Re: Help with retreiving children?



-> I am creating an app using GTK+... I don't like global variables, or
-> exporting large numbers of variables to implement functionality.

	Standard object-oriented design says to write _set_ and _get_
functions for each variable you wish to have publicly r/w.  I.e.,

gint config_page_get_varname(ConfigPage *cfg_page);
void config_page_set_varname(ConfigPage *cfg_page, gint value);

	...assuming varname makes sense as an int.  Of course, just write
_get_ fxns if it's read only.


--Derek


-> I'm thinking something along the line of using a function on the top-level
-> widget to return a pointer to the requested child-widget (requested by
-> name, since I did name all my widgets, and whats the point of names if
-> this isn't it?)
-> 
-> So if there's any functionality like this, or other suggestions, it would
-> be greatly appreciated.  I've been through the docs, unfortunately they're
-> a bit sketchy on the more complex topics.
-> 
-> 
-> 
-> Thanks loads,
-> 
-> Leeman 
-> alaric@portone.com
-> 
-> 
-> _______________________________________________
-> gtk-list mailing list
-> gtk-list@gnome.org
-> http://mail.gnome.org/mailman/listinfo/gtk-list
-> 







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]