4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #include "colorpicker.h"
40 class TitleFontTumble;
41 class TitleSizeTumble;
47 class TitleColorButton;
48 class TitleDropShadow;
59 class TitleRight;class TitleTop;
62 class TitleColorThread;
65 class TitleTimecodeFormat;
68 class TitleWindow : public PluginClientWindow
71 TitleWindow(TitleMain *client);
74 void create_objects();
75 int resize_event(int w, int h);
77 void update_justification();
86 TitleFontTumble *font_tumbler;
91 BC_Title *dropshadow_title;
92 TitleDropShadow *dropshadow;
93 BC_Title *outline_title;
94 TitleOutline *outline;
95 BC_Title *style_title;
100 int color_x, color_y;
101 int outline_color_x, outline_color_y;
102 BC_Title *size_title;
104 TitleSizeTumble *size_tumbler;
105 BC_Title *pitch_title;
107 BC_Title *encoding_title;
108 TitleEncoding *encoding;
109 TitleColorButton *color_button;
110 TitleColorThread *color_thread;
111 TitleColorButton *outline_color_button;
112 TitleColorThread *outline_color_thread;
113 BC_Title *motion_title;
115 TitleLinePitch *line_pitch;
117 BC_Title *fadein_title;
119 BC_Title *fadeout_title;
121 BC_Title *text_title;
123 BC_Title *justify_title;
130 BC_Title *speed_title;
132 TitleTimecode *timecode;
133 TitleTimecodeFormat *timecode_format;
136 ArrayList<BC_ListBoxItem*> sizes;
137 ArrayList<BC_ListBoxItem*> encodings;
138 ArrayList<BC_ListBoxItem*> paths;
139 ArrayList<BC_ListBoxItem*> fonts;
143 class TitleFontTumble : public BC_Tumbler
146 TitleFontTumble(TitleMain *client, TitleWindow *window, int x, int y);
148 int handle_up_event();
149 int handle_down_event();
156 class TitleSizeTumble : public BC_Tumbler
159 TitleSizeTumble(TitleMain *client, TitleWindow *window, int x, int y);
161 int handle_up_event();
162 int handle_down_event();
170 class TitleItalic : public BC_CheckBox
173 TitleItalic(TitleMain *client, TitleWindow *window, int x, int y);
178 class TitleBold : public BC_CheckBox
181 TitleBold(TitleMain *client, TitleWindow *window, int x, int y);
188 class TitleSize : public BC_PopupTextBox
191 TitleSize(TitleMain *client, TitleWindow *window, int x, int y, char *text);
194 void update(int size);
199 class TitlePitch : public BC_TumbleTextBox
202 TitlePitch(TitleMain *client, TitleWindow *window, int x, int y, int *value);
211 class TitleEncoding : public BC_PopupTextBox
214 TitleEncoding(TitleMain *client, TitleWindow *window, int x, int y, char *text);
221 class TitleColorButton : public BC_GenericButton
224 TitleColorButton(TitleMain *client,
235 class TitleMotion : public BC_PopupTextBox
238 TitleMotion(TitleMain *client, TitleWindow *window, int x, int y);
243 class TitleLoop : public BC_CheckBox
246 TitleLoop(TitleMain *client, int x, int y);
251 class TitleLinePitch : public BC_CheckBox
254 TitleLinePitch(TitleMain *client, int x, int y);
260 class TitleTimecode : public BC_CheckBox
263 TitleTimecode(TitleMain *client, int x, int y);
268 class TitleTimecodeFormat : public BC_PopupMenu
271 TitleTimecodeFormat(TitleMain *client, int x, int y, const char *text);
272 void create_objects();
273 int update(int timecode_format);
278 class TitleFade : public BC_TextBox
281 TitleFade(TitleMain *client, TitleWindow *window, double *value, int x, int y);
287 class TitleFont : public BC_PopupTextBox
290 TitleFont(TitleMain *client, TitleWindow *window, int x, int y);
295 class TitleText : public BC_ScrollTextBox
298 TitleText(TitleMain *client,
308 class TitleX : public BC_TumbleTextBox
311 TitleX(TitleMain *client, TitleWindow *window, int x, int y);
316 class TitleY : public BC_TumbleTextBox
319 TitleY(TitleMain *client, TitleWindow *window, int x, int y);
325 class TitleStrokeW : public BC_TumbleTextBox
328 TitleStrokeW(TitleMain *client, TitleWindow *window, int x, int y);
334 class TitleDropShadow : public BC_TumbleTextBox
337 TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y);
343 class TitleOutline : public BC_TumbleTextBox
346 TitleOutline(TitleMain *client, TitleWindow *window, int x, int y);
352 class TitleSpeed : public BC_TumbleTextBox
355 TitleSpeed(TitleMain *client, TitleWindow *window, int x, int y);
360 class TitleLeft : public BC_Radial
363 TitleLeft(TitleMain *client, TitleWindow *window, int x, int y);
368 class TitleCenter : public BC_Radial
371 TitleCenter(TitleMain *client, TitleWindow *window, int x, int y);
376 class TitleRight : public BC_Radial
379 TitleRight(TitleMain *client, TitleWindow *window, int x, int y);
385 class TitleTop : public BC_Radial
388 TitleTop(TitleMain *client, TitleWindow *window, int x, int y);
393 class TitleMid : public BC_Radial
396 TitleMid(TitleMain *client, TitleWindow *window, int x, int y);
401 class TitleBottom : public BC_Radial
404 TitleBottom(TitleMain *client, TitleWindow *window, int x, int y);
410 class TitleColorThread : public ColorThread
413 TitleColorThread(TitleMain *client, TitleWindow *window, int is_outline);
414 virtual int handle_new_color(int output, int alpha);
421 class TitleColorStrokeThread : public ColorThread
424 TitleColorStrokeThread(TitleMain *client, TitleWindow *window);
425 int handle_event(int output);