Re: [glade--]TreeView and button_press_event
- From: Fabrice Colin <fabrice colin ntlworld com>
- To: glademm-list gnome org
- Subject: Re: [glade--]TreeView and button_press_event
- Date: Fri, 07 May 2004 18:34:36 +0100
Fabrice Colin wrote:
> Christof Petig wrote:
>> Besides that I never heard of connect_notify() - can you explain the
>> difference?
>>
> The only thing I know about it is from the explanation given by Murray
> Cummings in the bug report I mentioned.
> With connect(), it is first passed to the treeview/renderer (where,
> unfortunately, "the standard handler stops the further handling of the
> signal", ie it is not delivered in turn to the user's handler),
> whereas with connect_notify(), the event is passed to the users's
> handler first and then to tthe treeview.
> Using connect_notify() ensures the application gets the
> button_press_event message.
>
I found another page that mentions connect_notify(), this time a tutorial :
http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch08s07.html
The interesting snippet is :
...
class TreeView_WithPopup : public Gtk::TreeView
{
public:
TreeView_WithPopup();
virtual ~TreeView_WithPopup();
protected:
// Override Signal handler:
// Alternatively, use signal_button_press_event().connect_notify()
virtual bool on_button_press_event(GdkEventButton *ev);
...
Fabrice
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]