Signals



Hello,
I am quite new to gtkmm, working with it only for few weekends. I was using signals for Buttons, CheckButtons, etc, working fine. But I also used signal for Gtk::Paned in the way:

myHPaned.signal_button_press_event().connect(sigc::mem_fun(*this, &MyMain::onHPanedClick));

My intention is to detect double click on divider between left and right part of this HPaned and respond to it in some way. That's working (checking GdkEventButton's type in onHPanedClick). But in right part of this HPaned I have Frame (added by pack2) and in this frame I have Gtk::Notebook. I just realized that double-clicking on this Notebook's pages' captions calls onHPanedClick too. I didn't know that connected signals are sent to all children widgets too. Is that so or do I connect signal in some wrong way? And second question - what's the proper way to detect if the double-click was made on the HPaned itself (well, on the divider in the middle to be correct) and not on its children? Should I somehow use GdkWindow *window in GdkEventButton parameter received by onHPanedClick?

Thanks,
Martin


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