Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / menueffects.h
bloba276772b4041a26410814c9d310aac911d1d4f36
1 #ifndef MENUEFFECTS_H
2 #define MENUEFFECTS_H
4 #include "asset.inc"
5 #include "bitspopup.h"
6 #include "browsebutton.h"
7 #include "compresspopup.h"
8 #include "formatpopup.h"
9 #include "formattools.h"
10 #include "loadmode.inc"
11 #include "mainmenu.inc"
12 #include "mwindow.inc"
13 #include "pluginarray.inc"
14 #include "pluginserver.inc"
15 #include "thread.h"
17 class MenuEffectThread;
18 class MenuEffects : public BC_MenuItem
20 public:
21 MenuEffects(MWindow *mwindow);
22 virtual ~MenuEffects();
24 int handle_event();
26 MWindow *mwindow;
27 MenuEffectThread *thread;
32 class MenuEffectPacket
34 public:
35 MenuEffectPacket(char *path, int64_t start, int64_t end);
36 ~MenuEffectPacket();
38 // Path of output without remote prefix
39 char path[BCTEXTLEN];
41 int64_t start;
42 int64_t end;
46 class MenuEffectThread : public Thread
48 public:
49 MenuEffectThread(MWindow *mwindow);
50 virtual ~MenuEffectThread();
52 void run();
53 int set_title(char *text); // set the effect to be run by a menuitem
54 virtual int get_recordable_tracks(Asset_GC asset) { return 0; };
55 virtual int get_derived_attributes(Asset_GC asset, BC_Hash *defaults) { return 0; };
56 virtual int save_derived_attributes(Asset_GC asset, BC_Hash *defaults) { return 0; };
57 virtual PluginArray* create_plugin_array() { return 0; };
58 virtual int64_t to_units(double position, int round) { return 0; };
59 virtual int fix_menu(char *title) {};
60 int test_existence(Asset_GC asset);
62 MWindow *mwindow;
63 char title[1024];
64 int dither, realtime, load_mode;
65 int strategy;
69 class MenuEffectItem : public BC_MenuItem
71 public:
72 MenuEffectItem(MenuEffects *menueffect, char *string);
73 virtual ~MenuEffectItem() {};
74 int handle_event();
75 MenuEffects *menueffect;
83 class MenuEffectWindowOK;
84 class MenuEffectWindowCancel;
85 class MenuEffectWindowList;
86 class MenuEffectWindowToTracks;
89 class MenuEffectWindow : public BC_Window
91 public:
92 MenuEffectWindow(MWindow *mwindow,
93 MenuEffectThread *menueffects,
94 ArrayList<BC_ListBoxItem*> *plugin_list,
95 Asset_GC asset);
96 virtual ~MenuEffectWindow();
98 int create_objects();
99 int resize_event(int w, int h);
101 BC_Title *list_title;
102 MenuEffectWindowList *list;
103 LoadMode *loadmode;
104 BC_Title *file_title;
105 FormatTools *format_tools;
106 MenuEffectThread *menueffects;
107 MWindow *mwindow;
108 ArrayList<BC_ListBoxItem*> *plugin_list;
109 Asset_GC asset;
111 int result;
114 class MenuEffectWindowOK : public BC_OKButton
116 public:
117 MenuEffectWindowOK(MenuEffectWindow *window);
119 int handle_event();
120 int keypress_event();
122 MenuEffectWindow *window;
125 class MenuEffectWindowCancel : public BC_CancelButton
127 public:
128 MenuEffectWindowCancel(MenuEffectWindow *window);
130 int handle_event();
131 int keypress_event();
133 MenuEffectWindow *window;
136 class MenuEffectWindowList : public BC_ListBox
138 public:
139 MenuEffectWindowList(MenuEffectWindow *window,
140 int x,
141 int y,
142 int w,
143 int h,
144 ArrayList<BC_ListBoxItem*> *plugin_list);
146 int handle_event();
147 MenuEffectWindow *window;
151 class MenuEffectPromptOK;
152 class MenuEffectPromptCancel;
155 class MenuEffectPrompt : public BC_Window
157 public:
158 MenuEffectPrompt(MWindow *mwindow);
160 static int calculate_w(BC_WindowBase *gui);
161 static int calculate_h(BC_WindowBase *gui);
162 int create_objects();
164 MenuEffectPromptOK *ok;
165 MenuEffectPromptCancel *cancel;
169 #endif
171 // Local Variables:
172 // mode: C++
173 // c-file-style: "linux"
174 // End: