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 #include <View.h> 13 #include <ColorControl.h> 14 #include <Message.h> 15 #include <ListItem.h> 16 #include <ListView.h> 17 #include <Button.h> 18 #include <ScrollView.h> 19 #include <ScrollBar.h> 20 #include <String.h> 21 #include <Menu.h> 22 #include <MenuField.h> 23 #include <MenuBar.h> 24 #include <MenuItem.h> 25 #include <StringView.h> 26 #include <Invoker.h> 27 28 #include "ColorSet.h" 29 30 class ColorWell; 31 class APRWindow; 32 33 class APRView : public BView 34 { 35 public: 36 APRView(const BRect &frame, const char *name, int32 resize, 37 int32 flags); 38 ~APRView(void); 39 void AttachedToWindow(void); 40 void MessageReceived(BMessage *msg); 41 42 void LoadSettings(void); 43 44 protected: 45 46 void UpdateControlsFromAttr(const char *string); 47 void UpdateCurrentColor(); 48 void UpdateAllColors(); 49 50 BColorControl *fPicker; 51 52 BButton *fRevert; 53 BButton *fDefaults; 54 55 BListView *fAttrList; 56 57 color_which fAttribute; 58 59 BString fAttrString; 60 61 BScrollView *fScrollView; 62 63 ColorWell *fColorWell; 64 65 ColorSet fCurrentSet; 66 ColorSet fPrevSet; 67 68 BMenu *fDecorMenu; 69 }; 70 71 #endif 72