4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
22 #ifndef KEYFRAMEPOPUP_H
23 #define KEYFRAMEPOPUP_H
26 #include "mwindow.inc"
27 #include "mwindowgui.inc"
29 #include "plugindialog.inc"
30 #include "keyframe.inc"
31 #include "keyframepopup.inc"
32 #include "automation.h"
33 #include "floatauto.h"
37 class KeyframePopup : public BC_PopupMenu
40 KeyframePopup(MWindow *mwindow, MWindowGUI *gui);
43 void create_objects();
44 int update(Plugin *plugin, KeyFrame *keyframe);
45 int update(Automation *automation, Autos *autos, Auto *auto_keyframe);
49 // Acquired through the update command as the plugin currently being operated on
51 Plugin *keyframe_plugin;
52 Autos *keyframe_autos;
53 Automation *keyframe_automation;
55 BC_MenuItem *key_mbar;
58 KeyframePopupDelete *key_delete;
59 KeyframePopupShow *key_show;
60 KeyframePopupCopy *key_copy;
61 KeyframePopupEdit *key_edit;
62 KeyframePopupCurveMode *key_smooth;
63 KeyframePopupCurveMode *key_linear;
64 KeyframePopupCurveMode *key_free_t;
65 KeyframePopupCurveMode *key_free;
66 bool key_edit_displayed;
67 bool key_mode_displayed;
69 void handle_curve_mode(Autos *autos, Auto *auto_keyframe);
72 class KeyframePopupDelete : public BC_MenuItem
75 KeyframePopupDelete(MWindow *mwindow, KeyframePopup *popup);
76 ~KeyframePopupDelete();
83 class KeyframePopupShow : public BC_MenuItem
86 KeyframePopupShow(MWindow *mwindow, KeyframePopup *popup);
94 class KeyframePopupCopy : public BC_MenuItem
97 KeyframePopupCopy(MWindow *mwindow, KeyframePopup *popup);
102 KeyframePopup *popup;
105 class KeyframePopupCurveMode : public BC_MenuItem
108 KeyframePopupCurveMode(MWindow *mwindow, KeyframePopup *popup, int curve_mode);
109 ~KeyframePopupCurveMode();
114 KeyframePopup *popup;
116 const char* get_labeltext(int);
117 void toggle_mode(FloatAuto*);
119 friend class KeyframePopup;
123 class KeyframePopupEdit : public BC_MenuItem
126 KeyframePopupEdit(MWindow *mwindow, KeyframePopup *popup);
130 KeyframePopup *popup;
133 class KeyframeHidePopup : public BC_PopupMenu
136 KeyframeHidePopup(MWindow *mwindow, MWindowGUI *gui);
137 ~KeyframeHidePopup();
139 void create_objects();
140 int update(Autos *autos);
144 Autos *keyframe_autos;
147 class KeyframePopupHide : public BC_MenuItem
150 KeyframePopupHide(MWindow *mwindow, KeyframeHidePopup *popup);
154 KeyframeHidePopup *popup;