Re: Default signal handlers






On Thu, Apr 18, 2013 at 2:55 AM, אנטולי קרסנר <tombackton gmail com> wrote:
Hello,

I'm a gtkmm user and I'd like to write signals for some of my classes. I
noticed gtkmm widgets have default handlers, which are virtual protected
class methods. I want my classes to have them too for consistency, but I
couldn't figure out from the source code, how exactly they are
implemented.

don't confuse the use of sigc++ to wrap GObject signals with using sigc++ signals "from scratch".

adding your own signal to a class is as simple as adding a declaration like:
 
          sigc::signal0<void> mySIgnal;

to the class declaration. such a signal has no handlers unless things connect to it, and no notion of a default handler.



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