xref: /haiku/src/preferences/appearance/APRView.h (revision 541ff51a6ef4c47f8ab105ba6ff895cdbba83aca)
1 /*
2  * Copyright 2002-2012, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		DarkWyrm (darkwyrm@earthlink.net)
7  *		Rene Gollent (rene@gollent.com)
8  *		Stephan Aßmus <superstippi@gmx.de>
9  */
10 #ifndef APR_VIEW_H_
11 #define APR_VIEW_H_
12 
13 
14 #include <Button.h>
15 #include <ColorControl.h>
16 #include <ListItem.h>
17 #include <ListView.h>
18 #include <Menu.h>
19 #include <MenuBar.h>
20 #include <MenuField.h>
21 #include <MenuItem.h>
22 #include <Message.h>
23 #include <ScrollBar.h>
24 #include <ScrollView.h>
25 #include <String.h>
26 #include <StringView.h>
27 #include <View.h>
28 
29 #include <DecorInfo.h>
30 
31 #include "ColorSet.h"
32 
33 
34 class ColorWell;
35 class APRWindow;
36 
37 
38 class APRView : public BView {
39 public:
40 								APRView(const char *name);
41 	virtual						~APRView();
42 
43 	virtual	void				AttachedToWindow();
44 	virtual	void				MessageReceived(BMessage *msg);
45 
46 			void				LoadSettings();
47 
48 			void				SetDefaults();
49 			void				Revert();
50 
51 			bool				IsDefaultable();
52 			bool				IsRevertable();
53 
54 private:
55 			void				_SetCurrentColor(rgb_color color);
56 			void				_UpdateControls();
57 			void				_UpdateAllColors();
58 
59 private:
60 			BColorControl*		fPicker;
61 
62 			BListView*			fAttrList;
63 
64 			color_which			fWhich;
65 
66 			BScrollView*		fScrollView;
67 
68 			ColorWell*			fColorWell;
69 
70 			ColorSet			fCurrentSet;
71 			ColorSet			fPrevSet;
72 			ColorSet			fDefaultSet;
73 };
74 
75 #endif
76