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;
48 class TitleColorButton;
49 class TitleOutlineColorButton;
50 class TitleDropShadow;
63 class TitleRight;class TitleTop;
66 class TitleColorThread;
69 class TitleTimecodeFormat;
72 class TitleBackground;
73 class TitleBackgroundPath;
74 class TitleLoopPlayback;
77 class TitleCurSubMenu;
78 class TitleCurSubMenuItem;
79 class TitleFontsPopup;
81 class TitleWindow : public PluginClientWindow
84 TitleWindow(TitleMain *client);
87 void create_objects();
88 int resize_event(int w, int h);
89 int grab_event(XEvent *event);
91 void update_justification();
95 int insert_ibeam(const char *txt, int adv);
101 TitleFontTumble *font_tumbler;
110 BC_Title *dropshadow_title;
111 TitleDropShadow *dropshadow;
112 BC_Title *outline_title;
113 TitleOutline *outline;
114 BC_Title *stroker_title;
115 TitleStroker *stroker;
116 BC_Title *style_title;
120 TitleCurPopup *cur_popup;
121 TitleFontsPopup *fonts_popup;
123 int color_x, color_y;
124 int outline_color_x, outline_color_y;
125 int drag_dx, drag_dy, dragging;
128 BC_Title *size_title;
130 TitleSizeTumble *size_tumbler;
131 BC_Title *pitch_title;
133 BC_Title *encoding_title;
134 TitleEncoding *encoding;
135 TitleColorButton *color_button;
136 TitleColorThread *color_thread;
137 TitleOutlineColorButton *outline_color_button;
138 TitleColorThread *outline_color_thread;
139 BC_Title *motion_title;
141 TitleLinePitch *line_pitch;
143 BC_Title *fadein_title;
145 BC_Title *fadeout_title;
147 BC_Title *text_title;
149 BC_Title *justify_title;
156 BC_Title *speed_title;
158 TitleTimecode *timecode;
159 TitleTimecodeFormat *timecode_format;
160 TitleBackground *background;
161 TitleBackgroundPath *background_path;
162 BrowseButton *background_browse;
163 TitleLoopPlayback *loop_playback;
166 ArrayList<BC_ListBoxItem*> sizes;
167 ArrayList<BC_ListBoxItem*> encodings;
168 ArrayList<BC_ListBoxItem*> paths;
169 ArrayList<BC_ListBoxItem*> fonts;
173 class TitleFontTumble : public BC_Tumbler
176 TitleFontTumble(TitleMain *client, TitleWindow *window, int x, int y);
178 int handle_up_event();
179 int handle_down_event();
186 class TitleSizeTumble : public BC_Tumbler
189 TitleSizeTumble(TitleMain *client, TitleWindow *window, int x, int y);
191 int handle_up_event();
192 int handle_down_event();
200 class TitleItalic : public BC_CheckBox
203 TitleItalic(TitleMain *client, TitleWindow *window, int x, int y);
208 class TitleBold : public BC_CheckBox
211 TitleBold(TitleMain *client, TitleWindow *window, int x, int y);
216 class TitleDrag : public BC_CheckBox
219 TitleDrag(TitleMain *client, TitleWindow *window, int x, int y);
226 class TitleSize : public BC_PopupTextBox
229 TitleSize(TitleMain *client, TitleWindow *window, int x, int y, char *text);
232 void update(int size);
237 class TitlePitch : public BC_TumbleTextBox
240 TitlePitch(TitleMain *client, TitleWindow *window, int x, int y, int *value);
249 class TitleEncoding : public BC_PopupTextBox
252 TitleEncoding(TitleMain *client, TitleWindow *window, int x, int y, char *text);
259 class TitleColorButton : public BC_GenericButton
262 TitleColorButton(TitleMain *client, TitleWindow *window, int x, int y);
267 class TitleOutlineColorButton : public BC_GenericButton
270 TitleOutlineColorButton(TitleMain *client, TitleWindow *window, int x, int y);
276 class TitleMotion : public BC_PopupTextBox
279 TitleMotion(TitleMain *client, TitleWindow *window, int x, int y);
284 class TitleLoop : public BC_CheckBox
287 TitleLoop(TitleMain *client, int x, int y);
292 class TitleLinePitch : public BC_CheckBox
295 TitleLinePitch(TitleMain *client, int x, int y);
301 class TitleTimecode : public BC_CheckBox
304 TitleTimecode(TitleMain *client, int x, int y);
309 class TitleTimecodeFormat : public BC_PopupMenu
312 TitleTimecodeFormat(TitleMain *client, int x, int y, const char *text);
313 void create_objects();
314 int update(int timecode_format);
319 class TitleFade : public BC_TextBox
322 TitleFade(TitleMain *client, TitleWindow *window, double *value, int x, int y);
328 class TitleFont : public BC_PopupTextBox
331 TitleFont(TitleMain *client, TitleWindow *window, int x, int y);
336 class TitleText : public BC_ScrollTextBox
339 TitleText(TitleMain *client,
346 int button_press_event();
350 class TitleX : public BC_TumbleTextBox
353 TitleX(TitleMain *client, TitleWindow *window, int x, int y);
358 class TitleY : public BC_TumbleTextBox
361 TitleY(TitleMain *client, TitleWindow *window, int x, int y);
366 class TitleW : public BC_TumbleTextBox
369 TitleW(TitleMain *client, TitleWindow *window, int x, int y);
374 class TitleH : public BC_TumbleTextBox
377 TitleH(TitleMain *client, TitleWindow *window, int x, int y);
383 class TitleDropShadow : public BC_TumbleTextBox
386 TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y);
392 class TitleOutline : public BC_TumbleTextBox
395 TitleOutline(TitleMain *client, TitleWindow *window, int x, int y);
401 class TitleStroker : public BC_TumbleTextBox
404 TitleStroker(TitleMain *client, TitleWindow *window, int x, int y);
410 class TitleSpeed : public BC_TumbleTextBox
413 TitleSpeed(TitleMain *client, TitleWindow *window, int x, int y);
418 class TitleLeft : public BC_Radial
421 TitleLeft(TitleMain *client, TitleWindow *window, int x, int y);
426 class TitleCenter : public BC_Radial
429 TitleCenter(TitleMain *client, TitleWindow *window, int x, int y);
434 class TitleRight : public BC_Radial
437 TitleRight(TitleMain *client, TitleWindow *window, int x, int y);
443 class TitleTop : public BC_Radial
446 TitleTop(TitleMain *client, TitleWindow *window, int x, int y);
451 class TitleMid : public BC_Radial
454 TitleMid(TitleMain *client, TitleWindow *window, int x, int y);
459 class TitleBottom : public BC_Radial
462 TitleBottom(TitleMain *client, TitleWindow *window, int x, int y);
467 class TitleColorThread : public ColorThread
470 TitleColorThread(TitleMain *client, TitleWindow *window, int is_outline);
471 virtual int handle_new_color(int output, int alpha);
476 class TitleBackground : public BC_CheckBox
479 TitleBackground(TitleMain *client, TitleWindow *window, int x, int y);
484 class TitleBackgroundPath : public BC_TextBox
487 TitleBackgroundPath(TitleMain *client, TitleWindow *window, int x, int y);
492 class TitleLoopPlayback : public BC_CheckBox
495 TitleLoopPlayback(TitleMain *client, int x, int y);
502 class TitleCurPopup : public BC_PopupMenu
505 TitleCurPopup(TitleMain *client, TitleWindow *window);
508 void create_objects();
514 class TitleCurItem : public BC_MenuItem
517 TitleCurItem(TitleCurPopup *popup, const char *text);
520 TitleCurPopup *popup;
523 class TitleCurSubMenu : public BC_SubMenu
526 TitleCurSubMenu(TitleCurItem *cur_item);
529 TitleCurItem *cur_item;
532 class TitleCurSubMenuItem : public BC_MenuItem
535 TitleCurSubMenuItem(TitleCurSubMenu *submenu, const char *text);
536 ~TitleCurSubMenuItem();
539 TitleCurSubMenu *submenu;
542 class TitleFontsPopup : public BC_ListBox
545 TitleFontsPopup(TitleMain *client, TitleWindow *window);