repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / preferences / appearance / APRView.h
blob598d385b132423a6b6db50fbd56701098764e5e8
1 /*
2 * Copyright 2002-2015, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * DarkWyrm (darkwyrm@earthlink.net)
7 * Rene Gollent (rene@gollent.com)
8 * Stephan Aßmus <superstippi@gmx.de>
9 * Joseph Groover <looncraz@looncraz.net>
11 #ifndef APR_VIEW_H_
12 #define APR_VIEW_H_
15 #include <Button.h>
16 #include <ColorControl.h>
17 #include <ListItem.h>
18 #include <ListView.h>
19 #include <Menu.h>
20 #include <MenuBar.h>
21 #include <MenuField.h>
22 #include <MenuItem.h>
23 #include <Message.h>
24 #include <ScrollBar.h>
25 #include <ScrollView.h>
26 #include <String.h>
27 #include <StringView.h>
28 #include <View.h>
30 #include <DecorInfo.h>
33 class APRWindow;
34 class ColorPreview;
36 class APRView : public BView {
37 public:
38 APRView(const char *name);
39 virtual ~APRView();
41 virtual void AttachedToWindow();
42 virtual void MessageReceived(BMessage *msg);
44 void LoadSettings();
46 void SetDefaults();
47 void Revert();
49 bool IsDefaultable();
50 bool IsRevertable();
52 private:
53 void _SetCurrentColor(rgb_color color);
54 void _SetUIColors(const BMessage& colors);
55 void _UpdatePreviews(const BMessage& colors);
57 private:
58 BColorControl* fPicker;
60 BListView* fAttrList;
62 color_which fWhich;
64 BScrollView* fScrollView;
66 ColorPreview* fColorPreview;
68 BMessage fPrevColors;
69 BMessage fDefaultColors;
70 BMessage fCurrentColors;
73 #endif // APR_VIEW_H_