Re: Pluggable widget types and implementations

On Fri, 1 Dec 2006, Damon Chaplin wrote:

On Tue, 2006-11-28 at 14:53 +0100, Tim Janik wrote:
Hey all,

this is a proposal for allowing pluggable widget types and implementations,
assorted bug report:

How about a sort of widget/object factory?

So you'd set the default implementation for a type:
 gtk_object_factory_set_default_implementation (factory,

And then in the widget/object xxx_new() functions instead of calling
g_object_new() they call:
 gtk_object_factory_create (factory, GTK_TYPE_LABEL, ...);

that sounds much like the alternative GFactory i suggested in another reply:

Does that work?

Applications could then use different sets of widgets for different
parts of the interface, just by switching the default factory:
 gtk_set_default_object_factory (factory);

the only differences i see are that you didn't introduce the factory at GLib level, and that you seem to advocate multiple factories.
i'm not quite sure why though, can you give more concrete examples on
why i would want to switch factories at all?



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