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;
68 class IndexPathText : public BC_TextBox
71 IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
74 PreferencesWindow *pwindow;
77 class IndexSize : public BC_TextBox
80 IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
82 PreferencesWindow *pwindow;
86 class IndexCount : public BC_TextBox
89 IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
91 PreferencesWindow *pwindow;
95 class ViewBehaviourText : public BC_PopupMenu
98 ViewBehaviourText(int x, int y, const char *text,
99 PreferencesWindow *pwindow, int *output);
100 ~ViewBehaviourText();
102 int handle_event(); // user copies text to value here
103 void create_objects(); // add initial items
104 InterfacePrefs *tfwindow;
108 class ViewBehaviourItem : public BC_MenuItem
111 ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
112 ~ViewBehaviourItem();
115 ViewBehaviourText *popup;
120 class MeterMinDB : public BC_TextBox
123 MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
125 PreferencesWindow *pwindow;
129 class MeterMaxDB : public BC_TextBox
132 MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
134 PreferencesWindow *pwindow;
137 class ScanCommercials : public BC_CheckBox
140 ScanCommercials(PreferencesWindow *pwindow, int x, int y);
142 PreferencesWindow *pwindow;
145 class AndroidRemote : public BC_CheckBox
148 AndroidRemote(PreferencesWindow *pwindow, int x, int y);
150 PreferencesWindow *pwindow;
153 class AndroidPIN : public BC_TextBox
156 PreferencesWindow *pwindow;
158 AndroidPIN(PreferencesWindow *pwindow, int x, int y);
161 class AndroidPort : public BC_TextBox
164 PreferencesWindow *pwindow;
166 AndroidPort(PreferencesWindow *pwindow, int x, int y);
169 class ShBtnPrefs : public BC_GenericButton
172 PreferencesWindow *pwindow;
173 InterfacePrefs *iface_prefs;
176 ShBtnPrefs(PreferencesWindow *pwindow,
177 InterfacePrefs *iface_prefs, int x, int y);
179 class StillImageUseDuration : public BC_CheckBox
182 StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
184 PreferencesWindow *pwindow;
187 class StillImageDuration : public BC_TextBox
190 StillImageDuration(PreferencesWindow *pwindow, int x, int y);
192 PreferencesWindow *pwindow;
195 class KeyframeReticle : public BC_PopupMenu
198 KeyframeReticle(PreferencesWindow *pwindow,
199 InterfacePrefs *iface_prefs, int x, int y, int *output);
202 const char *hairline_to_string(int type);
203 void create_objects();
205 PreferencesWindow *pwindow;
206 InterfacePrefs *iface_prefs;
210 class HairlineItem : public BC_MenuItem
213 HairlineItem(KeyframeReticle *popup, int hairline);
216 KeyframeReticle *popup;
221 class IndexFFMPEGMarkerFiles : public BC_CheckBox
224 IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
225 ~IndexFFMPEGMarkerFiles();
229 InterfacePrefs *iface_prefs;
233 class PrefsTrapSigSEGV : public BC_CheckBox
236 PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
240 InterfacePrefs *subwindow;
243 class PrefsTrapSigINTR : public BC_CheckBox
246 PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
250 InterfacePrefs *subwindow;
254 class PrefsFileProbes : public BC_GenericButton
257 PreferencesWindow *pwindow;
258 InterfacePrefs *subwindow;
261 PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
265 class PrefsYUV420P_DVDlace : public BC_CheckBox
268 PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
269 InterfacePrefs *subwindow, int x, int y);
272 InterfacePrefs *subwindow;
273 PreferencesWindow *pwindow;