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 *deleteall;
52 IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
54 ViewBehaviourText *button1, *button2, *button3;
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 SnapshotPathText *snapshot_path;
69 class IndexPathText : public BC_TextBox
72 IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
75 PreferencesWindow *pwindow;
78 class IndexSize : public BC_TextBox
81 IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
83 PreferencesWindow *pwindow;
87 class IndexCount : public BC_TextBox
90 IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
92 PreferencesWindow *pwindow;
96 class ViewBehaviourText : public BC_PopupMenu
99 ViewBehaviourText(int x, int y, const char *text,
100 PreferencesWindow *pwindow, int *output);
101 ~ViewBehaviourText();
103 int handle_event(); // user copies text to value here
104 void create_objects(); // add initial items
105 InterfacePrefs *tfwindow;
109 class ViewBehaviourItem : public BC_MenuItem
112 ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
113 ~ViewBehaviourItem();
116 ViewBehaviourText *popup;
121 class MeterMinDB : public BC_TextBox
124 MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
126 PreferencesWindow *pwindow;
130 class MeterMaxDB : public BC_TextBox
133 MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
135 PreferencesWindow *pwindow;
138 class ScanCommercials : public BC_CheckBox
141 ScanCommercials(PreferencesWindow *pwindow, int x, int y);
143 PreferencesWindow *pwindow;
146 class AndroidRemote : public BC_CheckBox
149 AndroidRemote(PreferencesWindow *pwindow, int x, int y);
151 PreferencesWindow *pwindow;
154 class AndroidPIN : public BC_TextBox
157 PreferencesWindow *pwindow;
159 AndroidPIN(PreferencesWindow *pwindow, int x, int y);
162 class AndroidPort : public BC_TextBox
165 PreferencesWindow *pwindow;
167 AndroidPort(PreferencesWindow *pwindow, int x, int y);
170 class ShBtnPrefs : public BC_GenericButton
173 PreferencesWindow *pwindow;
174 InterfacePrefs *iface_prefs;
177 ShBtnPrefs(PreferencesWindow *pwindow,
178 InterfacePrefs *iface_prefs, int x, int y);
180 class StillImageUseDuration : public BC_CheckBox
183 StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
185 PreferencesWindow *pwindow;
188 class StillImageDuration : public BC_TextBox
191 StillImageDuration(PreferencesWindow *pwindow, int x, int y);
193 PreferencesWindow *pwindow;
196 class KeyframeReticle : public BC_PopupMenu
199 KeyframeReticle(PreferencesWindow *pwindow,
200 InterfacePrefs *iface_prefs, int x, int y, int *output);
203 const char *hairline_to_string(int type);
204 void create_objects();
206 PreferencesWindow *pwindow;
207 InterfacePrefs *iface_prefs;
211 class HairlineItem : public BC_MenuItem
214 HairlineItem(KeyframeReticle *popup, int hairline);
217 KeyframeReticle *popup;
222 class IndexFFMPEGMarkerFiles : public BC_CheckBox
225 IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
226 ~IndexFFMPEGMarkerFiles();
230 InterfacePrefs *iface_prefs;
234 class PrefsTrapSigSEGV : public BC_CheckBox
237 PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
241 InterfacePrefs *subwindow;
244 class PrefsTrapSigINTR : public BC_CheckBox
247 PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
251 InterfacePrefs *subwindow;
255 class PrefsFileProbes : public BC_GenericButton
258 PreferencesWindow *pwindow;
259 InterfacePrefs *subwindow;
262 PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
266 class PrefsYUV420P_DVDlace : public BC_CheckBox
269 PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
270 InterfacePrefs *subwindow, int x, int y);
273 InterfacePrefs *subwindow;
274 PreferencesWindow *pwindow;
277 class SnapshotPathText : public BC_TextBox
280 SnapshotPathText(PreferencesWindow *pwindow,
281 InterfacePrefs *subwindow, int x, int y, int w);
285 PreferencesWindow *pwindow;
286 InterfacePrefs *subwindow;
289 class PrefsAutostartLV2UI : public BC_CheckBox
292 PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow);
294 PreferencesWindow *pwindow;
297 class PrefsLV2PathText : public BC_TextBox
300 PrefsLV2PathText(PreferencesWindow *pwindow,
301 InterfacePrefs *subwindow, int x, int y, int w);
305 PreferencesWindow *pwindow;
306 InterfacePrefs *subwindow;