2005-07-17 20:25:48 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
|
|
*/
|
|
|
|
#ifndef DESKTOP_SETTINGS_H
|
|
|
|
#define DESKTOP_SETTINGS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <InterfaceDefs.h>
|
|
|
|
#include <Menu.h>
|
|
|
|
#include <Message.h>
|
|
|
|
|
|
|
|
class Desktop;
|
2006-08-26 19:13:08 +04:00
|
|
|
class DesktopSettingsPrivate;
|
2005-11-03 20:03:36 +03:00
|
|
|
class ServerFont;
|
2005-07-17 20:25:48 +04:00
|
|
|
|
|
|
|
|
|
|
|
static const int32 kMaxWorkspaces = 32;
|
|
|
|
|
2006-02-06 16:36:46 +03:00
|
|
|
enum {
|
|
|
|
kAllSettings = 0xff,
|
|
|
|
kWorkspacesSettings = 0x01,
|
|
|
|
kFontSettings = 0x02,
|
2006-05-31 23:23:26 +04:00
|
|
|
kAppearanceSettings = 0x04,
|
|
|
|
kMouseSettings = 0x08,
|
2006-02-06 16:36:46 +03:00
|
|
|
};
|
2005-07-17 20:25:48 +04:00
|
|
|
|
|
|
|
class DesktopSettings {
|
|
|
|
public:
|
|
|
|
DesktopSettings(Desktop* desktop);
|
|
|
|
|
2006-02-06 16:36:46 +03:00
|
|
|
status_t Save(uint32 mask = kAllSettings);
|
2005-07-17 20:25:48 +04:00
|
|
|
|
2005-11-03 20:03:36 +03:00
|
|
|
void GetDefaultPlainFont(ServerFont& font) const;
|
|
|
|
void GetDefaultBoldFont(ServerFont& font) const;
|
|
|
|
void GetDefaultFixedFont(ServerFont& font) const;
|
|
|
|
|
2005-07-17 20:25:48 +04:00
|
|
|
void GetScrollBarInfo(scroll_bar_info& info) const;
|
|
|
|
void GetMenuInfo(menu_info& info) const;
|
|
|
|
|
|
|
|
mode_mouse MouseMode() const;
|
|
|
|
bool FocusFollowsMouse() const;
|
|
|
|
|
|
|
|
int32 WorkspacesCount() const;
|
|
|
|
const BMessage* WorkspacesMessage(int32 index) const;
|
|
|
|
|
|
|
|
private:
|
2006-08-26 19:13:08 +04:00
|
|
|
// friend class Desktop;
|
|
|
|
|
|
|
|
DesktopSettingsPrivate* fSettings;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LockedDesktopSettings {
|
|
|
|
public:
|
|
|
|
LockedDesktopSettings(Desktop* desktop);
|
|
|
|
~LockedDesktopSettings();
|
|
|
|
|
|
|
|
void SetDefaultPlainFont(const ServerFont& font);
|
|
|
|
void SetDefaultBoldFont(const ServerFont& font);
|
|
|
|
void SetDefaultFixedFont(const ServerFont& font);
|
|
|
|
|
|
|
|
void SetScrollBarInfo(const scroll_bar_info& info);
|
|
|
|
void SetMenuInfo(const menu_info& info);
|
|
|
|
|
|
|
|
void SetMouseMode(mode_mouse mode);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// friend class Desktop;
|
2005-07-17 20:25:48 +04:00
|
|
|
|
2006-08-26 19:13:08 +04:00
|
|
|
DesktopSettingsPrivate* fSettings;
|
|
|
|
Desktop* fDesktop;
|
2005-07-17 20:25:48 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* DESKTOP_SETTINGS_H */
|