4 #include "condition.inc"
5 #include "cwindowgui.inc"
7 #include "maskauto.inc"
15 // This common thread supports all the tool GUI's.
16 class CWindowTool
: public Thread
19 CWindowTool(MWindow
*mwindow
, CWindowGUI
*gui
);
22 // Called depending on state of toggle button
23 void start_tool(int operation
);
26 // Called when window is visible
31 void update_show_window();
36 CWindowToolGUI
*tool_gui
;
39 Condition
*input_lock
;
40 Condition
*output_lock
;
41 // Lock run and update_values
45 class CWindowToolGUI
: public BC_Window
48 CWindowToolGUI(MWindow
*mwindow
,
55 virtual void create_objects() {};
56 // Update the keyframe from text boxes
57 virtual void handle_event() {};
58 // Update text boxes from keyframe here
59 virtual void update() {};
60 // Update EDL and preview only
61 virtual void update_preview() {};
62 int current_operation
;
65 int translation_event();
69 CWindowCoord
*event_caller
;
72 class CWindowCoord
: public BC_TumbleTextBox
75 CWindowCoord(CWindowToolGUI
*gui
, int x
, int y
, float value
, int logincrement
);
76 CWindowCoord(CWindowToolGUI
*gui
, int x
, int y
, int value
);
78 // Calls the window's handle_event
84 class CWindowCropOK
: public BC_GenericButton
87 CWindowCropOK(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
88 // Perform the cropping operation
95 class CWindowCropGUI
: public CWindowToolGUI
98 CWindowCropGUI(MWindow
*mwindow
, CWindowTool
*thread
);
100 void create_objects();
104 CWindowCoord
*x1
, *y1
, *width
, *height
;
107 class CWindowMaskMode
: public BC_PopupMenu
110 CWindowMaskMode(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
, char *text
);
111 void create_objects();
113 static char* mode_to_text(int mode
);
114 int text_to_mode(char *text
);
119 class CWindowMaskDelete
: public BC_GenericButton
122 CWindowMaskDelete(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
124 int keypress_event();
129 class CWindowMaskCycleNext
: public BC_GenericButton
132 CWindowMaskCycleNext(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
138 class CWindowMaskCyclePrev
: public BC_GenericButton
141 CWindowMaskCyclePrev(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
147 class CWindowMaskNumber
: public BC_TumbleTextBox
150 CWindowMaskNumber(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
151 ~CWindowMaskNumber();
157 class CWindowMaskFeather
: public BC_TumbleTextBox
160 CWindowMaskFeather(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
161 ~CWindowMaskFeather();
167 class CWindowMaskValue
: public BC_ISlider
170 CWindowMaskValue(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
177 class CWindowMaskBeforePlugins
: public BC_CheckBox
180 CWindowMaskBeforePlugins(CWindowToolGUI
*gui
, int x
, int y
);
188 class CWindowMaskGUI
: public CWindowToolGUI
191 CWindowMaskGUI(MWindow
*mwindow
, CWindowTool
*thread
);
193 void create_objects();
196 void get_keyframe(Track
* &track
,
201 void update_preview();
204 CWindowMaskMode
*mode
;
205 CWindowMaskFeather
*feather
;
206 CWindowMaskDelete
*delete_point
;
207 // Not necessary if all keyframes have same points
208 // CWindowMaskCycleNext *next_point;
209 // CWindowMaskCyclePrev *prev_point;
210 CWindowMaskNumber
*number
;
211 CWindowMaskValue
*value
;
212 CWindowMaskBeforePlugins
*apply_before_plugins
;
217 class CWindowEyedropGUI
: public CWindowToolGUI
220 CWindowEyedropGUI(MWindow
*mwindow
, CWindowTool
*thread
);
221 ~CWindowEyedropGUI();
223 void create_objects();
226 BC_Title
*red
, *green
, *blue
;
227 BC_SubWindow
*sample
;
232 class CWindowCameraGUI
: public CWindowToolGUI
235 CWindowCameraGUI(MWindow
*mwindow
, CWindowTool
*thread
);
237 void create_objects();
239 void update_preview();
241 // Update the keyframe from text boxes
243 // BezierAuto* get_keyframe();
244 CWindowCoord
*x
, *y
, *z
;
247 class CWindowCameraLeft
: public BC_Button
250 CWindowCameraLeft(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
253 CWindowCameraGUI
*gui
;
256 class CWindowCameraCenter
: public BC_Button
259 CWindowCameraCenter(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
262 CWindowCameraGUI
*gui
;
265 class CWindowCameraRight
: public BC_Button
268 CWindowCameraRight(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
271 CWindowCameraGUI
*gui
;
274 class CWindowCameraTop
: public BC_Button
277 CWindowCameraTop(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
280 CWindowCameraGUI
*gui
;
283 class CWindowCameraMiddle
: public BC_Button
286 CWindowCameraMiddle(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
289 CWindowCameraGUI
*gui
;
292 class CWindowCameraBottom
: public BC_Button
295 CWindowCameraBottom(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
298 CWindowCameraGUI
*gui
;
301 class CWindowProjectorGUI
: public CWindowToolGUI
304 CWindowProjectorGUI(MWindow
*mwindow
, CWindowTool
*thread
);
305 ~CWindowProjectorGUI();
306 void create_objects();
308 void update_preview();
310 // BezierAuto* get_keyframe();
311 CWindowCoord
*x
, *y
, *z
;
314 class CWindowProjectorLeft
: public BC_Button
317 CWindowProjectorLeft(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
320 CWindowProjectorGUI
*gui
;
323 class CWindowProjectorCenter
: public BC_Button
326 CWindowProjectorCenter(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
329 CWindowProjectorGUI
*gui
;
332 class CWindowProjectorRight
: public BC_Button
335 CWindowProjectorRight(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
338 CWindowProjectorGUI
*gui
;
341 class CWindowProjectorTop
: public BC_Button
344 CWindowProjectorTop(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
347 CWindowProjectorGUI
*gui
;
350 class CWindowProjectorMiddle
: public BC_Button
353 CWindowProjectorMiddle(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
356 CWindowProjectorGUI
*gui
;
359 class CWindowProjectorBottom
: public BC_Button
362 CWindowProjectorBottom(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
365 CWindowProjectorGUI
*gui
;