00001 #ifndef TITLEWINDOW_H
00002 #define TITLEWINDOW_H
00003
00004 #include "guicast.h"
00005
00006 class TitleThread;
00007 class TitleWindow;
00008 class TitleInterlace;
00009
00010 #include "colorpicker.h"
00011 #include "filexml.h"
00012 #include "mutex.h"
00013 #include "title.h"
00014
00015
00016 PLUGIN_THREAD_HEADER(TitleMain, TitleThread, TitleWindow)
00017
00018
00019
00020 class TitleFontTumble;
00021 class TitleItalic;
00022 class TitleBold;
00023 class TitleSize;
00024 class TitleEncoding;
00025 class TitleColorButton;
00026 class TitleColorStrokeButton;
00027 class TitleStroke;
00028 class TitleStrokeW;
00029 class TitleDropShadow;
00030 class TitleMotion;
00031 class TitleLoop;
00032 class TitleFade;
00033 class TitleFont;
00034 class TitleText;
00035 class TitleX;
00036 class TitleY;
00037 class TitleLeft;
00038 class TitleCenter;
00039 class TitleRight;class TitleTop;
00040 class TitleMid;
00041 class TitleBottom;
00042 class TitleColorThread;
00043 class TitleColorStrokeThread;
00044 class TitleSpeed;
00045 class TitleTimecode;
00046 class TitleTimecodeFormat;
00047
00048 class TitleWindow : public BC_Window
00049 {
00050 public:
00051 TitleWindow(TitleMain *client, int x, int y);
00052 ~TitleWindow();
00053
00054 int create_objects();
00055 int close_event();
00056 int resize_event(int w, int h);
00057 void update_color();
00058 void update_justification();
00059 void update();
00060 void previous_font();
00061 void next_font();
00062
00063 TitleMain *client;
00064
00065 BC_Title *font_title;
00066 TitleFont *font;
00067 TitleFontTumble *font_tumbler;
00068 BC_Title *x_title;
00069 TitleX *title_x;
00070 BC_Title *y_title;
00071 TitleY *title_y;
00072 BC_Title *dropshadow_title;
00073 TitleDropShadow *dropshadow;
00074 BC_Title *style_title;
00075 TitleItalic *italic;
00076 TitleBold *bold;
00077
00078 #ifdef USE_OUTLINE
00079 TitleStroke *stroke;
00080 TitleColorStrokeButton *color_stroke_button;
00081 TitleColorStrokeThread *color_stroke_thread;
00082 BC_Title *strokewidth_title;
00083 TitleStrokeW *stroke_width;
00084 int color_stroke_x, color_stroke_y;
00085 #endif
00086
00087 int color_x, color_y;
00088 BC_Title *size_title;
00089 BC_Title *encoding_title;
00090 TitleSize *size;
00091 TitleEncoding *encoding;
00092 TitleColorButton *color_button;
00093 TitleColorThread *color_thread;
00094 BC_Title *motion_title;
00095 TitleMotion *motion;
00096 TitleLoop *loop;
00097 BC_Title *fadein_title;
00098 TitleFade *fade_in;
00099 BC_Title *fadeout_title;
00100 TitleFade *fade_out;
00101 BC_Title *text_title;
00102 TitleText *text;
00103 BC_Title *justify_title;
00104 TitleLeft *left;
00105 TitleCenter *center;
00106 TitleRight *right;
00107 TitleTop *top;
00108 TitleMid *mid;
00109 TitleBottom *bottom;
00110 BC_Title *speed_title;
00111 TitleSpeed *speed;
00112 TitleTimecode *timecode;
00113 TitleTimecodeFormat *timecodeformat;
00114
00115
00116 ArrayList<BC_ListBoxItem*> sizes;
00117 ArrayList<BC_ListBoxItem*> encodings;
00118 ArrayList<BC_ListBoxItem*> paths;
00119 ArrayList<BC_ListBoxItem*> fonts;
00120 ArrayList<BC_ListBoxItem*> timecodeformats;
00121 };
00122
00123
00124 class TitleFontTumble : public BC_Tumbler
00125 {
00126 public:
00127 TitleFontTumble(TitleMain *client, TitleWindow *window, int x, int y);
00128
00129 int handle_up_event();
00130 int handle_down_event();
00131
00132 TitleMain *client;
00133 TitleWindow *window;
00134 };
00135
00136 class TitleItalic : public BC_CheckBox
00137 {
00138 public:
00139 TitleItalic(TitleMain *client, TitleWindow *window, int x, int y);
00140 int handle_event();
00141 TitleMain *client;
00142 TitleWindow *window;
00143 };
00144 class TitleBold : public BC_CheckBox
00145 {
00146 public:
00147 TitleBold(TitleMain *client, TitleWindow *window, int x, int y);
00148 int handle_event();
00149 TitleMain *client;
00150 TitleWindow *window;
00151 };
00152
00153 class TitleStroke : public BC_CheckBox
00154 {
00155 public:
00156 TitleStroke(TitleMain *client, TitleWindow *window, int x, int y);
00157 int handle_event();
00158 TitleMain *client;
00159 TitleWindow *window;
00160 };
00161
00162
00163 class TitleSize : public BC_PopupTextBox
00164 {
00165 public:
00166 TitleSize(TitleMain *client, TitleWindow *window, int x, int y, char *text);
00167 ~TitleSize();
00168 int handle_event();
00169 void update(int size);
00170 TitleMain *client;
00171 TitleWindow *window;
00172 };
00173 class TitleEncoding : public BC_PopupTextBox
00174 {
00175 public:
00176 TitleEncoding(TitleMain *client, TitleWindow *window, int x, int y);
00177 ~TitleEncoding();
00178 int handle_event();
00179 TitleMain *client;
00180 TitleWindow *window;
00181 };
00182 class TitleColorButton : public BC_GenericButton
00183 {
00184 public:
00185 TitleColorButton(TitleMain *client, TitleWindow *window, int x, int y);
00186 int handle_event();
00187 TitleMain *client;
00188 TitleWindow *window;
00189 };
00190 class TitleColorStrokeButton : public BC_GenericButton
00191 {
00192 public:
00193 TitleColorStrokeButton(TitleMain *client, TitleWindow *window, int x, int y);
00194 int handle_event();
00195 TitleMain *client;
00196 TitleWindow *window;
00197 };
00198 class TitleMotion : public BC_PopupTextBox
00199 {
00200 public:
00201 TitleMotion(TitleMain *client, TitleWindow *window, int x, int y);
00202 int handle_event();
00203 TitleMain *client;
00204 TitleWindow *window;
00205 };
00206 class TitleLoop : public BC_CheckBox
00207 {
00208 public:
00209 TitleLoop(TitleMain *client, int x, int y);
00210 int handle_event();
00211 TitleMain *client;
00212 TitleWindow *window;
00213 };
00214 class TitleTimecode : public BC_CheckBox
00215 {
00216 public:
00217 TitleTimecode(TitleMain *client, int x, int y);
00218 int handle_event();
00219 TitleMain *client;
00220 TitleWindow *window;
00221 };
00222 class TitleTimecodeFormat : public BC_PopupTextBox
00223 {
00224 public:
00225 TitleTimecodeFormat(TitleMain *client, TitleWindow *window, int x, int y);
00226 ~TitleTimecodeFormat();
00227 int handle_event();
00228 TitleMain *client;
00229 TitleWindow *window;
00230 };
00231 class TitleFade : public BC_TextBox
00232 {
00233 public:
00234 TitleFade(TitleMain *client, TitleWindow *window, double *value, int x, int y);
00235 int handle_event();
00236 TitleMain *client;
00237 TitleWindow *window;
00238 double *value;
00239 };
00240 class TitleFont : public BC_PopupTextBox
00241 {
00242 public:
00243 TitleFont(TitleMain *client, TitleWindow *window, int x, int y);
00244 int handle_event();
00245 TitleMain *client;
00246 TitleWindow *window;
00247 };
00248 class TitleText : public BC_ScrollTextBox
00249 {
00250 public:
00251 TitleText(TitleMain *client,
00252 TitleWindow *window,
00253 int x,
00254 int y,
00255 int w,
00256 int h);
00257 int handle_event();
00258 TitleMain *client;
00259 TitleWindow *window;
00260 };
00261 class TitleX : public BC_TumbleTextBox
00262 {
00263 public:
00264 TitleX(TitleMain *client, TitleWindow *window, int x, int y);
00265 int handle_event();
00266 TitleMain *client;
00267 TitleWindow *window;
00268 };
00269 class TitleY : public BC_TumbleTextBox
00270 {
00271 public:
00272 TitleY(TitleMain *client, TitleWindow *window, int x, int y);
00273 int handle_event();
00274 TitleMain *client;
00275 TitleWindow *window;
00276 };
00277 class TitleStrokeW : public BC_TumbleTextBox
00278 {
00279 public:
00280 TitleStrokeW(TitleMain *client, TitleWindow *window, int x, int y);
00281 int handle_event();
00282 TitleMain *client;
00283 TitleWindow *window;
00284 };
00285 class TitleDropShadow : public BC_TumbleTextBox
00286 {
00287 public:
00288 TitleDropShadow(TitleMain *client, TitleWindow *window, int x, int y);
00289 int handle_event();
00290 TitleMain *client;
00291 TitleWindow *window;
00292 };
00293
00294 class TitleSpeed : public BC_TumbleTextBox
00295 {
00296 public:
00297 TitleSpeed(TitleMain *client, TitleWindow *window, int x, int y);
00298 int handle_event();
00299 TitleMain *client;
00300 };
00301
00302 class TitleLeft : public BC_Radial
00303 {
00304 public:
00305 TitleLeft(TitleMain *client, TitleWindow *window, int x, int y);
00306 int handle_event();
00307 TitleMain *client;
00308 TitleWindow *window;
00309 };
00310 class TitleCenter : public BC_Radial
00311 {
00312 public:
00313 TitleCenter(TitleMain *client, TitleWindow *window, int x, int y);
00314 int handle_event();
00315 TitleMain *client;
00316 TitleWindow *window;
00317 };
00318 class TitleRight : public BC_Radial
00319 {
00320 public:
00321 TitleRight(TitleMain *client, TitleWindow *window, int x, int y);
00322 int handle_event();
00323 TitleMain *client;
00324 TitleWindow *window;
00325 };
00326
00327 class TitleTop : public BC_Radial
00328 {
00329 public:
00330 TitleTop(TitleMain *client, TitleWindow *window, int x, int y);
00331 int handle_event();
00332 TitleMain *client;
00333 TitleWindow *window;
00334 };
00335 class TitleMid : public BC_Radial
00336 {
00337 public:
00338 TitleMid(TitleMain *client, TitleWindow *window, int x, int y);
00339 int handle_event();
00340 TitleMain *client;
00341 TitleWindow *window;
00342 };
00343 class TitleBottom : public BC_Radial
00344 {
00345 public:
00346 TitleBottom(TitleMain *client, TitleWindow *window, int x, int y);
00347 int handle_event();
00348 TitleMain *client;
00349 TitleWindow *window;
00350 };
00351
00352 class TitleColorThread : public ColorThread
00353 {
00354 public:
00355 TitleColorThread(TitleMain *client, TitleWindow *window);
00356 virtual int handle_new_color(int output, int alpha);
00357 TitleMain *client;
00358 TitleWindow *window;
00359 };
00360
00361 class TitleColorStrokeThread : public ColorThread
00362 {
00363 public:
00364 TitleColorStrokeThread(TitleMain *client, TitleWindow *window);
00365 int handle_event(int output);
00366 TitleMain *client;
00367 TitleWindow *window;
00368 };
00369
00370 #endif