xref: /haiku/src/preferences/screensaver/ScreenSaverWindow.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
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 class BTabView;
25 
26 class ModulesView;
27 class ScreenCornerSelector;
28 class ScreenSaverRunner;
29 class TimeSlider;
30 
31 class ScreenSaverWindow : public BWindow {
32 	public:
33 		ScreenSaverWindow();
34 		virtual ~ScreenSaverWindow();
35 
36 		virtual void MessageReceived(BMessage *message);
37 		virtual void ScreenChanged(BRect frame, color_space colorSpace);
38 		virtual bool QuitRequested();
39 
40 		void LoadSettings();
41 		void SetMinimalSizeLimit(float width, float height);
42 
43 	private:
44 		void _SetupFadeTab(BRect frame);
45 		void _UpdateTurnOffScreen();
46 		void _UpdateStatus();
47 
48 		float			fMinWidth, fMinHeight;
49 		ScreenSaverSettings fSettings;
50 		uint32			fTurnOffScreenFlags;
51 
52 		BView*			fFadeView;
53 		ModulesView*	fModulesView;
54 		BTabView*		fTabView;
55 
56 		BCheckBox*		fEnableCheckBox;
57 		TimeSlider*		fRunSlider;
58 
59 		BCheckBox*		fTurnOffCheckBox;
60 		TimeSlider*		fTurnOffSlider;
61 
62 		BCheckBox*		fPasswordCheckBox;
63 		TimeSlider*		fPasswordSlider;
64 		BButton*		fPasswordButton;
65 		PasswordWindow*	fPasswordWindow;
66 
67 		ScreenCornerSelector* fFadeNow;
68 		ScreenCornerSelector* fFadeNever;
69 };
70 
71 static const int32 kMsgUpdateList = 'UPDL';
72 
73 #endif	// SCREEN_SAVER_WINDOW_H
74