Re: themes & key bindings?



Skip Montanaro <skip pobox com> writes:
> Owen Taylor's theme architecture guide:
> 
>     http://www.gtk.org/~otaylor/gtk/2.0/theme-engines.html
> 
> doesn't mention key/button bindings at all.  Do themes only deal with the
> visual aspects of the user interface?

Yes. Keybindings are done with GtkBindingSet. GTK 2 uses binding set
fairly extensively, so there are lots of examples in the source.

> If I create a new widget for an application, what hooks (if any) do I need
> to provide to make it "themeable"?

Draw with colors in widget->style, be sure any computations based on
widget->style are recalculated either on size_request/size_allocate or 
in a style_set handler, use the gtk_paint_ routines to draw rather
than gdk_draw_ whenever a gtk_paint_ routine is appropriate.

Again, many examples in GTK source.

Havoc




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