xref: /haiku/src/preferences/screensaver/ScreenSaverWindow.h (revision 3cb015b1ee509d69c643506e8ff573808c86dcfc)
1 /*
2  * Copyright 2003-2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Phipps
7  *		Jérôme Duval, jerome.duval@free.fr
8  *		Axel Dörfler, axeld@pinc-software.de
9  */
10 #ifndef SCREEN_SAVER_WINDOW_H
11 #define SCREEN_SAVER_WINDOW_H
12 
13 
14 #include "PasswordWindow.h"
15 #include "ScreenSaverSettings.h"
16 
17 #include <Box.h>
18 #include <CheckBox.h>
19 #include <FilePanel.h>
20 #include <Slider.h>
21 #include <ListView.h>
22 
23 class BButton;
24 
25 class ModulesView;
26 class ScreenCornerSelector;
27 class ScreenSaverRunner;
28 class TimeSlider;
29 
30 class ScreenSaverWindow : public BWindow {
31 	public:
32 		ScreenSaverWindow();
33 		virtual ~ScreenSaverWindow();
34 
35 		virtual void MessageReceived(BMessage *message);
36 		virtual void ScreenChanged(BRect frame, color_space colorSpace);
37 		virtual bool QuitRequested();
38 
39 		void LoadSettings();
40 		void SetMinimalSizeLimit(float width, float height);
41 
42 	private:
43 		void _SetupFadeTab(BRect frame);
44 		void _UpdateTurnOffScreen();
45 		void _UpdateStatus();
46 
47 		float			fMinWidth, fMinHeight;
48 		ScreenSaverSettings fSettings;
49 		uint32			fTurnOffScreenFlags;
50 
51 		BView*			fFadeView;
52 		ModulesView*	fModulesView;
53 		BTabView*		fTabView;
54 
55 		BCheckBox*		fEnableCheckBox;
56 		TimeSlider*		fRunSlider;
57 
58 		BCheckBox*		fTurnOffCheckBox;
59 		TimeSlider*		fTurnOffSlider;
60 
61 		BCheckBox*		fPasswordCheckBox;
62 		TimeSlider*		fPasswordSlider;
63 		BButton*		fPasswordButton;
64 		PasswordWindow*	fPasswordWindow;
65 
66 		ScreenCornerSelector* fFadeNow;
67 		ScreenCornerSelector* fFadeNever;
68 };
69 
70 static const int32 kMsgUpdateList = 'UPDL';
71 
72 #endif	// SCREEN_SAVER_WINDOW_H
73