Re: [gtk-list] gtk from file ?



On Sat, 11 Jul 1998, Andreas Jellinghaus wrote:

> after reading the gtk docs :
> what about writing a routine that can read a file and create the widgets and 
> set the callbacks during runtime ? speed isn't a big issue, as e.g. the main
> window is only created once. could increase flexibility a lot.
> is someone working on this ?

yes, i am. this is the main purpose of GLE. you read in a widget
tree description in lisp syntax and build up an internal tree of
container<->child relations ships, also you collect widget-specific
arguments that are contained by the description as well.

after the internal tree is build up, you call a specific function
on the toplevel node, and instantiate the gtk-widgets for each of the nodes.
this can be done multiple times, so you don't need to reread the description
each time you build a message box or somesuch.

> the only problem i see, is that the parser had to be changed for every new
> widget written, but maybe someone can find a solution for that.

actually a whole lot more is needed for this, i started out on the basic idea
about one and a half year ago, and still haven't gotten it into a publically
consumable state until now (mostly because of getting side-tracked by other
interesting things, and the intend to cleanly seperate builder and toolkit
specific stuff, thus implementing object arguments and child arguments
within gtk itself). the basic idea of the object/child arguments is to
provide a _generic_ interface to all widgets that features all of their
possibilities (i once started out on a widget-specific builder, called GUBI,
but dropped that approach after a while).

> 
> andreas
> 

---
ciaoTJ




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