4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
22 #ifndef INTERFACEPREFS_H
23 #define INTERFACEPREFS_H
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"
34 class InterfacePrefs : public PreferencesDialog
37 InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
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();
50 IndexPathText *ipathtext;
51 DeleteAllIndexes *del_indexes;
52 DeleteAllIndexes *del_clipngs;
53 IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
55 ViewBehaviourText *button1, *button2, *button3;
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;
70 class IndexPathText : public BC_TextBox
73 IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
76 PreferencesWindow *pwindow;
79 class IndexSize : public BC_TextBox
82 IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
84 PreferencesWindow *pwindow;
88 class IndexCount : public BC_TextBox
91 IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
93 PreferencesWindow *pwindow;
97 class ViewBehaviourText : public BC_PopupMenu
100 ViewBehaviourText(int x, int y, const char *text,
101 PreferencesWindow *pwindow, int *output);
102 ~ViewBehaviourText();
104 int handle_event(); // user copies text to value here
105 void create_objects(); // add initial items
106 InterfacePrefs *tfwindow;
110 class ViewBehaviourItem : public BC_MenuItem
113 ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
114 ~ViewBehaviourItem();
117 ViewBehaviourText *popup;
122 class MeterMinDB : public BC_TextBox
125 MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
127 PreferencesWindow *pwindow;
131 class MeterMaxDB : public BC_TextBox
134 MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
136 PreferencesWindow *pwindow;
139 class ScanCommercials : public BC_CheckBox
142 ScanCommercials(PreferencesWindow *pwindow, int x, int y);
144 PreferencesWindow *pwindow;
147 class AndroidRemote : public BC_CheckBox
150 AndroidRemote(PreferencesWindow *pwindow, int x, int y);
152 PreferencesWindow *pwindow;
155 class AndroidPIN : public BC_TextBox
158 PreferencesWindow *pwindow;
160 AndroidPIN(PreferencesWindow *pwindow, int x, int y);
163 class AndroidPort : public BC_TextBox
166 PreferencesWindow *pwindow;
168 AndroidPort(PreferencesWindow *pwindow, int x, int y);
171 class ShBtnPrefs : public BC_GenericButton
174 PreferencesWindow *pwindow;
175 InterfacePrefs *iface_prefs;
178 ShBtnPrefs(PreferencesWindow *pwindow,
179 InterfacePrefs *iface_prefs, int x, int y);
181 class StillImageUseDuration : public BC_CheckBox
184 StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
186 PreferencesWindow *pwindow;
189 class StillImageDuration : public BC_TextBox
192 StillImageDuration(PreferencesWindow *pwindow, int x, int y);
194 PreferencesWindow *pwindow;
197 class KeyframeReticle : public BC_PopupMenu
200 KeyframeReticle(PreferencesWindow *pwindow,
201 InterfacePrefs *iface_prefs, int x, int y, int *output);
204 const char *hairline_to_string(int type);
205 void create_objects();
207 PreferencesWindow *pwindow;
208 InterfacePrefs *iface_prefs;
212 class HairlineItem : public BC_MenuItem
215 HairlineItem(KeyframeReticle *popup, int hairline);
218 KeyframeReticle *popup;
223 class IndexFFMPEGMarkerFiles : public BC_CheckBox
226 IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
227 ~IndexFFMPEGMarkerFiles();
231 InterfacePrefs *iface_prefs;
235 class PrefsTrapSigSEGV : public BC_CheckBox
238 PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
242 InterfacePrefs *subwindow;
245 class PrefsTrapSigINTR : public BC_CheckBox
248 PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
252 InterfacePrefs *subwindow;
256 class PrefsFileProbes : public BC_GenericButton
259 PreferencesWindow *pwindow;
260 InterfacePrefs *subwindow;
263 PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
267 class PrefsYUV420P_DVDlace : public BC_CheckBox
270 PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
271 InterfacePrefs *subwindow, int x, int y);
274 InterfacePrefs *subwindow;
275 PreferencesWindow *pwindow;
278 class SnapshotPathText : public BC_TextBox
281 SnapshotPathText(PreferencesWindow *pwindow,
282 InterfacePrefs *subwindow, int x, int y, int w);
286 PreferencesWindow *pwindow;
287 InterfacePrefs *subwindow;
290 class PrefsAutostartLV2UI : public BC_CheckBox
293 PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow);
295 PreferencesWindow *pwindow;
298 class PrefsLV2PathText : public BC_TextBox
301 PrefsLV2PathText(PreferencesWindow *pwindow,
302 InterfacePrefs *subwindow, int x, int y, int w);
306 PreferencesWindow *pwindow;
307 InterfacePrefs *subwindow;