[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Widget management
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: "gtk-app-devel-list redhat com" <gtk-app-devel-list redhat com>
- Subject: Re: Widget management
- Date: Fri, 6 Nov 1998 10:03:52 -0600 (CST)
On Fri, 6 Nov 1998, Eric Faurot wrote:
>
> If I call gtk_widget_destroy(wdg), are all the sub-widgets
> attached to wdg destroyed too?
Yes, all children of containers get destroyed.
> (If so what if I attach a
> widget to two others?)
You can't do this, a widget can only display in one place on the screen.
You can add refcounts to the widget though to keep it from dying.
> I don't quite understand ref and unref. Is there a kind
> of garbage-collection in the gtk_main loop?
>
No, it's simpler than that; it just keeps a count of ref's and when that
reaches zero does a destroy. You can ignore these most of the time.
Look at refcounting.txt in the docs directory of gtk+.
Mostly if you add every widget to a container, you only need to worry
about destroying toplevel windows.
Havoc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]