docs/ikteam: Delete most files.
[haiku.git] / src / preferences / screen / ScreenWindow.h
blob8698625144240979f8f7d5e90ea0a5bbd9944d0b
1 /*
2 * Copyright 2001-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stefano Ceccherini, burton666@libero.it
7 * Axel Dörfler, axeld@pinc-software.de
8 * Thomas Kurschel
9 * Rafael Romo
10 * John Scipione, jscipione@gmail.com
12 #ifndef SCREEN_WINDOW_H
13 #define SCREEN_WINDOW_H
16 #include <Window.h>
18 #include "ScreenMode.h"
21 class BBox;
22 class BPopUpMenu;
23 class BMenuField;
24 class BSlider;
25 class BSpinner;
26 class BStringView;
28 class RefreshWindow;
29 class MonitorView;
30 class ScreenSettings;
33 class ScreenWindow : public BWindow {
34 public:
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);
43 private:
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();
61 void _Apply();
63 status_t _WriteVesaModeFile(const screen_mode& mode) const;
64 bool _IsVesa() const { return fIsVesa; }
66 private:
67 ScreenSettings* fSettings;
68 bool fIsVesa;
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;
117 bool fModified;
120 #endif /* SCREEN_WINDOW_H */