r550: References to a shared plugin that is moved up or down must be updated.
[cinelerra_cv.git] / plugins / titler / titlewindow.h
blobbf679195fbff5f4f093cb402abe7f75dc067667f
1 #ifndef TITLEWINDOW_H
2 #define TITLEWINDOW_H
4 #include "guicast.h"
6 class TitleThread;
7 class TitleWindow;
8 class TitleInterlace;
10 #include "colorpicker.h"
11 #include "filexml.h"
12 #include "mutex.h"
13 #include "title.h"
16 PLUGIN_THREAD_HEADER(TitleMain, TitleThread, TitleWindow)
20 class TitleFontTumble;
21 class TitleItalic;
22 class TitleBold;
23 class TitleSize;
24 class TitleEncoding;
25 class TitleColorButton;
26 class TitleColorStrokeButton;
27 class TitleStroke;
28 class TitleStrokeW;
29 class TitleDropShadow;
30 class TitleMotion;
31 class TitleLoop;
32 class TitleFade;
33 class TitleFont;
34 class TitleText;
35 class TitleX;
36 class TitleY;
37 class TitleLeft;
38 class TitleCenter;
39 class TitleRight;class TitleTop;
40 class TitleMid;
41 class TitleBottom;
42 class TitleColorThread;
43 class TitleColorStrokeThread;
44 class TitleSpeed;
45 class TitleTimecode;
47 class TitleWindow : public BC_Window
49 public:
50 TitleWindow(TitleMain *client, int x, int y);
51 ~TitleWindow();
53 int create_objects();
54 int close_event();
55 int resize_event(int w, int h);
56 void update_color();
57 void update_justification();
58 void update();
59 void previous_font();
60 void next_font();
62 TitleMain *client;
64 BC_Title *font_title;
65 TitleFont *font;
66 TitleFontTumble *font_tumbler;
67 BC_Title *x_title;
68 TitleX *title_x;
69 BC_Title *y_title;
70 TitleY *title_y;
71 BC_Title *dropshadow_title;
72 TitleDropShadow *dropshadow;
73 BC_Title *style_title;
74 TitleItalic *italic;
75 TitleBold *bold;
77 #ifdef USE_OUTLINE
78 TitleStroke *stroke;
79 TitleColorStrokeButton *color_stroke_button;
80 TitleColorStrokeThread *color_stroke_thread;
81 BC_Title *strokewidth_title;
82 TitleStrokeW *stroke_width;
83 int color_stroke_x, color_stroke_y;
84 #endif
86 int color_x, color_y;
87 BC_Title *size_title;
88 BC_Title *encoding_title;
89 TitleSize *size;
90 TitleEncoding *encoding;
91 TitleColorButton *color_button;
92 TitleColorThread *color_thread;
93 BC_Title *motion_title;
94 TitleMotion *motion;
95 TitleLoop *loop;
96 BC_Title *fadein_title;
97 TitleFade *fade_in;
98 BC_Title *fadeout_title;
99 TitleFade *fade_out;
100 BC_Title *text_title;
101 TitleText *text;
102 BC_Title *justify_title;
103 TitleLeft *left;
104 TitleCenter *center;
105 TitleRight *right;
106 TitleTop *top;
107 TitleMid *mid;
108 TitleBottom *bottom;
109 BC_Title *speed_title;
110 TitleSpeed *speed;
111 TitleTimecode *timecode;
113 // Color preview
114 ArrayList<BC_ListBoxItem*> sizes;
115 ArrayList<BC_ListBoxItem*> encodings;
116 ArrayList<BC_ListBoxItem*> paths;
117 ArrayList<BC_ListBoxItem*> fonts;
121 class TitleFontTumble : public BC_Tumbler
123 public:
124 TitleFontTumble(TitleMain *client, TitleWindow *window, int x, int y);
126 int handle_up_event();
127 int handle_down_event();
129 TitleMain *client;
130 TitleWindow *window;
133 class TitleItalic : public BC_CheckBox
135 public:
136 TitleItalic(TitleMain *client, TitleWindow *window, int x, int y);
137 int handle_event();
138 TitleMain *client;
139 TitleWindow *window;
141 class TitleBold : public BC_CheckBox
143 public:
144 TitleBold(TitleMain *client, TitleWindow *window, int x, int y);
145 int handle_event();
146 TitleMain *client;
147 TitleWindow *window;
150 class TitleStroke : public BC_CheckBox
152 public:
153 TitleStroke(TitleMain *client, TitleWindow *window, int x, int y);
154 int handle_event();
155 TitleMain *client;
156 TitleWindow *window;
160 class TitleSize : public BC_PopupTextBox
162 public:
163 TitleSize(TitleMain *client, TitleWindow *window, int x, int y, char *text);
164 ~TitleSize();
165 int handle_event();
166 void update(int size);
167 TitleMain *client;
168 TitleWindow *window;
170 class TitleEncoding : public BC_PopupTextBox
172 public:
173 TitleEncoding(TitleMain *client, TitleWindow *window, int x, int y);
174 ~TitleEncoding();
175 int handle_event();
176 TitleMain *client;
177 TitleWindow *window;
179 class TitleColorButton : public BC_GenericButton
181 public:
182 TitleColorButton(TitleMain *client, TitleWindow *window, int x, int y);
183 int handle_event();
184 TitleMain *client;
185 TitleWindow *window;
187 class TitleColorStrokeButton : public BC_GenericButton
189 public:
190 TitleColorStrokeButton(TitleMain *client, TitleWindow *window, int x, int y);
191 int handle_event();
192 TitleMain *client;
193 TitleWindow *window;
195 class TitleMotion : public BC_PopupTextBox
197 public:
198 TitleMotion(TitleMain *client, TitleWindow *window, int x, int y);
199 int handle_event();
200 TitleMain *client;
201 TitleWindow *window;
203 class TitleLoop : public BC_CheckBox
205 public:
206 TitleLoop(TitleMain *client, int x, int y);
207 int handle_event();
208 TitleMain *client;
209 TitleWindow *window;
211 class TitleTimecode : public BC_CheckBox
213 public:
214 TitleTimecode(TitleMain *client, int x, int y);
215 int handle_event();
216 TitleMain *client;
217 TitleWindow *window;
219 class TitleFade : public BC_TextBox
221 public:
222 TitleFade(TitleMain *client, TitleWindow *window, double *value, int x, int y);
223 int handle_event();
224 TitleMain *client;
225 TitleWindow *window;
226 double *value;
228 class TitleFont : public BC_PopupTextBox
230 public:
231 TitleFont(TitleMain *client, TitleWindow *window, int x, int y);
232 int handle_event();
233 TitleMain *client;
234 TitleWindow *window;
236 class TitleText : public BC_ScrollTextBox
238 public:
239 TitleText(TitleMain *client,
240 TitleWindow *window,
241 int x,
242 int y,
243 int w,
244 int h);
245 int handle_event();
246 TitleMain *client;
247 TitleWindow *window;
249 class TitleX : public BC_TumbleTextBox
251 public:
252 TitleX(TitleMain *client, TitleWindow *window, int x, int y);
253 int handle_event();
254 TitleMain *client;
255 TitleWindow *window;
257 class TitleY : public BC_TumbleTextBox
259 public:
260 TitleY(TitleMain *client, TitleWindow *window, int x, int y);
261 int handle_event();
262 TitleMain *client;
263 TitleWindow *window;
265 class TitleStrokeW : public BC_TumbleTextBox
267 public:
268 TitleStrokeW(TitleMain *client, TitleWindow *window, int x, int y);
269 int handle_event();
270 TitleMain *client;
271 TitleWindow *window;
273 class TitleDropShadow : public BC_TumbleTextBox
275 public:
276 TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y);
277 int handle_event();
278 TitleMain *client;
279 TitleWindow *window;
282 class TitleSpeed : public BC_TumbleTextBox
284 public:
285 TitleSpeed(TitleMain *client, TitleWindow *window, int x, int y);
286 int handle_event();
287 TitleMain *client;
290 class TitleLeft : public BC_Radial
292 public:
293 TitleLeft(TitleMain *client, TitleWindow *window, int x, int y);
294 int handle_event();
295 TitleMain *client;
296 TitleWindow *window;
298 class TitleCenter : public BC_Radial
300 public:
301 TitleCenter(TitleMain *client, TitleWindow *window, int x, int y);
302 int handle_event();
303 TitleMain *client;
304 TitleWindow *window;
306 class TitleRight : public BC_Radial
308 public:
309 TitleRight(TitleMain *client, TitleWindow *window, int x, int y);
310 int handle_event();
311 TitleMain *client;
312 TitleWindow *window;
315 class TitleTop : public BC_Radial
317 public:
318 TitleTop(TitleMain *client, TitleWindow *window, int x, int y);
319 int handle_event();
320 TitleMain *client;
321 TitleWindow *window;
323 class TitleMid : public BC_Radial
325 public:
326 TitleMid(TitleMain *client, TitleWindow *window, int x, int y);
327 int handle_event();
328 TitleMain *client;
329 TitleWindow *window;
331 class TitleBottom : public BC_Radial
333 public:
334 TitleBottom(TitleMain *client, TitleWindow *window, int x, int y);
335 int handle_event();
336 TitleMain *client;
337 TitleWindow *window;
340 class TitleColorThread : public ColorThread
342 public:
343 TitleColorThread(TitleMain *client, TitleWindow *window);
344 virtual int handle_new_color(int output, int alpha);
345 TitleMain *client;
346 TitleWindow *window;
349 class TitleColorStrokeThread : public ColorThread
351 public:
352 TitleColorStrokeThread(TitleMain *client, TitleWindow *window);
353 int handle_event(int output);
354 TitleMain *client;
355 TitleWindow *window;
358 #endif