1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxSystemSettingsBase 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
78 wxSYS_MOUSE_BUTTONS
= 1,
89 wxSYS_HSCROLL_ARROW_X
,
90 wxSYS_HSCROLL_ARROW_Y
,
106 wxSYS_VSCROLL_ARROW_X
,
107 wxSYS_VSCROLL_ARROW_Y
,
111 wxSYS_NETWORK_PRESENT
,
112 wxSYS_PENWINDOWS_PRESENT
,
117 // possible values for wxSystemSettings::HasFeature() parameter
120 wxSYS_CAN_DRAW_FRAME_DECORATIONS
= 1,
121 wxSYS_CAN_ICONIZE_FRAME
124 // ----------------------------------------------------------------------------
125 // wxSystemSettingsBase: defines the API for wxSystemSettings class
126 // ----------------------------------------------------------------------------
128 // this is a namespace rather than a class: it has only non virtual static
131 // also note that the methods are implemented in the platform-specific source
132 // files (i.e. this is not a real base class as we can't override its virtual
133 // functions because it doesn't have any)
136 class WXDLLEXPORT wxSystemSettingsBase
139 // get a standard system colour
140 static wxColour
GetColour(wxSystemColour index
);
142 // get a standard system font
143 static wxFont
GetFont(wxSystemFont index
);
145 // get a system-dependent metric
146 static int GetMetric(wxSystemMetric index
);
148 // return true if the port has certain feature
149 static bool HasFeature(wxSystemFeature index
);
152 // the backwards compatible versions, don't use these methods in the new
154 static wxColour
GetSystemColour(int index
)
155 { return GetColour((wxSystemColour
)index
); }
156 static wxFont
GetSystemFont(int index
)
157 { return GetFont((wxSystemFont
)index
); }
158 static int GetSystemMetric(int index
)
159 { return GetMetric((wxSystemMetric
)index
); }
160 static bool GetCapability(int index
)
161 { return HasFeature((wxSystemFeature
)index
); }
165 // ----------------------------------------------------------------------------
166 // include the declaration of the real platform-dependent class
167 // ----------------------------------------------------------------------------
169 #if defined(__WXMSW__)
170 #include "wx/msw/settings.h"
171 #elif defined(__WXMOTIF__)
172 #include "wx/motif/settings.h"
173 #elif defined(__WXGTK__)
174 #include "wx/gtk/settings.h"
175 #elif defined(__WXMGL__)
176 #include "wx/mgl/settings.h"
177 #elif defined(__WXMAC__)
178 #include "wx/mac/settings.h"
179 #elif defined(__WXPM__)
180 #include "wx/os2/settings.h"
184 // _WX_SETTINGS_H_BASE_