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 }; 28 29 class DesktopSettings { 30 public: 31 DesktopSettings(Desktop* desktop); 32 ~DesktopSettings(); 33 34 status_t Save(uint32 mask = kAllSettings); 35 36 void SetDefaultPlainFont(const ServerFont& font); 37 void GetDefaultPlainFont(ServerFont& font) const; 38 39 void SetDefaultBoldFont(const ServerFont& font); 40 void GetDefaultBoldFont(ServerFont& font) const; 41 42 void SetDefaultFixedFont(const ServerFont& font); 43 void GetDefaultFixedFont(ServerFont& font) const; 44 45 void SetScrollBarInfo(const scroll_bar_info& info); 46 void GetScrollBarInfo(scroll_bar_info& info) const; 47 48 void SetMenuInfo(const menu_info& info); 49 void GetMenuInfo(menu_info& info) const; 50 51 void SetMouseMode(mode_mouse mode); 52 mode_mouse MouseMode() const; 53 bool FocusFollowsMouse() const; 54 55 void SetWorkspacesCount(int32 number); 56 int32 WorkspacesCount() const; 57 58 void SetWorkspacesMessage(int32 index, BMessage& message); 59 const BMessage* WorkspacesMessage(int32 index) const; 60 61 private: 62 class Private; 63 friend class Desktop; 64 65 Private* fSettings; 66 }; 67 68 #endif /* DESKTOP_SETTINGS_H */ 69