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

cwindowtool.h

Go to the documentation of this file.
00001 #ifndef CWINDOWTOOL_H
00002 #define CWINDOWTOOL_H
00003 
00004 #include "condition.inc"
00005 #include "cwindowgui.inc"
00006 #include "guicast.h"
00007 #include "maskauto.inc"
00008 #include "mwindow.inc"
00009 
00010 
00011 class CWindowToolGUI;
00012 class CWindowCoord;
00013 
00014 
00015 // This common thread supports all the tool GUI's.
00016 class CWindowTool : public Thread
00017 {
00018 public:
00019         CWindowTool(MWindow *mwindow, CWindowGUI *gui);
00020         ~CWindowTool();
00021 
00022 // Called depending on state of toggle button
00023         void start_tool(int operation);
00024         void stop_tool();
00025 
00026 // Called when window is visible
00027         void show_tool();
00028         void hide_tool();
00029 
00030         void run();
00031         void update_show_window();
00032         void update_values();
00033 
00034         MWindow *mwindow;
00035         CWindowGUI *gui;
00036         CWindowToolGUI *tool_gui;
00037         int done;
00038         int current_tool;
00039         Condition *input_lock;
00040         Condition *output_lock;
00041 // Lock run and update_values
00042         Mutex *tool_gui_lock;
00043 };
00044 
00045 class CWindowToolGUI : public BC_Window
00046 {
00047 public:
00048         CWindowToolGUI(MWindow *mwindow, 
00049                 CWindowTool *thread, 
00050                 char *title,
00051                 int w, 
00052                 int h);
00053         ~CWindowToolGUI();
00054         
00055         virtual void create_objects() {};
00056 // Update the keyframe from text boxes
00057         virtual void handle_event() {};
00058 // Update text boxes from keyframe here
00059         virtual void update() {};
00060 // Update EDL and preview only
00061         virtual void update_preview() {};
00062         int current_operation;
00063         int close_event();
00064         int keypress_event();
00065         int translation_event();
00066         
00067         MWindow *mwindow;
00068         CWindowTool *thread;
00069         CWindowCoord *event_caller;
00070 };
00071 
00072 class CWindowCoord : public BC_TumbleTextBox
00073 {
00074 public:
00075         CWindowCoord(CWindowToolGUI *gui, int x, int y, float value);
00076         CWindowCoord(CWindowToolGUI *gui, int x, int y, int value);
00077 
00078 // Calls the window's handle_event
00079         int handle_event();
00080 
00081         CWindowToolGUI *gui;
00082 };
00083 
00084 class CWindowCropOK : public BC_GenericButton
00085 {
00086 public:
00087         CWindowCropOK(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00088 // Perform the cropping operation
00089         int handle_event();
00090         int keypress_event();
00091         MWindow *mwindow;
00092         CWindowToolGUI *gui;
00093 };
00094 
00095 class CWindowCropGUI : public CWindowToolGUI
00096 {
00097 public:
00098         CWindowCropGUI(MWindow *mwindow, CWindowTool *thread);
00099         ~CWindowCropGUI();
00100         void create_objects();
00101         void update();
00102 // Update the gui
00103         void handle_event();
00104         CWindowCoord *x1, *y1, *width, *height;
00105 };
00106 
00107 class CWindowMaskMode : public BC_PopupMenu
00108 {
00109 public:
00110         CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y, char *text);
00111         void create_objects();
00112         int handle_event();
00113         static char* mode_to_text(int mode);
00114         int text_to_mode(char *text);
00115         MWindow *mwindow;
00116         CWindowToolGUI *gui;
00117 };
00118 
00119 class CWindowMaskDelete : public BC_GenericButton
00120 {
00121 public:
00122         CWindowMaskDelete(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00123         int handle_event();
00124         int keypress_event();
00125         MWindow *mwindow;
00126         CWindowToolGUI *gui;
00127 };
00128 
00129 class CWindowMaskCycleNext : public BC_GenericButton
00130 {
00131 public:
00132         CWindowMaskCycleNext(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00133         int handle_event();
00134         MWindow *mwindow;
00135         CWindowToolGUI *gui;
00136 };
00137 
00138 class CWindowMaskCyclePrev : public BC_GenericButton
00139 {
00140 public:
00141         CWindowMaskCyclePrev(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00142         int handle_event();
00143         MWindow *mwindow;
00144         CWindowToolGUI *gui;
00145 };
00146 
00147 class CWindowMaskNumber : public BC_TumbleTextBox
00148 {
00149 public:
00150         CWindowMaskNumber(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00151         ~CWindowMaskNumber();
00152         int handle_event();
00153         MWindow *mwindow;
00154         CWindowToolGUI *gui;
00155 };
00156 
00157 class CWindowMaskFeather : public BC_TumbleTextBox
00158 {
00159 public:
00160         CWindowMaskFeather(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00161         ~CWindowMaskFeather();
00162         int handle_event();
00163         MWindow *mwindow;
00164         CWindowToolGUI *gui;
00165 };
00166 
00167 class CWindowMaskValue : public BC_ISlider
00168 {
00169 public:
00170         CWindowMaskValue(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
00171         ~CWindowMaskValue();
00172         int handle_event();
00173         MWindow *mwindow;
00174         CWindowToolGUI *gui;
00175 };
00176 
00177 
00178 class CWindowMaskGUI : public CWindowToolGUI
00179 {
00180 public:
00181         CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread);
00182         ~CWindowMaskGUI();
00183         void create_objects();
00184         void update();
00185         void handle_event();
00186         void get_keyframe(Track* &track, 
00187                 MaskAuto* &keyframe, 
00188                 SubMask* &mask, 
00189                 MaskPoint* &point,
00190                 int create_it);
00191         void update_preview();
00192 
00193         CWindowCoord *x, *y;
00194         CWindowMaskMode *mode;
00195         CWindowMaskFeather *feather;
00196         CWindowMaskDelete *delete_point;
00197 // Not necessary if all keyframes have same points
00198 //      CWindowMaskCycleNext *next_point;
00199 //      CWindowMaskCyclePrev *prev_point;
00200         CWindowMaskNumber *number;
00201         CWindowMaskValue *value;
00202 };
00203 
00204 
00205 
00206 class CWindowEyedropGUI : public CWindowToolGUI
00207 {
00208 public:
00209         CWindowEyedropGUI(MWindow *mwindow, CWindowTool *thread);
00210         ~CWindowEyedropGUI();
00211 
00212         void create_objects();
00213         void update();
00214 
00215         BC_Title *red, *green, *blue;
00216         BC_SubWindow *sample;
00217 };
00218 
00219 
00220 
00221 class CWindowCameraGUI : public CWindowToolGUI
00222 {
00223 public:
00224         CWindowCameraGUI(MWindow *mwindow, CWindowTool *thread);
00225         ~CWindowCameraGUI();
00226         void create_objects();
00227         void update();
00228         void update_preview();
00229 
00230 // Update the keyframe from text boxes
00231         void handle_event();
00232 //      BezierAuto* get_keyframe();
00233         CWindowCoord *x, *y, *z;
00234 };
00235 
00236 class CWindowCameraLeft : public BC_Button
00237 {
00238 public:
00239         CWindowCameraLeft(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00240         int handle_event();
00241         MWindow *mwindow;
00242         CWindowCameraGUI *gui;
00243 };
00244 
00245 class CWindowCameraCenter : public BC_Button
00246 {
00247 public:
00248         CWindowCameraCenter(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00249         int handle_event();
00250         MWindow *mwindow;
00251         CWindowCameraGUI *gui;
00252 };
00253 
00254 class CWindowCameraRight : public BC_Button
00255 {
00256 public:
00257         CWindowCameraRight(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00258         int handle_event();
00259         MWindow *mwindow;
00260         CWindowCameraGUI *gui;
00261 };
00262 
00263 class CWindowCameraTop : public BC_Button
00264 {
00265 public:
00266         CWindowCameraTop(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00267         int handle_event();
00268         MWindow *mwindow;
00269         CWindowCameraGUI *gui;
00270 };
00271 
00272 class CWindowCameraMiddle : public BC_Button
00273 {
00274 public:
00275         CWindowCameraMiddle(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00276         int handle_event();
00277         MWindow *mwindow;
00278         CWindowCameraGUI *gui;
00279 };
00280 
00281 class CWindowCameraBottom : public BC_Button
00282 {
00283 public:
00284         CWindowCameraBottom(MWindow *mwindow, CWindowCameraGUI *gui, int x, int y);
00285         int handle_event();
00286         MWindow *mwindow;
00287         CWindowCameraGUI *gui;
00288 };
00289 
00290 class CWindowProjectorGUI : public CWindowToolGUI
00291 {
00292 public:
00293         CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread);
00294         ~CWindowProjectorGUI();
00295         void create_objects();
00296         void update();
00297         void update_preview();
00298         void handle_event();
00299 //      BezierAuto* get_keyframe();
00300         CWindowCoord *x, *y, *z;
00301 };
00302 
00303 class CWindowProjectorLeft : public BC_Button
00304 {
00305 public:
00306         CWindowProjectorLeft(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00307         int handle_event();
00308         MWindow *mwindow;
00309         CWindowProjectorGUI *gui;
00310 };
00311 
00312 class CWindowProjectorCenter : public BC_Button
00313 {
00314 public:
00315         CWindowProjectorCenter(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00316         int handle_event();
00317         MWindow *mwindow;
00318         CWindowProjectorGUI *gui;
00319 };
00320 
00321 class CWindowProjectorRight : public BC_Button
00322 {
00323 public:
00324         CWindowProjectorRight(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00325         int handle_event();
00326         MWindow *mwindow;
00327         CWindowProjectorGUI *gui;
00328 };
00329 
00330 class CWindowProjectorTop : public BC_Button
00331 {
00332 public:
00333         CWindowProjectorTop(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00334         int handle_event();
00335         MWindow *mwindow;
00336         CWindowProjectorGUI *gui;
00337 };
00338 
00339 class CWindowProjectorMiddle : public BC_Button
00340 {
00341 public:
00342         CWindowProjectorMiddle(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00343         int handle_event();
00344         MWindow *mwindow;
00345         CWindowProjectorGUI *gui;
00346 };
00347 
00348 class CWindowProjectorBottom : public BC_Button
00349 {
00350 public:
00351         CWindowProjectorBottom(MWindow *mwindow, CWindowProjectorGUI *gui, int x, int y);
00352         int handle_event();
00353         MWindow *mwindow;
00354         CWindowProjectorGUI *gui;
00355 };
00356 
00357 
00358 
00359 #endif

Generated on Sun Jan 8 13:38:52 2006 for Cinelerra-svn by  doxygen 1.4.4