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 WXDLLEXPORT 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
,
31 wxSYS_DEFAULT_PALETTE
,
32 wxSYS_SYSTEM_FIXED_FONT
,
33 wxSYS_DEFAULT_GUI_FONT
,
35 // this was just a temporary aberration, do not use it any more
36 wxSYS_ICONTITLE_FONT
= wxSYS_DEFAULT_GUI_FONT
39 // possible values for wxSystemSettings::GetColour() parameter
41 // NB: wxMSW assumes that they have the same values as the parameters of
42 // Windows GetSysColor() API, don't change the values!
45 wxSYS_COLOUR_SCROLLBAR
,
46 wxSYS_COLOUR_BACKGROUND
,
47 wxSYS_COLOUR_DESKTOP
= wxSYS_COLOUR_BACKGROUND
,
48 wxSYS_COLOUR_ACTIVECAPTION
,
49 wxSYS_COLOUR_INACTIVECAPTION
,
52 wxSYS_COLOUR_WINDOWFRAME
,
53 wxSYS_COLOUR_MENUTEXT
,
54 wxSYS_COLOUR_WINDOWTEXT
,
55 wxSYS_COLOUR_CAPTIONTEXT
,
56 wxSYS_COLOUR_ACTIVEBORDER
,
57 wxSYS_COLOUR_INACTIVEBORDER
,
58 wxSYS_COLOUR_APPWORKSPACE
,
59 wxSYS_COLOUR_HIGHLIGHT
,
60 wxSYS_COLOUR_HIGHLIGHTTEXT
,
62 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
63 wxSYS_COLOUR_BTNSHADOW
,
64 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
65 wxSYS_COLOUR_GRAYTEXT
,
67 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
68 wxSYS_COLOUR_BTNHIGHLIGHT
,
69 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
70 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
71 wxSYS_COLOUR_3DHILIGHT
= 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
,
86 // possible values for wxSystemSettings::GetMetric() index parameter
88 // NB: update the conversion table in msw/settings.cpp if you change the values
89 // of the elements of this enum
92 wxSYS_MOUSE_BUTTONS
= 1,
103 wxSYS_HSCROLL_ARROW_X
,
104 wxSYS_HSCROLL_ARROW_Y
,
120 wxSYS_VSCROLL_ARROW_X
,
121 wxSYS_VSCROLL_ARROW_Y
,
125 wxSYS_NETWORK_PRESENT
,
126 wxSYS_PENWINDOWS_PRESENT
,
131 // possible values for wxSystemSettings::HasFeature() parameter
134 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
135 wxSYS_CAN_ICONIZE_FRAME
138 // values for different screen designs
139 enum wxSystemScreenType
141 wxSYS_SCREEN_NONE
= 0, // not yet defined
143 wxSYS_SCREEN_TINY
, // <
144 wxSYS_SCREEN_PDA
, // >= 320x240
145 wxSYS_SCREEN_SMALL
, // >= 640x480
146 wxSYS_SCREEN_DESKTOP
// >= 800x600
149 // ----------------------------------------------------------------------------
150 // wxSystemSettingsNative: defines the API for wxSystemSettings class
151 // ----------------------------------------------------------------------------
153 // this is a namespace rather than a class: it has only non virtual static
156 // also note that the methods are implemented in the platform-specific source
157 // files (i.e. this is not a real base class as we can't override its virtual
158 // functions because it doesn't have any)
160 class WXDLLEXPORT wxSystemSettingsNative
163 // get a standard system colour
164 static wxColour
GetColour(wxSystemColour index
);
166 // get a standard system font
167 static wxFont
GetFont(wxSystemFont index
);
169 // get a system-dependent metric
170 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
172 // return true if the port has certain feature
173 static bool HasFeature(wxSystemFeature index
);
176 // ----------------------------------------------------------------------------
177 // include the declaration of the real platform-dependent class
178 // ----------------------------------------------------------------------------
180 class WXDLLEXPORT wxSystemSettings
: public wxSystemSettingsNative
183 #ifdef __WXUNIVERSAL__
184 // in wxUniversal we want to use the theme standard colours instead of the
185 // system ones, otherwise wxSystemSettings is just the same as
186 // wxSystemSettingsNative
187 static wxColour
GetColour(wxSystemColour index
);
188 #endif // __WXUNIVERSAL__
190 // Get system screen design (desktop, pda, ..) used for
191 // laying out various dialogs.
192 static wxSystemScreenType
GetScreenType();
195 static void SetScreenType( wxSystemScreenType screen
);
198 static wxSystemScreenType ms_screen
;
200 #if WXWIN_COMPATIBILITY_2_4
201 // the backwards compatible versions of wxSystemSettingsNative functions,
202 // don't use these methods in the new code!
203 wxDEPRECATED(static wxColour
GetSystemColour(int index
));
204 wxDEPRECATED(static wxFont
GetSystemFont(int index
));
205 wxDEPRECATED(static int GetSystemMetric(int index
));
210 // _WX_SETTINGS_H_BASE_