Re: custom widget example



In my previous mail the widget had the GTK_NO_WINDOW widget flag set, Widgets without a window render themselves into their parent container's GdkWindow.
When i unset this flag (using unset_flags(Gtk::NO_WINDOW); ) the widget gets painted correctly but i must call the expose function manually, because the widget does not receive an expose event anymore.
 
 
When the GTK layer receives an exposure event from GDK, it finds the widget that corresponds to the window which received the event. By definition, this corresponds to a widget that is not a GTK_NO_WINDOW widget. First this widget paints its background, and then, if it is a container widget, it tells each of its GTK_NO_WINDOW children to paint themselves. This process is applied recursively for all the GTK_NO_WINDOW descendants of the original widget.
There are some widgets with no associated GdkWindow; these are called "no window" widgets, an allusion to the GTK_NO_WINDOW flag that marks them. (You can test this flag with the macro GTK_WIDGET_NO_WINDOW().) Widgets without a window render themselves into their parent container's GdkWindow.
 
Note that this process does not get propagated to widgets which have windows of their own, that is, to widgets which do not have the GTK_NO_WINDOW flag set. If such widgets require redrawing, then the windowing system will already have sent exposure events to their corresponding windows. As such, there is no need to propagate the exposure to them on the GTK+ side
 
So the problem is that the windowing system doesn't send an expose signal to the widget
does anybody how i should change the widget so that it does?
 
Marco,
 


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