revert de.po
[goodguy/history.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 "guicast.h"
26 #include "mwindow.inc"
27 #include "mwindowgui.inc"
28 #include "plugin.inc"
29 #include "plugindialog.inc"
30 #include "keyframe.inc"
31 #include "automation.h" 
32 #include "floatauto.h"
33
34
35 class KeyframePopupDelete;
36 class KeyframePopupShow;
37 class KeyframePopupCopy;
38 class KeyframePopupCurveMode;
39 class KeyframePopupEdit;
40  
41  
42 class KeyframePopup : public BC_PopupMenu
43 {
44 public:
45         KeyframePopup(MWindow *mwindow, MWindowGUI *gui);
46         ~KeyframePopup();
47
48         void create_objects();
49         int update(Plugin *plugin, KeyFrame *keyframe);
50         int update(Automation *automation, Autos *autos, Auto *auto_keyframe);
51
52         MWindow *mwindow;
53         MWindowGUI *gui;
54 // Acquired through the update command as the plugin currently being operated on
55         
56         Plugin *keyframe_plugin;
57         Autos *keyframe_autos;
58         Automation *keyframe_automation;
59         Auto *keyframe_auto;
60         BC_MenuItem *key_mbar;
61
62 private:        
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;
73
74         void handle_curve_mode(Autos *autos, Auto *auto_keyframe);
75 };
76
77 class KeyframePopupDelete : public BC_MenuItem
78 {
79 public:
80         KeyframePopupDelete(MWindow *mwindow, KeyframePopup *popup);
81         ~KeyframePopupDelete();
82         int handle_event();
83         
84         MWindow *mwindow;
85         KeyframePopup *popup;
86 };
87
88 class KeyframePopupShow : public BC_MenuItem
89 {
90 public:
91         KeyframePopupShow(MWindow *mwindow, KeyframePopup *popup);
92         ~KeyframePopupShow();
93         int handle_event();
94         
95         MWindow *mwindow;
96         KeyframePopup *popup;
97 };
98
99 class KeyframePopupCopy : public BC_MenuItem
100 {
101 public:
102         KeyframePopupCopy(MWindow *mwindow, KeyframePopup *popup);
103         ~KeyframePopupCopy();
104         int handle_event();
105         
106         MWindow *mwindow;
107         KeyframePopup *popup;
108 };
109
110 class KeyframePopupCurveMode : public BC_MenuItem
111 {
112 public:
113         KeyframePopupCurveMode(MWindow *mwindow, KeyframePopup *popup, int curve_mode);
114         ~KeyframePopupCurveMode();
115         int handle_event();
116
117 private:
118         MWindow *mwindow;
119         KeyframePopup *popup;
120         int curve_mode;
121         const char* get_labeltext(int);
122         void toggle_mode(FloatAuto*);
123     
124 friend class KeyframePopup;
125 };
126
127  
128 class KeyframePopupEdit : public BC_MenuItem
129 {
130 public:
131         KeyframePopupEdit(MWindow *mwindow, KeyframePopup *popup);
132         int handle_event();
133
134         MWindow *mwindow;
135         KeyframePopup *popup;
136 };
137
138 #endif