xref: /haiku/src/preferences/screen/MonitorView.h (revision d25503d3dbd8e3f526fd0a9bdd884b8e43c1b794)
1 /*
2  * Copyright 2001-2009, Haiku.
3  * Copyright 2002, Thomas Kurschel.
4  * Distributed under the terms of the MIT License.
5  *
6  * Authors:
7  *		Rafael Romo
8  *		Thomas Kurschel
9  *		Axel Dörfler, axeld@pinc-software.de
10  */
11 #ifndef MONITOR_VIEW_H
12 #define MONITOR_VIEW_H
13 
14 
15 #include <View.h>
16 
17 
18 class MonitorView : public BView {
19 	public:
20 		MonitorView(BRect frame, char *name, int32 screenWidth,
21 			int32 screenHeight);
22 		~MonitorView();
23 
24 		virtual void AttachedToWindow();
25 		virtual void Draw(BRect updateRect);
26 		virtual void MessageReceived(BMessage *message);
27 		virtual void MouseDown(BPoint point);
28 
29 		void SetResolution(int32 width, int32 height);
30 		void SetMaxResolution(int32 width, int32 height);
31 
32 	private:
33 		BRect MonitorBounds();
34 
35 		rgb_color	fBackgroundColor;
36 		rgb_color	fDesktopColor;
37 		int32		fMaxWidth;
38 		int32		fMaxHeight;
39 		int32		fWidth;
40 		int32		fHeight;
41 };
42 
43 #endif	/* MONITOR_VIEW_H */
44