1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "settings.h"
16 #include "wx/settings.h"
18 wxColour
wxSystemSettings::GetSystemColour(int index
)
22 case wxSYS_COLOUR_SCROLLBAR
:
23 case wxSYS_COLOUR_BACKGROUND
:
24 case wxSYS_COLOUR_ACTIVECAPTION
:
25 case wxSYS_COLOUR_INACTIVECAPTION
:
26 case wxSYS_COLOUR_MENU
:
27 case wxSYS_COLOUR_WINDOW
:
28 case wxSYS_COLOUR_WINDOWFRAME
:
29 case wxSYS_COLOUR_ACTIVEBORDER
:
30 case wxSYS_COLOUR_INACTIVEBORDER
:
31 case wxSYS_COLOUR_BTNFACE
:
32 return wxColor( 0xDD , 0xDD , 0xDD ) ;
35 case wxSYS_COLOUR_BTNSHADOW
:
36 return wxColor( 0x44 , 0x44 , 0x44 ) ;
39 case wxSYS_COLOUR_BTNTEXT
:
40 case wxSYS_COLOUR_MENUTEXT
:
41 case wxSYS_COLOUR_WINDOWTEXT
:
42 case wxSYS_COLOUR_CAPTIONTEXT
:
43 case wxSYS_COLOUR_INFOTEXT
:
44 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
47 case wxSYS_COLOUR_HIGHLIGHT
:
50 LMGetHiliteRGB(&hilite
) ;
51 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
54 case wxSYS_COLOUR_BTNHIGHLIGHT
:
55 case wxSYS_COLOUR_GRAYTEXT
:
56 return wxColor( 0xCC , 0xCC , 0xCC ) ;
59 case wxSYS_COLOUR_3DDKSHADOW
:
60 return wxColor( 0x44 , 0x44 , 0x44 ) ;
62 case wxSYS_COLOUR_3DLIGHT
:
63 return wxColor( 0xCC , 0xCC , 0xCC ) ;
65 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
68 LMGetHiliteRGB(&hilite
) ;
69 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
75 case wxSYS_COLOUR_INFOBK
:
76 case wxSYS_COLOUR_APPWORKSPACE
:
83 wxFont
wxSystemSettings::GetSystemFont(int index
)
87 case wxSYS_ANSI_VAR_FONT
:
88 case wxSYS_SYSTEM_FONT
:
89 case wxSYS_DEVICE_DEFAULT_FONT
:
90 case wxSYS_DEFAULT_GUI_FONT
:
92 return *wxSMALL_FONT
;
95 case wxSYS_OEM_FIXED_FONT
:
96 case wxSYS_ANSI_FIXED_FONT
:
97 case wxSYS_SYSTEM_FIXED_FONT
:
100 return *wxNORMAL_FONT
;
105 return *wxNORMAL_FONT
;
108 // Get a system metric, e.g. scrollbar size
109 int wxSystemSettings::GetSystemMetric(int index
)
113 case wxSYS_MOUSE_BUTTONS
:
114 return 2; // we emulate a two button mouse (ctrl + click = right button )
145 case wxSYS_HSCROLL_ARROW_X
:
147 case wxSYS_HSCROLL_ARROW_Y
:
157 case wxSYS_ICONSPACING_X
:
160 case wxSYS_ICONSPACING_Y
:
163 case wxSYS_WINDOWMIN_X
:
166 case wxSYS_WINDOWMIN_Y
:
175 case wxSYS_FRAMESIZE_X
:
178 case wxSYS_FRAMESIZE_Y
:
181 case wxSYS_SMALLICON_X
:
184 case wxSYS_SMALLICON_Y
:
187 case wxSYS_HSCROLL_Y
:
189 case wxSYS_VSCROLL_X
:
191 case wxSYS_VSCROLL_ARROW_X
:
193 case wxSYS_VSCROLL_ARROW_Y
:
197 case wxSYS_CAPTION_Y
:
203 case wxSYS_NETWORK_PRESENT
:
206 case wxSYS_PENWINDOWS_PRESENT
:
208 case wxSYS_SHOW_SOUNDS
:
211 case wxSYS_SWAP_BUTTONS
: