Re: Probleme with Release button event.
- From: Ian Martin <ian_martin65 yahoo com au>
- To: Florent Blanchon <florent blanchon gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Probleme with Release button event.
- Date: Sat, 10 Oct 2009 01:58:54 -0700 (PDT)
Hi Florent,
Not exactly sure how you connected your signal handler. The code I used was this:
I connected a signal handler to the DrawingArea with
Grid *area =Gtk::manage(new Grid());
area->signal_event().connect(sigc::mem_fun(*area, &Grid::on_event_happened));
Grid is a class derived from a Drawing area.
In the on_event_happened() method(declared: bool on_event_happened(GdkEvent *event); )
I then just went looking for the event type I was looking for and defined the effect:
if (event->type == GDK_BUTTON_PRESS) {
It compiles and runs.
The enum list for events is in
file:///usr/share/doc/libgtkmm-2.4-doc/reference/html/group__gdkmmEnums.html
so long as you've got the gtkmm docs installed. It looks like you've already found it.
Ian.
From: Florent Blanchon <florent blanchon gmail com>
To: gtkmm-list gnome org
Sent: Tue, 6 October, 2009 8:18:13 AM
Subject: Probleme with Release button event.
Hello all.
I'm doing a chess board, so I'm using a Drawing Area.
I'd like to activate release button event.
But even by connecting my signal handler ( signal_button_release_event() ) and set_events(...), I can't get the event.....
Is someone can help me ?
Thanks.
Flo
Get more done like never before with Yahoo!7 Mail.
Learn more.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]