Re: [gtkmm] catching doubleclicks
- From: Paul Davis <pbd op net>
- To: RevX gmx at
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] catching doubleclicks
- Date: Fri, 30 Aug 2002 14:54:48 -0400
>Hi,
>
>do I need an eventbox (in a normal button) to catch a doubleclick or is the
>a more simple solution to it???
>
>I've tried the following without an eventbox:
>button6->clicked.connect(SigC::slot(static_cast<class
>setuphelpwindow*>(this), &setuphelpwindow::on_helpaboutbutton_clicked));
>and alternatively also
>button6->button_press_event.connect(SigC::slot(static_cast<class
>setuphelpwindow*>(this), &setuphelpwindow::on_helpaboutbutton_clicked));
>in conjunction with my callback routine:
>void setuphelpwindow::on_helpaboutbutton_clicked(GdkEventButton *ev)
>{
> if (ev->type == GDK_2BUTTON_PRESS)
> cout << "double clicked" << endl;
>}
>but it doesn't compile fine and I don't know what the problem is! (Is this
>approach any useful anyway?)
>Can someone please tell me what I'm doing wrong (and give me hints on what
>to fix)? Thank you!
there are several button-related signals.
clicked
button_press
button_release
the clicked form does not deliver a GdkEvent to the handlers, and
doesn't require them to return a value.
the press and release forms do deliver a GdkEvent, but expect a return
type of gint.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]