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 // possible values for wxSystemSettings::GetFont() parameter
20 // NB: wxMSW assumes that they have the same values as the parameters of
21 // Windows GetStockObject() API, don't change the values!
24 wxSYS_OEM_FIXED_FONT
= 10,
25 wxSYS_ANSI_FIXED_FONT
,
28 wxSYS_DEVICE_DEFAULT_FONT
,
29 wxSYS_DEFAULT_PALETTE
,
30 wxSYS_SYSTEM_FIXED_FONT
,
31 wxSYS_DEFAULT_GUI_FONT
,
33 // this was just a temporary aberration, do not use it any more
34 wxSYS_ICONTITLE_FONT
= wxSYS_DEFAULT_GUI_FONT
37 // possible values for wxSystemSettings::GetColour() parameter
39 // NB: wxMSW assumes that they have the same values as the parameters of
40 // Windows GetSysColor() API, don't change the values!
43 wxSYS_COLOUR_SCROLLBAR
,
44 wxSYS_COLOUR_BACKGROUND
,
45 wxSYS_COLOUR_DESKTOP
= wxSYS_COLOUR_BACKGROUND
,
46 wxSYS_COLOUR_ACTIVECAPTION
,
47 wxSYS_COLOUR_INACTIVECAPTION
,
50 wxSYS_COLOUR_WINDOWFRAME
,
51 wxSYS_COLOUR_MENUTEXT
,
52 wxSYS_COLOUR_WINDOWTEXT
,
53 wxSYS_COLOUR_CAPTIONTEXT
,
54 wxSYS_COLOUR_ACTIVEBORDER
,
55 wxSYS_COLOUR_INACTIVEBORDER
,
56 wxSYS_COLOUR_APPWORKSPACE
,
57 wxSYS_COLOUR_HIGHLIGHT
,
58 wxSYS_COLOUR_HIGHLIGHTTEXT
,
60 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
61 wxSYS_COLOUR_BTNSHADOW
,
62 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
63 wxSYS_COLOUR_GRAYTEXT
,
65 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
66 wxSYS_COLOUR_BTNHIGHLIGHT
,
67 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
68 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
69 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
70 wxSYS_COLOUR_3DDKSHADOW
,
72 wxSYS_COLOUR_INFOTEXT
,
75 wxSYS_COLOUR_HOTLIGHT
,
76 wxSYS_COLOUR_GRADIENTACTIVECAPTION
,
77 wxSYS_COLOUR_GRADIENTINACTIVECAPTION
,
78 wxSYS_COLOUR_MENUHILIGHT
,
84 // possible values for wxSystemSettings::GetMetric() parameter
86 // NB: update the conversion table in msw/settings.cpp if you change the values
87 // of the elements of this enum
90 wxSYS_MOUSE_BUTTONS
= 1,
101 wxSYS_HSCROLL_ARROW_X
,
102 wxSYS_HSCROLL_ARROW_Y
,
118 wxSYS_VSCROLL_ARROW_X
,
119 wxSYS_VSCROLL_ARROW_Y
,
123 wxSYS_NETWORK_PRESENT
,
124 wxSYS_PENWINDOWS_PRESENT
,
129 // possible values for wxSystemSettings::HasFeature() parameter
132 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
133 wxSYS_CAN_ICONIZE_FRAME
136 // values for different screen designs
137 enum wxSystemScreenType
139 wxSYS_SCREEN_NONE
= 0, // not yet defined
141 wxSYS_SCREEN_TINY
, // <
142 wxSYS_SCREEN_PDA
, // >= 320x240
143 wxSYS_SCREEN_SMALL
, // >= 640x480
144 wxSYS_SCREEN_DESKTOP
// >= 800x600
147 // ----------------------------------------------------------------------------
148 // wxSystemSettingsNative: defines the API for wxSystemSettings class
149 // ----------------------------------------------------------------------------
151 // this is a namespace rather than a class: it has only non virtual static
154 // also note that the methods are implemented in the platform-specific source
155 // files (i.e. this is not a real base class as we can't override its virtual
156 // functions because it doesn't have any)
158 class WXDLLEXPORT wxSystemSettingsNative
161 // get a standard system colour
162 static wxColour
GetColour(wxSystemColour index
);
164 // get a standard system font
165 static wxFont
GetFont(wxSystemFont index
);
167 // get a system-dependent metric
168 static int GetMetric(wxSystemMetric index
);
170 // return true if the port has certain feature
171 static bool HasFeature(wxSystemFeature index
);
174 // ----------------------------------------------------------------------------
175 // include the declaration of the real platform-dependent class
176 // ----------------------------------------------------------------------------
178 class WXDLLEXPORT wxSystemSettings
: public wxSystemSettingsNative
181 #ifdef __WXUNIVERSAL__
182 // in wxUniversal we want to use the theme standard colours instead of the
183 // system ones, otherwise wxSystemSettings is just the same as
184 // wxSystemSettingsNative
185 static wxColour
GetColour(wxSystemColour index
);
186 #endif // __WXUNIVERSAL__
188 // Get system screen design (desktop, pda, ..) used for
189 // laying out various dialogs.
190 static wxSystemScreenType
GetScreenType();
193 static void SetScreenType( wxSystemScreenType screen
);
196 static wxSystemScreenType ms_screen
;
198 #if WXWIN_COMPATIBILITY_2_4
199 // the backwards compatible versions of wxSystemSettingsNative functions,
200 // don't use these methods in the new code!
201 wxDEPRECATED(static wxColour
GetSystemColour(int index
));
202 wxDEPRECATED(static wxFont
GetSystemFont(int index
));
203 wxDEPRECATED(static int GetSystemMetric(int index
));
208 // _WX_SETTINGS_H_BASE_