x265 upgrade to 2.5, cinfinity cc lic, keyframe reticle redraw, crikey/titler event...
[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 #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 *deleteall;
52         IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
53
54         ViewBehaviourText *button1, *button2, *button3;
55         MeterMinDB *min_db;
56         MeterMaxDB *max_db;
57
58         ShBtnEditDialog *shbtn_dialog;
59         KeyframeReticle *keyframe_reticle;
60         PrefsYUV420P_DVDlace *yuv420p_dvdlace;
61         FileProbeDialog *file_probe_dialog;
62         PrefsFileProbes *file_probes;
63         PrefsTrapSigSEGV *trap_segv;
64         PrefsTrapSigINTR *trap_intr;
65 };
66
67
68 class IndexPathText : public BC_TextBox
69 {
70 public:
71         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
72         ~IndexPathText();
73         int handle_event();
74         PreferencesWindow *pwindow;
75 };
76
77 class IndexSize : public BC_TextBox
78 {
79 public:
80         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
81         int handle_event();
82         PreferencesWindow *pwindow;
83 };
84
85
86 class IndexCount : public BC_TextBox
87 {
88 public:
89         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
90         int handle_event();
91         PreferencesWindow *pwindow;
92 };
93
94
95 class ViewBehaviourText : public BC_PopupMenu
96 {
97 public:
98         ViewBehaviourText(int x, int y, const char *text,
99                 PreferencesWindow *pwindow, int *output);
100         ~ViewBehaviourText();
101
102         int handle_event();  // user copies text to value here
103         void create_objects();         // add initial items
104         InterfacePrefs *tfwindow;
105         int *output;
106 };
107
108 class ViewBehaviourItem : public BC_MenuItem
109 {
110 public:
111         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
112         ~ViewBehaviourItem();
113
114         int handle_event();
115         ViewBehaviourText *popup;
116         int behaviour;
117 };
118
119
120 class MeterMinDB : public BC_TextBox
121 {
122 public:
123         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
124         int handle_event();
125         PreferencesWindow *pwindow;
126 };
127
128
129 class MeterMaxDB : public BC_TextBox
130 {
131 public:
132         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
133         int handle_event();
134         PreferencesWindow *pwindow;
135 };
136
137 class ScanCommercials : public BC_CheckBox
138 {
139 public:
140         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
141         int handle_event();
142         PreferencesWindow *pwindow;
143 };
144
145 class AndroidRemote : public BC_CheckBox
146 {
147 public:
148         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
149         int handle_event();
150         PreferencesWindow *pwindow;
151 };
152
153 class AndroidPIN : public BC_TextBox
154 {
155 public:
156         PreferencesWindow *pwindow;
157         int handle_event();
158         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
159 };
160
161 class AndroidPort : public BC_TextBox
162 {
163 public:
164         PreferencesWindow *pwindow;
165         int handle_event();
166         AndroidPort(PreferencesWindow *pwindow, int x, int y);
167 };
168
169 class ShBtnPrefs : public BC_GenericButton
170 {
171 public:
172         PreferencesWindow *pwindow;
173         InterfacePrefs *iface_prefs;
174
175         int handle_event();
176         ShBtnPrefs(PreferencesWindow *pwindow,
177                 InterfacePrefs *iface_prefs, int x, int y);
178 };
179 class StillImageUseDuration : public BC_CheckBox
180 {
181 public:
182         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
183         int handle_event();
184         PreferencesWindow *pwindow;
185 };
186
187 class StillImageDuration : public BC_TextBox
188 {
189 public:
190         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
191         int handle_event();
192         PreferencesWindow *pwindow;
193 };
194
195 class KeyframeReticle : public BC_PopupMenu
196 {
197 public:
198         KeyframeReticle(PreferencesWindow *pwindow,
199                 InterfacePrefs *iface_prefs, int x, int y, int *output);
200         ~KeyframeReticle();
201
202         const char *hairline_to_string(int type);
203         void create_objects();
204
205         PreferencesWindow *pwindow;
206         InterfacePrefs *iface_prefs;
207         int *output;
208 };
209
210 class HairlineItem : public BC_MenuItem
211 {
212 public:
213         HairlineItem(KeyframeReticle *popup, int hairline);
214         ~HairlineItem();
215
216         KeyframeReticle *popup;
217         int handle_event();
218         int hairline;
219 };
220
221 class IndexFFMPEGMarkerFiles : public BC_CheckBox
222 {
223 public:
224         IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
225         ~IndexFFMPEGMarkerFiles();
226
227         int handle_event();
228
229         InterfacePrefs *iface_prefs;
230 };
231
232
233 class PrefsTrapSigSEGV : public BC_CheckBox
234 {
235 public:
236         PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
237         ~PrefsTrapSigSEGV();
238         int handle_event();
239
240         InterfacePrefs *subwindow;
241 };
242
243 class PrefsTrapSigINTR : public BC_CheckBox
244 {
245 public:
246         PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
247         ~PrefsTrapSigINTR();
248         int handle_event();
249
250         InterfacePrefs *subwindow;
251 };
252
253
254 class PrefsFileProbes : public BC_GenericButton
255 {
256 public:
257         PreferencesWindow *pwindow;
258         InterfacePrefs *subwindow;
259
260         int handle_event();
261         PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
262 };
263
264
265 class PrefsYUV420P_DVDlace : public BC_CheckBox
266 {
267 public:
268         PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
269                 InterfacePrefs *subwindow, int x, int y);
270         int handle_event();
271
272         InterfacePrefs *subwindow;
273         PreferencesWindow *pwindow;
274 };
275
276
277 #endif