xref: /haiku/src/servers/app/DesktopSettingsPrivate.h (revision 746cac055adc6ac3308c7bc2d29040fb95689cc9)
1 /*
2  * Copyright 2005-2007, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  *		Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
8  */
9 #ifndef DESKTOP_SETTINGS_PRIVATE_H
10 #define DESKTOP_SETTINGS_PRIVATE_H
11 
12 
13 #include "DesktopSettings.h"
14 #include "ServerFont.h"
15 
16 #include <Locker.h>
17 
18 struct server_read_only_memory;
19 
20 
21 class DesktopSettingsPrivate {
22 	public:
23 		DesktopSettingsPrivate(server_read_only_memory* shared);
24 		~DesktopSettingsPrivate();
25 
26 		status_t		Save(uint32 mask = kAllSettings);
27 
28 		void			SetDefaultPlainFont(const ServerFont& font);
29 		const ServerFont& DefaultPlainFont() const;
30 
31 		void			SetDefaultBoldFont(const ServerFont& font);
32 		const ServerFont& DefaultBoldFont() const;
33 
34 		void			SetDefaultFixedFont(const ServerFont& font);
35 		const ServerFont& DefaultFixedFont() const;
36 
37 		void			SetScrollBarInfo(const scroll_bar_info &info);
38 		const scroll_bar_info& ScrollBarInfo() const;
39 
40 		void			SetMenuInfo(const menu_info &info);
41 		const menu_info& MenuInfo() const;
42 
43 		void			SetMouseMode(mode_mouse mode);
44 		mode_mouse		MouseMode() const;
45 		bool			FocusFollowsMouse() const;
46 
47 		void			SetShowAllDraggers(bool show);
48 		bool			ShowAllDraggers() const;
49 
50 		void			SetWorkspacesCount(int32 number);
51 		int32			WorkspacesCount() const;
52 
53 		void			SetWorkspacesMessage(int32 index, BMessage& message);
54 		const BMessage*	WorkspacesMessage(int32 index) const;
55 
56 		void			SetUIColor(color_which which, const rgb_color color);
57 		rgb_color		UIColor(color_which which) const;
58 
59 		void			SetSubpixelAntialiasing(bool subpix);
60 		bool			SubpixelAntialiasing() const;
61 		void			SetHinting(bool hinting);
62 		bool			Hinting() const;
63 		void			SetSubpixelAverageWeight(uint8 averageWeight);
64 		uint8			SubpixelAverageWeight() const;
65 		void			SetSubpixelOrderingRegular(bool SubpixelOrdering);
66 		bool			IsSubpixelOrderingRegular() const;
67 
68 	private:
69 		void			_SetDefaults();
70 		status_t		_Load();
71 		status_t		_GetPath(BPath& path);
72 
73 		ServerFont		fPlainFont;
74 		ServerFont		fBoldFont;
75 		ServerFont		fFixedFont;
76 
77 		scroll_bar_info	fScrollBarInfo;
78 		menu_info		fMenuInfo;
79 		mode_mouse		fMouseMode;
80 		bool			fShowAllDraggers;
81 		int32			fWorkspacesCount;
82 		BMessage		fWorkspaceMessages[kMaxWorkspaces];
83 
84 		server_read_only_memory& fShared;
85 };
86 
87 #endif	/* DESKTOP_SETTINGS_PRIVATE_H */
88