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