1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // TODO: these settings should probably be configurable from some central or
13 // per-user file, which can be edited using a Windows-control-panel clone.
14 // Also they should be documented better. Some are very MS Windows-ish.
17 #pragma implementation "settings.h"
20 #include "wx/settings.h"
21 #include "wx/gdicmn.h"
23 wxColour
wxSystemSettingsNative::GetColour(wxSystemColour index
)
27 case wxSYS_COLOUR_WINDOW
:
31 case wxSYS_COLOUR_SCROLLBAR
:
32 // case wxSYS_COLOUR_DESKTOP: // Same as wxSYS_COLOUR_BACKGROUND
33 case wxSYS_COLOUR_BACKGROUND
:
34 case wxSYS_COLOUR_ACTIVECAPTION
:
35 case wxSYS_COLOUR_INACTIVECAPTION
:
36 case wxSYS_COLOUR_MENU
:
37 case wxSYS_COLOUR_WINDOWFRAME
:
38 case wxSYS_COLOUR_ACTIVEBORDER
:
39 case wxSYS_COLOUR_INACTIVEBORDER
:
40 case wxSYS_COLOUR_BTNFACE
:
41 // case wxSYS_COLOUR_3DFACE: // Same as wxSYS_COLOUR_BTNFACE
42 case wxSYS_COLOUR_GRAYTEXT
:
44 return wxColour("LIGHT GREY");
46 case wxSYS_COLOUR_BTNSHADOW
:
47 // case wxSYS_COLOUR_3DSHADOW: // Same as wxSYS_COLOUR_BTNSHADOW
49 return wxColour("GREY");
51 case wxSYS_COLOUR_3DDKSHADOW
:
55 case wxSYS_COLOUR_HIGHLIGHT
:
59 case wxSYS_COLOUR_BTNHIGHLIGHT
:
60 case wxSYS_COLOUR_LISTBOX
:
61 // case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
65 case wxSYS_COLOUR_3DLIGHT
:
67 return wxColour("LIGHT GREY");
69 case wxSYS_COLOUR_MENUTEXT
:
70 case wxSYS_COLOUR_WINDOWTEXT
:
71 case wxSYS_COLOUR_CAPTIONTEXT
:
72 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
73 case wxSYS_COLOUR_BTNTEXT
:
74 case wxSYS_COLOUR_INFOTEXT
:
78 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
82 case wxSYS_COLOUR_INFOBK
:
83 case wxSYS_COLOUR_APPWORKSPACE
:
85 return wxColour("LIGHT GREY");
88 case wxSYS_COLOUR_HOTLIGHT
:
89 case wxSYS_COLOUR_GRADIENTACTIVECAPTION
:
90 case wxSYS_COLOUR_GRADIENTINACTIVECAPTION
:
91 case wxSYS_COLOUR_MENUHILIGHT
:
92 case wxSYS_COLOUR_MENUBAR
:
94 return wxColour("LIGHT GREY");
97 case wxSYS_COLOUR_MAX
:
98 wxFAIL_MSG( _T("unknown colour") );
103 wxFont
wxSystemSettingsNative::GetFont(wxSystemFont index
)
107 case wxSYS_SYSTEM_FIXED_FONT
:
109 return wxFont(12, wxMODERN
, wxNORMAL
, wxNORMAL
, FALSE
);
112 case wxSYS_DEVICE_DEFAULT_FONT
:
113 case wxSYS_SYSTEM_FONT
:
114 case wxSYS_DEFAULT_GUI_FONT
:
117 return wxFont(12, wxSWISS
, wxNORMAL
, wxNORMAL
, FALSE
);
125 // Get a system metric, e.g. scrollbar size
126 int wxSystemSettingsNative::GetMetric(wxSystemMetric index
)
130 case wxSYS_MOUSE_BUTTONS
:
163 case wxSYS_HSCROLL_ARROW_X
:
166 case wxSYS_HSCROLL_ARROW_Y
:
178 case wxSYS_ICONSPACING_X
:
181 case wxSYS_ICONSPACING_Y
:
184 case wxSYS_WINDOWMIN_X
:
187 case wxSYS_WINDOWMIN_Y
:
196 case wxSYS_FRAMESIZE_X
:
199 case wxSYS_FRAMESIZE_Y
:
202 case wxSYS_SMALLICON_X
:
205 case wxSYS_SMALLICON_Y
:
208 case wxSYS_HSCROLL_Y
:
211 case wxSYS_VSCROLL_X
:
214 case wxSYS_VSCROLL_ARROW_X
:
217 case wxSYS_VSCROLL_ARROW_Y
:
223 case wxSYS_CAPTION_Y
:
229 case wxSYS_NETWORK_PRESENT
:
232 case wxSYS_PENWINDOWS_PRESENT
:
235 case wxSYS_SHOW_SOUNDS
:
238 case wxSYS_SWAP_BUTTONS
:
246 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index
)
250 case wxSYS_CAN_ICONIZE_FRAME
:
251 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: