X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fsamplescroll.C;h=387dcfef9b021c456298419702675119ab68b9a6;hp=6d3e1509bfbb7713245e6fed916ebbef99de9a61;hb=502b6f3b6fd04f6b01c6d70dcb81aa304dd0db1c;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/cinelerra/samplescroll.C b/cinelerra-5.1/cinelerra/samplescroll.C index 6d3e1509..387dcfef 100644 --- a/cinelerra-5.1/cinelerra/samplescroll.C +++ b/cinelerra-5.1/cinelerra/samplescroll.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 1997-2014 Adam Williams - * + * * 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" @@ -34,17 +34,17 @@ #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; @@ -53,17 +53,17 @@ SampleScroll::SampleScroll(MWindow *mwindow, 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; @@ -90,7 +90,7 @@ int SampleScroll::in_use() int SampleScroll::resize_event() { reposition_window(mwindow->theme->mhscroll_x, - mwindow->theme->mhscroll_y, + mwindow->theme->mhscroll_y, mwindow->theme->mhscroll_w); return 0; } @@ -98,7 +98,7 @@ int SampleScroll::resize_event() int SampleScroll::resize_event(int x, int y, int w) { reposition_window(x, - y, + y, w); return 0; } @@ -106,14 +106,14 @@ int SampleScroll::resize_event(int x, int y, int w) 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);