Re: [gnomemm] libglademm / widget templates



"C.J. Collier" <cjcollier colliertech org> writes:

> I'd like to use glade to define my UI, but I've got a lot of widgets
> that I plan on using as a template.  As an example, Gimp's image
> window is used many times in a single application.  I want to be able
> to clone widget hierarchies, give them different names, and stick them
> back in the libglade XML tree.  Is this possible?  Murray suggested
> that I re-open the .glade file and extract the widget each time I want
> to duplicate a widget branch.

I think it is mentioned in the documentation for libglade that the
library will cache the parse trees. Take a look at this:

  http://developer.gnome.org/doc/API/2.0/libglade/libglade-embedding.html

For example, everytime you needed a "minor_window", you could do

  Gnome::Glade::Xml::create("my.glade", "minor_window")

to create to widget hierarchy. Isn't this what you want?

-- 
Ole Laursen
http://www.cs.auc.dk/~olau/



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