catching a mouse scroll event on a Gtk::DrawingArea
- From: Rob Benton <rob benton conwaycorp net>
- To: gtkmm-list gnome org
- Subject: catching a mouse scroll event on a Gtk::DrawingArea
- Date: Sat, 18 Feb 2006 22:40:28 -0600
Can this be done? I tried with the signal_scroll_event() signal but I'm
not getting into the handler:
MyWindow::MyWindow()
{
_drawarea.signal_scroll_event().connect(sigc::mem_fun(*this,
&MyWindow::on_drawarea_scroll));
}
bool MyWindow::on_drawarea_scroll(GdkEventScroll * e)
{
if (e->direction == GDK_SCROLL_UP)
{
// up code
}
else if (e->direction == GDK_SCROLL_DOWN)
{
// down code
}
g_print("%d\n", e->direction);
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]