xref: /haiku/src/servers/app/DesktopSettingsPrivate.h (revision 0c93c0a807b27096abbfad677436afb7d1712d4a)
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  */
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			SetShowAllDraggers(bool show);
47 		bool			ShowAllDraggers() const;
48 
49 		void			SetWorkspacesCount(int32 number);
50 		int32			WorkspacesCount() const;
51 
52 		void			SetWorkspacesMessage(int32 index, BMessage& message);
53 		const BMessage*	WorkspacesMessage(int32 index) const;
54 
55 	private:
56 		void			_SetDefaults();
57 		status_t		_Load();
58 		status_t		_GetPath(BPath& path);
59 
60 		ServerFont		fPlainFont;
61 		ServerFont		fBoldFont;
62 		ServerFont		fFixedFont;
63 
64 		scroll_bar_info	fScrollBarInfo;
65 		menu_info		fMenuInfo;
66 		mode_mouse		fMouseMode;
67 		bool			fShowAllDraggers;
68 		int32			fWorkspacesCount;
69 		BMessage		fWorkspaceMessages[kMaxWorkspaces];
70 
71 		server_read_only_memory& fShared;
72 };
73 
74 #endif	/* DESKTOP_SETTINGS_PRIVATE_H */
75