1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSystemSettings class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_SETTINGS_H_BASE_
12 #define _WX_SETTINGS_H_BASE_
14 #include "wx/colour.h"
17 class WXDLLIMPEXP_FWD_CORE wxWindow
;
19 // possible values for wxSystemSettings::GetFont() parameter
21 // NB: wxMSW assumes that they have the same values as the parameters of
22 // Windows GetStockObject() API, don't change the values!
25 wxSYS_OEM_FIXED_FONT
= 10,
26 wxSYS_ANSI_FIXED_FONT
,
29 wxSYS_DEVICE_DEFAULT_FONT
,
31 // don't use: this is here just to make the values of enum elements
32 // coincide with the corresponding MSW constants
33 wxSYS_DEFAULT_PALETTE
,
35 // don't use: MSDN says that this is a stock object provided only
36 // for compatibility with 16-bit Windows versions earlier than 3.0!
37 wxSYS_SYSTEM_FIXED_FONT
,
39 wxSYS_DEFAULT_GUI_FONT
,
41 // this was just a temporary aberration, do not use it any more
42 wxSYS_ICONTITLE_FONT
= wxSYS_DEFAULT_GUI_FONT
45 // possible values for wxSystemSettings::GetColour() parameter
47 // NB: wxMSW assumes that they have the same values as the parameters of
48 // Windows GetSysColor() API, don't change the values!
51 wxSYS_COLOUR_SCROLLBAR
,
53 wxSYS_COLOUR_ACTIVECAPTION
,
54 wxSYS_COLOUR_INACTIVECAPTION
,
57 wxSYS_COLOUR_WINDOWFRAME
,
58 wxSYS_COLOUR_MENUTEXT
,
59 wxSYS_COLOUR_WINDOWTEXT
,
60 wxSYS_COLOUR_CAPTIONTEXT
,
61 wxSYS_COLOUR_ACTIVEBORDER
,
62 wxSYS_COLOUR_INACTIVEBORDER
,
63 wxSYS_COLOUR_APPWORKSPACE
,
64 wxSYS_COLOUR_HIGHLIGHT
,
65 wxSYS_COLOUR_HIGHLIGHTTEXT
,
67 wxSYS_COLOUR_BTNSHADOW
,
68 wxSYS_COLOUR_GRAYTEXT
,
70 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
71 wxSYS_COLOUR_BTNHIGHLIGHT
,
72 wxSYS_COLOUR_3DDKSHADOW
,
74 wxSYS_COLOUR_INFOTEXT
,
77 wxSYS_COLOUR_HOTLIGHT
,
78 wxSYS_COLOUR_GRADIENTACTIVECAPTION
,
79 wxSYS_COLOUR_GRADIENTINACTIVECAPTION
,
80 wxSYS_COLOUR_MENUHILIGHT
,
82 wxSYS_COLOUR_LISTBOXTEXT
,
83 wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT
,
88 wxSYS_COLOUR_BACKGROUND
= wxSYS_COLOUR_DESKTOP
,
89 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
90 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
91 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
92 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
93 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
94 wxSYS_COLOUR_FRAMEBK
= wxSYS_COLOUR_BTNFACE
97 // possible values for wxSystemSettings::GetMetric() index parameter
99 // NB: update the conversion table in msw/settings.cpp if you change the values
100 // of the elements of this enum
103 wxSYS_MOUSE_BUTTONS
= 1,
114 wxSYS_HSCROLL_ARROW_X
,
115 wxSYS_HSCROLL_ARROW_Y
,
131 wxSYS_VSCROLL_ARROW_X
,
132 wxSYS_VSCROLL_ARROW_Y
,
136 wxSYS_NETWORK_PRESENT
,
137 wxSYS_PENWINDOWS_PRESENT
,
143 // possible values for wxSystemSettings::HasFeature() parameter
146 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
147 wxSYS_CAN_ICONIZE_FRAME
,
151 // values for different screen designs
152 enum wxSystemScreenType
154 wxSYS_SCREEN_NONE
= 0, // not yet defined
156 wxSYS_SCREEN_TINY
, // <
157 wxSYS_SCREEN_PDA
, // >= 320x240
158 wxSYS_SCREEN_SMALL
, // >= 640x480
159 wxSYS_SCREEN_DESKTOP
// >= 800x600
162 // ----------------------------------------------------------------------------
163 // wxSystemSettingsNative: defines the API for wxSystemSettings class
164 // ----------------------------------------------------------------------------
166 // this is a namespace rather than a class: it has only non virtual static
169 // also note that the methods are implemented in the platform-specific source
170 // files (i.e. this is not a real base class as we can't override its virtual
171 // functions because it doesn't have any)
173 class WXDLLIMPEXP_CORE wxSystemSettingsNative
176 // get a standard system colour
177 static wxColour
GetColour(wxSystemColour index
);
179 // get a standard system font
180 static wxFont
GetFont(wxSystemFont index
);
182 // get a system-dependent metric
183 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
185 // return true if the port has certain feature
186 static bool HasFeature(wxSystemFeature index
);
189 // ----------------------------------------------------------------------------
190 // include the declaration of the real platform-dependent class
191 // ----------------------------------------------------------------------------
193 class WXDLLIMPEXP_CORE wxSystemSettings
: public wxSystemSettingsNative
196 #ifdef __WXUNIVERSAL__
197 // in wxUniversal we want to use the theme standard colours instead of the
198 // system ones, otherwise wxSystemSettings is just the same as
199 // wxSystemSettingsNative
200 static wxColour
GetColour(wxSystemColour index
);
202 // some metrics are toolkit-dependent and provided by wxUniv, some are
204 static int GetMetric(wxSystemMetric index
, wxWindow
*win
= NULL
);
205 #endif // __WXUNIVERSAL__
207 // Get system screen design (desktop, pda, ..) used for
208 // laying out various dialogs.
209 static wxSystemScreenType
GetScreenType();
212 static void SetScreenType( wxSystemScreenType screen
);
215 static wxSystemScreenType ms_screen
;
220 // _WX_SETTINGS_H_BASE_