glade project mini-rfc



Hi gtk+ developers,
    I'm currently looking into the glade project and was hoping to solicit your 
attention on some design issues.

I have two goals with glade3
    o Bring glade3 to a minimum usibility standard (i.e. our graphic
      artist needs to be able to use it when I'm done).
    o Make glade3 more flexable in regards with custom properties,
      container implementations and types (i.e. I'd like to be able
      to build GObject derivitives and not only GtkWidget derivitives).
      Essentialy this goal is to make is simple and possible to extend
      glade with new widgets without nescisarily modifying the core.

    The first goal is self-explanitory, here are my initial feelings on how
to go about this second goal:

glade3 uses an xml catalog of widgets to define:
    o The object metadata (i.e. class name)
    o Any properties that can not be set/get by introspection through 
      the type system (and the functions used to get/set them)
    o Any properties that are not really widget properties but are
      needed for the glade environment.
    o Some extra stubs to be called before and after the Object's creation.

libglade offers an API for a similar purpose, like so:
==============================================================
void glade_register_widget (GType                      type,
                            GladeNewFunc               new_func,
                            GladeBuildChildrenFunc     build_children,
                            GladeFindInternalChildFunc find_internal_child);

void glade_register_custom_prop (GType                      type,
                                 const gchar               *prop_name,
                                 GladeApplyCustomPropFunc   apply_prop);

==============================================================

The approach I'm thinking of taking is, put simply; to add everything
else needed to the xml catalog, this would imply:

    o Signature of a "add child" function; allowing for the standardization
      of packing proceedures such as gtk_fixed_put and allowing for GObjects
      to contain other GObjects without them being burdened by the bulk of
      GtkWidgetClass (off-hand this could apply to cases where a GtkScale
      holds a GtkAdjustment, or some specific cases of my own).
    o Signature of a "new func"; I cant think of anything off-hand, but I'm sure
      a quick reference to glade-gtk.c in the libglade project will yeild an
      example or two.
    o Signature of a "forall func"; allowing glade to write the xml nodes of
      children that dont nescisarily belong to a GtkContainerClass
    o Name of module containing these stubs and possibly the name of the library
      containing the widget kit (so that glade doesn't need to be
relinked in order
      to add widgets).

I'll try to log in on the weekend but I'll be back on monday at the latest.

Any comments, sugestions, ideas, flames, encouraged ;-)

Cheers,
                                                                    -Tristan

PS:
    Would send this to glade-devel ximian com but it seems to be broken
right now, also it seems pretty dead over there :-/



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