Re: Widget states for 3.0 (and 2.18?)



On Sun, 2009-08-16 at 14:48 -0500, Cody Russell wrote:
> 
> Sorry, I totally messed this up.. those are widget flags, not state
> flags.  The state flags API hasn't gone in yet.
> 
> Ignore this part, except for the gtk_widget_get_state() part and the
> rest of the message. :)

I've been thinking about this from the point of view of a third party
widget drawing library (i.e. pretty much starting on a clean slate).

I think the current GTK+ states are correct as an enum. They are single
user or application activatable states of which the widget cannot be in
more than one state at once (normal, insensitive, active, prelight).

What we talked about at the hackfest was that there is often further
"state like" information that is needed for drawing the widgets. Some
times a widget can be in multiple of these states (plus their
GtkStateType) so I have called these "drawing flags". For example, a
widget could be focused and checked. So it would make sense for this
information to be stored in a bitfield.

Therefore, for my widget drawing library, I've decided on having two
separate properties for these datum; a state enum and a flags bitfield.

Regards,

Thomas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]