add select all/none, layout shortcuts from all guis, docs tweaks + cv->gg
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / interfaceprefs.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 INTERFACEPREFS_H
23 #define INTERFACEPREFS_H
24
25 #include "browsebutton.h"
26 #include "deleteallindexes.inc"
27 #include "interfaceprefs.inc"
28 #include "mwindow.inc"
29 #include "preferencesthread.h"
30 #include "probeprefs.inc"
31 #include "shbtnprefs.inc"
32
33
34 class InterfacePrefs : public PreferencesDialog
35 {
36 public:
37         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
38         ~InterfacePrefs();
39
40         void create_objects();
41 // must delete each derived class
42         int update(int new_value);
43         const char* behavior_to_text(int mode);
44         int start_shbtn_dialog();
45         void start_probe_dialog();
46
47         BrowseButton *ipath;
48         IndexSize *isize;
49         IndexCount *icount;
50         IndexPathText *ipathtext;
51         DeleteAllIndexes *del_indexes;
52         DeleteAllIndexes *del_clipngs;
53         IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
54
55         ViewBehaviourText *button1, *button2, *button3;
56         MeterMinDB *min_db;
57         MeterMaxDB *max_db;
58
59         ShBtnEditDialog *shbtn_dialog;
60         KeyframeReticle *keyframe_reticle;
61         PrefsYUV420P_DVDlace *yuv420p_dvdlace;
62         FileProbeDialog *file_probe_dialog;
63         PrefsFileProbes *file_probes;
64         PrefsTrapSigSEGV *trap_segv;
65         PrefsTrapSigINTR *trap_intr;
66         SnapshotPathText *snapshot_path;
67         PrefsReloadPlugins *reload_plugins;
68 };
69
70
71 class IndexPathText : public BC_TextBox
72 {
73 public:
74         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
75         ~IndexPathText();
76         int handle_event();
77         PreferencesWindow *pwindow;
78 };
79
80 class IndexSize : public BC_TextBox
81 {
82 public:
83         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
84         int handle_event();
85         PreferencesWindow *pwindow;
86 };
87
88
89 class IndexCount : public BC_TextBox
90 {
91 public:
92         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
93         int handle_event();
94         PreferencesWindow *pwindow;
95 };
96
97
98 class ViewBehaviourText : public BC_PopupMenu
99 {
100 public:
101         ViewBehaviourText(int x, int y, const char *text,
102                 PreferencesWindow *pwindow, int *output);
103         ~ViewBehaviourText();
104
105         int handle_event();  // user copies text to value here
106         void create_objects();         // add initial items
107         InterfacePrefs *tfwindow;
108         int *output;
109 };
110
111 class ViewBehaviourItem : public BC_MenuItem
112 {
113 public:
114         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
115         ~ViewBehaviourItem();
116
117         int handle_event();
118         ViewBehaviourText *popup;
119         int behaviour;
120 };
121
122
123 class MeterMinDB : public BC_TextBox
124 {
125 public:
126         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
127         int handle_event();
128         PreferencesWindow *pwindow;
129 };
130
131
132 class MeterMaxDB : public BC_TextBox
133 {
134 public:
135         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
136         int handle_event();
137         PreferencesWindow *pwindow;
138 };
139
140 class ScanCommercials : public BC_CheckBox
141 {
142 public:
143         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
144         int handle_event();
145         PreferencesWindow *pwindow;
146 };
147
148 class AndroidRemote : public BC_CheckBox
149 {
150 public:
151         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
152         int handle_event();
153         PreferencesWindow *pwindow;
154 };
155
156 class AndroidPIN : public BC_TextBox
157 {
158 public:
159         PreferencesWindow *pwindow;
160         int handle_event();
161         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
162 };
163
164 class AndroidPort : public BC_TextBox
165 {
166 public:
167         PreferencesWindow *pwindow;
168         int handle_event();
169         AndroidPort(PreferencesWindow *pwindow, int x, int y);
170 };
171
172 class ShBtnPrefs : public BC_GenericButton
173 {
174 public:
175         PreferencesWindow *pwindow;
176         InterfacePrefs *iface_prefs;
177
178         int handle_event();
179         ShBtnPrefs(PreferencesWindow *pwindow,
180                 InterfacePrefs *iface_prefs, int x, int y);
181 };
182 class StillImageUseDuration : public BC_CheckBox
183 {
184 public:
185         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
186         int handle_event();
187         PreferencesWindow *pwindow;
188 };
189
190 class StillImageDuration : public BC_TextBox
191 {
192 public:
193         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
194         int handle_event();
195         PreferencesWindow *pwindow;
196 };
197
198 class KeyframeReticle : public BC_PopupMenu
199 {
200 public:
201         KeyframeReticle(PreferencesWindow *pwindow,
202                 InterfacePrefs *iface_prefs, int x, int y, int *output);
203         ~KeyframeReticle();
204
205         const char *hairline_to_string(int type);
206         void create_objects();
207
208         PreferencesWindow *pwindow;
209         InterfacePrefs *iface_prefs;
210         int *output;
211 };
212
213 class HairlineItem : public BC_MenuItem
214 {
215 public:
216         HairlineItem(KeyframeReticle *popup, int hairline);
217         ~HairlineItem();
218
219         KeyframeReticle *popup;
220         int handle_event();
221         int hairline;
222 };
223
224 class IndexFFMPEGMarkerFiles : public BC_CheckBox
225 {
226 public:
227         IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
228         ~IndexFFMPEGMarkerFiles();
229
230         int handle_event();
231
232         InterfacePrefs *iface_prefs;
233 };
234
235
236 class PrefsTrapSigSEGV : public BC_CheckBox
237 {
238 public:
239         PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
240         ~PrefsTrapSigSEGV();
241         int handle_event();
242
243         InterfacePrefs *subwindow;
244 };
245
246 class PrefsTrapSigINTR : public BC_CheckBox
247 {
248 public:
249         PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
250         ~PrefsTrapSigINTR();
251         int handle_event();
252
253         InterfacePrefs *subwindow;
254 };
255
256
257 class PrefsFileProbes : public BC_GenericButton
258 {
259 public:
260         PreferencesWindow *pwindow;
261         InterfacePrefs *subwindow;
262
263         int handle_event();
264         PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
265 };
266
267
268 class PrefsYUV420P_DVDlace : public BC_CheckBox
269 {
270 public:
271         PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
272                 InterfacePrefs *subwindow, int x, int y);
273         int handle_event();
274
275         InterfacePrefs *subwindow;
276         PreferencesWindow *pwindow;
277 };
278
279 class SnapshotPathText : public BC_TextBox
280 {
281 public:
282         SnapshotPathText(PreferencesWindow *pwindow,
283                 InterfacePrefs *subwindow, int x, int y, int w);
284         ~SnapshotPathText();
285
286         int handle_event();
287         PreferencesWindow *pwindow;
288         InterfacePrefs *subwindow;
289 };
290
291 class PrefsAutostartLV2UI : public BC_CheckBox
292 {
293 public:
294         PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow);
295         int handle_event();
296         PreferencesWindow *pwindow;
297 };
298
299 class PrefsLV2PathText : public BC_TextBox
300 {
301 public:
302         PrefsLV2PathText(PreferencesWindow *pwindow,
303                 InterfacePrefs *subwindow, int x, int y, int w);
304         ~PrefsLV2PathText();
305
306         int handle_event();
307         PreferencesWindow *pwindow;
308         InterfacePrefs *subwindow;
309 };
310
311 class PrefsReloadPlugins : public BC_GenericButton
312 {
313 public:
314         PreferencesWindow *pwindow;
315         InterfacePrefs *iface_prefs;
316
317         int handle_event();
318         PrefsReloadPlugins(PreferencesWindow *pwindow,
319                 InterfacePrefs *iface_prefs, int x, int y);
320 };
321
322 #endif