clear group_id on move_edits, neoph about_bg leak, use inv clr on edit title bar...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / editpopup.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef EDITPOPUP_H
23 #define EDITPOPUP_H
24
25 #include "guicast.h"
26 #include "edit.inc"
27 #include "colorpicker.h"
28 #include "editpopup.inc"
29 #include "mwindow.inc"
30 #include "mwindowgui.inc"
31 #include "plugin.inc"
32 #include "pluginset.inc"
33 #include "plugindialog.inc"
34 #include "resizetrackthread.inc"
35 #include "track.inc"
36
37 class EditPopup : public BC_PopupMenu
38 {
39 public:
40         EditPopup(MWindow *mwindow, MWindowGUI *gui);
41         ~EditPopup();
42
43         void create_objects();
44         int activate_menu(Track *track, Edit *edit,
45                 PluginSet *pluginset, Plugin *plugin, double position);
46
47         MWindow *mwindow;
48         MWindowGUI *gui;
49         Track *track;
50         Edit *edit;
51         Plugin *plugin;
52         PluginSet *pluginset;
53         double position;
54 };
55
56 class EditPopupClearSelect : public BC_MenuItem
57 {
58 public:
59         EditPopupClearSelect(MWindow *mwindow, EditPopup *popup);
60         int handle_event();
61
62         MWindow *mwindow;
63         EditPopup *popup;
64 };
65
66 class EditPopupCopy : public BC_MenuItem
67 {
68 public:
69         EditPopupCopy(MWindow *mwindow, EditPopup *popup);
70         int handle_event();
71
72         MWindow *mwindow;
73         EditPopup *popup;
74 };
75
76 class EditPopupCopyPack : public BC_MenuItem
77 {
78 public:
79         EditPopupCopyPack(MWindow *mwindow, EditPopup *popup);
80         int handle_event();
81
82         MWindow *mwindow;
83         EditPopup *popup;
84 };
85
86 class EditPopupCut : public BC_MenuItem
87 {
88 public:
89         EditPopupCut(MWindow *mwindow, EditPopup *popup);
90         int handle_event();
91
92         MWindow *mwindow;
93         EditPopup *popup;
94 };
95
96 class EditPopupCutPack : public BC_MenuItem
97 {
98 public:
99         EditPopupCutPack(MWindow *mwindow, EditPopup *popup);
100         int handle_event();
101
102         MWindow *mwindow;
103         EditPopup *popup;
104 };
105
106 class EditPopupMute : public BC_MenuItem
107 {
108 public:
109         EditPopupMute(MWindow *mwindow, EditPopup *popup);
110         int handle_event();
111
112         MWindow *mwindow;
113         EditPopup *popup;
114 };
115
116 class EditPopupMutePack : public BC_MenuItem
117 {
118 public:
119         EditPopupMutePack(MWindow *mwindow, EditPopup *popup);
120         int handle_event();
121
122         MWindow *mwindow;
123         EditPopup *popup;
124 };
125
126 class EditPopupPaste : public BC_MenuItem
127 {
128 public:
129         EditPopupPaste(MWindow *mwindow, EditPopup *popup);
130         int handle_event();
131
132         MWindow *mwindow;
133         EditPopup *popup;
134 };
135
136 class EditPopupOverwrite : public BC_MenuItem
137 {
138 public:
139         EditPopupOverwrite(MWindow *mwindow, EditPopup *popup);
140         int handle_event();
141
142         MWindow *mwindow;
143         EditPopup *popup;
144 };
145
146 class EditPopupFindAsset : public BC_MenuItem
147 {
148 public:
149         EditPopupFindAsset(MWindow *mwindow, EditPopup *popup);
150         int handle_event();
151         MWindow *mwindow;
152         EditPopup *popup;
153 };
154
155 class EditPopupUserTitle : public BC_MenuItem
156 {
157 public:
158         EditPopupUserTitle(MWindow *mwindow, EditPopup *popup);
159         ~EditPopupUserTitle();
160
161         int handle_event();
162
163         MWindow *mwindow;
164         EditPopup *popup;
165         EditUserTitleDialogThread *dialog_thread;
166 };
167
168 class EditPopupUserTitleText : public BC_TextBox
169 {
170 public:
171         EditPopupUserTitleText(EditPopupUserTitleWindow *window,
172                 MWindow *mwindow, int x, int y, const char *text);
173         ~EditPopupUserTitleText();
174         int handle_event();
175
176         MWindow *mwindow;
177         EditPopupUserTitleWindow *window;
178 };
179
180 class EditPopupUserTitleWindow : public BC_Window
181 {
182 public:
183         EditPopupUserTitleWindow(MWindow *mwindow, EditPopup *popup, int wx, int wy);
184         ~EditPopupUserTitleWindow();
185
186         void create_objects();
187         void handle_close_event(int result);
188
189         EditPopupUserTitleText *title_text;
190         MWindow *mwindow;
191         EditPopup *popup;
192         char new_text[BCTEXTLEN];
193 };
194
195 class EditUserTitleDialogThread : public BC_DialogThread
196 {
197 public:
198         EditUserTitleDialogThread(EditPopupUserTitle *edit_title);
199         ~EditUserTitleDialogThread();
200
201         void handle_close_event(int result);
202         void handle_done_event(int result);
203         BC_Window* new_gui();
204         void start(int wx, int wy);
205
206         int wx, wy;
207         EditPopupUserTitle *edit_title;
208         EditPopupUserTitleWindow *window;
209 };
210
211
212 class EditPopupTitleColor : public BC_MenuItem
213 {
214 public:
215         EditPopupTitleColor(MWindow *mwindow, EditPopup *popup);
216         ~EditPopupTitleColor();
217
218         int handle_event();
219
220         MWindow *mwindow;
221         EditPopup *popup;
222         EditTitleColorPicker *color_picker;
223 };
224
225 class EditTitleColorDefault : public BC_GenericButton
226 {
227 public:
228         EditTitleColorDefault(EditTitleColorPicker *color_picker, int x, int y);
229         int handle_event();
230
231         EditTitleColorPicker *color_picker;
232 };
233
234 class EditTitleColorPicker : public ColorPicker
235 {
236 public:
237         EditTitleColorPicker(EditPopup *popup, int color);
238         ~EditTitleColorPicker();
239         void create_objects(ColorWindow *gui);
240         int handle_new_color(int color, int alpha);
241         void handle_done_event(int result);
242
243         EditPopup *popup;
244         int color;
245 };
246
247
248 class EditPopupShow : public BC_MenuItem
249 {
250 public:
251         EditPopupShow(MWindow *mwindow, EditPopup *popup);
252         ~EditPopupShow();
253
254         int handle_event();
255
256         MWindow *mwindow;
257         EditPopup *popup;
258         EditShowDialogThread *dialog_thread;
259 };
260
261 class EditShowDialogThread : public BC_DialogThread
262 {
263 public:
264         EditShowDialogThread(EditPopupShow *edit_show);
265         ~EditShowDialogThread();
266         BC_Window* new_gui();
267         void start(int wx, int wy);
268         void handle_close_event(int result);
269
270         int wx, wy;
271         EditPopupShow *edit_show;
272         EditPopupShowWindow *window;
273 };
274
275 class EditPopupShowText : public BC_TextBox
276 {
277 public:
278         EditPopupShowText(EditPopupShowWindow *window,
279                 MWindow *mwindow, int x, int y, const char *text);
280         ~EditPopupShowText();
281
282         EditPopupShowWindow *window;
283         MWindow *mwindow;
284 };
285
286 class EditPopupShowWindow : public BC_Window
287 {
288 public:
289         EditPopupShowWindow(MWindow *mwindow, EditPopup *popup, int wx, int wy);
290         ~EditPopupShowWindow();
291
292         void create_objects();
293
294         EditPopupShowText *show_text;
295         MWindow *mwindow;
296         EditPopup *popup;
297 };
298
299 #endif