1 /* 2 * Copyright 2010-2012 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 * Alexander von Gluck <kallisti5@unixzen.com> 8 * John Scipione <jscipione@gmail.com> 9 * Ryan Leavengood <leavengood@gmail.com> 10 */ 11 #ifndef LOOK_AND_FEEL_SETTINGS_VIEW_H 12 #define LOOK_AND_FEEL_SETTINGS_VIEW_H 13 14 15 #include <DecorInfo.h> 16 #include <String.h> 17 #include <View.h> 18 19 20 class BButton; 21 class BCheckBox; 22 class BMenuField; 23 class BPopUpMenu; 24 class FakeScrollBar; 25 26 class LookAndFeelSettingsView : public BView { 27 public: 28 LookAndFeelSettingsView(const char* name); 29 virtual ~LookAndFeelSettingsView(); 30 31 virtual void AttachedToWindow(); 32 virtual void MessageReceived(BMessage* message); 33 34 bool IsDefaultable(); 35 void SetDefaults(); 36 37 bool IsRevertable(); 38 void Revert(); 39 40 private: 41 void _SetDecor(const BString& name); 42 void _SetDecor(BPrivate::DecorInfo* decorInfo); 43 44 void _BuildDecorMenu(); 45 void _AdoptToCurrentDecor(); 46 void _AdoptInterfaceToCurrentDecor(); 47 48 bool _DoubleScrollBarArrows(); 49 void _SetDoubleScrollBarArrows(bool doubleArrows); 50 51 private: 52 DecorInfoUtility fDecorUtility; 53 54 BButton* fDecorInfoButton; 55 BMenuField* fDecorMenuField; 56 BPopUpMenu* fDecorMenu; 57 58 FakeScrollBar* fArrowStyleSingle; 59 FakeScrollBar* fArrowStyleDouble; 60 61 BString fSavedDecor; 62 BString fCurrentDecor; 63 64 bool fSavedDoubleArrowsValue; 65 }; 66 67 #endif // LOOK_AND_FEEL_SETTINGS_VIEW_H 68