13
0

add some scroll wheel support to the scroomer

git-svn-id: svn://localhost/ardour2/branches/3.0@9287 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-04-04 22:26:03 +00:00
parent 79c918fd6a
commit 847e8f0610

View File

@ -202,6 +202,23 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev)
return true;
}
bool
Scroomer::on_scroll_event (GdkEventScroll* ev)
{
switch (ev->direction) {
case GDK_SCROLL_UP:
adj.set_value (adj.get_value() - adj.get_page_size()/10.0);
break;
case GDK_SCROLL_DOWN:
adj.set_value (adj.get_value() + adj.get_page_size()/10.0);
break;
default:
return false;
}
return true;
}
bool
Scroomer::on_button_press_event (GdkEventButton* ev)
{
@ -267,12 +284,6 @@ Scroomer::on_button_release_event (GdkEventButton* ev)
return true;
}
bool
Scroomer::on_scroll_event (GdkEventScroll*)
{
return true;
}
void
Scroomer::on_size_allocate (Allocation& a)
{