[Glade-users] ? on lookup widget(...)
- From: james cameron compaq com (James Cameron)
- Subject: [Glade-users] ? on lookup widget(...)
- Date: Tue, 28 Aug 2001 09:05:18 +1000
G'day Mike,
The first argument to lookup_widget is a pointer to either the top level
widget or any other widget below it, in which the widget you want
exists.
The code needs to know which instance of the widget tree you are talking
about, in case you decide to have multiple instances of the same window.
The code takes the widget pointer you give it, explores up the tree to
find the parent without any more parents (the top level widget), and
then uses the values stored against that widget to find the widget
pointer for the name you provide.
If you had two or three instances of a window, the widget names would be
duplicated, and so the return value would be ambiguous. To prevent
this, the database of names to widget pointers is stored in the top
level widget that was returned by a create_widgetname() call.
Read the lookup_widget() code for more detail, and compare it against
the code generated for create_whatever().
--
James Cameron (james cameron compaq com)
http://quozl.linux.org.au/ (or) http://quozl.netrek.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]