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 APPEARANCEPREFS_H
23 #define APPEARANCEPREFS_H
25 #include "appearanceprefs.inc"
26 #include "browsebutton.h"
27 #include "colorpicker.h"
28 #include "deleteallindexes.inc"
29 #include "mwindow.inc"
30 #include "preferencesthread.h"
31 #include "shbtnprefs.inc"
34 class AppearancePrefs : public PreferencesDialog
37 AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
40 void create_objects();
42 int update(int new_value);
45 TimeFormatTimecode *timecode;
46 TimeFormatSamples *samples;
48 TimeFormatFrames *frames;
50 TimeFormatSeconds *seconds;
51 ViewLayoutScale *layout_scale;
52 ViewThumbnails *thumbnails;
53 ViewThumbnailSize *thumbnail_size;
54 ViewViconSize *vicon_size;
55 ViewViconColorMode *vicon_color_mode;
56 YuvColorSpace *yuv_color_space;
57 YuvColorRange *yuv_color_range;
58 Composer_BG_Color *cwdw_bg_color;
62 class TimeFormatHMS : public BC_Radial
65 TimeFormatHMS(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
67 PreferencesWindow *pwindow;
68 AppearancePrefs *tfwindow;
71 class TimeFormatHMSF : public BC_Radial
74 TimeFormatHMSF(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
76 PreferencesWindow *pwindow;
77 AppearancePrefs *tfwindow;
80 class TimeFormatTimecode : public BC_Radial
83 TimeFormatTimecode(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
85 PreferencesWindow *pwindow;
86 AppearancePrefs *tfwindow;
89 class TimeFormatSamples : public BC_Radial
92 TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
94 PreferencesWindow *pwindow;
95 AppearancePrefs *tfwindow;
98 class TimeFormatFrames : public BC_Radial
101 TimeFormatFrames(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
103 PreferencesWindow *pwindow;
104 AppearancePrefs *tfwindow;
107 class TimeFormatHex : public BC_Radial
110 TimeFormatHex(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
112 PreferencesWindow *pwindow;
113 AppearancePrefs *tfwindow;
116 class TimeFormatFeet : public BC_Radial
119 TimeFormatFeet(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
121 PreferencesWindow *pwindow;
122 AppearancePrefs *tfwindow;
125 class TimeFormatSeconds : public BC_Radial
128 TimeFormatSeconds(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
130 PreferencesWindow *pwindow;
131 AppearancePrefs *tfwindow;
134 class TimeFormatFeetSetting : public BC_TextBox
137 TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
139 PreferencesWindow *pwindow;
144 class ViewTheme : public BC_PopupMenu
147 ViewTheme(int x, int y, PreferencesWindow *pwindow);
150 void create_objects();
153 PreferencesWindow *pwindow;
156 class ViewThemeItem : public BC_MenuItem
159 ViewThemeItem(ViewTheme *popup, const char *text);
164 class ViewPluginIcons : public BC_PopupMenu
167 ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
170 void create_objects();
173 PreferencesWindow *pwindow;
176 class ViewPluginIconItem : public BC_MenuItem
179 ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
181 ViewPluginIcons *popup;
184 class LayoutLocale : public BC_PopupMenu
186 static const char *locale_list[];
188 LayoutLocale(int x, int y, PreferencesWindow *pwindow);
191 void create_objects();
194 PreferencesWindow *pwindow;
197 class LayoutLocaleItem : public BC_MenuItem
200 LayoutLocaleItem(LayoutLocale *popup, const char *text);
205 class ViewLayoutScale : public BC_TumbleTextBox
208 ViewLayoutScale(PreferencesWindow *pwindow,
209 AppearancePrefs *aprefs, int x, int y);
211 AppearancePrefs *aprefs;
212 PreferencesWindow *pwindow;
215 class ViewThumbnails : public BC_CheckBox
218 ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
220 PreferencesWindow *pwindow;
223 class ViewThumbnailSize : public BC_TumbleTextBox
226 ViewThumbnailSize(PreferencesWindow *pwindow,
227 AppearancePrefs *aprefs, int x, int y);
229 AppearancePrefs *aprefs;
230 PreferencesWindow *pwindow;
233 class ViewViconSize : public BC_TumbleTextBox
236 ViewViconSize(PreferencesWindow *pwindow,
237 AppearancePrefs *aprefs, int x, int y);
239 AppearancePrefs *aprefs;
240 PreferencesWindow *pwindow;
243 class ViewViconColorMode : public BC_PopupMenu
245 #define MAX_VICON_COLOR_MODE 3
246 static const char *vicon_color_modes[MAX_VICON_COLOR_MODE];
248 ViewViconColorMode(PreferencesWindow *pwindow, int x, int y);
249 ~ViewViconColorMode();
251 void create_objects();
254 PreferencesWindow *pwindow;
257 class ViewViconColorModeItem : public BC_MenuItem
260 ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id);
262 ViewViconColorMode *popup;
266 class UseTipWindow : public BC_CheckBox
269 UseTipWindow(PreferencesWindow *pwindow, int x, int y);
271 PreferencesWindow *pwindow;
274 class UseWarnIndecies : public BC_CheckBox
277 UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
279 PreferencesWindow *pwindow;
282 class UseUnsafeGUI : public BC_CheckBox
285 UseUnsafeGUI(PreferencesWindow *pwindow, int x, int y);
287 PreferencesWindow *pwindow;
290 class OngoingBackups: public BC_CheckBox
293 OngoingBackups(PreferencesWindow *pwindow, int x, int y);
295 PreferencesWindow *pwindow;
298 class BD_WarnRoot : public BC_CheckBox
301 BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
303 PreferencesWindow *pwindow;
306 class UseWarnFileRef : public BC_CheckBox
309 UseWarnFileRef(PreferencesWindow *pwindow, int x, int y);
311 PreferencesWindow *pwindow;
314 class PopupMenuBtnup : public BC_CheckBox
317 PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
319 PreferencesWindow *pwindow;
322 class GrabFocusPolicy : public BC_CheckBox
325 GrabFocusPolicy(PreferencesWindow *pwindow, int x, int y);
327 PreferencesWindow *pwindow;
330 class ActivateFocusPolicy : public BC_CheckBox
333 ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
335 PreferencesWindow *pwindow;
338 class DeactivateFocusPolicy : public BC_CheckBox
341 DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
343 PreferencesWindow *pwindow;
346 class AutoRotate: public BC_CheckBox
349 AutoRotate(PreferencesWindow *pwindow, int x, int y);
351 PreferencesWindow *pwindow;
354 class ForwardRenderDisplacement : public BC_CheckBox
357 ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y);
359 PreferencesWindow *pwindow;
362 class AutocolorAssets : public BC_CheckBox
365 AutocolorAssets(PreferencesWindow *pwindow, int x, int y);
367 PreferencesWindow *pwindow;
370 class HighlightInverseColor : public BC_TextBox
373 HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex);
375 PreferencesWindow *pwindow;
378 class YuvColorSpace : public BC_PopupMenu
381 #define MAX_COLOR_SPACE 5
382 static const char *color_space[MAX_COLOR_SPACE];
383 YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
386 void create_objects();
389 PreferencesWindow *pwindow;
392 class YuvColorSpaceItem : public BC_MenuItem
395 YuvColorSpaceItem(YuvColorSpace *popup, const char *text, int id);
397 YuvColorSpace *popup;
401 class YuvColorRange : public BC_PopupMenu
404 #define MAX_COLOR_RANGE 2
405 static const char *color_range[MAX_COLOR_RANGE];
406 YuvColorRange(int x, int y, PreferencesWindow *pwindow);
409 void create_objects();
412 PreferencesWindow *pwindow;
415 class YuvColorRangeItem : public BC_MenuItem
418 YuvColorRangeItem(YuvColorRange *popup, const char *text, int id);
420 YuvColorRange *popup;
424 class PerpetualSession : public BC_CheckBox
427 PerpetualSession(int x, int y, PreferencesWindow *pwindow);
429 PreferencesWindow *pwindow;
432 class CtrlToggle : public BC_CheckBox
435 CtrlToggle(int x, int y, PreferencesWindow *pwindow);
437 PreferencesWindow *pwindow;
440 class RectifyAudioToggle : public BC_CheckBox
443 RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow);
445 PreferencesWindow *pwindow;
448 class Composer_BG_Color : public ColorBoxButton
451 Composer_BG_Color(PreferencesWindow *pwindow,
452 int x, int y, int w, int h, int color);
453 ~Composer_BG_Color();
454 void handle_done_event(int result);
455 int handle_new_color(int color, int alpha);
457 PreferencesWindow *pwindow;