Re: help with GtkStyles

On Thu, 26 Jul 2001, Paul Davis wrote:

> >can anybody tell me if each widget has its own GtkStyle structure/object
> >or do all the widgets in an app share the same? 
> AFAIK, styles have names. all instances of the same-named style use a
> single shared object.
> >The reason I'm asking is that I've been doing some work in php-gtk (Gtk+
> >bindings for php) and have come across the case where modifying the style
> >of one widget (in this case a CList) also effects the others (a CTree and
> >a GtkText) unless I specifically copy the GtkStyle, modify the copy
> >and then change the widget's Style to be the new GtkStyle.
> Yep, thats precisely it. I think :)

OK, so unless I specifically make a copy for each widget then I should
assume that all
widgets in the app are going to access the same GtkStyle object and any
changes to that object are going to be 'global'.

OH, one more thing, if I modify this GtkStyle object, must I notify the
widget(s) of the change, or is that handled already by Gtk/Gdk.

thanks, things make much more sense now.


Rich Payne
rpayne alphalinux org

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