/*
* CINELERRA
* Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
- *
+ *
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "bcsignals.h"
#include "trackcanvas.h"
#include "tracks.h"
-SampleScroll::SampleScroll(MWindow *mwindow,
- MWindowGUI *gui,
+SampleScroll::SampleScroll(MWindow *mwindow,
+ MWindowGUI *gui,
int x,
int y,
int w)
- : BC_ScrollBar(x,
+ : BC_ScrollBar(x,
y,
- SCROLL_HORIZ,
- w,
- 0,
- 0,
+ SCROLL_HORIZ,
+ w,
+ 0,
+ 0,
0)
{
this->gui = gui;
oldposition = 0;
}
-SampleScroll::SampleScroll(MWindow *mwindow,
- TimelinePane *pane,
+SampleScroll::SampleScroll(MWindow *mwindow,
+ TimelinePane *pane,
int x,
int y,
int w)
- : BC_ScrollBar(x,
+ : BC_ScrollBar(x,
y,
- SCROLL_HORIZ,
- w,
- 0,
- 0,
+ SCROLL_HORIZ,
+ w,
+ 0,
+ 0,
0)
{
this->gui = mwindow->gui;
int SampleScroll::resize_event()
{
reposition_window(mwindow->theme->mhscroll_x,
- mwindow->theme->mhscroll_y,
+ mwindow->theme->mhscroll_y,
mwindow->theme->mhscroll_w);
return 0;
}
int SampleScroll::resize_event(int x, int y, int w)
{
reposition_window(x,
- y,
+ y,
w);
return 0;
}
int SampleScroll::set_position()
{
if(!pane->canvas) return 0;
- long length = Units::round(mwindow->edl->tracks->total_length() *
- mwindow->edl->session->sample_rate /
+ long length = Units::round(mwindow->edl->tracks->total_length() *
+ mwindow->edl->session->sample_rate /
mwindow->edl->local_session->zoom_sample);
long position = mwindow->edl->local_session->view_start[pane->number];
long handle_size = pane->view_w;
- update_length(length,
- position,
+ update_length(length,
+ position,
handle_size,
0);