1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSystemSettings class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_SETTINGS_H_BASE_
13 #define _WX_SETTINGS_H_BASE_
15 #include "wx/colour.h"
18 class WXDLLIMPEXP_FWD_CORE wxWindow
;
20 // possible values for wxSystemSettings::GetFont() parameter
22 // NB: wxMSW assumes that they have the same values as the parameters of
23 // Windows GetStockObject() API, don't change the values!
26 wxSYS_OEM_FIXED_FONT
= 10,
27 wxSYS_ANSI_FIXED_FONT
,
30 wxSYS_DEVICE_DEFAULT_FONT
,
32 // don't use: this is here just to make the values of enum elements
33 // coincide with the corresponding MSW constants
34 wxSYS_DEFAULT_PALETTE
,
36 // don't use: MSDN says that this is a stock object provided only
37 // for compatibility with 16-bit Windows versions earlier than 3.0!
38 wxSYS_SYSTEM_FIXED_FONT
,
40 wxSYS_DEFAULT_GUI_FONT
,
42 // this was just a temporary aberration, do not use it any more
43 wxSYS_ICONTITLE_FONT
= wxSYS_DEFAULT_GUI_FONT
46 // possible values for wxSystemSettings::GetColour() parameter
48 // NB: wxMSW assumes that they have the same values as the parameters of
49 // Windows GetSysColor() API, don't change the values!
52 wxSYS_COLOUR_SCROLLBAR
,
54 wxSYS_COLOUR_ACTIVECAPTION
,
55 wxSYS_COLOUR_INACTIVECAPTION
,
58 wxSYS_COLOUR_WINDOWFRAME
,
59 wxSYS_COLOUR_MENUTEXT
,
60 wxSYS_COLOUR_WINDOWTEXT
,
61 wxSYS_COLOUR_CAPTIONTEXT
,
62 wxSYS_COLOUR_ACTIVEBORDER
,
63 wxSYS_COLOUR_INACTIVEBORDER
,
64 wxSYS_COLOUR_APPWORKSPACE
,
65 wxSYS_COLOUR_HIGHLIGHT
,
66 wxSYS_COLOUR_HIGHLIGHTTEXT
,
68 wxSYS_COLOUR_BTNSHADOW
,
69 wxSYS_COLOUR_GRAYTEXT
,
71 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
72 wxSYS_COLOUR_BTNHIGHLIGHT
,
73 wxSYS_COLOUR_3DDKSHADOW
,
75 wxSYS_COLOUR_INFOTEXT
,
78 wxSYS_COLOUR_HOTLIGHT
,
79 wxSYS_COLOUR_GRADIENTACTIVECAPTION
,
80 wxSYS_COLOUR_GRADIENTINACTIVECAPTION
,
81 wxSYS_COLOUR_MENUHILIGHT
,
83 wxSYS_COLOUR_LISTBOXTEXT
,
84 wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT
,
89 wxSYS_COLOUR_BACKGROUND
= wxSYS_COLOUR_DESKTOP
,
90 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
91 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
92 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
93 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
94 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
95 wxSYS_COLOUR_FRAMEBK
= wxSYS_COLOUR_BTNFACE
98 // possible values for wxSystemSettings::GetMetric() index parameter
100 // NB: update the conversion table in msw/settings.cpp if you change the values
101 // of the elements of this enum
104 wxSYS_MOUSE_BUTTONS
= 1,
115 wxSYS_HSCROLL_ARROW_X
,
116 wxSYS_HSCROLL_ARROW_Y
,
132 wxSYS_VSCROLL_ARROW_X
,
133 wxSYS_VSCROLL_ARROW_Y
,
137 wxSYS_NETWORK_PRESENT
,
138 wxSYS_PENWINDOWS_PRESENT
,
144 // possible values for wxSystemSettings::HasFeature() parameter
147 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
148 wxSYS_CAN_ICONIZE_FRAME
,
152 // values for different screen designs
153 enum wxSystemScreenType
155 wxSYS_SCREEN_NONE
= 0, // not yet defined
157 wxSYS_SCREEN_TINY
, // <
158 wxSYS_SCREEN_PDA
, // >= 320x240
159 wxSYS_SCREEN_SMALL
, // >= 640x480
160 wxSYS_SCREEN_DESKTOP
// >= 800x600
163 // ----------------------------------------------------------------------------
164 // wxSystemSettingsNative: defines the API for wxSystemSettings class
165 // ----------------------------------------------------------------------------
167 // this is a namespace rather than a class: it has only non virtual static
170 // also note that the methods are implemented in the platform-specific source
171 // files (i.e. this is not a real base class as we can't override its virtual
172 // functions because it doesn't have any)
174 class WXDLLIMPEXP_CORE wxSystemSettingsNative
177 // get a standard system colour
178 static wxColour
GetColour(wxSystemColour index
);
180 // get a standard system font
181 static wxFont
GetFont(wxSystemFont index
);
183 // get a system-dependent metric
184 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
186 // return true if the port has certain feature
187 static bool HasFeature(wxSystemFeature index
);
190 // ----------------------------------------------------------------------------
191 // include the declaration of the real platform-dependent class
192 // ----------------------------------------------------------------------------
194 class WXDLLIMPEXP_CORE wxSystemSettings
: public wxSystemSettingsNative
197 #ifdef __WXUNIVERSAL__
198 // in wxUniversal we want to use the theme standard colours instead of the
199 // system ones, otherwise wxSystemSettings is just the same as
200 // wxSystemSettingsNative
201 static wxColour
GetColour(wxSystemColour index
);
203 // some metrics are toolkit-dependent and provided by wxUniv, some are
205 static int GetMetric(wxSystemMetric index
, wxWindow
*win
= NULL
);
206 #endif // __WXUNIVERSAL__
208 // Get system screen design (desktop, pda, ..) used for
209 // laying out various dialogs.
210 static wxSystemScreenType
GetScreenType();
213 static void SetScreenType( wxSystemScreenType screen
);
216 static wxSystemScreenType ms_screen
;
221 // _WX_SETTINGS_H_BASE_