1 /* 2 * Copyright 2002-2008, 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 */ 9 #ifndef APR_VIEW_H_ 10 #define APR_VIEW_H_ 11 12 13 #include <Button.h> 14 #include <ColorControl.h> 15 #include <ListItem.h> 16 #include <ListView.h> 17 #include <Menu.h> 18 #include <MenuBar.h> 19 #include <MenuField.h> 20 #include <MenuItem.h> 21 #include <Message.h> 22 #include <ScrollBar.h> 23 #include <ScrollView.h> 24 #include <String.h> 25 #include <StringView.h> 26 #include <View.h> 27 28 #include <DecorInfo.h> 29 30 #include "ColorSet.h" 31 32 33 class ColorWell; 34 class APRWindow; 35 36 37 class APRView : public BView { 38 public: 39 APRView(const char *name, uint32 flags); 40 ~APRView(void); 41 void AttachedToWindow(void); 42 void MessageReceived(BMessage *msg); 43 44 void LoadSettings(void); 45 bool IsDefaultable(void); 46 47 protected: 48 49 void SetCurrentColor(rgb_color color); 50 void UpdateControls(); 51 void UpdateAllColors(); 52 53 BColorControl *fPicker; 54 55 BListView *fAttrList; 56 57 color_which fWhich; 58 59 BScrollView *fScrollView; 60 61 ColorWell *fColorWell; 62 63 ColorSet fCurrentSet; 64 ColorSet fPrevSet; 65 ColorSet fDefaultSet; 66 }; 67 68 #endif 69