2 #include "edlsession.h"
3 #include "localsession.h"
4 #include "maincursor.h"
6 #include "mwindowgui.h"
8 #include "mainsession.h"
10 #include "trackcanvas.h"
12 #include "trackscroll.h"
14 TrackScroll::TrackScroll(MWindow *mwindow, MWindowGUI *gui, int x, int y, int h)
23 this->mwindow = mwindow;
28 TrackScroll::~TrackScroll()
32 long TrackScroll::get_distance()
34 return get_value() - old_position;
37 int TrackScroll::update()
42 int TrackScroll::resize_event()
44 reposition_window(mwindow->theme->mvscroll_x,
45 mwindow->theme->mvscroll_y,
46 mwindow->theme->mvscroll_h);
51 int TrackScroll::flip_vertical(int top, int bottom)
56 int TrackScroll::handle_event()
58 mwindow->edl->local_session->track_start = get_value();
59 mwindow->edl->tracks->update_y_pixels(mwindow->theme);
60 mwindow->gui->canvas->draw();
61 mwindow->gui->cursor->draw(1);
62 mwindow->gui->patchbay->update();
63 mwindow->gui->canvas->flash();
64 // Scrollbar must be active to trap button release events
65 // mwindow->gui->canvas->activate();
66 old_position = get_value();