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 static 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;
67 PrefsReloadPlugins *reload_plugins;
71 class IndexPathText : public BC_TextBox
74 IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
77 PreferencesWindow *pwindow;
80 class IndexSize : public BC_TextBox
83 IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
85 PreferencesWindow *pwindow;
89 class IndexCount : public BC_TextBox
92 IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
94 PreferencesWindow *pwindow;
98 class ViewBehaviourText : public BC_PopupMenu
101 ViewBehaviourText(int x, int y, const char *text,
102 PreferencesWindow *pwindow, int *output);
103 ~ViewBehaviourText();
105 int handle_event(); // user copies text to value here
106 void create_objects(); // add initial items
107 InterfacePrefs *tfwindow;
111 class ViewBehaviourItem : public BC_MenuItem
114 ViewBehaviourItem(ViewBehaviourText *popup, const char *text, int behaviour);
115 ~ViewBehaviourItem();
118 ViewBehaviourText *popup;
123 class MeterMinDB : public BC_TextBox
126 MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
128 PreferencesWindow *pwindow;
132 class MeterMaxDB : public BC_TextBox
135 MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
137 PreferencesWindow *pwindow;
140 class ScanCommercials : public BC_CheckBox
143 ScanCommercials(PreferencesWindow *pwindow, int x, int y);
145 PreferencesWindow *pwindow;
148 class AndroidRemote : public BC_CheckBox
151 AndroidRemote(PreferencesWindow *pwindow, int x, int y);
153 PreferencesWindow *pwindow;
156 class AndroidPIN : public BC_TextBox
159 PreferencesWindow *pwindow;
161 AndroidPIN(PreferencesWindow *pwindow, int x, int y);
164 class AndroidPort : public BC_TextBox
167 PreferencesWindow *pwindow;
169 AndroidPort(PreferencesWindow *pwindow, int x, int y);
172 class ShBtnPrefs : public BC_GenericButton
175 PreferencesWindow *pwindow;
176 InterfacePrefs *iface_prefs;
179 ShBtnPrefs(PreferencesWindow *pwindow,
180 InterfacePrefs *iface_prefs, int x, int y);
182 class StillImageUseDuration : public BC_CheckBox
185 StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
187 PreferencesWindow *pwindow;
190 class StillImageDuration : public BC_TextBox
193 StillImageDuration(PreferencesWindow *pwindow, int x, int y);
195 PreferencesWindow *pwindow;
198 class KeyframeReticle : public BC_PopupMenu
201 KeyframeReticle(PreferencesWindow *pwindow,
202 InterfacePrefs *iface_prefs, int x, int y, int *output);
205 const char *hairline_to_string(int type);
206 void create_objects();
208 PreferencesWindow *pwindow;
209 InterfacePrefs *iface_prefs;
213 class HairlineItem : public BC_MenuItem
216 HairlineItem(KeyframeReticle *popup, int hairline);
219 KeyframeReticle *popup;
224 class IndexFFMPEGMarkerFiles : public BC_CheckBox
227 IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
228 ~IndexFFMPEGMarkerFiles();
232 InterfacePrefs *iface_prefs;
236 class PrefsTrapSigSEGV : public BC_CheckBox
239 PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
243 InterfacePrefs *subwindow;
246 class PrefsTrapSigINTR : public BC_CheckBox
249 PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
253 InterfacePrefs *subwindow;
257 class PrefsFileProbes : public BC_GenericButton
260 PreferencesWindow *pwindow;
261 InterfacePrefs *subwindow;
264 PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
268 class PrefsYUV420P_DVDlace : public BC_CheckBox
271 PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
272 InterfacePrefs *subwindow, int x, int y);
275 InterfacePrefs *subwindow;
276 PreferencesWindow *pwindow;
279 class SnapshotPathText : public BC_TextBox
282 SnapshotPathText(PreferencesWindow *pwindow,
283 InterfacePrefs *subwindow, int x, int y, int w);
287 PreferencesWindow *pwindow;
288 InterfacePrefs *subwindow;
291 class PrefsAutostartLV2UI : public BC_CheckBox
294 PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow);
296 PreferencesWindow *pwindow;
299 class PrefsLV2PathText : public BC_TextBox
302 PrefsLV2PathText(PreferencesWindow *pwindow,
303 InterfacePrefs *subwindow, int x, int y, int w);
307 PreferencesWindow *pwindow;
308 InterfacePrefs *subwindow;
311 class PrefsNestedProxyPath : public BC_TextBox
314 PrefsNestedProxyPath(PreferencesWindow *pwindow,
315 InterfacePrefs *subwindow, int x, int y, int w);
316 ~PrefsNestedProxyPath();
319 PreferencesWindow *pwindow;
320 InterfacePrefs *subwindow;
323 class PrefsReloadPlugins : public BC_GenericButton
326 PreferencesWindow *pwindow;
327 InterfacePrefs *iface_prefs;
330 PrefsReloadPlugins(PreferencesWindow *pwindow,
331 InterfacePrefs *iface_prefs, int x, int y);