|
Hi! I'm seeking information on widgets destruction process. And I'm wondering what,
exactly, is a TOP-LEVEL widget, :) i have searched through a lot of sites and
documentations and they are a bit confuse about whats a top-level widget truly means.
For example, i found this statement:
1) If the widget "owns" any widgets other than its child
widgets, (for instance popup windows) it should
call gtk_widget_destroy () for them.
In another site (developers section at gnome site):
* In practice, this means that you only have to destroy toplevel widgets;
any widgets that are inside a container will be destroyed along with the container.
Ok at this point i figure out to myself that ANY gtk component child of GtkContainer
is itself a TOP-LEVEL widget, but in GtkWidget section (gtk_widget_destroy) i get:
...
* In most cases, only TOPLEVEL widgets (WINDOWS) require explicit destruction,
because when you destroy a toplevel its children will be destroyed as well.
So, i guess, I get it right. A TOP-LEVEL widget is, ANY, widget child of GtkContainer, and
this note (WINDOWS) in gtk_widget_destroy docs is just an example :)
NOTE: I looked at an pygtk site that states:
...
* If the widget is a toplevel (derived from gtk.Window ), it will be removed
from the list of toplevels...
This is very weird! :)
So, am i wrong about (TOPLEVEL == any GtkContainer) or not? :) Thanks!
|