r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / scale / scale.h
blob7c86ec790a66c7d9a0a6d4978aed4a0b4170f604
1 #ifndef SCALE_H
2 #define SCALE_H
4 // the simplest plugin possible
6 class ScaleMain;
7 class ScaleWidth;
8 class ScaleHeight;
9 class ScaleConstrain;
10 class ScaleThread;
11 class ScaleWin;
13 #include "defaults.h"
14 #include "guicast.h"
15 #include "mutex.h"
16 #include "scalewin.h"
17 #include "overlayframe.h"
18 #include "pluginvclient.h"
20 class ScaleConfig
22 public:
23 ScaleConfig();
25 void copy_from(ScaleConfig &src);
26 int equivalent(ScaleConfig &src);
27 void interpolate(ScaleConfig &prev,
28 ScaleConfig &next,
29 int64_t prev_frame,
30 int64_t next_frame,
31 int64_t current_frame);
33 float w, h;
34 int constrain;
38 class ScaleWidth : public BC_TumbleTextBox
40 public:
41 ScaleWidth(ScaleWin *win, ScaleMain *client, int x, int y);
42 ~ScaleWidth();
43 int handle_event();
45 ScaleMain *client;
46 ScaleWin *win;
49 class ScaleHeight : public BC_TumbleTextBox
51 public:
52 ScaleHeight(ScaleWin *win, ScaleMain *client, int x, int y);
53 ~ScaleHeight();
54 int handle_event();
56 ScaleMain *client;
57 ScaleWin *win;
60 class ScaleConstrain : public BC_CheckBox
62 public:
63 ScaleConstrain(ScaleMain *client, int x, int y);
64 ~ScaleConstrain();
65 int handle_event();
67 ScaleMain *client;
70 class ScaleWin : public BC_Window
72 public:
73 ScaleWin(ScaleMain *client, int x, int y);
74 ~ScaleWin();
76 int create_objects();
77 int close_event();
79 ScaleMain *client;
80 ScaleWidth *width;
81 ScaleHeight *height;
82 ScaleConstrain *constrain;
85 PLUGIN_THREAD_HEADER(ScaleMain, ScaleThread, ScaleWin)
87 class ScaleMain : public PluginVClient
89 public:
90 ScaleMain(PluginServer *server);
91 ~ScaleMain();
93 // required for all realtime plugins
94 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
95 int is_realtime();
96 char* plugin_title();
97 int show_gui();
98 void raise_window();
99 int set_string();
100 void update_gui();
101 void save_data(KeyFrame *keyframe);
102 void read_data(KeyFrame *keyframe);
103 VFrame* new_picon();
104 int load_defaults();
105 int save_defaults();
106 int load_configuration();
108 // a thread for the GUI
109 ScaleThread *thread;
111 OverlayFrame *overlayer; // To scale images
112 VFrame *temp_frame; // Used if buffers are the same
113 Defaults *defaults;
114 ScaleConfig config;
118 #endif