Re: libglademm question
Viktor Dick <[email protected]> Thu, 09 Jun 2005 13:07:27 +0200
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Message-ID | <[email protected]> |
As far as I know libglademm does not support any Autoconnection and
ignores signal settings in the glade file. You have to connect the
signals to their handlers manually:
--------------------------------------------------------------------------
class myWindow : public Gtk::Window
{
private:
Glib::RefPtr<Gnome::Glade::Xml> m_refGlade;
Gtk::Button* button1;
public:
myWindow(GtkWindow*& cobject, const Glib::RefPtr<Gnome::Glade::Xml>&
refXml);
void onbutton1click();
};
myWindow::myWindow(GtkWindow*& cobject, const
Glib::RefPtr<Gnome::Glade::Xml>& refXml)
: Gtk::Window(cobject), m_refGlade(refXml), button1(0)
{
m_refGlade->get_widget("button1", button1);
if (button1) button1->signal_clicked().connect( sigc::mem_fun(*this,
&myWindow::onbutton1click));
};
--------------------------------------------------------------------------
I am just trying to write a code generation utility that does not
replace the whole glade file with gtkmm code (like the code generators
of glademm) but creates code like the above; the glade file ist still
loaded and parsed, but the signals (which are ignored by libglademm) are
connected in the constructor.
At the moment I do not have much time, but I'll try to finish the
project this month. If it works I will send a link to the mailing list.
M. David Wilson schrieb:
> I have a glade file that has signals and their handlers defined in the
> glade file. I was wondering if it was possible to a) find out where
> those handlers need to be or b) find out how to redirect them to a file
> of my choice. is this possible with libglademm?
> David Wilson
> _______________________________________________
> gnomemm-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gnomemm-list
>
>