prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / cinelerra / playbackprefs.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 PLAYBACKPREFS_H
23 #define PLAYBACKPREFS_H
24
25
26 class PlaybackPrefs;
27 class PlaybackModuleFragment;
28 class PlaybackAudioOffset;
29 class PlaybackViewFollows;
30 class PlaybackSoftwareTimer;
31 class PlaybackRealTime;
32 class PlaybackMap51_2;
33 class VideoAsynchronous;
34 class VideoEveryFrame;
35 class PlaybackDeblock;
36 class PlaybackPreload;
37 class PlaybackInterpolateRaw;
38 class PlaybackWhiteBalanceRaw;
39 class PlaybackSubtitle;
40 class PlaybackSubtitleNumber;
41 class PlaybackLabelCells;
42 class PlaybackProgramNumber;
43 class PlaybackGain;
44
45 #include "adeviceprefs.h"
46 #include "guicast.h"
47 #include "mwindow.inc"
48 #include "preferencesthread.h"
49 #include "vdeviceprefs.h"
50
51 class PlaybackPrefs : public PreferencesDialog
52 {
53 public:
54         PlaybackPrefs(MWindow *mwindow, PreferencesWindow *pwindow, int config_number);
55         ~PlaybackPrefs();
56
57         void create_objects();
58 //      int set_strategy(int strategy);
59
60         static char* strategy_to_string(int strategy);
61         void delete_strategy();
62
63         int draw_framerate(int flush /* = 1 */);
64
65         int config_number;
66         ADevicePrefs *audio_device;
67         VDevicePrefs *video_device;
68         ArrayList<BC_ListBoxItem*> strategies;
69
70         PlaybackConfig *playback_config;
71         BC_Title *framerate_title;
72         PlaybackDeblock *mpeg4_deblock;
73         PlaybackInterpolateRaw *interpolate_raw;
74         PlaybackWhiteBalanceRaw *white_balance_raw;
75         VideoAsynchronous *asynchronous;
76
77         BC_Title *vdevice_title;
78         PlaybackAudioOffset *audio_offset;
79         PlaybackGain *play_gain;
80 };
81
82 class PlaybackModuleFragment : public BC_PopupMenu
83 {
84 public:
85         PlaybackModuleFragment(int x, 
86                 int y, 
87                 PreferencesWindow *pwindow, 
88                 PlaybackPrefs *playback, 
89                 char *text);
90         int handle_event();
91         PreferencesWindow *pwindow;
92         PlaybackPrefs *playback;
93 };
94
95 class PlaybackAudioOffset : public BC_TumbleTextBox
96 {
97 public:
98         PlaybackAudioOffset(PreferencesWindow *pwindow, 
99                 PlaybackPrefs *subwindow,
100                 int x, 
101                 int y);
102         int handle_event();
103         PreferencesWindow *pwindow;
104         PlaybackPrefs *playback;
105 };
106
107
108 class PlaybackViewFollows : public BC_CheckBox
109 {
110 public:
111         PlaybackViewFollows(PreferencesWindow *pwindow, int value, int y);
112         int handle_event();
113         PreferencesWindow *pwindow;
114 };
115
116 class PlaybackSoftwareTimer : public BC_CheckBox
117 {
118 public:
119         PlaybackSoftwareTimer(PreferencesWindow *pwindow, int value, int y);
120         int handle_event();
121         PreferencesWindow *pwindow;
122 };
123
124 class PlaybackRealTime : public BC_CheckBox
125 {
126 public:
127         PlaybackRealTime(PreferencesWindow *pwindow, int value, int y);
128         int handle_event();
129         PreferencesWindow *pwindow;
130 };
131
132 class PlaybackMap51_2 : public BC_CheckBox
133 {
134 public:
135         PlaybackMap51_2(PreferencesWindow *pwindow,
136                 PlaybackPrefs *playback_prefs, int x, int y);
137         int handle_event();
138         PreferencesWindow *pwindow;
139         PlaybackPrefs *playback_prefs;
140 };
141
142 class VideoAsynchronous : public BC_CheckBox
143 {
144 public:
145         VideoAsynchronous(PreferencesWindow *pwindow, int x, int y);
146         int handle_event();
147         PreferencesWindow *pwindow;
148 };
149
150 class VideoEveryFrame : public BC_CheckBox
151 {
152 public:
153         VideoEveryFrame(PreferencesWindow *pwindow, 
154                 PlaybackPrefs *playback_prefs, int x, int y);
155         int handle_event();
156         PreferencesWindow *pwindow;
157         PlaybackPrefs *playback_prefs;
158 };
159
160 class PlaybackDeblock : public BC_CheckBox
161 {
162 public:
163         PlaybackDeblock(PreferencesWindow *pwindow, int x, int y);
164         int handle_event();
165         PreferencesWindow *pwindow;
166 };
167
168 class PlaybackPreload : public BC_TextBox
169 {
170 public:
171         PlaybackPreload(int x, 
172                 int y, 
173                 PreferencesWindow *pwindow, 
174                 PlaybackPrefs *playback, 
175                 char *text);
176         int handle_event();
177         PreferencesWindow *pwindow;
178         PlaybackPrefs *playback;
179 };
180
181 class PlaybackInterpolateRaw : public BC_CheckBox
182 {
183 public:
184         PlaybackInterpolateRaw(int x, 
185                 int y, 
186                 PreferencesWindow *pwindow, 
187                 PlaybackPrefs *playback);
188         int handle_event();
189         PreferencesWindow *pwindow;
190         PlaybackPrefs *playback;
191 };
192
193 class PlaybackWhiteBalanceRaw : public BC_CheckBox
194 {
195 public:
196         PlaybackWhiteBalanceRaw(int x, 
197                 int y, 
198                 PreferencesWindow *pwindow, 
199                 PlaybackPrefs *playback);
200         int handle_event();
201         PreferencesWindow *pwindow;
202         PlaybackPrefs *playback;
203 };
204
205 class PlaybackSubtitle : public BC_CheckBox
206 {
207 public:
208         PlaybackSubtitle(int x, 
209                 int y, 
210                 PreferencesWindow *pwindow, 
211                 PlaybackPrefs *playback);
212         int handle_event();
213         PreferencesWindow *pwindow;
214         PlaybackPrefs *playback;
215 };
216
217 class PlaybackSubtitleNumber : public BC_TumbleTextBox
218 {
219 public:
220         PlaybackSubtitleNumber(int x, int y, 
221                 PreferencesWindow *pwindow, 
222                 PlaybackPrefs *playback);
223         int handle_event();
224         PreferencesWindow *pwindow;
225         PlaybackPrefs *playback;
226 };
227
228 class PlaybackLabelCells : public BC_CheckBox
229 {
230 public:
231         PlaybackLabelCells(int x, int y, 
232                 PreferencesWindow *pwindow, 
233                 PlaybackPrefs *playback);
234         int handle_event();
235         PreferencesWindow *pwindow;
236         PlaybackPrefs *playback;
237 };
238
239 class PlaybackProgramNumber : public BC_TumbleTextBox
240 {
241 public:
242         PlaybackProgramNumber(int x, int y, 
243                 PreferencesWindow *pwindow, 
244                 PlaybackPrefs *playback);
245         int handle_event();
246         PreferencesWindow *pwindow;
247         PlaybackPrefs *playback;
248 };
249
250 class PlaybackGain : public BC_TumbleTextBox
251 {
252 public:
253         PlaybackGain(int x, int y,
254                 PreferencesWindow *pwindow, 
255                 PlaybackPrefs *gui);
256         int handle_event();
257         PreferencesWindow *pwindow;
258 };
259
260 #endif