From: Avi Bryant Date: 2001-01-20T16:34:42+09:00 Subject: [ruby-talk:9585] Re: glade-ruby On Sat, 20 Jan 2001, Dave Thomas wrote: > Never having used it, can I ask a stupid question?� Glade seems bound > to Gtk: you use Gtk widget class names in the XML, for example. > > If we were doing this work, is there any way of putting an additional > layer of abstraction on top of this, so we could use the same .xml > files, but use them to drive different toolkits (such as FOX or Qt)? The glade file format is extremely bound to Gtk; not only in terms of classnames, layout mechanisms, etc, etc, but also that the whole "signal" system is somewhat unique to gtk - it may map to similar concepts in other toolkits, but not near closely enough to effectively reuse the files. But even if it were more technically feasible, I'm not convinced an abstraction at that level would be useful. I find graphic toolkits very idiomatic things, and good design for one UI paradigm may be very awkward in another; I think an interface design is always going to need to be geared towards the context (OS, toolkit, domain) it is intended for, to a much greater level of detail than a cross-toolkit description could provide. However: most of the work I do with graphic interfaces is at a much more abstract level, and I think some very interesting work could be done there. In Objective-C, I've developed a sort of adhoc meta-toolkit (or something) to keep an object graph in sync with (in this case) a gtk interface. For the stuff I'm doing, it's rarely necessary to go down to the level of actually interacting with widgets, and so it could in theory be based on any toolkit (although a good interface builder like glade, and a way to load the interface dynamically like libglade, is essential). avi