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: MSDN says that this is a stock object provided only
33 // for compatibility with 16-bit Windows versions earlier than 3.0!
34 wxSYS_SYSTEM_FIXED_FONT
,
36 wxSYS_DEFAULT_GUI_FONT
,
38 // this was just a temporary aberration, do not use it any more
39 wxSYS_ICONTITLE_FONT
= wxSYS_DEFAULT_GUI_FONT
42 // possible values for wxSystemSettings::GetColour() parameter
44 // NB: wxMSW assumes that they have the same values as the parameters of
45 // Windows GetSysColor() API, don't change the values!
48 wxSYS_COLOUR_SCROLLBAR
,
50 wxSYS_COLOUR_ACTIVECAPTION
,
51 wxSYS_COLOUR_INACTIVECAPTION
,
54 wxSYS_COLOUR_WINDOWFRAME
,
55 wxSYS_COLOUR_MENUTEXT
,
56 wxSYS_COLOUR_WINDOWTEXT
,
57 wxSYS_COLOUR_CAPTIONTEXT
,
58 wxSYS_COLOUR_ACTIVEBORDER
,
59 wxSYS_COLOUR_INACTIVEBORDER
,
60 wxSYS_COLOUR_APPWORKSPACE
,
61 wxSYS_COLOUR_HIGHLIGHT
,
62 wxSYS_COLOUR_HIGHLIGHTTEXT
,
64 wxSYS_COLOUR_BTNSHADOW
,
65 wxSYS_COLOUR_GRAYTEXT
,
67 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
68 wxSYS_COLOUR_BTNHIGHLIGHT
,
69 wxSYS_COLOUR_3DDKSHADOW
,
71 wxSYS_COLOUR_INFOTEXT
,
74 wxSYS_COLOUR_HOTLIGHT
,
75 wxSYS_COLOUR_GRADIENTACTIVECAPTION
,
76 wxSYS_COLOUR_GRADIENTINACTIVECAPTION
,
77 wxSYS_COLOUR_MENUHILIGHT
,
79 wxSYS_COLOUR_LISTBOXTEXT
,
84 wxSYS_COLOUR_BACKGROUND
= wxSYS_COLOUR_DESKTOP
,
85 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
86 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
87 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
88 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
89 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
90 wxSYS_COLOUR_FRAMEBK
= wxSYS_COLOUR_BTNFACE
93 // possible values for wxSystemSettings::GetMetric() index parameter
95 // NB: update the conversion table in msw/settings.cpp if you change the values
96 // of the elements of this enum
99 wxSYS_MOUSE_BUTTONS
= 1,
110 wxSYS_HSCROLL_ARROW_X
,
111 wxSYS_HSCROLL_ARROW_Y
,
127 wxSYS_VSCROLL_ARROW_X
,
128 wxSYS_VSCROLL_ARROW_Y
,
132 wxSYS_NETWORK_PRESENT
,
133 wxSYS_PENWINDOWS_PRESENT
,
139 // possible values for wxSystemSettings::HasFeature() parameter
142 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
143 wxSYS_CAN_ICONIZE_FRAME
,
147 // values for different screen designs
148 enum wxSystemScreenType
150 wxSYS_SCREEN_NONE
= 0, // not yet defined
152 wxSYS_SCREEN_TINY
, // <
153 wxSYS_SCREEN_PDA
, // >= 320x240
154 wxSYS_SCREEN_SMALL
, // >= 640x480
155 wxSYS_SCREEN_DESKTOP
// >= 800x600
158 // ----------------------------------------------------------------------------
159 // wxSystemSettingsNative: defines the API for wxSystemSettings class
160 // ----------------------------------------------------------------------------
162 // this is a namespace rather than a class: it has only non virtual static
165 // also note that the methods are implemented in the platform-specific source
166 // files (i.e. this is not a real base class as we can't override its virtual
167 // functions because it doesn't have any)
169 class WXDLLIMPEXP_CORE wxSystemSettingsNative
172 // get a standard system colour
173 static wxColour
GetColour(wxSystemColour index
);
175 // get a standard system font
176 static wxFont
GetFont(wxSystemFont index
);
178 // get a system-dependent metric
179 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
181 // return true if the port has certain feature
182 static bool HasFeature(wxSystemFeature index
);
185 // ----------------------------------------------------------------------------
186 // include the declaration of the real platform-dependent class
187 // ----------------------------------------------------------------------------
189 class WXDLLIMPEXP_CORE wxSystemSettings
: public wxSystemSettingsNative
192 #ifdef __WXUNIVERSAL__
193 // in wxUniversal we want to use the theme standard colours instead of the
194 // system ones, otherwise wxSystemSettings is just the same as
195 // wxSystemSettingsNative
196 static wxColour
GetColour(wxSystemColour index
);
198 // some metrics are toolkit-dependent and provided by wxUniv, some are
200 static int GetMetric(wxSystemMetric index
, wxWindow
*win
= NULL
);
201 #endif // __WXUNIVERSAL__
203 // Get system screen design (desktop, pda, ..) used for
204 // laying out various dialogs.
205 static wxSystemScreenType
GetScreenType();
208 static void SetScreenType( wxSystemScreenType screen
);
211 static wxSystemScreenType ms_screen
;
216 // _WX_SETTINGS_H_BASE_