4 bt fixes, xft unrefd font fix, add: find in resources, add: user title, filebox...
[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 EditPopupResize;
33 class EditPopupMatchSize;
34 class EditPopupTitleText;
35 class EditPopupTitleWindow;
36 class EditPopupTitleButton;
37 class EditPopupTitleButtonRes;
38
39 class EditPopup : public BC_PopupMenu
40 {
41 public:
42         EditPopup(MWindow *mwindow, MWindowGUI *gui);
43         ~EditPopup();
44
45         void create_objects();
46         int update(Track *track, Edit *edit);
47
48         MWindow *mwindow;
49         MWindowGUI *gui;
50 // Acquired through the update command as the edit currently being operated on
51         Edit *edit;
52         Track *track;
53         EditPopupResize *resize_option;
54         EditPopupMatchSize *matchsize_option;
55 };
56
57 class EditPopupMatchSize : public BC_MenuItem
58 {
59 public:
60         EditPopupMatchSize(MWindow *mwindow, EditPopup *popup);
61         ~EditPopupMatchSize();
62         int handle_event();
63         MWindow *mwindow;
64         EditPopup *popup;
65 };
66
67 class EditPopupResize : public BC_MenuItem
68 {
69 public:
70         EditPopupResize(MWindow *mwindow, EditPopup *popup);
71         ~EditPopupResize();
72         int handle_event();
73         MWindow *mwindow;
74         EditPopup *popup;
75         ResizeTrackThread *dialog_thread;
76 };
77
78 class EditPopupDeleteTrack : public BC_MenuItem
79 {
80 public:
81         EditPopupDeleteTrack(MWindow *mwindow, EditPopup *popup);
82         int handle_event();
83         MWindow *mwindow;
84         EditPopup *popup;
85 };
86
87 class EditPopupAddTrack : public BC_MenuItem
88 {
89 public:
90         EditPopupAddTrack(MWindow *mwindow, EditPopup *popup);
91         int handle_event();
92         MWindow *mwindow;
93         EditPopup *popup;
94 };
95
96 class EditPopupFindAsset : public BC_MenuItem
97 {
98 public:
99         EditPopupFindAsset(MWindow *mwindow, EditPopup *popup);
100         int handle_event();
101         MWindow *mwindow;
102         EditPopup *popup;
103 };
104
105
106 class EditAttachEffect : public BC_MenuItem
107 {
108 public:
109         EditAttachEffect(MWindow *mwindow, EditPopup *popup);
110         ~EditAttachEffect();
111
112         int handle_event();
113
114         MWindow *mwindow;
115         EditPopup *popup;
116         PluginDialogThread *dialog_thread;
117 };
118
119 class EditMoveTrackUp : public BC_MenuItem
120 {
121 public:
122         EditMoveTrackUp(MWindow *mwindow, EditPopup *popup);
123         ~EditMoveTrackUp();
124
125         int handle_event();
126
127         MWindow *mwindow;
128         EditPopup *popup;
129 };
130
131 class EditMoveTrackDown : public BC_MenuItem
132 {
133 public:
134         EditMoveTrackDown(MWindow *mwindow, EditPopup *popup);
135         ~EditMoveTrackDown();
136
137         int handle_event();
138
139         MWindow *mwindow;
140         EditPopup *popup;
141 };
142
143
144 class EditPopupTitle : public BC_MenuItem
145 {
146 public:
147         EditPopupTitle (MWindow *mwindow, EditPopup *popup);
148         ~EditPopupTitle();
149
150         int handle_event();
151
152         MWindow *mwindow;
153         EditPopup *popup;
154         EditPopupTitleWindow *window;
155 };
156
157 class EditPopupTitleText : public BC_TextBox
158 {
159 public:
160         EditPopupTitleText (EditPopupTitleWindow *window,
161                 MWindow *mwindow, int x, int y, const char *text);
162         ~EditPopupTitleText();
163
164         int handle_event();
165
166         EditPopupTitleWindow *window;
167         MWindow *mwindow;
168 };
169
170
171 class EditPopupTitleWindow : public BC_Window
172 {
173 public:
174         EditPopupTitleWindow (MWindow *mwindow, EditPopup *popup);
175         ~EditPopupTitleWindow ();
176
177         void create_objects();
178         int close_event();
179
180         EditPopupTitleText *title_text;
181         MWindow *mwindow;
182         EditPopup *popup;
183         char new_text[BCTEXTLEN];
184 };
185
186 #endif