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 void start_tool(int operation
);
25 void update_show_window();
30 CWindowToolGUI
*tool_gui
;
33 Condition
*input_lock
;
34 Condition
*output_lock
;
35 // Lock run and update_values
39 class CWindowToolGUI
: public BC_Window
42 CWindowToolGUI(MWindow
*mwindow
,
49 virtual void create_objects() {};
50 // Update the keyframe from text boxes
51 virtual void handle_event() {};
52 // Update text boxes from keyframe here
53 virtual void update() {};
54 // Update EDL and preview only
55 virtual void update_preview() {};
56 int current_operation
;
59 int translation_event();
63 CWindowCoord
*event_caller
;
66 class CWindowCoord
: public BC_TumbleTextBox
69 CWindowCoord(CWindowToolGUI
*gui
, int x
, int y
, float value
);
70 CWindowCoord(CWindowToolGUI
*gui
, int x
, int y
, int value
);
72 // Calls the window's handle_event
78 class CWindowCropOK
: public BC_GenericButton
81 CWindowCropOK(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
82 // Perform the cropping operation
89 class CWindowCropGUI
: public CWindowToolGUI
92 CWindowCropGUI(MWindow
*mwindow
, CWindowTool
*thread
);
94 void create_objects();
98 CWindowCoord
*x1
, *y1
, *x2
, *y2
;
101 class CWindowMaskMode
: public BC_PopupMenu
104 CWindowMaskMode(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
, char *text
);
105 void create_objects();
107 static char* mode_to_text(int mode
);
108 int text_to_mode(char *text
);
113 class CWindowMaskDelete
: public BC_GenericButton
116 CWindowMaskDelete(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
118 int keypress_event();
123 class CWindowMaskCycleNext
: public BC_GenericButton
126 CWindowMaskCycleNext(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
132 class CWindowMaskCyclePrev
: public BC_GenericButton
135 CWindowMaskCyclePrev(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
141 class CWindowMaskNumber
: public BC_TumbleTextBox
144 CWindowMaskNumber(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
145 ~CWindowMaskNumber();
151 class CWindowMaskFeather
: public BC_TumbleTextBox
154 CWindowMaskFeather(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
155 ~CWindowMaskFeather();
161 class CWindowMaskValue
: public BC_ISlider
164 CWindowMaskValue(MWindow
*mwindow
, CWindowToolGUI
*gui
, int x
, int y
);
172 class CWindowMaskGUI
: public CWindowToolGUI
175 CWindowMaskGUI(MWindow
*mwindow
, CWindowTool
*thread
);
177 void create_objects();
180 void get_keyframe(Track
* &track
,
185 void update_preview();
188 CWindowMaskMode
*mode
;
189 CWindowMaskFeather
*feather
;
190 CWindowMaskDelete
*delete_point
;
191 // Not necessary if all keyframes have same points
192 // CWindowMaskCycleNext *next_point;
193 // CWindowMaskCyclePrev *prev_point;
194 CWindowMaskNumber
*number
;
195 CWindowMaskValue
*value
;
200 class CWindowCameraGUI
: public CWindowToolGUI
203 CWindowCameraGUI(MWindow
*mwindow
, CWindowTool
*thread
);
205 void create_objects();
207 void update_preview();
209 // Update the keyframe from text boxes
211 BezierAuto
* get_keyframe();
212 CWindowCoord
*x
, *y
, *z
;
215 class CWindowCameraLeft
: public BC_Button
218 CWindowCameraLeft(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
221 CWindowCameraGUI
*gui
;
224 class CWindowCameraCenter
: public BC_Button
227 CWindowCameraCenter(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
230 CWindowCameraGUI
*gui
;
233 class CWindowCameraRight
: public BC_Button
236 CWindowCameraRight(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
239 CWindowCameraGUI
*gui
;
242 class CWindowCameraTop
: public BC_Button
245 CWindowCameraTop(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
248 CWindowCameraGUI
*gui
;
251 class CWindowCameraMiddle
: public BC_Button
254 CWindowCameraMiddle(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
257 CWindowCameraGUI
*gui
;
260 class CWindowCameraBottom
: public BC_Button
263 CWindowCameraBottom(MWindow
*mwindow
, CWindowCameraGUI
*gui
, int x
, int y
);
266 CWindowCameraGUI
*gui
;
269 class CWindowProjectorGUI
: public CWindowToolGUI
272 CWindowProjectorGUI(MWindow
*mwindow
, CWindowTool
*thread
);
273 ~CWindowProjectorGUI();
274 void create_objects();
276 void update_preview();
278 BezierAuto
* get_keyframe();
279 CWindowCoord
*x
, *y
, *z
;
282 class CWindowProjectorLeft
: public BC_Button
285 CWindowProjectorLeft(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
288 CWindowProjectorGUI
*gui
;
291 class CWindowProjectorCenter
: public BC_Button
294 CWindowProjectorCenter(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
297 CWindowProjectorGUI
*gui
;
300 class CWindowProjectorRight
: public BC_Button
303 CWindowProjectorRight(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
306 CWindowProjectorGUI
*gui
;
309 class CWindowProjectorTop
: public BC_Button
312 CWindowProjectorTop(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
315 CWindowProjectorGUI
*gui
;
318 class CWindowProjectorMiddle
: public BC_Button
321 CWindowProjectorMiddle(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
324 CWindowProjectorGUI
*gui
;
327 class CWindowProjectorBottom
: public BC_Button
330 CWindowProjectorBottom(MWindow
*mwindow
, CWindowProjectorGUI
*gui
, int x
, int y
);
333 CWindowProjectorGUI
*gui
;