RE: [gtkmm] libglademm



> From: Christer Palm [mailto:palm nogui se] 
> I've taken the route of creating my own Gtk::Window objects with a 
> constructor that looks up the guts of the corresponding window in the 
> Glade::Xml and reparents it to itself.

I've done this in the past, but I believe the get_widget_derived() method in
libglademm 2.1.0 is the new one-true-way.

> I also copy the basic 
> attributes 
> (such as title, etc) from the corresponding Glade::Xml window into my 
> own window.

You wouldn't have to do this with get_widget_derived().
 
> 2. Connecting signals
> 
> To connect a signal, I need about 5 lines of code for each 
> signal (given 
> that I want to avoid a segfault if the widget can't be located in the 
> Glade::Xml).

libglademm will give useful warnings at compile time, so I tend to avoid the
null pointer checks. Nothing is going to work if someone has messed up the
.glade file. Anyway, an if() is just one line.

> I got quite disappointed to find out that Glade::VariablesMap, by 
> design, only works with entry boxes and checkbuttons

What else would you like to use it with?

Murray Cumming
murrayc usa net
www.murrayc.com 



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