2 * Copyright 2009 Haiku, Inc.
3 * All Rights Reserved. Distributed under the terms of the MIT License.
5 #ifndef _PREFERENCES_WINDOW_H
6 #define _PREFERENCES_WINDOW_H
11 #include "BarSettings.h"
14 const uint32 kConfigShow
= 'PrSh';
15 const uint32 kConfigQuit
= 'PrQt';
16 const uint32 kUpdateRecentCounts
= 'upct';
17 const uint32 kEditInTracker
= 'etrk';
19 const uint32 kTrackerFirst
= 'TkFt';
20 const uint32 kSortRunningApps
= 'SAps';
21 const uint32 kSuperExpando
= 'SprE';
22 const uint32 kExpandNewTeams
= 'ExTm';
23 const uint32 kHideLabels
= 'hLbs';
24 const uint32 kResizeTeamIcons
= 'RTIs';
25 const uint32 kAutoRaise
= 'AtRs';
26 const uint32 kAutoHide
= 'AtHd';
28 const uint32 kDefaults
= 'dflt';
29 const uint32 kRevert
= 'rvrt';
39 class PreferencesWindow
: public BWindow
42 PreferencesWindow(BRect frame
);
45 virtual void MessageReceived(BMessage
* message
);
46 virtual bool QuitRequested();
50 void _EnableDisableDependentItems();
52 bool _IsDefaultable();
55 status_t
_InitSettingsFile(BFile
* file
, bool write
);
56 status_t
_LoadSettings(BMessage
* settings
);
57 status_t
_SaveSettings(BMessage
* settings
);
59 void _SetInitialSettings();
61 void _UpdateButtons();
62 void _UpdatePreferences(desk_settings
* settings
);
63 void _UpdateRecentCounts();
66 BCheckBox
* fMenuRecentDocuments
;
67 BCheckBox
* fMenuRecentApplications
;
68 BCheckBox
* fMenuRecentFolders
;
70 BSpinner
* fMenuRecentDocumentCount
;
71 BSpinner
* fMenuRecentApplicationCount
;
72 BSpinner
* fMenuRecentFolderCount
;
75 BCheckBox
* fAppsSortTrackerFirst
;
76 BCheckBox
* fAppsShowExpanders
;
77 BCheckBox
* fAppsExpandNew
;
78 BCheckBox
* fAppsHideLabels
;
79 BSlider
* fAppsIconSizeSlider
;
81 BCheckBox
* fWindowAlwaysOnTop
;
82 BCheckBox
* fWindowAutoRaise
;
83 BCheckBox
* fWindowAutoHide
;
85 BButton
* fDefaultsButton
;
86 BButton
* fRevertButton
;
89 desk_settings fSettings
;
93 #endif // _PREFERENCES_WINDOW_H