1 /* 2 * Copyright 2008, Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk> 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef ANTIALIASING_SETTINGS_VIEW_H 6 #define ANTIALIASING_SETTINGS_VIEW_H 7 8 9 #include <View.h> 10 11 class BBox; 12 class BMenuField; 13 class BPopUpMenu; 14 class BSlider; 15 16 17 class AntialiasingSettingsView : public BView { 18 public: 19 AntialiasingSettingsView(const char* name); 20 virtual ~AntialiasingSettingsView(); 21 22 virtual void AttachedToWindow(); 23 virtual void MessageReceived(BMessage* message); 24 25 void SetDefaults(); 26 void Revert(); 27 bool IsDefaultable(); 28 bool IsRevertable(); 29 30 private: 31 void _BuildAntialiasingMenu(); 32 void _SetCurrentAntialiasing(); 33 void _BuildHintingMenu(); 34 void _SetCurrentHinting(); 35 void _SetCurrentAverageWeight(); 36 37 protected: 38 float fDivider; 39 40 BMenuField* fAntialiasingMenuField; 41 BPopUpMenu* fAntialiasingMenu; 42 BMenuField* fHintingMenuField; 43 BPopUpMenu* fHintingMenu; 44 BSlider* fAverageWeightControl; 45 46 bool fSavedSubpixelAntialiasing; 47 bool fCurrentSubpixelAntialiasing; 48 uint8 fSavedHinting; 49 uint8 fCurrentHinting; 50 unsigned char fSavedAverageWeight; 51 unsigned char fCurrentAverageWeight; 52 }; 53 54 #endif // ANTIALIASING_SETTINGS_VIEW_H 55