00001 #ifndef CWINDOWGUI_H
00002 #define CWINDOWGUI_H
00003
00004 #include "auto.inc"
00005 #include "canvas.h"
00006 #include "cpanel.inc"
00007 #include "ctimebar.inc"
00008 #include "cwindow.inc"
00009 #include "cwindowtool.inc"
00010 #include "editpanel.h"
00011 #include "floatauto.inc"
00012 #include "floatautos.inc"
00013 #include "guicast.h"
00014 #include "mainclock.inc"
00015 #include "maskauto.inc"
00016 #include "meterpanel.h"
00017 #include "mwindow.inc"
00018 #include "playtransport.h"
00019 #include "thread.h"
00020 #include "track.inc"
00021 #include "zoompanel.h"
00022
00023 class CWindowZoom;
00024 class CWindowSlider;
00025 class CWindowReset;
00026 class CWindowDestination;
00027 class CWindowMeters;
00028 class CWindowTransport;
00029 class CWindowCanvas;
00030 class CWindowEditing;
00031
00032
00033 #define AUTO_ZOOM "Auto"
00034
00035 class CWindowGUI : public BC_Window
00036 {
00037 public:
00038 CWindowGUI(MWindow *mwindow, CWindow *cwindow);
00039 ~CWindowGUI();
00040
00041 int create_objects();
00042 int resize_event(int w, int h);
00043
00044
00045 int button_press_event();
00046 int cursor_leave_event();
00047 int cursor_enter_event();
00048 int button_release_event();
00049 int cursor_motion_event();
00050
00051
00052 void zoom_canvas(int do_auto, double value, int update_menu);
00053
00054 int close_event();
00055 int keypress_event();
00056 int translation_event();
00057 void set_operation(int value);
00058 void update_tool();
00059 void drag_motion();
00060 int drag_stop();
00061 void draw_status();
00062
00063 void reset_affected();
00064 void keyboard_zoomin();
00065 void keyboard_zoomout();
00066
00067 MWindow *mwindow;
00068 CWindow *cwindow;
00069 CWindowEditing *edit_panel;
00070
00071 CPanel *composite_panel;
00072 CWindowZoom *zoom_panel;
00073 CWindowSlider *slider;
00074 CWindowReset *reset;
00075 CWindowTransport *transport;
00076 CWindowCanvas *canvas;
00077 CTimeBar *timebar;
00078 BC_Pixmap *active;
00079 BC_Pixmap *inactive;
00080
00081
00082
00083 CWindowMeters *meters;
00084
00085
00086 CWindowTool *tool_panel;
00087
00088
00089 int current_operation;
00090
00091
00092
00093 Track *affected_track;
00094
00095 FloatAuto *affected_x;
00096 FloatAuto *affected_y;
00097 FloatAuto *affected_z;
00098
00099 Auto *affected_keyframe;
00100
00101 int affected_point;
00102
00103 float x_offset, y_offset;
00104
00105
00106 float x_origin, y_origin;
00107
00108 int crop_handle;
00109
00110 int crop_translate;
00111
00112 float crop_origin_x, crop_origin_y;
00113
00114 float crop_origin_x1, crop_origin_y1;
00115 float crop_origin_x2, crop_origin_y2;
00116
00117
00118 float center_x, center_y, center_z;
00119 float control_in_x, control_in_y, control_out_x, control_out_y;
00120 int current_tool;
00121
00122
00123 int translating_zoom;
00124 };
00125
00126
00127 class CWindowEditing : public EditPanel
00128 {
00129 public:
00130 CWindowEditing(MWindow *mwindow, CWindow *cwindow);
00131
00132 void set_inpoint();
00133 void set_outpoint();
00134
00135 MWindow *mwindow;
00136 CWindow *cwindow;
00137 };
00138
00139
00140 class CWindowMeters : public MeterPanel
00141 {
00142 public:
00143 CWindowMeters(MWindow *mwindow, CWindowGUI *gui, int x, int y, int h);
00144 ~CWindowMeters();
00145
00146 int change_status_event();
00147
00148 MWindow *mwindow;
00149 CWindowGUI *gui;
00150 };
00151
00152 class CWindowZoom : public ZoomPanel
00153 {
00154 public:
00155 CWindowZoom(MWindow *mwindow, CWindowGUI *gui, int x, int y);
00156 ~CWindowZoom();
00157 int handle_event();
00158 MWindow *mwindow;
00159 CWindowGUI *gui;
00160 };
00161
00162
00163 class CWindowSlider : public BC_PercentageSlider
00164 {
00165 public:
00166 CWindowSlider(MWindow *mwindow, CWindow *cwindow, int x, int y, int pixels);
00167 ~CWindowSlider();
00168
00169 int handle_event();
00170 void set_position();
00171 int increase_value();
00172 int decrease_value();
00173
00174 MWindow *mwindow;
00175 CWindow *cwindow;
00176 };
00177
00178 class CWindowReset : public BC_Button
00179 {
00180 public:
00181 CWindowReset(MWindow *mwindow, CWindowGUI *cwindow, int x, int y);
00182 ~CWindowReset();
00183 int handle_event();
00184 CWindowGUI *cwindow;
00185 MWindow *mwindow;
00186 };
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 class CWindowTransport : public PlayTransport
00199 {
00200 public:
00201 CWindowTransport(MWindow *mwindow,
00202 CWindowGUI *gui,
00203 int x,
00204 int y);
00205 EDL* get_edl();
00206 void goto_start();
00207 void goto_end();
00208
00209 CWindowGUI *gui;
00210 };
00211
00212
00213 class CWindowCanvas : public Canvas
00214 {
00215 public:
00216 CWindowCanvas(MWindow *mwindow, CWindowGUI *gui);
00217
00218 void status_event();
00219 void zoom_resize_window(float percentage);
00220 void update_zoom(int x, int y, float zoom);
00221 int get_xscroll();
00222 int get_yscroll();
00223 float get_zoom();
00224 int do_eyedrop(int &rerender, int button_press);
00225 int do_mask(int &redraw,
00226 int &rerender,
00227 int button_press,
00228 int cursor_motion,
00229 int draw);
00230 void draw_refresh();
00231 void draw_overlays();
00232 void draw_safe_regions();
00233
00234 int cursor_leave_event();
00235 int cursor_enter_event();
00236 int cursor_motion_event();
00237 int button_press_event();
00238 int button_release_event();
00239 int get_fullscreen();
00240 void set_fullscreen(int value);
00241 int test_crop(int button_press, int &redraw);
00242 int test_bezier(int button_press,
00243 int &redraw,
00244 int &redraw_canvas,
00245 int &rerender,
00246 int do_camera);
00247 int test_zoom(int &redraw);
00248 void reset_camera();
00249 void reset_projector();
00250 void reset_keyframe(int do_camera);
00251 void draw_crophandle(int x, int y);
00252 void zoom_auto();
00253
00254
00255 void draw_bezier(int do_camera);
00256 void draw_crop();
00257 void calculate_origin();
00258 void toggle_controls();
00259 int get_cwindow_controls();
00260
00261 MWindow *mwindow;
00262 CWindowGUI *gui;
00263 };
00264
00265 #endif