xref: /haiku/src/preferences/appearance/AntialiasingSettingsView.h (revision 2600324b57fa31cdea1627d584d314f2a579c4a8)
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(BRect rect,
20 								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 			bool			fSavedHinting;
50 			bool			fCurrentHinting;
51 			unsigned char	fSavedAverageWeight;
52 			unsigned char	fCurrentAverageWeight;
53 };
54 
55 #endif // ANTIALIASING_SETTINGS_VIEW_H
56