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_ACTIVECAPTION
,
43 wxSYS_COLOUR_INACTIVECAPTION
,
46 wxSYS_COLOUR_WINDOWFRAME
,
47 wxSYS_COLOUR_MENUTEXT
,
48 wxSYS_COLOUR_WINDOWTEXT
,
49 wxSYS_COLOUR_CAPTIONTEXT
,
50 wxSYS_COLOUR_ACTIVEBORDER
,
51 wxSYS_COLOUR_INACTIVEBORDER
,
52 wxSYS_COLOUR_APPWORKSPACE
,
53 wxSYS_COLOUR_HIGHLIGHT
,
54 wxSYS_COLOUR_HIGHLIGHTTEXT
,
56 wxSYS_COLOUR_BTNSHADOW
,
57 wxSYS_COLOUR_GRAYTEXT
,
59 wxSYS_COLOUR_INACTIVECAPTIONTEXT
,
60 wxSYS_COLOUR_BTNHIGHLIGHT
,
61 wxSYS_COLOUR_3DDKSHADOW
,
63 wxSYS_COLOUR_INFOTEXT
,
67 wxSYS_COLOUR_DESKTOP
= wxSYS_COLOUR_BACKGROUND
,
68 wxSYS_COLOUR_3DFACE
= wxSYS_COLOUR_BTNFACE
,
69 wxSYS_COLOUR_3DSHADOW
= wxSYS_COLOUR_BTNSHADOW
,
70 wxSYS_COLOUR_3DHIGHLIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
71 wxSYS_COLOUR_3DHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
,
72 wxSYS_COLOUR_BTNHILIGHT
= wxSYS_COLOUR_BTNHIGHLIGHT
75 // possible values for wxSystemSettings::GetMetric() parameter
77 // NB: update the conversion table in msw/settings.cpp if you change the values
78 // of the elements of this enum
81 wxSYS_MOUSE_BUTTONS
= 1,
92 wxSYS_HSCROLL_ARROW_X
,
93 wxSYS_HSCROLL_ARROW_Y
,
109 wxSYS_VSCROLL_ARROW_X
,
110 wxSYS_VSCROLL_ARROW_Y
,
114 wxSYS_NETWORK_PRESENT
,
115 wxSYS_PENWINDOWS_PRESENT
,
120 // possible values for wxSystemSettings::HasFeature() parameter
123 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
124 wxSYS_CAN_ICONIZE_FRAME
127 // ----------------------------------------------------------------------------
128 // wxSystemSettingsNative: defines the API for wxSystemSettings class
129 // ----------------------------------------------------------------------------
131 // this is a namespace rather than a class: it has only non virtual static
134 // also note that the methods are implemented in the platform-specific source
135 // files (i.e. this is not a real base class as we can't override its virtual
136 // functions because it doesn't have any)
138 class WXDLLEXPORT wxSystemSettingsNative
141 // get a standard system colour
142 static wxColour
GetColour(wxSystemColour index
);
144 // get a standard system font
145 static wxFont
GetFont(wxSystemFont index
);
147 // get a system-dependent metric
148 static int GetMetric(wxSystemMetric index
);
150 // return true if the port has certain feature
151 static bool HasFeature(wxSystemFeature index
);
154 // the backwards compatible versions, don't use these methods in the new
156 static wxColour
GetSystemColour(int index
)
157 { return GetColour((wxSystemColour
)index
); }
158 static wxFont
GetSystemFont(int index
)
159 { return GetFont((wxSystemFont
)index
); }
160 static int GetSystemMetric(int index
)
161 { return GetMetric((wxSystemMetric
)index
); }
164 // ----------------------------------------------------------------------------
165 // include the declaration of the real platform-dependent class
166 // ----------------------------------------------------------------------------
168 #if defined(__WXMSW__)
169 #define wxHAS_SS_NATIVE
170 #elif defined(__WXMOTIF__)
171 #include "wx/motif/settings.h"
172 #elif defined(__WXGTK__)
173 #define wxHAS_SS_NATIVE
174 #elif defined(__WXMGL__)
175 #define wxHAS_SS_NATIVE
176 #elif defined(__WXMAC__)
177 #include "wx/mac/settings.h"
178 #elif defined(__WXPM__)
179 #include "wx/os2/settings.h"
182 // TODO: this should go away once all ports are updated to use wxSSNative
183 #ifdef wxHAS_SS_NATIVE
185 class wxSystemSettings
: public wxSystemSettingsNative
188 #ifdef __WXUNIVERSAL__
189 // in wxUniversal we want to use the theme standard colours instead of the
190 // system ones, otherwuse wxSystemSettings is just the same as
191 // wxSystemSettingsNative
192 static wxColour
GetColour(wxSystemColour index
);
193 #endif // __WXUNIVERSAL__
196 #endif // wxHAS_SS_NATIVE
199 // _WX_SETTINGS_H_BASE_