When using the form:
Glib:signal_io().connect(sigc::ptr_fun(MyCallback), read_fd, Glib::IO_IN);
can the MyCallback in ptr_fun(MyCallback) be a member function?



klaus triendl wrote:
[email protected] schrieb:
  
In Chapter 21 of the documentation, in the Monitor IO section, the
signal connection statement is:
   Glib:signal_io().connect(sigc::ptr_fun(MyCallback), read_fd,
Glib::IO_IN);
Can this be done with member functions using something like:
   Glib:signal_io().connect(sigc::mem_fun(MyCallback) . . .
or can "MyCallback" be a member function?
    

Yes, it can be a member function.
Depending on from where you connect to the signal, exchange 'this'
appropriately:

Glib::signal_io().connect(sigc::mem_fun(this, &MyClass::MyCallback), ...);



Klaus

  

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to