00001 #ifndef SHAPEWIPE_H
00002 #define SHAPEWIPE_H
00003
00004 class ShapeWipeMain;
00005 class ShapeWipeWindow;
00006
00007 #include "overlayframe.inc"
00008 #include "pluginvclient.h"
00009 #include "vframe.inc"
00010
00011 class ShapeWipeW2B : public BC_Radial
00012 {
00013 public:
00014 ShapeWipeW2B(ShapeWipeMain *plugin,
00015 ShapeWipeWindow *window,
00016 int x,
00017 int y);
00018 int handle_event();
00019 ShapeWipeMain *plugin;
00020 ShapeWipeWindow *window;
00021 };
00022
00023 class ShapeWipeB2W : public BC_Radial
00024 {
00025 public:
00026 ShapeWipeB2W(ShapeWipeMain *plugin,
00027 ShapeWipeWindow *window,
00028 int x,
00029 int y);
00030 int handle_event();
00031 ShapeWipeMain *plugin;
00032 ShapeWipeWindow *window;
00033 };
00034
00035 class ShapeWipeFilename : public BC_TextBox
00036 {
00037 public:
00038 ShapeWipeFilename(ShapeWipeMain *plugin,
00039 ShapeWipeWindow *window,
00040 char *value,
00041 int x,
00042 int y);
00043 int handle_event();
00044 ShapeWipeMain *plugin;
00045 ShapeWipeWindow *window;
00046 char *value;
00047 };
00048
00049 class ShapeWipeBrowseButton : public BC_GenericButton
00050 {
00051 public:
00052 ShapeWipeBrowseButton(ShapeWipeMain *plugin,
00053 ShapeWipeWindow *window,
00054 ShapeWipeFilename *filename,
00055 int x,
00056 int y);
00057 int handle_event();
00058 ShapeWipeMain *plugin;
00059 ShapeWipeWindow *window;
00060 ShapeWipeFilename *filename;
00061 };
00062
00063 class ShapeWipeAntiAlias : public BC_CheckBox
00064 {
00065 public:
00066 ShapeWipeAntiAlias(ShapeWipeMain *plugin,
00067 ShapeWipeWindow *window,
00068 int x,
00069 int y);
00070 int handle_event();
00071 ShapeWipeMain *plugin;
00072 ShapeWipeWindow *window;
00073 };
00074
00075
00076 class ShapeWipePreserveAspectRatio : public BC_CheckBox
00077 {
00078 public:
00079 ShapeWipePreserveAspectRatio(ShapeWipeMain *plugin,
00080 ShapeWipeWindow *window,
00081 int x,
00082 int y);
00083 int handle_event();
00084 ShapeWipeMain *plugin;
00085 ShapeWipeWindow *window;
00086 };
00087
00088
00089 class ShapeWipeLoad : public BC_FileBox
00090 {
00091 public:
00092 ShapeWipeLoad(ShapeWipeFilename *filename,
00093 char *init_directory);
00094 ShapeWipeFilename *filename;
00095 };
00096
00097 class ShapeWipeWindow : public BC_Window
00098 {
00099 public:
00100 ShapeWipeWindow(ShapeWipeMain *plugin, int x, int y);
00101 void create_objects();
00102 int close_event();
00103 void reset_pattern_image();
00104 ShapeWipeMain *plugin;
00105 ShapeWipeW2B *left;
00106 ShapeWipeB2W *right;
00107 ShapeWipeFilename *filename_widget;
00108 };
00109
00110 PLUGIN_THREAD_HEADER(ShapeWipeMain, ShapeWipeThread, ShapeWipeWindow)
00111
00112 class ShapeWipeMain : public PluginVClient
00113 {
00114 public:
00115 ShapeWipeMain(PluginServer *server);
00116 ~ShapeWipeMain();
00117
00118
00119 void load_configuration();
00120 int process_realtime(VFrame *incoming, VFrame *outgoing);
00121 int load_defaults();
00122 int save_defaults();
00123 void save_data(KeyFrame *keyframe);
00124 void read_data(KeyFrame *keyframe);
00125 int show_gui();
00126 void raise_window();
00127 int uses_gui();
00128 int is_transition();
00129 int is_video();
00130 char* plugin_title();
00131 int set_string();
00132 VFrame* new_picon();
00133 int read_pattern_image(int new_frame_width, int new_frame_height);
00134 void reset_pattern_image();
00135
00136 int direction;
00137 char filename[BCTEXTLEN];
00138 char last_read_filename[BCTEXTLEN];
00139 unsigned char **pattern_image;
00140 unsigned char min_value;
00141 unsigned char max_value;
00142 int frame_width;
00143 int frame_height;
00144 int antialias;
00145 int preserve_aspect;
00146 int last_preserve_aspect;
00147 ShapeWipeThread *thread;
00148 BC_Hash *defaults;
00149 };
00150
00151 #endif