LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   GTK and C : how to view list of gpointer children (https://www.linuxquestions.org/questions/programming-9/gtk-and-c-how-to-view-list-of-gpointer-children-247981/)

szparag 10-27-2004 12:00 PM

GTK and C : how to view list of gpointer children
 
hi.

i have a problem with getting list of GTK elements.
i'm using GLADE-2 to build interfaces and i have to configure callbacks manually.
this isn't so hard when i'm using simple pointers passing to callback functions, for example pointers to label or button. but i don't know how to get children list when i'm passing containers which contains more elements (for example: frame with label, text entry and image) ...

how to get list (and easy access) to GTK container children having his gpointer ???

pelatrix 12-10-2004 08:59 AM

Glade provides a function named lookup_widget.
Look at the code generated by Glade, and you'll find that every widget has a name and a relation with him parents.
Providing any reference in the tree and the name of the widget you want to look up for, lookp_widget will return to you the pointer to that widget.

Look at at prototype, and you'll understand.

Sorry about my english.


All times are GMT -5. The time now is 10:31 AM.