update shuttlerc, fix vwdw lock update_position
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / recordtransport.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 RECORDTRANSPORT_H
23 #define RECORDTRANSPORT_H
24
25 #include "guicast.h"
26 #include "record.inc"
27
28 class RecordGUIRewind;
29 class RecordGUIRec;
30 class RecordGUIRecFrame;
31 class RecordGUIStop;
32 class RecordGUIPause;
33
34 class RecordGUIBegin;
35 class RecordGUIBack;
36 class RecordGUIHalt;
37 class RecordGUIPlay;
38 class RecordGUIFwd;
39 class RecordGUIEnd;
40
41
42 class RecordTransport
43 {
44 public:
45         RecordTransport(MWindow *mwindow, Record *record,
46                 BC_WindowBase *window, int x, int y);
47         ~RecordTransport();
48
49         void create_objects();
50         void reposition_window(int x, int y);
51         int keypress_event();
52         int get_h();
53         int get_w();
54         int max(int a,int b) { return a>b ? a : b; }
55         void start_writing_file(int single_frame=0);
56         void stop_writing();
57
58         MWindow *mwindow;
59         BC_WindowBase *window;
60         Record *record;
61         int x, y, x_end, y_end;
62         int record_active;
63         int play_active;
64
65         RecordGUIRewind *rewind_button;
66         RecordGUIRec *record_button;
67         RecordGUIRecFrame *record_frame;
68         RecordGUIStop *stop_button;
69         RecordGUIPause *pause_button;
70
71         RecordGUIBegin *begin_button;
72         RecordGUIBack *back_button;
73         RecordGUIHalt *halt_button;
74         RecordGUIPlay *play_button;
75         RecordGUIFwd *fwd_button;
76         RecordGUIEnd *end_button;
77 };
78
79
80 class RecordGUIRewind : public BC_Button
81 {
82 public:
83         RecordGUIRewind(RecordTransport *record_transport, int x, int y);
84         ~RecordGUIRewind();
85
86         int handle_event();
87         int keypress_event();
88         MWindow *mwindow;
89         RecordTransport *record_transport;
90 };
91
92
93 class RecordGUIRec : public BC_Button
94 {
95 public:
96         RecordGUIRec(RecordTransport *record_transport, int x, int y);
97         ~RecordGUIRec();
98
99         int handle_event();
100         int keypress_event();
101         MWindow *mwindow;
102         RecordTransport *record_transport;
103 };
104
105
106 class RecordGUIRecFrame : public BC_Button
107 {
108 public:
109         RecordGUIRecFrame(RecordTransport *record_transport, int x, int y);
110         ~RecordGUIRecFrame();
111
112         int handle_event();
113         int keypress_event();
114         MWindow *mwindow;
115         RecordTransport *record_transport;
116 };
117
118
119 class RecordGUIStop : public BC_Button
120 {
121 public:
122         RecordGUIStop(RecordTransport *record_transport, int x, int y);
123         ~RecordGUIStop();
124
125         int handle_event();
126         int keypress_event();
127         MWindow *mwindow;
128         RecordTransport *record_transport;
129 };
130
131
132 class RecordGUIPause : public BC_Button
133 {
134 public:
135         RecordGUIPause(RecordTransport *record_transport, int x, int y);
136         ~RecordGUIPause();
137
138         int handle_event();
139         int keypress_event();
140         MWindow *mwindow;
141         RecordTransport *record_transport;
142 };
143
144
145 class RecordGUIBegin : public BC_Button
146 {
147 public:
148         RecordGUIBegin(RecordTransport *record_transport, int x, int y);
149         ~RecordGUIBegin();
150
151         int handle_event();
152         int keypress_event();
153         MWindow *mwindow;
154         RecordTransport *record_transport;
155 };
156
157
158 class RecordGUIBack : public BC_Button
159 {
160 public:
161         RecordGUIBack(RecordTransport *record_transport, int x, int y);
162         ~RecordGUIBack();
163
164         int handle_event();
165         int button_press();
166         int button_release();
167         int repeat_event();
168         int keypress_event();
169         long count;
170         long repeat_id;
171
172         MWindow *mwindow;
173         RecordTransport *record_transport;
174 };
175
176
177 class RecordGUIHalt : public BC_Button
178 {
179 public:
180         RecordGUIHalt(RecordTransport *record_transport, int x, int y);
181         ~RecordGUIHalt();
182
183         int handle_event();
184         int keypress_event();
185
186         MWindow *mwindow;
187         RecordTransport *record_transport;
188 };
189
190
191 class RecordGUIPlay : public BC_Button
192 {
193 public:
194         RecordGUIPlay(RecordTransport *record_transport, int x, int y);
195         ~RecordGUIPlay();
196
197         int handle_event();
198         int keypress_event();
199
200         MWindow *mwindow;
201         RecordTransport *record_transport;
202 };
203
204
205 class RecordGUIFwd : public BC_Button
206 {
207 public:
208         RecordGUIFwd(RecordTransport *record_transport, int x, int y);
209         ~RecordGUIFwd();
210
211         int handle_event();
212         int button_press();
213         int button_release();
214         int repeat_event();
215         int keypress_event();
216
217         long count;
218         long repeat_id;
219
220         MWindow *mwindow;
221         RecordTransport *record_transport;
222 };
223
224
225 class RecordGUIEnd : public BC_Button
226 {
227 public:
228         RecordGUIEnd(RecordTransport *record_transport, int x, int y);
229         ~RecordGUIEnd();
230
231         int handle_event();
232         int keypress_event();
233
234         MWindow *mwindow;
235         RecordTransport *record_transport;
236 };
237
238 #endif