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