using namespace std;
using namespace ARDOUR;
+using namespace PBD;
void
Editor::hscrollbar_allocate (Gtk::Allocation &alloc)
{
- if (session) {
- horizontal_adjustment.set_upper (session->current_end_frame() / frames_per_unit);
- }
-
}
bool
Editor::hscrollbar_button_press (GdkEventButton *ev)
{
- edit_hscroll_dragging = true;
return true;
}
Editor::hscrollbar_button_release (GdkEventButton *ev)
{
if (session) {
- if (edit_hscroll_dragging) {
- // lets do a tempo redisplay only on button release, because it is dog slow
- tempo_map_changed (Change (0));
- edit_hscroll_dragging = false;
- }
+
}
return true;
}
+void
+Editor::reset_hscrollbar_stepping ()
+{
+ horizontal_adjustment.set_step_increment ((current_page_frames() / 5)/frames_per_unit); /* 5 clicks to scroll the entire page */
+ horizontal_adjustment.set_page_increment (current_page_frames()/frames_per_unit);
+}