Re: Pluggable widgets II

Tim Janik <timj <at>> writes:

> >  - How does this work for application derived types?
> >
> >    e.g. if vino derives from GtkLabel to make a label which looks like
> >    a clickable URL, then even if it is instantiated using
> >    g_factory_create() a gtk theme module will not be able to replace
> >    it given the fact it does not have access to the derived gtype
> a theme has many other means to affect widget look or behavior.
> it is not meant to appoint new widget types. or - if you have a
> use case for this, please elaborate.

I just talked on IRC about this with Tim, and he made me repost the points of
our discussion here, so here they are:

- This API is very powerful, but may result in weird behavior if it is not
clearly defined who is supposed to use these appointments. If vendors, theme
authors and application writers start appointing the same types to different
implementations, it can easily result in chaos. So it might be very important to
clearly define the intended audience for this API and state it at least in the
documentation. (side note: theme engine authors write very crazy code and they
use all the APIs there are in very "innovative" ways - just so you know ;))

- If theme authors were supposed to use this API, a lot of crazy (and
reasonable) ideas could be implemented. Of the top of my head (from reasonable
to crazy):
- make GtkMenuItem fade in and out the selection highlight
- make GtkMenu (or other widgets) translucent
- create morphing effects when switching tabs in GtkNotebook
- make WnckPager really pop up new windows and do the minimize animation
- implement WnckPager as a cube (think compiz)
- use animations for all sorts of transitions in widgets (let GtkMenus fall down
for example)
If I took 5 more minutes, I could probably come up with 20 more ideas.

- This API seems problematic wrt subclassing. If I subclass GtkAboutBox in my
application for some simple change it won't pick up the appointing of the about 


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