rework keyframe hide popup, keyframe auto render, textbox set_selection wide text
[goodguy/history.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 class IndexSize;
26 class IndexCount;
27 class IndexPathText;
28 class TimeFormatHMS;
29 class TimeFormatHMSF;
30 class TimeFormatSamples;
31 class TimeFormatFrames;
32 class TimeFormatHex;
33 class TimeFormatFeet;
34 class TimeFormatSeconds;
35 class MeterMinDB;
36 class MeterMaxDB;
37 class MeterVUDB;
38 class MeterVUInt;
39 class ViewBehaviourText;
40 class ViewTheme;
41 class ViewThumbnails;
42 class ViewThemeItem;
43 class UseTipWindow;
44 class StillImageUseDuration;
45 class StillImageDuration;
46
47 #include "browsebutton.h"
48 #include "deleteallindexes.inc"
49 #include "mwindow.inc"
50 #include "preferencesthread.h"
51 #include "shbtnprefs.inc"
52
53
54 class InterfacePrefs : public PreferencesDialog
55 {
56 public:
57         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
58         ~InterfacePrefs();
59
60         void create_objects();
61 // must delete each derived class
62         int update(int new_value);
63         const char* behavior_to_text(int mode);
64         int start_shbtn_dialog();
65
66         BrowseButton *ipath;
67         IndexSize *isize;
68         IndexCount *icount;
69         IndexPathText *ipathtext;
70         DeleteAllIndexes *deleteall;
71
72         TimeFormatHMS *hms;
73         TimeFormatHMSF *hmsf;
74         TimeFormatSamples *samples;
75         TimeFormatHex *hex;
76         TimeFormatFrames *frames;
77         TimeFormatFeet *feet;
78         TimeFormatSeconds *seconds;
79
80         MeterMinDB *min_db;
81         MeterMaxDB *max_db;
82         MeterVUDB *vu_db;
83 //      MeterVUInt *vu_int;
84         ViewBehaviourText *button1, *button2, *button3;
85         ViewThumbnails *thumbnails;
86         ShBtnEditDialog *shbtn_dialog;
87 };
88
89
90 class IndexPathText : public BC_TextBox
91 {
92 public:
93         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
94         ~IndexPathText();
95         int handle_event();
96         PreferencesWindow *pwindow;
97 };
98
99 class IndexSize : public BC_TextBox
100 {
101 public:
102         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
103         int handle_event();
104         PreferencesWindow *pwindow;
105 };
106
107
108 class IndexCount : public BC_TextBox
109 {
110 public:
111         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
112         int handle_event();
113         PreferencesWindow *pwindow;
114 };
115
116 class TimeFormatHMS : public BC_Radial
117 {
118 public:
119         TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
120         int handle_event();
121         PreferencesWindow *pwindow;
122         InterfacePrefs *tfwindow;
123 };
124
125 class TimeFormatHMSF : public BC_Radial
126 {
127 public:
128         TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
129         int handle_event();
130         PreferencesWindow *pwindow;
131         InterfacePrefs *tfwindow;
132 };
133
134 class TimeFormatSamples : public BC_Radial
135 {
136 public:
137         TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
138         int handle_event();
139         PreferencesWindow *pwindow;
140         InterfacePrefs *tfwindow;
141 };
142
143 class TimeFormatFrames : public BC_Radial
144 {
145 public:
146         TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
147         int handle_event();
148         PreferencesWindow *pwindow;
149         InterfacePrefs *tfwindow;
150 };
151
152 class TimeFormatHex : public BC_Radial
153 {
154 public:
155         TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
156         int handle_event();
157         PreferencesWindow *pwindow;
158         InterfacePrefs *tfwindow;
159 };
160
161 class TimeFormatFeet : public BC_Radial
162 {
163 public:
164         TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
165         int handle_event();
166         PreferencesWindow *pwindow;
167         InterfacePrefs *tfwindow;
168 };
169
170 class TimeFormatSeconds : public BC_Radial
171 {
172 public:
173         TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
174         int handle_event();
175         PreferencesWindow *pwindow;
176         InterfacePrefs *tfwindow;
177 };
178
179 class TimeFormatFeetSetting : public BC_TextBox
180 {
181 public:
182         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
183         int handle_event();
184         PreferencesWindow *pwindow;
185 };
186
187
188
189 class MeterMinDB : public BC_TextBox
190 {
191 public:
192         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
193         int handle_event();
194         PreferencesWindow *pwindow;
195 };
196
197
198 class MeterMaxDB : public BC_TextBox
199 {
200 public:
201         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
202         int handle_event();
203         PreferencesWindow *pwindow;
204 };
205
206 class MeterVUDB : public BC_Radial
207 {
208 public:
209         MeterVUDB(PreferencesWindow *pwindow, char *text, int y);
210         int handle_event();
211 //      MeterVUInt *vu_int;
212         PreferencesWindow *pwindow;
213 };
214
215 class MeterVUInt : public BC_Radial
216 {
217 public:
218         MeterVUInt(PreferencesWindow *pwindow, char *text, int y);
219         int handle_event();
220         MeterVUDB *vu_db;
221         PreferencesWindow *pwindow;
222 };
223
224 class ViewBehaviourText : public BC_PopupMenu
225 {
226 public:
227         ViewBehaviourText(int x,
228                 int y,
229                 const char *text,
230                 PreferencesWindow *pwindow,
231                 int *output);
232         ~ViewBehaviourText();
233
234         int handle_event();  // user copies text to value here
235         void create_objects();         // add initial items
236         InterfacePrefs *tfwindow;
237         int *output;
238 };
239
240 class ViewBehaviourItem : public BC_MenuItem
241 {
242 public:
243         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
244         ~ViewBehaviourItem();
245
246         int handle_event();
247         ViewBehaviourText *popup;
248         int behaviour;
249 };
250
251 class ViewTheme : public BC_PopupMenu
252 {
253 public:
254         ViewTheme(int x, int y, PreferencesWindow *pwindow);
255         ~ViewTheme();
256
257         void create_objects();
258         int handle_event();
259
260         PreferencesWindow *pwindow;
261 };
262
263 class ViewThumbnails : public BC_CheckBox
264 {
265 public:
266         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
267         int handle_event();
268         PreferencesWindow *pwindow;
269 };
270
271 class ViewThemeItem : public BC_MenuItem
272 {
273 public:
274         ViewThemeItem(ViewTheme *popup, char *text);
275         int handle_event();
276         ViewTheme *popup;
277 };
278
279 class UseTipWindow : public BC_CheckBox
280 {
281 public:
282         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
283         int handle_event();
284         PreferencesWindow *pwindow;
285 };
286
287 class UseWarnIndecies : public BC_CheckBox
288 {
289 public:
290         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
291         int handle_event();
292         PreferencesWindow *pwindow;
293 };
294
295 class ScanCommercials : public BC_CheckBox
296 {
297 public:
298         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
299         int handle_event();
300         PreferencesWindow *pwindow;
301 };
302
303 class AndroidRemote : public BC_CheckBox
304 {
305 public:
306         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
307         int handle_event();
308         PreferencesWindow *pwindow;
309 };
310
311 class AndroidPIN : public BC_TextBox
312 {
313 public:
314         PreferencesWindow *pwindow;
315         int handle_event();
316         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
317 };
318
319 class AndroidPort : public BC_TextBox
320 {
321 public:
322         PreferencesWindow *pwindow;
323         int handle_event();
324         AndroidPort(PreferencesWindow *pwindow, int x, int y);
325 };
326
327 class ShBtnPrefs : public BC_GenericButton
328 {
329 public:
330         PreferencesWindow *pwindow;
331         InterfacePrefs *iface_prefs;
332
333         int handle_event();
334         ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y);
335 };
336 class StillImageUseDuration : public BC_CheckBox
337 {
338 public:
339         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
340         int handle_event();
341         PreferencesWindow *pwindow;
342 };
343
344 class StillImageDuration : public BC_TextBox
345 {
346 public:
347         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
348         int handle_event();
349         PreferencesWindow *pwindow;
350 };
351
352
353 #endif