2 * Copyright 2001-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Stefano Ceccherini, burton666@libero.it
7 * Axel Dörfler, axeld@pinc-software.de
10 * John Scipione, jscipione@gmail.com
12 #ifndef SCREEN_WINDOW_H
13 #define SCREEN_WINDOW_H
18 #include "ScreenMode.h"
33 class ScreenWindow
: public BWindow
{
35 ScreenWindow(ScreenSettings
*settings
);
36 virtual ~ScreenWindow();
38 virtual bool QuitRequested();
39 virtual void MessageReceived(BMessage
*message
);
40 virtual void WorkspaceActivated(int32 ws
, bool state
);
41 virtual void ScreenChanged(BRect frame
, color_space mode
);
44 void _BuildSupportedColorSpaces();
46 void _CheckApplyEnabled();
47 void _CheckResolutionMenu();
48 void _CheckColorMenu();
49 void _CheckRefreshMenu();
51 void _UpdateActiveMode();
52 void _UpdateActiveMode(int32 workspace
);
53 void _UpdateWorkspaceButtons();
54 void _UpdateRefreshControl();
55 void _UpdateMonitorView();
56 void _UpdateControls();
57 void _UpdateOriginal();
58 void _UpdateMonitor();
59 void _UpdateColorLabel();
63 status_t
_WriteVesaModeFile(const screen_mode
& mode
) const;
64 bool _IsVesa() const { return fIsVesa
; }
67 ScreenSettings
* fSettings
;
69 bool fBootWorkspaceApplied
;
71 BStringView
* fMonitorInfo
;
72 BStringView
* fDeviceInfo
;
73 MonitorView
* fMonitorView
;
74 BMenuItem
* fAllWorkspacesItem
;
76 BSpinner
* fColumnsControl
;
77 BSpinner
* fRowsControl
;
79 uint32 fSupportedColorSpaces
;
80 BMenuItem
* fUserSelectedColorSpace
;
82 BPopUpMenu
* fResolutionMenu
;
83 BMenuField
* fResolutionField
;
84 BPopUpMenu
* fColorsMenu
;
85 BMenuField
* fColorsField
;
86 BPopUpMenu
* fRefreshMenu
;
87 BMenuField
* fRefreshField
;
88 BMenuItem
* fOtherRefresh
;
90 BPopUpMenu
* fCombineMenu
;
91 BMenuField
* fCombineField
;
92 BPopUpMenu
* fSwapDisplaysMenu
;
93 BMenuField
* fSwapDisplaysField
;
94 BPopUpMenu
* fUseLaptopPanelMenu
;
95 BMenuField
* fUseLaptopPanelField
;
96 BPopUpMenu
* fTVStandardMenu
;
97 BMenuField
* fTVStandardField
;
99 BSlider
* fBrightnessSlider
;
101 BButton
* fDefaultsButton
;
102 BButton
* fApplyButton
;
103 BButton
* fRevertButton
;
105 BButton
* fBackgroundsButton
;
107 ScreenMode fScreenMode
;
108 ScreenMode fUndoScreenMode
;
109 // screen modes for all workspaces
111 screen_mode fActive
, fSelected
, fOriginal
;
112 // screen modes for the current workspace
114 uint32 fOriginalWorkspacesColumns
;
115 uint32 fOriginalWorkspacesRows
;
116 float fOriginalBrightness
;
120 #endif /* SCREEN_WINDOW_H */