xref: /haiku/src/preferences/appearance/APRView.h (revision 4f00613311d0bd6b70fa82ce19931c41f071ea4e)
1 //------------------------------------------------------------------------------
2 //	Copyright (c) 2001-2002, OpenBeOS
3 //
4 //	Permission is hereby granted, free of charge, to any person obtaining a
5 //	copy of this software and associated documentation files (the "Software"),
6 //	to deal in the Software without restriction, including without limitation
7 //	the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 //	and/or sell copies of the Software, and to permit persons to whom the
9 //	Software is furnished to do so, subject to the following conditions:
10 //
11 //	The above copyright notice and this permission notice shall be included in
12 //	all copies or substantial portions of the Software.
13 //
14 //	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 //	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 //	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 //	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 //	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 //	FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 //	DEALINGS IN THE SOFTWARE.
21 //
22 //	File Name:		APRView.cpp
23 //	Author:			DarkWyrm <bpmagic@columbus.rr.com>
24 //	Description:	color handler for the app
25 //
26 //------------------------------------------------------------------------------
27 #ifndef APR_VIEW_H_
28 #define APR_VIEW_H_
29 
30 #include <View.h>
31 #include <ColorControl.h>
32 #include <Message.h>
33 #include <ListItem.h>
34 #include <ListView.h>
35 #include <Button.h>
36 #include <ScrollView.h>
37 #include <ScrollBar.h>
38 #include <String.h>
39 #include <Menu.h>
40 #include <MenuBar.h>
41 #include <MenuItem.h>
42 #include <StringView.h>
43 #include <Invoker.h>
44 #include "ColorSet.h"
45 
46 class ColorWell;
47 class APRWindow;
48 
49 class APRView : public BView
50 {
51 public:
52 			APRView(const BRect &frame, const char *name, int32 resize,
53 					int32 flags);
54 	void	AttachedToWindow(void);
55 	void	MessageReceived(BMessage *msg);
56 
57 	void	LoadSettings(void);
58 
59 protected:
60 
61 	void	UpdateControlsFromAttr(const char *string);
62 
63 	BColorControl	*picker;
64 
65 	BButton			*apply;
66 	BButton			*revert;
67 	BButton			*defaults;
68 
69 	BListView		*attrlist;
70 
71 	color_which		attribute;
72 
73 	BString			attrstring;
74 
75 	BScrollView		*scrollview;
76 
77 	ColorWell		*colorwell;
78 
79 	ColorSet		currentset;
80 	ColorSet		prevset;
81 };
82 
83 #endif
84