xref: /haiku/src/servers/app/DesktopSettings.h (revision cd552c7a15cc10c36dae8d7439ba1d6c0bb168c5)
1 /*
2  * Copyright 2001-2005, 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_H
9 #define DESKTOP_SETTINGS_H
10 
11 
12 #include <InterfaceDefs.h>
13 #include <Menu.h>
14 #include <Message.h>
15 
16 class Desktop;
17 class ServerFont;
18 
19 
20 static const int32 kMaxWorkspaces = 32;
21 
22 enum {
23 	kAllSettings		= 0xff,
24 	kWorkspacesSettings	= 0x01,
25 	kFontSettings		= 0x02,
26 	kAppearanceSettings	= 0x04,
27 	kMouseSettings		= 0x08,
28 };
29 
30 class DesktopSettings {
31 	public:
32 		DesktopSettings(Desktop* desktop);
33 		~DesktopSettings();
34 
35 		status_t		Save(uint32 mask = kAllSettings);
36 
37 		void			SetDefaultPlainFont(const ServerFont& font);
38 		void			GetDefaultPlainFont(ServerFont& font) const;
39 
40 		void			SetDefaultBoldFont(const ServerFont& font);
41 		void			GetDefaultBoldFont(ServerFont& font) const;
42 
43 		void			SetDefaultFixedFont(const ServerFont& font);
44 		void			GetDefaultFixedFont(ServerFont& font) const;
45 
46 		void			SetScrollBarInfo(const scroll_bar_info& info);
47 		void			GetScrollBarInfo(scroll_bar_info& info) const;
48 
49 		void			SetMenuInfo(const menu_info& info);
50 		void			GetMenuInfo(menu_info& info) const;
51 
52 		void			SetMouseMode(mode_mouse mode);
53 		mode_mouse		MouseMode() const;
54 		bool			FocusFollowsMouse() const;
55 
56 		void			SetWorkspacesCount(int32 number);
57 		int32			WorkspacesCount() const;
58 
59 		void			SetWorkspacesMessage(int32 index, BMessage& message);
60 		const BMessage*	WorkspacesMessage(int32 index) const;
61 
62 	private:
63 		class Private;
64 		friend class Desktop;
65 
66 		Private*		fSettings;
67 };
68 
69 #endif	/* DESKTOP_SETTINGS_H */
70