remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / cinelerra / keyframegui.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 KEYFRAMEGUI_H
23 #define KEYFRAMEGUI_H
24
25
26 #include "bcdialog.h"
27 #include "guicast.h"
28
29 class KeyFrameWindow;
30
31
32 #define KEYFRAME_COLUMNS 2
33 // Enable editing of detailed keyframe parameters.
34 class KeyFrameThread : public BC_DialogThread
35 {
36 public:
37         KeyFrameThread(MWindow *mwindow);
38         ~KeyFrameThread();
39
40
41         BC_Window* new_gui();
42         void start_window(Plugin *plugin, KeyFrame *keyframe);
43         void handle_done_event(int result);
44         void handle_close_event(int result);
45         void update_values();
46         void save_value(char *value);
47         void apply_value();
48         void update_gui(int update_value_text = 1);
49
50         ArrayList<BC_ListBoxItem*> *keyframe_data;
51         Plugin *plugin;
52         KeyFrame *keyframe;
53         MWindow *mwindow;
54         char window_title[BCTEXTLEN];
55         char plugin_title[BCTEXTLEN];
56         char *column_titles[KEYFRAME_COLUMNS];
57         int column_width[KEYFRAME_COLUMNS];
58 };
59
60 class KeyFrameList : public BC_ListBox
61 {
62 public:
63         KeyFrameList(KeyFrameThread *thread,
64                 KeyFrameWindow *window, int x, int y, int w, int h);
65         int selection_changed();
66         int handle_event();
67         int column_resize_event();
68         KeyFrameThread *thread;
69         KeyFrameWindow *window;
70 };
71
72 class KeyFrameParamList : public BC_ListBox
73 {
74 public:
75         KeyFrameParamList(KeyFrameThread *thread,
76                 KeyFrameWindow *window, int x, int y, int w, int h);
77         int selection_changed();
78         int handle_event();
79         KeyFrameThread *thread;
80         KeyFrameWindow *window;
81 };
82
83 class KeyFrameValue : public BC_TextBox
84 {
85 public:
86         KeyFrameValue(KeyFrameThread *thread,
87                 KeyFrameWindow *window, int x, int y, int w);
88         int handle_event();
89         KeyFrameThread *thread;
90         KeyFrameWindow *window;
91 };
92
93 class KeyFrameAll : public BC_CheckBox
94 {
95 public:
96         KeyFrameAll(KeyFrameThread *thread,
97                 KeyFrameWindow *window, int x, int y);
98         int handle_event();
99         KeyFrameThread *thread;
100         KeyFrameWindow *window;
101 };
102
103 class KeyFrameParamsOK : public BC_OKButton
104 {
105 public:
106         KeyFrameParamsOK(KeyFrameThread *thread,
107                 KeyFrameWindow *window);
108         int keypress_event();
109         KeyFrameThread *thread;
110         KeyFrameWindow *window;
111 };
112
113 class KeyFrameWindow : public BC_Window
114 {
115 public:
116         KeyFrameWindow(MWindow *mwindow,
117                 KeyFrameThread *thread, int x, int y, char *title);
118         void create_objects();
119         int resize_event(int w, int h);
120
121 // List of parameters, values, & whether the parameter is defined by the current keyframe.
122         KeyFrameList *keyframe_list;
123 // The text area of the plugin
124 //      KeyFrameText *keyframe_text;
125 // Value text of the current parameter
126         KeyFrameValue *value_text;
127         KeyFrameAll *all_toggle;
128         BC_Title *title1, *title3;
129
130         MWindow *mwindow;
131         KeyFrameThread *thread;
132 };
133
134 #endif