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 class BTextView; 16 17 18 class AntialiasingSettingsView : public BView { 19 public: 20 AntialiasingSettingsView(const char* name); 21 virtual ~AntialiasingSettingsView(); 22 23 virtual void AttachedToWindow(); 24 virtual void MessageReceived(BMessage* message); 25 26 void SetDefaults(); 27 void Revert(); 28 bool IsDefaultable(); 29 bool IsRevertable(); 30 31 private: 32 void _BuildAntialiasingMenu(); 33 void _SetCurrentAntialiasing(); 34 void _BuildHintingMenu(); 35 void _SetCurrentHinting(); 36 void _SetCurrentAverageWeight(); 37 38 protected: 39 float fDivider; 40 41 BMenuField* fAntialiasingMenuField; 42 BPopUpMenu* fAntialiasingMenu; 43 BMenuField* fHintingMenuField; 44 BPopUpMenu* fHintingMenu; 45 BSlider* fAverageWeightControl; 46 47 bool fSavedSubpixelAntialiasing; 48 bool fCurrentSubpixelAntialiasing; 49 uint8 fSavedHinting; 50 uint8 fCurrentHinting; 51 unsigned char fSavedAverageWeight; 52 unsigned char fCurrentAverageWeight; 53 }; 54 55 #endif // ANTIALIASING_SETTINGS_VIEW_H 56