Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

trackscroll.C

Go to the documentation of this file.
00001 #include "edl.h"
00002 #include "edlsession.h"
00003 #include "localsession.h"
00004 #include "maincursor.h"
00005 #include "mwindow.h"
00006 #include "mwindowgui.h"
00007 #include "patchbay.h"
00008 #include "mainsession.h"
00009 #include "theme.h"
00010 #include "trackcanvas.h"
00011 #include "tracks.h"
00012 #include "trackscroll.h"
00013 
00014 TrackScroll::TrackScroll(MWindow *mwindow, MWindowGUI *gui, int x, int y, int h)
00015  : BC_ScrollBar(x, 
00016         y, 
00017         SCROLL_VERT, 
00018         h, 
00019         0, 
00020         0, 
00021         0)
00022 {
00023         this->mwindow = mwindow;
00024         this->gui = gui;
00025         old_position = 0;
00026 }
00027 
00028 TrackScroll::~TrackScroll()
00029 {
00030 }
00031 
00032 long TrackScroll::get_distance()
00033 {
00034         return get_value() - old_position;
00035 }
00036 
00037 int TrackScroll::update()
00038 {
00039         return 0;
00040 }
00041 
00042 int TrackScroll::resize_event()
00043 {
00044         reposition_window(mwindow->theme->mvscroll_x, 
00045                 mwindow->theme->mvscroll_y, 
00046                 mwindow->theme->mvscroll_h);
00047         update();
00048         return 0;
00049 }
00050 
00051 int TrackScroll::flip_vertical(int top, int bottom)
00052 {
00053         return 0;
00054 }
00055 
00056 int TrackScroll::handle_event()
00057 {
00058         mwindow->edl->local_session->track_start = get_value();
00059         mwindow->edl->tracks->update_y_pixels(mwindow->theme);
00060         mwindow->gui->canvas->draw();
00061         mwindow->gui->cursor->draw();
00062         mwindow->gui->patchbay->update();
00063         mwindow->gui->canvas->flash();
00064 // Scrollbar must be active to trap button release events
00065 //      mwindow->gui->canvas->activate();
00066         old_position = get_value();
00067         flush();
00068         return 1;
00069 }

Generated on Sun Jan 8 13:39:01 2006 for Cinelerra-svn by  doxygen 1.4.4