2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2002 Paul Davis
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "editor.h"
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/session.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace ARDOUR;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void
|
2009-07-21 11:55:17 -04:00
|
|
|
Editor::hscrollbar_allocate (Gtk::Allocation &)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
bool
|
2009-07-21 11:55:17 -04:00
|
|
|
Editor::hscrollbar_button_press (GdkEventButton *)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2007-01-31 13:51:33 -05:00
|
|
|
_dragging_hscrollbar = true;
|
|
|
|
return false;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
bool
|
2009-07-21 11:55:17 -04:00
|
|
|
Editor::hscrollbar_button_release (GdkEventButton *)
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2007-01-31 13:51:33 -05:00
|
|
|
_dragging_hscrollbar = false;
|
|
|
|
|
2005-12-12 15:54:55 -05:00
|
|
|
if (session) {
|
2006-08-30 16:48:16 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2007-01-31 13:51:33 -05:00
|
|
|
return false;
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
2006-04-18 22:11:39 -04:00
|
|
|
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);
|
|
|
|
}
|