2 * Copyright 2005-2006, Axel Dörfler, axeld@pinc-software.de
3 * All rights reserved. Distributed under the terms of the MIT License.
5 * Copyright 2010-2012 Haiku, Inc. All rights reserved.
6 * Distributed under the terms of the MIT License.
9 * Hamish Morrison, hamish@lavabit.com
10 * Alexander von Gluck, kallisti5@unixzen.com
12 #ifndef SETTINGS_WINDOW_H
13 #define SETTINGS_WINDOW_H
18 #include <StatusBar.h>
32 class SizeSlider
: public BSlider
{
34 SizeSlider(const char* name
, const char* label
,
35 BMessage
* message
, int32 min
, int32 max
,
37 virtual ~SizeSlider() {};
39 virtual const char* UpdateText() const;
42 mutable char fText
[128];
46 class VolumeMenuItem
: public BMenuItem
, public BHandler
{
48 VolumeMenuItem(BVolume volume
, BMessage
* message
);
49 virtual ~VolumeMenuItem() {}
51 virtual BVolume
Volume() { return fVolume
; }
52 virtual void MessageReceived(BMessage
* message
);
53 virtual void GenerateLabel();
60 class SettingsWindow
: public BWindow
{
63 virtual ~SettingsWindow() {};
65 virtual void MessageReceived(BMessage
* message
);
66 virtual bool QuitRequested();
69 status_t
_AddVolumeMenuItem(dev_t device
);
70 status_t
_RemoveVolumeMenuItem(dev_t device
);
71 VolumeMenuItem
* _FindVolumeMenuItem(dev_t device
);
73 void _RecordChoices();
75 void _UpdateSwapInfo();
77 BCheckBox
* fSwapEnabledCheckBox
;
78 BCheckBox
* fSwapAutomaticCheckBox
;
80 BButton
* fDefaultsButton
;
81 BButton
* fRevertButton
;
82 BStringView
* fWarningStringView
;
83 BMenuField
* fVolumeMenuField
;
84 BStatusBar
* fSwapUsageBar
;
89 #endif /* SETTINGS_WINDOW_H */