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 "automation.h"
32 #include "floatauto.h"
35 class KeyframePopupDelete;
36 class KeyframePopupShow;
37 class KeyframePopupCopy;
38 class KeyframePopupCurveMode;
39 class KeyframePopupEdit;
42 class KeyframePopup : public BC_PopupMenu
45 KeyframePopup(MWindow *mwindow, MWindowGUI *gui);
48 void create_objects();
49 int update(Plugin *plugin, KeyFrame *keyframe);
50 int update(Automation *automation, Autos *autos, Auto *auto_keyframe);
54 // Acquired through the update command as the plugin currently being operated on
56 Plugin *keyframe_plugin;
57 Autos *keyframe_autos;
58 Automation *keyframe_automation;
60 BC_MenuItem *key_mbar;
63 KeyframePopupDelete *key_delete;
64 KeyframePopupShow *key_show;
65 KeyframePopupCopy *key_copy;
66 KeyframePopupEdit *key_edit;
67 KeyframePopupCurveMode *key_smooth;
68 KeyframePopupCurveMode *key_linear;
69 KeyframePopupCurveMode *key_free_t;
70 KeyframePopupCurveMode *key_free;
71 bool key_edit_displayed;
72 bool key_mode_displayed;
74 void handle_curve_mode(Autos *autos, Auto *auto_keyframe);
77 class KeyframePopupDelete : public BC_MenuItem
80 KeyframePopupDelete(MWindow *mwindow, KeyframePopup *popup);
81 ~KeyframePopupDelete();
88 class KeyframePopupShow : public BC_MenuItem
91 KeyframePopupShow(MWindow *mwindow, KeyframePopup *popup);
99 class KeyframePopupCopy : public BC_MenuItem
102 KeyframePopupCopy(MWindow *mwindow, KeyframePopup *popup);
103 ~KeyframePopupCopy();
107 KeyframePopup *popup;
110 class KeyframePopupCurveMode : public BC_MenuItem
113 KeyframePopupCurveMode(MWindow *mwindow, KeyframePopup *popup, int curve_mode);
114 ~KeyframePopupCurveMode();
119 KeyframePopup *popup;
121 const char* get_labeltext(int);
122 void toggle_mode(FloatAuto*);
124 friend class KeyframePopup;
128 class KeyframePopupEdit : public BC_MenuItem
131 KeyframePopupEdit(MWindow *mwindow, KeyframePopup *popup);
135 KeyframePopup *popup;