add 2 asset list fmts, user title rework, added show edit, bt tweak
[goodguy/history.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 "mwindow.inc"
27 #include "mwindowgui.inc"
28 #include "edit.inc"
29 #include "plugindialog.inc"
30 #include "resizetrackthread.inc"
31
32 class EditPopup;
33 class EditPopupMatchSize;
34 class EditPopupResize;
35 class EditPopupDeleteTrack;
36 class EditPopupAddTrack;
37 class EditPopupFindAsset;
38 class EditAttachEffect;
39 class EditMoveTrackUp;
40 class EditMoveTrackDown;
41 class EditPopupTitle;
42 class EditTitleDialogThread;
43 class EditPopupTitleText;
44 class EditPopupTitleWindow;
45 class EditPopupShow;
46 class EditShowDialogThread;
47 class EditPopupShowText;
48 class EditPopupShowWindow;
49
50 class EditPopup : public BC_PopupMenu
51 {
52 public:
53         EditPopup(MWindow *mwindow, MWindowGUI *gui);
54         ~EditPopup();
55
56         void create_objects();
57         int update(Track *track, Edit *edit);
58
59         MWindow *mwindow;
60         MWindowGUI *gui;
61 // Acquired through the update command as the edit currently being operated on
62         Edit *edit;
63         Track *track;
64         EditPopupResize *resize_option;
65         EditPopupMatchSize *matchsize_option;
66 };
67
68 class EditPopupMatchSize : public BC_MenuItem
69 {
70 public:
71         EditPopupMatchSize(MWindow *mwindow, EditPopup *popup);
72         ~EditPopupMatchSize();
73         int handle_event();
74         MWindow *mwindow;
75         EditPopup *popup;
76 };
77
78 class EditPopupResize : public BC_MenuItem
79 {
80 public:
81         EditPopupResize(MWindow *mwindow, EditPopup *popup);
82         ~EditPopupResize();
83         int handle_event();
84         MWindow *mwindow;
85         EditPopup *popup;
86         ResizeTrackThread *dialog_thread;
87 };
88
89 class EditPopupDeleteTrack : public BC_MenuItem
90 {
91 public:
92         EditPopupDeleteTrack(MWindow *mwindow, EditPopup *popup);
93         int handle_event();
94         MWindow *mwindow;
95         EditPopup *popup;
96 };
97
98 class EditPopupAddTrack : public BC_MenuItem
99 {
100 public:
101         EditPopupAddTrack(MWindow *mwindow, EditPopup *popup);
102         int handle_event();
103         MWindow *mwindow;
104         EditPopup *popup;
105 };
106
107 class EditPopupFindAsset : public BC_MenuItem
108 {
109 public:
110         EditPopupFindAsset(MWindow *mwindow, EditPopup *popup);
111         int handle_event();
112         MWindow *mwindow;
113         EditPopup *popup;
114 };
115
116
117 class EditAttachEffect : public BC_MenuItem
118 {
119 public:
120         EditAttachEffect(MWindow *mwindow, EditPopup *popup);
121         ~EditAttachEffect();
122
123         int handle_event();
124
125         MWindow *mwindow;
126         EditPopup *popup;
127         PluginDialogThread *dialog_thread;
128 };
129
130 class EditMoveTrackUp : public BC_MenuItem
131 {
132 public:
133         EditMoveTrackUp(MWindow *mwindow, EditPopup *popup);
134         ~EditMoveTrackUp();
135
136         int handle_event();
137
138         MWindow *mwindow;
139         EditPopup *popup;
140 };
141
142 class EditMoveTrackDown : public BC_MenuItem
143 {
144 public:
145         EditMoveTrackDown(MWindow *mwindow, EditPopup *popup);
146         ~EditMoveTrackDown();
147
148         int handle_event();
149
150         MWindow *mwindow;
151         EditPopup *popup;
152 };
153
154
155 class EditPopupTitle : public BC_MenuItem
156 {
157 public:
158         EditPopupTitle(MWindow *mwindow, EditPopup *popup);
159         ~EditPopupTitle();
160
161         int handle_event();
162
163         MWindow *mwindow;
164         EditPopup *popup;
165         EditTitleDialogThread *dialog_thread;
166 };
167
168 class EditTitleDialogThread : public BC_DialogThread
169 {
170 public:
171         EditTitleDialogThread(EditPopupTitle *edit_title);
172         ~EditTitleDialogThread();
173         BC_Window* new_gui();
174         void start(int wx, int wy);
175         void handle_close_event(int result);
176         void handle_done_event(int result);
177
178         int wx, wy;
179         EditPopupTitle *edit_title;
180         EditPopupTitleWindow *window;
181 };
182
183 class EditPopupTitleText : public BC_TextBox
184 {
185 public:
186         EditPopupTitleText(EditPopupTitleWindow *window,
187                 MWindow *mwindow, int x, int y, const char *text);
188         ~EditPopupTitleText();
189         int handle_event();
190
191         MWindow *mwindow;
192         EditPopupTitleWindow *window;
193 };
194
195 class EditPopupTitleWindow : public BC_Window
196 {
197 public:
198         EditPopupTitleWindow(MWindow *mwindow, EditPopup *popup, int wx, int wy);
199         ~EditPopupTitleWindow();
200
201         void create_objects();
202         void handle_close_event(int result);
203
204         EditPopupTitleText *title_text;
205         MWindow *mwindow;
206         EditPopup *popup;
207         char new_text[BCTEXTLEN];
208 };
209
210
211 class EditPopupShow : public BC_MenuItem
212 {
213 public:
214         EditPopupShow(MWindow *mwindow, EditPopup *popup);
215         ~EditPopupShow();
216
217         int handle_event();
218
219         MWindow *mwindow;
220         EditPopup *popup;
221         EditShowDialogThread *dialog_thread;
222 };
223
224 class EditShowDialogThread : public BC_DialogThread
225 {
226 public:
227         EditShowDialogThread(EditPopupShow *edit_show);
228         ~EditShowDialogThread();
229         BC_Window* new_gui();
230         void start(int wx, int wy);
231         void handle_close_event(int result);
232
233         int wx, wy;
234         EditPopupShow *edit_show;
235         EditPopupShowWindow *window;
236 };
237
238 class EditPopupShowText : public BC_TextBox
239 {
240 public:
241         EditPopupShowText(EditPopupShowWindow *window,
242                 MWindow *mwindow, int x, int y, const char *text);
243         ~EditPopupShowText();
244
245         EditPopupShowWindow *window;
246         MWindow *mwindow;
247 };
248
249 class EditPopupShowWindow : public BC_Window
250 {
251 public:
252         EditPopupShowWindow(MWindow *mwindow, EditPopup *popup, int wx, int wy);
253         ~EditPopupShowWindow();
254
255         void create_objects();
256
257         EditPopupShowText *show_text;
258         MWindow *mwindow;
259         EditPopup *popup;
260 };
261
262 #endif