add shuttle dev support, use dflt ff_a/v.png icons, mjpegtools typo patch
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / keyframepopup.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 KEYFRAMEPOPUP_H
23 #define KEYFRAMEPOPUP_H
24
25 #include "apatchgui.h"
26 #include "guicast.h"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "patchgui.inc"
30 #include "plugin.inc"
31 #include "plugindialog.inc"
32 #include "keyframe.inc"
33 #include "keyframepopup.inc"
34 #include "automation.h"
35 #include "floatauto.h"
36
37
38
39 class KeyframePopup : public BC_PopupMenu
40 {
41 public:
42         KeyframePopup(MWindow *mwindow, MWindowGUI *gui);
43         ~KeyframePopup();
44
45         void create_objects();
46         int update(Plugin *plugin, KeyFrame *keyframe);
47         int update(Automation *automation, Autos *autos, Auto *auto_keyframe);
48
49         MWindow *mwindow;
50         MWindowGUI *gui;
51 // Acquired through the update command as the plugin currently being operated on
52
53         Plugin *keyframe_plugin;
54         Autos *keyframe_autos;
55         Automation *keyframe_automation;
56         Auto *keyframe_auto;
57         BC_MenuItem *key_mbar;
58
59 private:
60         KeyframePopupDelete *key_delete;
61         KeyframePopupHide *key_hide;
62         KeyframePopupShow *key_show;
63         KeyframePopupCopy *key_copy;
64         KeyframePopupEdit *key_edit;
65         KeyframePopupCurveMode *key_smooth;
66         KeyframePopupCurveMode *key_linear;
67         KeyframePopupCurveMode *key_free_t;
68         KeyframePopupCurveMode *key_free;
69         bool key_edit_displayed;
70         bool key_mode_displayed;
71
72         void handle_curve_mode(Autos *autos, Auto *auto_keyframe);
73 };
74
75 class KeyframePopupDelete : public BC_MenuItem
76 {
77 public:
78         KeyframePopupDelete(MWindow *mwindow, KeyframePopup *popup);
79         ~KeyframePopupDelete();
80         int handle_event();
81
82         MWindow *mwindow;
83         KeyframePopup *popup;
84 };
85
86 class KeyframePopupHide : public BC_MenuItem
87 {
88 public:
89         KeyframePopupHide(MWindow *mwindow, KeyframePopup *popup);
90         ~KeyframePopupHide();
91         int handle_event();
92
93         MWindow *mwindow;
94         KeyframePopup *popup;
95 };
96
97 class KeyframePopupShow : public BC_MenuItem
98 {
99 public:
100         KeyframePopupShow(MWindow *mwindow, KeyframePopup *popup);
101         ~KeyframePopupShow();
102         int handle_event();
103
104         MWindow *mwindow;
105         KeyframePopup *popup;
106 };
107
108 class KeyframePopupCopy : public BC_MenuItem
109 {
110 public:
111         KeyframePopupCopy(MWindow *mwindow, KeyframePopup *popup);
112         ~KeyframePopupCopy();
113         int handle_event();
114
115         MWindow *mwindow;
116         KeyframePopup *popup;
117 };
118
119 class KeyframePopupCurveMode : public BC_MenuItem
120 {
121 public:
122         KeyframePopupCurveMode(MWindow *mwindow, KeyframePopup *popup, int curve_mode);
123         ~KeyframePopupCurveMode();
124         int handle_event();
125
126 private:
127         MWindow *mwindow;
128         KeyframePopup *popup;
129         int curve_mode;
130         const char* get_labeltext(int);
131         void toggle_mode(FloatAuto*);
132
133 friend class KeyframePopup;
134 };
135
136
137 class KeyframePopupEdit : public BC_MenuItem
138 {
139 public:
140         KeyframePopupEdit(MWindow *mwindow, KeyframePopup *popup);
141         int handle_event();
142
143         MWindow *mwindow;
144         KeyframePopup *popup;
145 };
146
147 class KeyframeHidePopup : public BC_PopupMenu
148 {
149 public:
150         KeyframeHidePopup(MWindow *mwindow, MWindowGUI *gui);
151         ~KeyframeHidePopup();
152
153         void create_objects();
154         int update(Autos *autos);
155
156         MWindow *mwindow;
157         MWindowGUI *gui;
158         Autos *keyframe_autos;
159 };
160
161 class KeyframeHideItem : public BC_MenuItem
162 {
163 public:
164         KeyframeHideItem(MWindow *mwindow, KeyframeHidePopup *popup);
165         int handle_event();
166
167         MWindow *mwindow;
168         KeyframeHidePopup *popup;
169 };
170
171 class KeyMutePatch : public BC_SubWindow
172 {
173 public:
174         KeyMutePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
175         void create_objects();
176
177         MWindow *mwindow;
178         PatchGUI *patch;
179         KeyMuteValue *key_mute_checkbox;
180 };
181
182 class KeyMuteValue : public BC_CheckBox
183 {
184 public:
185         KeyMuteValue(KeyMutePatch *key_mute_patch);
186         int button_release_event();
187         int handle_event();
188
189         KeyMutePatch *key_mute_patch;
190 };
191
192 class KeySpeedPatch : public BC_SubWindow
193 {
194 public:
195         KeySpeedPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
196         void create_objects();
197         void update(float v);
198         void update_speed(float v);
199         int cursor_enter_event();
200         int cursor_leave_event();
201
202         MWindow *mwindow;
203         PatchGUI *patch;
204         KeySpeedSlider *key_speed_slider;
205         KeySpeedText *key_speed_text;
206         KeySpeedOK *key_speed_ok;
207 };
208
209 class KeySpeedOK : public BC_Button
210 {
211 public:
212         KeySpeedOK(KeySpeedPatch *key_speed_patch, int x, int y, VFrame **images);
213         int handle_event();
214
215         KeySpeedPatch *key_speed_patch;
216 };
217
218 class KeySpeedText : public BC_TextBox
219 {
220 public:
221         KeySpeedText(KeySpeedPatch *key_speed_patch, int x, int y, int w, float v);
222         int handle_event();
223
224         KeySpeedPatch *key_speed_patch;
225 };
226
227 class KeySpeedSlider : public BC_FSlider
228 {
229 public:
230         KeySpeedSlider(KeySpeedPatch *key_speed_patch,
231                 int x, int y, int w, float v);
232         ~KeySpeedSlider();
233
234         int handle_event();
235
236         KeySpeedPatch *key_speed_patch;
237 };
238
239 #endif