Probleme with Release button event.

View: New views
2 Messages — Rating Filter:   Alert me  

Probleme with Release button event.

by Florent Blanchon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Probleme with Release button event.

by Ian Martin-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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@...>
To: gtkmm-list@...
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.
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list