1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSystemSettings class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
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
34 // possible values for wxSystemSettings::GetColour() parameter
36 // NB: wxMSW assumes that they have the same values as the parameters of
37 // Windows GetSysColor() API, don't change the values!
40 wxSYS_COLOUR_SCROLLBAR
,
41 wxSYS_COLOUR_BACKGROUND
,
42 wxSYS_COLOUR_DESKTOP
= wxSYS_COLOUR_BACKGROUND
,
43 wxSYS_COLOUR_ACTIVECAPTION
,
44 wxSYS_COLOUR_INACTIVECAPTION
,
47 wxSYS_COLOUR_WINDOWFRAME
,
48 wxSYS_COLOUR_MENUTEXT
,
49 wxSYS_COLOUR_WINDOWTEXT
,
50 wxSYS_COLOUR_CAPTIONTEXT
,
51 wxSYS_COLOUR_ACTIVEBORDER
,
52 wxSYS_COLOUR_INACTIVEBORDER
,
53 wxSYS_COLOUR_APPWORKSPACE
,
54 wxSYS_COLOUR_HIGHLIGHT
,
55 wxSYS_COLOUR_HIGHLIGHTTEXT
,
57 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
58 wxSYS_COLOUR_BTNSHADOW
,
59 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
60 wxSYS_COLOUR_GRAYTEXT
,
62 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
63 wxSYS_COLOUR_BTNHIGHLIGHT
,
64 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
65 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
66 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
67 wxSYS_COLOUR_3DDKSHADOW
,
69 wxSYS_COLOUR_INFOTEXT
,
72 wxSYS_COLOUR_HOTLIGHT
,
73 wxSYS_COLOUR_GRADIENTACTIVECAPTION
,
74 wxSYS_COLOUR_GRADIENTINACTIVECAPTION
,
75 wxSYS_COLOUR_MENUHILIGHT
,
81 // possible values for wxSystemSettings::GetMetric() parameter
83 // NB: update the conversion table in msw/settings.cpp if you change the values
84 // of the elements of this enum
87 wxSYS_MOUSE_BUTTONS
= 1,
98 wxSYS_HSCROLL_ARROW_X
,
99 wxSYS_HSCROLL_ARROW_Y
,
115 wxSYS_VSCROLL_ARROW_X
,
116 wxSYS_VSCROLL_ARROW_Y
,
120 wxSYS_NETWORK_PRESENT
,
121 wxSYS_PENWINDOWS_PRESENT
,
126 // possible values for wxSystemSettings::HasFeature() parameter
129 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
130 wxSYS_CAN_ICONIZE_FRAME
133 // values for wxSystemSettings::GetString
136 wxSYS_DECIMAL_SEPARATOR
= 1,
137 wxSYS_LIST_SEPARATOR
,
141 // ----------------------------------------------------------------------------
142 // wxSystemSettingsNative: defines the API for wxSystemSettings class
143 // ----------------------------------------------------------------------------
145 // this is a namespace rather than a class: it has only non virtual static
148 // also note that the methods are implemented in the platform-specific source
149 // files (i.e. this is not a real base class as we can't override its virtual
150 // functions because it doesn't have any)
152 class WXDLLEXPORT wxSystemSettingsNative
155 // get a standard system colour
156 static wxColour
GetColour(wxSystemColour index
);
158 // get a standard system font
159 static wxFont
GetFont(wxSystemFont index
);
161 // get a system-dependent metric
162 static int GetMetric(wxSystemMetric index
);
164 // return true if the port has certain feature
165 static bool HasFeature(wxSystemFeature index
);
167 // Windows-only for now
169 // Get a system string, e. g. decimal separator
170 static wxString
GetString(int index
);
174 // ----------------------------------------------------------------------------
175 // include the declaration of the real platform-dependent class
176 // ----------------------------------------------------------------------------
178 class wxSystemSettings
: public wxSystemSettingsNative
181 #ifdef __WXUNIVERSAL__
182 // in wxUniversal we want to use the theme standard colours instead of the
183 // system ones, otherwuse wxSystemSettings is just the same as
184 // wxSystemSettingsNative
185 static wxColour
GetColour(wxSystemColour index
);
186 #endif // __WXUNIVERSAL__
189 // the backwards compatible versions of wxSystemSettingsNative functions,
190 // don't use these methods in the new code!
191 static wxColour
GetSystemColour(int index
)
192 { return GetColour((wxSystemColour
)index
); }
193 static wxFont
GetSystemFont(int index
)
194 { return GetFont((wxSystemFont
)index
); }
195 static int GetSystemMetric(int index
)
196 { return GetMetric((wxSystemMetric
)index
); }
200 // _WX_SETTINGS_H_BASE_