Jump to content

Expanding the style concept


Sting

Recommended Posts

Currently the widget style only covers color elements.  I have built a table widget, a list widget already exists, and I plan to build others that have the need for at least one but maybe two alternative fonts.  If more then one of these types of elements are on the same page it is left to the implementer to make the right choices to keep a consistent interface.

The table has a title and a header, the list should have a header.  And I will build a grid that is like a table but is cell oriented.  

What I was thinking was something like:

#if GWIN_NEED_TITLE
  gwinSetStyleTitleFont (...
  gwinSetStyleTitleBackground (...
  gwinSetStyleTitleJustify (...
#endif

#if GWIN_NEED_HEADER
  gwinSetStyleHeaderFont (...
  gwinSetStyleHeaderBackground (...
#endif

Expanding the style concept would allow interfaces to be more consistent.

Currently the table widget has the concept of even/odd background color for the rows and the list widget should have the same.  If this could be conditionally added to the style then it would be straight forward for the implementer to create a consistent interface.

Both the list widget and the table widget need to specify what kind of scrolling to enable for the device.  How this is handled needs to be figured out, but the scrolling could be in the style with a switch like GWIN_NEED_SCROLL  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...