Re: [gtkmm] About constructor's parameters using libglademm



> When using libglademm to load "some_ui.glade" file:
> (1) I don't know why the signature of Class's Constructor should be like
> the example below.

Because that's the signature that's needed by the get_widget_derived()
template.

> (2) i know cobject will be passed to Gtk::Dialog, but what is passed to
> cobject and refGlade?

As described here
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch19s03.html
cobject is something that you need to provide to the base constructor.
It's annoying that you need to do that, but you do.

refGlade should be used to get_widget() or get_widget_derived() the child
widgets. You almost always need to access some child widgets if you are
using a derived container with libglade.

> (3) and when these happen?

The constructor is called when you call get_widget_derived().


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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