Re: [gtk-list] Repeat: Clicking on widgets - consistency question




On Wed, 2 Jun 1999 andrew@cogent.ca wrote:
> 
> Type 1:  On a type 1 widget, the widget gets the button press, and my
> callback runs normally.  No other widget gets the press event.  Example:
> GtkButton with a GtkFixed parent.
>

GtkButton "handles" the event by returning TRUE from its handler so the
event isn't propagated to the parent.
 
> Type 2:  The widget gets the button press event, but so does the
> widget's parent.  This is not affected by stacking, as I can stack two
> type 2 widgets as siblings, and only the clicked widget and its parent
> get the event.  Example: GtkEntry with a GtkFixed parent.
> 

GtkEntry returns FALSE, indicating that its parent should also get the
event.

> Type 3:  No widget gets the button press.  It is ignored by all widgets,
> even if the widget's parent is the same parent that got the event in the
> Type 2 case.  Example: GtkCheckButton with a GtkFixed parent.
> 

GtkCheckButton should emit button press, I can't think of what's going on.
Otherwise the same as GtkButton above.

> I believe that all widgets should be Type 1 widgets.  Is there a
> compelling reason why they are not?
> 

Often you don't want the same button press to do multiple things, for
efficiency and UI reasons.

Havoc



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