Re: New widget - style inheritance?



Neil Bird <neil fnxweb com> writes:
> Havoc Pennington wrote:
> > Use the functions in gtkpaint.h to do your drawing when possible, and
> > if that isn't possible (there aren't functions there to draw triangles
> > for example), use the colors and graphics contexts in widget->style.
> 
>   Won't that give me the paint-area's default style values, though? They
> /should/ match, but I wouldn't want to assume anything about a user's
> style. I suppose I can always (a) create a transient button, read it's
> style, and delete the button, or (b) create the widget as a fully-defined
> widget, cloned from the GtkButton widget code.
> 

You're drawing on a widget, right? So use widget->style from that
widget you're drawing on.

Havoc




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