On Thu, 2009-08-06 at 22:45 -0400, Paul Davis wrote: > On Thu, Aug 6, 2009 at 8:47 AM, Renato Merli<[email protected]> wrote: > > class myCtn : public Gtk::Fixed > > { > > > > public: > > Gtk::Button btn; > > int x, y; > > > > bool on_configure_event (GdkEventConfigure *e) > > only top level windows receive configure events.
The following excerpt from this (old?) event docs: http://developer.gnome.org/doc/GGAD/sec-gdkevent.html, seems to say something different (see the last paragraph of the excerpt): > Window Change Events > As a GdkWindow is shown, hidden, resized, or destroyed, events are > emitted. > > Configure events indicate that the size or position of the event > window has changed. They include the new size and positon of the > window: > > typedef struct _GdkEventConfigure GdkEventConfigure; > > struct _GdkEventConfigure > { > GdkEventType type; > GdkWindow *window; > gint8 send_event; > gint16 x, y; > gint16 width; > gint16 height; > }; > > All widgets receive this event (since GDK_STRUCTURE_MASK is > automatically in the event mask), but the widget size allocation > system already conveys the necessary information. That is, most > widgets resize their GdkWindow themselves in response to a size > allocation; configure events just report back the resize---not very > useful. There are two notable exceptions. First, the toplevel > GtkWindow widget is in charge of initiating the size allocation > process, and has no parent to get an allocation from, so it monitors > configure events to determine its size allocation. When you resize a > GtkWindow using its window manager decorations, it will receive > configure events and act accordingly. The second exception is > GtkDrawingArea. GtkDrawingArea sends itself a configure event when it > receives its size allocation. This is convenient, since you will > usually want to repaint the contents of the drawing area if it is > resized. Like all "fake" events GTK+ creates, send_event will be TRUE > for this configure event. -- José Alburquerque _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
