Resources?



There's been a lot of talk on this list about accessing internal data items
directly or with a specific function.  Coming from an Motif background,
what about adding Resources for a GTK+-1.4 version, with a 
get_resource and set_resource routine.  The widgets then just have
to define a table that maps the data in the structures to the resource.
Once done, then you don't have to have a separate function for
every resource you want to modify or read. Plus you still maintain
the OO encapsulation.

For backward compatibility, modify the existing specific 
functions (ie. gtk_toggle_button_get_active() could be just call
gtk_widget_get_resource (w, "active") )

Overall I much prefer GTK over Motif, but there are
some things that I think we could learn from Motif, 
and this could be one of them :)

Regards,

Steven Rostedt



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