Re: [gtkmm] Detecting double-click in a treeview and more
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Detecting double-click in a treeview and more
- Date: 12 Apr 2003 14:48:02 +0200
Paul Davis <paul linuxaudiosystems com> writes:
> >> true. just be warned that if you have a handler for a single press
> >> and/or single release, these will be executed before the one that sees
> >> the 2 button press. this can get gnarly, quite rapidly.
> >Doesn't connect_notify() take care of this?
> i don't know what that does. my comment is based on GTK+-level
> experiences and some GTK+ documentation (can't find a URL right
> now). the order of events generated for a "double click" is:
> button-press (ev->type == GDK_BUTTON_PRESS)
> button-press (ev->type == GDK_2BUTTON_PRESS)
> what does connect_notify() do?
I don't think it can fix a situation where you register more than one
callback, but it is easier to use since you don't have to pass false
(or is it true? I forgot) to the extra hidden parameter in connect,
and don't have to return anything from the handler.
void MainWindow::on_treeview_clicked(GdkEventButton *event)
if (event->type == GDK_2BUTTON_PRESS)
] [Thread Prev