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
)
50 case wxSYS_COLOUR_WINDOWFRAME
:
51 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
55 vCol
.Set( GetRValue(vRef
)
62 case wxSYS_COLOUR_MENUTEXT
:
63 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
67 vCol
.Set( GetRValue(vRef
)
73 case wxSYS_COLOUR_BTNFACE
:
74 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
78 vCol
.Set( GetRValue(vRef
)
85 case wxSYS_COLOUR_BTNSHADOW
:
86 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
90 vCol
.Set( GetRValue(vRef
)
97 case wxSYS_COLOUR_BTNHIGHLIGHT
:
98 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
102 vCol
.Set( GetRValue(vRef
)
110 // We'll have to just give values to these
112 case wxSYS_COLOUR_LISTBOX
:
113 case wxSYS_COLOUR_CAPTIONTEXT
:
117 case wxSYS_COLOUR_WINDOWTEXT
:
118 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
119 case wxSYS_COLOUR_BTNTEXT
:
120 case wxSYS_COLOUR_INFOTEXT
:
125 // We should customize these to look like other ports
128 case wxSYS_COLOUR_ACTIVECAPTION
:
129 case wxSYS_COLOUR_ACTIVEBORDER
:
130 case wxSYS_COLOUR_HIGHLIGHT
:
134 case wxSYS_COLOUR_SCROLLBAR
:
135 case wxSYS_COLOUR_BACKGROUND
:
136 case wxSYS_COLOUR_INACTIVECAPTION
:
137 case wxSYS_COLOUR_MENU
:
138 case wxSYS_COLOUR_INACTIVEBORDER
:
139 case wxSYS_COLOUR_APPWORKSPACE
:
140 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
141 case wxSYS_COLOUR_GRAYTEXT
:
142 case wxSYS_COLOUR_3DDKSHADOW
:
143 case wxSYS_COLOUR_3DLIGHT
:
144 case wxSYS_COLOUR_INFOBK
:
145 return(*wxLIGHT_GREY
);
149 vRef
= (ULONG
)::WinQuerySysColor( HWND_DESKTOP
153 vCol
.Set( GetRValue(vRef
)
161 } // end of wxSystemSettings::GetSystemColour
163 wxFont
wxSystemSettings::GetSystemFont(int index
)
168 case wxSYS_DEVICE_DEFAULT_FONT
:
172 case wxSYS_DEFAULT_PALETTE
:
176 case wxSYS_SYSTEM_FIXED_FONT
:
180 case wxSYS_SYSTEM_FONT
:
185 case wxSYS_DEFAULT_GUI_FONT
:
191 return *wxSWISS_FONT
;
194 // Get a system metric, e.g. scrollbar size
195 int wxSystemSettings::GetSystemMetric(int index
)
199 case wxSYS_MOUSE_BUTTONS
:
232 case wxSYS_HSCROLL_ARROW_X
:
235 case wxSYS_HSCROLL_ARROW_Y
:
247 case wxSYS_ICONSPACING_X
:
250 case wxSYS_ICONSPACING_Y
:
253 case wxSYS_WINDOWMIN_X
:
256 case wxSYS_WINDOWMIN_Y
:
265 case wxSYS_FRAMESIZE_X
:
268 case wxSYS_FRAMESIZE_Y
:
271 case wxSYS_SMALLICON_X
:
274 case wxSYS_SMALLICON_Y
:
277 case wxSYS_HSCROLL_Y
:
280 case wxSYS_VSCROLL_X
:
283 case wxSYS_VSCROLL_ARROW_X
:
286 case wxSYS_VSCROLL_ARROW_Y
:
292 case wxSYS_CAPTION_Y
:
298 case wxSYS_NETWORK_PRESENT
:
301 case wxSYS_PENWINDOWS_PRESENT
:
304 case wxSYS_SHOW_SOUNDS
:
307 case wxSYS_SWAP_BUTTONS
: