Re: [gnomemm] libglademm / widget templates



Murray Cumming Comneon com writes:

> > I've been wanting to write about this for some time. We need 
> > a good "programming with libglademm" tutorial. I'm prepared 
> > to write one. Murray, what do you think? Should it be 
> > included on www.gtkmm.org? If so, it is perhaps best to write 
> > in Docbook XML (?), else I'll just write in XHTML and put it 
> > on my home page.
> 
> There is already some stuff in the gtkmm book, because I think libglademm is
> essential to gtkmm development:
> http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch19.html
> Feel free to patch the book.

Hah, completely missed that. I'll have look at it.


[...]

> >   - how to structure an application sensibly with libglademm supplied
> >     widgets
> 
> Not sure. I've done a bit of that.
> 
> I feel your aggregation thing is questionable, but I'm not sure why. Maybe I
> don't like the idea of having a class called *Window that isn't derived from
> a Window. I don't have an alternative.

I agree it is a bit unusual. But OTOH it doesn't really claim to be a
Gtk::Window. I personally feel uncomfortable inheriting from the
various widgets since I'm not sure of what I get. And so far, the only
things I've needed from other classes of the Gtk::Window interface is
show()/hide()/raise() and a window pointer for set_transient_for().

What do others do? It's part of the basic structure of a
libglademm-enabled application so it's important to get right.

Another option is to derive from Gtk::Window and then just load the
window contents from the XML. But then you need to put window layout
code in the constructor, though it doesn't amount to terribly much.
IIRC that's what you do with PrefixSuffix?

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



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