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 bool IsDefaultable(void); 44 45 protected: 46 47 void SetCurrentColor(rgb_color color); 48 void UpdateControls(); 49 void UpdateAllColors(); 50 51 BColorControl *fPicker; 52 53 BListView *fAttrList; 54 55 color_which fWhich; 56 57 BScrollView *fScrollView; 58 59 ColorWell *fColorWell; 60 61 ColorSet fCurrentSet; 62 ColorSet fPrevSet; 63 ColorSet fDefaultSet; 64 65 BMenu *fDecorMenu; 66 }; 67 68 #endif 69