Button_ release/pressed_event in DrawingArea
- From: Kees Kling <ckling upcmail nl>
- To: gtkmm-list gnome org
- Subject: Button_ release/pressed_event in DrawingArea
- Date: Sat, 15 Jan 2011 16:33:15 +0100
Hi,
I'm dispkaying an image in a Gtk::DrawingArea and I try to catch some
mouse events
so I did:
snippet
Gtk::DrawingArea drawingRegion = manage ( new Gtk::drawingArea());
drawinRegion->set_events(drawingRegion->get_events() |
Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK |
Gdk::BUTTON_RELEASE_MASK );
drawingRegion->signal_expose_event().connect(sigc::mem_fun(*this,&imageModule::on_expose_event));
drawingRegion->signal_scroll_event().connect(sigc::mem_fun(*this,&imageModule::on_scroll_event));
drawingRegion->signal_button_release_event().connect(sigc::mem_fun(*this,
&imageModule::on_button_release_event));
My signal handler is;
bool imageModule::on_button_release_event (GdkEventButton* event) {
cout<<"releasing in imagemodule"<<endl;
return false;
}
but this is never called.
You can also see that I also connect expose_event and scroll_event and
both work.
What am I doing wrong
Thanks
Kees Kling
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]