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 APRWindow; 35 class ColorPreview; 36 37 class APRView : public BView { 38 public: 39 APRView(const char *name); 40 virtual ~APRView(); 41 42 virtual void AttachedToWindow(); 43 virtual void MessageReceived(BMessage *msg); 44 45 void LoadSettings(); 46 47 void SetDefaults(); 48 void Revert(); 49 50 bool IsDefaultable(); 51 bool IsRevertable(); 52 53 private: 54 void _SetCurrentColor(rgb_color color); 55 void _UpdateAllColors(); 56 57 private: 58 BColorControl* fPicker; 59 60 BListView* fAttrList; 61 62 color_which fWhich; 63 64 BScrollView* fScrollView; 65 66 ColorPreview* fColorPreview; 67 68 ColorSet fCurrentSet; 69 ColorSet fPrevSet; 70 ColorSet fDefaultSet; 71 }; 72 73 #endif // APR_VIEW_H_ 74