search fixes, preset fixes, ladspa icon logging, igor pref theme, drag btn rollover
[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 #define SNAPSHOT_PNG  0
33 #define SNAPSHOT_JPEG 1
34 #define SNAPSHOT_TIFF 2
35
36 class EditPopupResize;
37 class EditPopupMatchSize;
38 class EditPopupTitleText;
39 class EditPopupTitleWindow;
40 class EditPopupTitleButton;
41 class EditPopupTitleButtonRes;
42 class EditSnapshot;
43 class SnapshotSubMenu;
44 class SnapshotMenuItem;
45
46 class EditPopup : public BC_PopupMenu
47 {
48 public:
49         EditPopup(MWindow *mwindow, MWindowGUI *gui);
50         ~EditPopup();
51
52         void create_objects();
53         int update(Track *track, Edit *edit);
54
55         MWindow *mwindow;
56         MWindowGUI *gui;
57 // Acquired through the update command as the edit currently being operated on
58         Edit *edit;
59         Track *track;
60         EditPopupResize *resize_option;
61         EditPopupMatchSize *matchsize_option;
62 };
63
64 class EditPopupMatchSize : public BC_MenuItem
65 {
66 public:
67         EditPopupMatchSize(MWindow *mwindow, EditPopup *popup);
68         ~EditPopupMatchSize();
69         int handle_event();
70         MWindow *mwindow;
71         EditPopup *popup;
72 };
73
74 class EditPopupResize : public BC_MenuItem
75 {
76 public:
77         EditPopupResize(MWindow *mwindow, EditPopup *popup);
78         ~EditPopupResize();
79         int handle_event();
80         MWindow *mwindow;
81         EditPopup *popup;
82         ResizeTrackThread *dialog_thread;
83 };
84
85 class EditPopupDeleteTrack : public BC_MenuItem
86 {
87 public:
88         EditPopupDeleteTrack(MWindow *mwindow, EditPopup *popup);
89         int handle_event();
90         MWindow *mwindow;
91         EditPopup *popup;
92 };
93
94 class EditPopupAddTrack : public BC_MenuItem
95 {
96 public:
97         EditPopupAddTrack(MWindow *mwindow, EditPopup *popup);
98         int handle_event();
99         MWindow *mwindow;
100         EditPopup *popup;
101 };
102
103
104 class EditAttachEffect : public BC_MenuItem
105 {
106 public:
107         EditAttachEffect(MWindow *mwindow, EditPopup *popup);
108         ~EditAttachEffect();
109
110         int handle_event();
111
112         MWindow *mwindow;
113         EditPopup *popup;
114         PluginDialogThread *dialog_thread;
115 };
116
117 class EditMoveTrackUp : public BC_MenuItem
118 {
119 public:
120         EditMoveTrackUp(MWindow *mwindow, EditPopup *popup);
121         ~EditMoveTrackUp();
122
123         int handle_event();
124
125         MWindow *mwindow;
126         EditPopup *popup;
127 };
128
129 class EditMoveTrackDown : public BC_MenuItem
130 {
131 public:
132         EditMoveTrackDown(MWindow *mwindow, EditPopup *popup);
133         ~EditMoveTrackDown();
134
135         int handle_event();
136
137         MWindow *mwindow;
138         EditPopup *popup;
139 };
140
141
142 class EditPopupTitle : public BC_MenuItem
143 {
144 public:
145         EditPopupTitle (MWindow *mwindow, EditPopup *popup);
146         ~EditPopupTitle();
147
148         int handle_event();
149
150         MWindow *mwindow;
151         EditPopup *popup;
152         EditPopupTitleWindow *window;
153 };
154
155 class EditPopupTitleText : public BC_TextBox
156 {
157 public:
158         EditPopupTitleText (EditPopupTitleWindow *window,
159                 MWindow *mwindow, int x, int y);
160         ~EditPopupTitleText();
161
162         int handle_event();
163
164         EditPopupTitleWindow *window;
165         MWindow *mwindow;
166 };
167
168
169 class EditPopupTitleWindow : public BC_Window
170 {
171 public:
172         EditPopupTitleWindow (MWindow *mwindow, EditPopup *popup);
173         ~EditPopupTitleWindow ();
174
175         void create_objects();
176         int close_event();
177
178         EditPopupTitleText *title_text;
179         Edit *edt;
180         MWindow *mwindow;
181         EditPopup *popup;
182         char new_text[BCTEXTLEN];
183 };
184
185
186 class EditSnapshot : public BC_MenuItem
187 {
188 public:
189         EditSnapshot(MWindow *mwindow, EditPopup *popup);
190         ~EditSnapshot();
191
192         MWindow *mwindow;
193         EditPopup *popup;
194 };
195
196 class SnapshotSubMenu : public BC_SubMenu
197 {
198 public:
199         SnapshotSubMenu(EditSnapshot *edit_snapshot);
200         ~SnapshotSubMenu();
201
202         EditSnapshot *edit_snapshot;
203 };
204
205 class SnapshotMenuItem : public BC_MenuItem
206 {
207 public:
208         SnapshotMenuItem(SnapshotSubMenu *submenu, const char *text, int mode);
209         ~SnapshotMenuItem();
210
211         int handle_event();
212         SnapshotSubMenu *submenu;
213         int mode;
214 };
215
216 #endif