[gtkmm] Libglademm autoconnecting callbacks
- From: Daniel Serpell <daniel atmlab utfsm cl>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: [gtkmm] Libglademm autoconnecting callbacks
- Date: Fri, 5 Sep 2003 16:40:37 -0400
El Fri, Sep 05, 2003 at 09:37:42PM +0200, Murray Cumming escribio:
>
> http://sourceforge.net/projects/libglademm/
>
Ok, I downloaded libglademm-0.2.1 and read the sources, but the method
used to autoconnect is very different that we are talking already.
Basically, the autoconnect function does a search of a C (not C++)
symbol if the callback given in the XML file is prefixed by a
given string.
If not, a new entry in a map<string,signal_handler> is created, with
a proxy function that can be called by Gtk+ C code and calls back
to a sigc++ slot.
The idea is that the user have to fill this map, connecting each
of the signals stored in it to the correct handler, at runtime,
see the doc's in xml.h:
// The 'signal_name' parameter is a free-form string, which matches the
// callback set in the *.glade file. Thus the string and callback names
// do not need to match, and you can tie multiple "callbacks" to the
// same function.
xml.signal( "other_callback_name" ).full.connect( slot(my_full_callback) );
So, there is no marshalling in the code :-(
(perhaps you were reffering to other sources, then please hint me).
Daniel.
- References:
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
- Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]