00001 #ifndef VWINDOWGUI_H
00002 #define VWINDOWGUI_H
00003
00004 #include "asset.inc"
00005 #include "canvas.h"
00006 #include "editpanel.h"
00007 #include "guicast.h"
00008 #include "mainclock.inc"
00009 #include "meterpanel.h"
00010 #include "mwindow.inc"
00011 #include "playtransport.h"
00012
00013 #include "timebar.h"
00014
00015 #include "vtimebar.inc"
00016 #include "vwindow.inc"
00017 #include "zoompanel.h"
00018
00019 class VWindowSlider;
00020 class VWindowZoom;
00021 class VWindowSource;
00022 class VWindowTransport;
00023 class VWindowEditing;
00024 class VWindowCanvas;
00025 class VWindowMeters;
00026 class VWindowInPoint;
00027 class VWindowOutPoint;
00028
00029 class VWindowGUI : public BC_Window
00030 {
00031 public:
00032 VWindowGUI(MWindow *mwindow, VWindow *vwindow);
00033 ~VWindowGUI();
00034
00035 int create_objects();
00036 int resize_event(int w, int h);
00037 int translation_event();
00038 int close_event();
00039 int keypress_event();
00040 int button_press_event();
00041 int cursor_leave_event();
00042 int cursor_enter_event();
00043 int button_release_event();
00044 int cursor_motion_event();
00045
00046 void update_sources(char *title);
00047
00048 void change_source(EDL *edl, char *title);
00049 void drag_motion();
00050 int drag_stop();
00051
00052
00053
00054 MWindow *mwindow;
00055 VWindow *vwindow;
00056
00057
00058 VWindowCanvas *canvas;
00059 VWindowSlider *slider;
00060 BC_Title *fps_title;
00061 MainClock *clock;
00062 VTimeBar *timebar;
00063 VWindowZoom *zoom_panel;
00064 VWindowTransport *transport;
00065 VWindowEditing *edit_panel;
00066
00067 VWindowMeters *meters;
00068 ArrayList<BC_ListBoxItem*> sources;
00069 ArrayList<LabelGUI*> labels;
00070 VWindowInPoint *in_point;
00071 VWindowOutPoint *out_point;
00072 char loaded_title[BCTEXTLEN];
00073 private:
00074 void get_scrollbars(int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h);
00075 };
00076
00077
00078 class VWindowMeters : public MeterPanel
00079 {
00080 public:
00081 VWindowMeters(MWindow *mwindow, VWindowGUI *gui, int x, int y, int h);
00082 ~VWindowMeters();
00083
00084 int change_status_event();
00085
00086 MWindow *mwindow;
00087 VWindowGUI *gui;
00088 };
00089
00090
00091 class VWindowCanvas : public Canvas
00092 {
00093 public:
00094 VWindowCanvas(MWindow *mwindow, VWindowGUI *gui);
00095
00096 void zoom_resize_window(float percentage);
00097 void draw_refresh();
00098 void draw_overlays();
00099 void close_source();
00100 int get_fullscreen();
00101 void set_fullscreen(int value);
00102
00103 MWindow *mwindow;
00104 VWindowGUI *gui;
00105 };
00106
00107 class VWindowEditing : public EditPanel
00108 {
00109 public:
00110 VWindowEditing(MWindow *mwindow, VWindow *vwindow);
00111 ~VWindowEditing();
00112
00113 void copy_selection();
00114 void splice_selection();
00115 void overwrite_selection();
00116 void set_inpoint();
00117 void set_outpoint();
00118 void clear_inpoint();
00119 void clear_outpoint();
00120 void to_clip();
00121 void toggle_label();
00122 void prev_label();
00123 void next_label();
00124
00125 MWindow *mwindow;
00126 VWindow *vwindow;
00127 };
00128
00129 class VWindowZoom : public ZoomPanel
00130 {
00131 public:
00132 VWindowZoom(MWindow *mwindow, VWindowGUI *gui, int x, int y);
00133 ~VWindowZoom();
00134 int handle_event();
00135 MWindow *mwindow;
00136 VWindowGUI *gui;
00137 };
00138
00139
00140 class VWindowSlider : public BC_PercentageSlider
00141 {
00142 public:
00143 VWindowSlider(MWindow *mwindow,
00144 VWindow *vwindow,
00145 VWindowGUI *gui,
00146 int x,
00147 int y,
00148 int pixels);
00149 ~VWindowSlider();
00150
00151 int handle_event();
00152 void set_position();
00153
00154 VWindowGUI *gui;
00155 MWindow *mwindow;
00156 VWindow *vwindow;
00157 };
00158
00159 class VWindowSource : public BC_PopupTextBox
00160 {
00161 public:
00162 VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y);
00163 ~VWindowSource();
00164 int handle_event();
00165 VWindowGUI *vwindow;
00166 MWindow *mwindow;
00167 };
00168
00169 class VWindowTransport : public PlayTransport
00170 {
00171 public:
00172 VWindowTransport(MWindow *mwindow,
00173 VWindowGUI *gui,
00174 int x,
00175 int y);
00176 EDL* get_edl();
00177 void goto_start();
00178 void goto_end();
00179
00180 VWindowGUI *gui;
00181 };
00182
00183 class VWindowInPoint : public InPointGUI
00184 {
00185 public:
00186 VWindowInPoint(MWindow *mwindow,
00187 TimeBar *timebar,
00188 VWindowGUI *gui,
00189 long pixel,
00190 double position);
00191 int handle_event();
00192 VWindowGUI *gui;
00193 };
00194
00195
00196 class VWindowOutPoint : public OutPointGUI
00197 {
00198 public:
00199 VWindowOutPoint(MWindow *mwindow,
00200 TimeBar *timebar,
00201 VWindowGUI *gui,
00202 long pixel,
00203 double position);
00204 int handle_event();
00205 VWindowGUI *gui;
00206 };
00207
00208 #endif