RSS Reader Sections Auto-Size

The RSS Reader sections now auto-size. I decided not to use too much of the FLTK infrastructure. A Fl_Pack exists in FLTK that does much of what I’ve done in this release but the Fl_Pack does it better. Then why do custom auto-size? The reason is doing custom auto-size is one of the ways to validate that you have a solid understanding of the geometric dimensions provided by the graphics engine. I learned that I had read the FLTK documentation incorrectly and misunderstood the values I received from Fl:w() and Fl:h(). I spent a solid 2 or 3 days trying to work out some sizing issues due to the incorrect way I read the documentation.

Anyway, I didn’t do the auto-size specifically for the reason I stated earlier. I am striving for a more custom user interface with a dash of assistance from FLTK where practical. The goal is to have control over colors, fonts, and layout such as I would have if I was defining the user interface in Allegro or other video game framework. I am not using those frameworks as that would be too extreme (requiring an extensive amount of code) for the purpose of defining an RSS Reader. The auto-size goal helped with verifying that the core principle of generating the geometry separate from the graphics instructions works the way I saw it in my mind.

So far, everything is going well. The code shown below is a fully compilable version (there are no dependencies yet on the RSS Engine). You just compile it including the FLTK library binaries and you are good to go. The code is one amalgamation at present on purpose. The plan is to refactor it later into a more appealing form. However, this approach is an idea I came upon to speed up development in C++. Write everything in a single .cxx file and get all the parts working first then go all out organizing everything. As it stands, the strategy has increased by productivity tremendously. It was all handwritten in a text editor and separately compiled by build script in a command-line window.

Updated C++ Code


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.