Re: Layout Composite Widget Components Using Glade-3? / Pluggable widgets replacement for Glade custom widget?



On Thu, Oct 16, 2008 at 10:01 PM, Daniel Yek <dyek real com> wrote:
Hi,

I have been wondering, if I were to create a (custom) composite widget to
contain several standard GTK+ widgets from within a larger Glade project, is
there a way I can keep both the application layout and the composite widget
layout in the same Glade-3 project? (It is nicer if all widgets appear in
the same design view.)

Do I have to use the custom widget in Glade (which is marked as deprecated)
to create composite widget? Is pluggable widget the replacement mechanism
for custom widget?

I read a little about pluggable widgets, but I'm not familiar with creating
pluggable widgets and I am likely not able to spend time on that. How much
additional time is needed to turn a custom widget into a pluggable widget?
Is there a generic mechanism that automatically turn a custom widget into a
pluggable widget where it might be possible? :-)

I'm just trying to figure out how to best create and use composite widgets.
Ideas and advice are appreciated. Thanks.

Well, in trunk you are allowed non GtkWindow toplevel objects, and you are
allowed to use a more lax naming scheme - so it can be as easy as defining some
widget layouts in glade... and then the art is how you parse it with gtkbuilder.

you should be able to use builder first to build your main window, and then
go back in the file and build your other "composed" widgets seperately,
and just add them to your interface with gtk_container_add() yourself.

Glade can also integrate your own real custom GtkWidget derived object
into the runtime, thats why we deprecated the old custom widget hook.

Cheers,
                    -Tristan



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