xref: /haiku/src/servers/app/DesktopSettingsPrivate.h (revision 9d6d3fcf5fe8308cd020cecf89dede440346f8c4)
1 /*
2  * Copyright 2005-2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  */
8 #ifndef DESKTOP_SETTINGS_PRIVATE_H
9 #define DESKTOP_SETTINGS_PRIVATE_H
10 
11 
12 #include "DesktopSettings.h"
13 #include "ServerFont.h"
14 
15 #include <Locker.h>
16 
17 struct server_read_only_memory;
18 
19 
20 class DesktopSettingsPrivate {
21 	public:
22 		DesktopSettingsPrivate(server_read_only_memory* shared);
23 		~DesktopSettingsPrivate();
24 
25 		status_t		Save(uint32 mask = kAllSettings);
26 
27 		void			SetDefaultPlainFont(const ServerFont& font);
28 		const ServerFont& DefaultPlainFont() const;
29 
30 		void			SetDefaultBoldFont(const ServerFont& font);
31 		const ServerFont& DefaultBoldFont() const;
32 
33 		void			SetDefaultFixedFont(const ServerFont& font);
34 		const ServerFont& DefaultFixedFont() const;
35 
36 		void			SetScrollBarInfo(const scroll_bar_info &info);
37 		const scroll_bar_info& ScrollBarInfo() const;
38 
39 		void			SetMenuInfo(const menu_info &info);
40 		const menu_info& MenuInfo() const;
41 
42 		void			SetMouseMode(mode_mouse mode);
43 		mode_mouse		MouseMode() const;
44 		bool			FocusFollowsMouse() const;
45 
46 		void			SetWorkspacesCount(int32 number);
47 		int32			WorkspacesCount() const;
48 
49 		void			SetWorkspacesMessage(int32 index, BMessage& message);
50 		const BMessage*	WorkspacesMessage(int32 index) const;
51 
52 	private:
53 		void			_SetDefaults();
54 		status_t		_Load();
55 		status_t		_GetPath(BPath& path);
56 
57 		ServerFont		fPlainFont;
58 		ServerFont		fBoldFont;
59 		ServerFont		fFixedFont;
60 
61 		scroll_bar_info	fScrollBarInfo;
62 		menu_info		fMenuInfo;
63 		mode_mouse		fMouseMode;
64 		int32			fWorkspacesCount;
65 		BMessage		fWorkspaceMessages[kMaxWorkspaces];
66 
67 		server_read_only_memory& fShared;
68 };
69 
70 #endif	/* DESKTOP_SETTINGS_PRIVATE_H */
71