Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / plugins / titler / titlewindow.h
blob178dbef95bbda6e82c8864092fcbd033df26dff1
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;
46 class TitleTimecodeFormat;
48 class TitleWindow : public BC_Window
50 public:
51 TitleWindow(TitleMain *client, int x, int y);
52 ~TitleWindow();
54 int create_objects();
55 int close_event();
56 int resize_event(int w, int h);
57 void update_color();
58 void update_justification();
59 void update();
60 void previous_font();
61 void next_font();
63 TitleMain *client;
65 BC_Title *font_title;
66 TitleFont *font;
67 TitleFontTumble *font_tumbler;
68 BC_Title *x_title;
69 TitleX *title_x;
70 BC_Title *y_title;
71 TitleY *title_y;
72 BC_Title *dropshadow_title;
73 TitleDropShadow *dropshadow;
74 BC_Title *style_title;
75 TitleItalic *italic;
76 TitleBold *bold;
78 #ifdef USE_OUTLINE
79 TitleStroke *stroke;
80 TitleColorStrokeButton *color_stroke_button;
81 TitleColorStrokeThread *color_stroke_thread;
82 BC_Title *strokewidth_title;
83 TitleStrokeW *stroke_width;
84 int color_stroke_x, color_stroke_y;
85 #endif
87 int color_x, color_y;
88 BC_Title *size_title;
89 BC_Title *encoding_title;
90 TitleSize *size;
91 TitleEncoding *encoding;
92 TitleColorButton *color_button;
93 TitleColorThread *color_thread;
94 BC_Title *motion_title;
95 TitleMotion *motion;
96 TitleLoop *loop;
97 BC_Title *fadein_title;
98 TitleFade *fade_in;
99 BC_Title *fadeout_title;
100 TitleFade *fade_out;
101 BC_Title *text_title;
102 TitleText *text;
103 BC_Title *justify_title;
104 TitleLeft *left;
105 TitleCenter *center;
106 TitleRight *right;
107 TitleTop *top;
108 TitleMid *mid;
109 TitleBottom *bottom;
110 BC_Title *speed_title;
111 TitleSpeed *speed;
112 TitleTimecode *timecode;
113 TitleTimecodeFormat *timecodeformat;
115 // Color preview
116 ArrayList<BC_ListBoxItem*> sizes;
117 ArrayList<BC_ListBoxItem*> encodings;
118 ArrayList<BC_ListBoxItem*> paths;
119 ArrayList<BC_ListBoxItem*> fonts;
120 ArrayList<BC_ListBoxItem*> timecodeformats;
124 class TitleFontTumble : public BC_Tumbler
126 public:
127 TitleFontTumble(TitleMain *client, TitleWindow *window, int x, int y);
129 int handle_up_event();
130 int handle_down_event();
132 TitleMain *client;
133 TitleWindow *window;
136 class TitleItalic : public BC_CheckBox
138 public:
139 TitleItalic(TitleMain *client, TitleWindow *window, int x, int y);
140 int handle_event();
141 TitleMain *client;
142 TitleWindow *window;
144 class TitleBold : public BC_CheckBox
146 public:
147 TitleBold(TitleMain *client, TitleWindow *window, int x, int y);
148 int handle_event();
149 TitleMain *client;
150 TitleWindow *window;
153 class TitleStroke : public BC_CheckBox
155 public:
156 TitleStroke(TitleMain *client, TitleWindow *window, int x, int y);
157 int handle_event();
158 TitleMain *client;
159 TitleWindow *window;
163 class TitleSize : public BC_PopupTextBox
165 public:
166 TitleSize(TitleMain *client, TitleWindow *window, int x, int y, char *text);
167 ~TitleSize();
168 int handle_event();
169 void update(int size);
170 TitleMain *client;
171 TitleWindow *window;
173 class TitleEncoding : public BC_PopupTextBox
175 public:
176 TitleEncoding(TitleMain *client, TitleWindow *window, int x, int y);
177 ~TitleEncoding();
178 int handle_event();
179 TitleMain *client;
180 TitleWindow *window;
182 class TitleColorButton : public BC_GenericButton
184 public:
185 TitleColorButton(TitleMain *client, TitleWindow *window, int x, int y);
186 int handle_event();
187 TitleMain *client;
188 TitleWindow *window;
190 class TitleColorStrokeButton : public BC_GenericButton
192 public:
193 TitleColorStrokeButton(TitleMain *client, TitleWindow *window, int x, int y);
194 int handle_event();
195 TitleMain *client;
196 TitleWindow *window;
198 class TitleMotion : public BC_PopupTextBox
200 public:
201 TitleMotion(TitleMain *client, TitleWindow *window, int x, int y);
202 int handle_event();
203 TitleMain *client;
204 TitleWindow *window;
206 class TitleLoop : public BC_CheckBox
208 public:
209 TitleLoop(TitleMain *client, int x, int y);
210 int handle_event();
211 TitleMain *client;
212 TitleWindow *window;
214 class TitleTimecode : public BC_CheckBox
216 public:
217 TitleTimecode(TitleMain *client, int x, int y);
218 int handle_event();
219 TitleMain *client;
220 TitleWindow *window;
222 class TitleTimecodeFormat : public BC_PopupTextBox
224 public:
225 TitleTimecodeFormat(TitleMain *client, TitleWindow *window, int x, int y);
226 ~TitleTimecodeFormat();
227 int handle_event();
228 TitleMain *client;
229 TitleWindow *window;
231 class TitleFade : public BC_TextBox
233 public:
234 TitleFade(TitleMain *client, TitleWindow *window, double *value, int x, int y);
235 int handle_event();
236 TitleMain *client;
237 TitleWindow *window;
238 double *value;
240 class TitleFont : public BC_PopupTextBox
242 public:
243 TitleFont(TitleMain *client, TitleWindow *window, int x, int y);
244 int handle_event();
245 TitleMain *client;
246 TitleWindow *window;
248 class TitleText : public BC_ScrollTextBox
250 public:
251 TitleText(TitleMain *client,
252 TitleWindow *window,
253 int x,
254 int y,
255 int w,
256 int h);
257 int handle_event();
258 TitleMain *client;
259 TitleWindow *window;
261 class TitleX : public BC_TumbleTextBox
263 public:
264 TitleX(TitleMain *client, TitleWindow *window, int x, int y);
265 int handle_event();
266 TitleMain *client;
267 TitleWindow *window;
269 class TitleY : public BC_TumbleTextBox
271 public:
272 TitleY(TitleMain *client, TitleWindow *window, int x, int y);
273 int handle_event();
274 TitleMain *client;
275 TitleWindow *window;
277 class TitleStrokeW : public BC_TumbleTextBox
279 public:
280 TitleStrokeW(TitleMain *client, TitleWindow *window, int x, int y);
281 int handle_event();
282 TitleMain *client;
283 TitleWindow *window;
285 class TitleDropShadow : public BC_TumbleTextBox
287 public:
288 TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y);
289 int handle_event();
290 TitleMain *client;
291 TitleWindow *window;
294 class TitleSpeed : public BC_TumbleTextBox
296 public:
297 TitleSpeed(TitleMain *client, TitleWindow *window, int x, int y);
298 int handle_event();
299 TitleMain *client;
302 class TitleLeft : public BC_Radial
304 public:
305 TitleLeft(TitleMain *client, TitleWindow *window, int x, int y);
306 int handle_event();
307 TitleMain *client;
308 TitleWindow *window;
310 class TitleCenter : public BC_Radial
312 public:
313 TitleCenter(TitleMain *client, TitleWindow *window, int x, int y);
314 int handle_event();
315 TitleMain *client;
316 TitleWindow *window;
318 class TitleRight : public BC_Radial
320 public:
321 TitleRight(TitleMain *client, TitleWindow *window, int x, int y);
322 int handle_event();
323 TitleMain *client;
324 TitleWindow *window;
327 class TitleTop : public BC_Radial
329 public:
330 TitleTop(TitleMain *client, TitleWindow *window, int x, int y);
331 int handle_event();
332 TitleMain *client;
333 TitleWindow *window;
335 class TitleMid : public BC_Radial
337 public:
338 TitleMid(TitleMain *client, TitleWindow *window, int x, int y);
339 int handle_event();
340 TitleMain *client;
341 TitleWindow *window;
343 class TitleBottom : public BC_Radial
345 public:
346 TitleBottom(TitleMain *client, TitleWindow *window, int x, int y);
347 int handle_event();
348 TitleMain *client;
349 TitleWindow *window;
352 class TitleColorThread : public ColorThread
354 public:
355 TitleColorThread(TitleMain *client, TitleWindow *window);
356 virtual int handle_new_color(int output, int alpha);
357 TitleMain *client;
358 TitleWindow *window;
361 class TitleColorStrokeThread : public ColorThread
363 public:
364 TitleColorStrokeThread(TitleMain *client, TitleWindow *window);
365 int handle_event(int output);
366 TitleMain *client;
367 TitleWindow *window;
370 #endif