[Glade-users] Glade-3 and derived widgets

Magnus Danielson wrote:
I make a few assumptions, which may be far off, so please point that out if

I assume that I can provide my XML file with the glade-catalog of my objects.


I assume that I the XML file is sufficient to bind the widgets and its events.

Not exactly; the actual object/widget needs to be visible to glade-3; usually
you'd achieve this by providing a support module that implicitly links
to the library containing the object.


glade-3 --> dlopen'd glade-gnome.so via the catalog reference
glade-gnome.so --> Implicitly compuled with "-lgnome"

Once glade-3 has a way to instanciate your object; all the properties
should be automagicly editable in the glade-3 tool.

I assume that I can inherit and object from another XML file.

Yes, there is a dependancy chain though; in the xml file you can
declare depends="gtk+" and this will ensure that the gtk+ catalog
will be loaded before yours (and then inheritance will work properly).

(I seriously need to update glade3/widgets/adding-widgets.txt which
"should" cover all of this)

I assume that I somehow need to build a library hold the functionality of my
new widgets.

This library typicly will only provide support for non-standard object
behaviour, like if you have objects that parent other object which
are not GtkWidget or GtkContainer; or if you have parameters to implement
that are not implemented via GParamSpec/g_object_install_property.

I assume that I can then use this environment to acheive the same kind of
Glade-3 widget compositing as I can do with previously known objects, create a
glade XML file which then libglade is able to execute correctly including my
privately added widgets.

Yes. Released versions of libglade will allow you to:
     - glade_xml_register_widget(), which should also be a one-liner assuming
       your code operates purly with GtkContainer->GtkWidget parenting and
       with introspectable properties.
     - Add "build_widget" and "build_children" and "set_custom_property" support
       to any objects that need any special-casing.

If this is within the vision but not quite there, what is missing (i.e. is
there something where I may help out)?

It seems like not all objects are there with all their events. Right?

Most of the Gtk+ objects are implemented, there is still some minor
enhancements to make on that front:
     - Add non-widget objects like GtkAdjustment & GtkSizeGroup
       (underlying framework for this is layed out and thoroughly tested,
        just need to add the special-casing code).
     - Make a toolbar editor (which should be a sinch since we can
       now copy Juan's excelent work on the menubar editor).
     - Possibly make a treeview, icon-view etc. editor(s) supporting
       child TreeViewColumns and thier child renderers... which could
       easily work but would just take some time to write the editors.

No other catalogs are implemented ATM (like gnomeui or gnome-db).


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