Re: libglademm signal_connect?



Il giorno sab, 01-01-2005 alle 00:16 -0800, leyland needham ha scritto:
> Like instead of having to get the widget and signal connect it
> yourself, do something like this :
> GladeXml->signal_connect( "HandlerName", ptr_fun(&my_signal_handler));
> GladeXml->signal_connect( "Handler2Name", mem_fun(foo,&CFoo::bar));
> 
> Would this be out of scope for the libglade wrapper?
In libglademm cvs there is connect_clicked()

Usage from VariablesMap example:

  //Connect button's signal handler:
  //Glade::Xml::connect_clicked() is a convenience method, which has
nothing to do with the VariablesMap.
  m_refGlade->connect_clicked("button", sigc::mem_fun(*this,
&ExampleWindow::on_button_clicked));
  m_refGlade->connect_clicked("file_new", sigc::mem_fun(*this,
&ExampleWindow::on_file_new));
  m_refGlade->connect_clicked("file_exit", sigc::mem_fun(*this,
&ExampleWindow::on_file_exit));
  m_refGlade->connect_clicked("help_info", sigc::mem_fun(*this,
&ExampleWindow::on_info));

Hi,
	Alberto




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