1 /////////////////////////////////////////////////////////////////////////////
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
20 #include "wx/gdicmn.h"
23 #include "wx/settings.h"
24 #include "wx/window.h"
25 #include "wx/os2/private.h"
27 wxColour
wxSystemSettings::GetSystemColour(
36 // PM actually has values for these
38 case wxSYS_COLOUR_WINDOW
:
39 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
43 vCol
.Set( GetRValue(vRef
)
49 case wxSYS_COLOUR_WINDOWFRAME
:
50 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
54 vCol
.Set( GetRValue(vRef
)
60 case wxSYS_COLOUR_MENUTEXT
:
61 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
65 vCol
.Set( GetRValue(vRef
)
71 case wxSYS_COLOUR_BTNFACE
:
72 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
76 vCol
.Set( GetRValue(vRef
)
82 case wxSYS_COLOUR_BTNSHADOW
:
83 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
87 vCol
.Set( GetRValue(vRef
)
93 case wxSYS_COLOUR_BTNHIGHLIGHT
:
94 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
98 vCol
.Set( GetRValue(vRef
)
105 // We'll have to just give values to these
107 case wxSYS_COLOUR_LISTBOX
:
108 case wxSYS_COLOUR_CAPTIONTEXT
:
112 case wxSYS_COLOUR_WINDOWTEXT
:
113 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
114 case wxSYS_COLOUR_BTNTEXT
:
115 case wxSYS_COLOUR_INFOTEXT
:
120 // We should customize these to look like other ports
123 case wxSYS_COLOUR_ACTIVECAPTION
:
124 case wxSYS_COLOUR_ACTIVEBORDER
:
125 case wxSYS_COLOUR_HIGHLIGHT
:
129 case wxSYS_COLOUR_SCROLLBAR
:
130 case wxSYS_COLOUR_BACKGROUND
:
131 case wxSYS_COLOUR_INACTIVECAPTION
:
132 case wxSYS_COLOUR_MENU
:
133 case wxSYS_COLOUR_INACTIVEBORDER
:
134 case wxSYS_COLOUR_APPWORKSPACE
:
135 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
136 case wxSYS_COLOUR_GRAYTEXT
:
137 case wxSYS_COLOUR_3DDKSHADOW
:
138 case wxSYS_COLOUR_3DLIGHT
:
139 case wxSYS_COLOUR_INFOBK
:
140 vCol
= (*wxLIGHT_GREY
);
144 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
148 vCol
.Set( GetRValue(vRef
)
155 } // end of wxSystemSettings::GetSystemColour
157 wxFont
wxSystemSettings::GetSystemFont(int index
)
162 case wxSYS_DEVICE_DEFAULT_FONT
:
166 case wxSYS_DEFAULT_PALETTE
:
170 case wxSYS_SYSTEM_FIXED_FONT
:
174 case wxSYS_SYSTEM_FONT
:
179 case wxSYS_DEFAULT_GUI_FONT
:
185 return *wxSWISS_FONT
;
190 // Get a system metric, e.g. scrollbar size
191 int wxSystemSettings::GetSystemMetric(int index
)
195 case wxSYS_MOUSE_BUTTONS
:
228 case wxSYS_HSCROLL_ARROW_X
:
231 case wxSYS_HSCROLL_ARROW_Y
:
243 case wxSYS_ICONSPACING_X
:
246 case wxSYS_ICONSPACING_Y
:
249 case wxSYS_WINDOWMIN_X
:
252 case wxSYS_WINDOWMIN_Y
:
261 case wxSYS_FRAMESIZE_X
:
264 case wxSYS_FRAMESIZE_Y
:
267 case wxSYS_SMALLICON_X
:
270 case wxSYS_SMALLICON_Y
:
273 case wxSYS_HSCROLL_Y
:
276 case wxSYS_VSCROLL_X
:
279 case wxSYS_VSCROLL_ARROW_X
:
282 case wxSYS_VSCROLL_ARROW_Y
:
288 case wxSYS_CAPTION_Y
:
294 case wxSYS_NETWORK_PRESENT
:
297 case wxSYS_PENWINDOWS_PRESENT
:
300 case wxSYS_SHOW_SOUNDS
:
303 case wxSYS_SWAP_BUTTONS
: