1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "settings.h"
16 #include "wx/settings.h"
17 #include "wx/gdicmn.h"
19 wxColour
wxSystemSettings::GetSystemColour(int index
)
23 case wxSYS_COLOUR_SCROLLBAR
:
24 case wxSYS_COLOUR_BACKGROUND
:
25 case wxSYS_COLOUR_ACTIVECAPTION
:
26 case wxSYS_COLOUR_INACTIVECAPTION
:
27 case wxSYS_COLOUR_MENU
:
28 case wxSYS_COLOUR_WINDOW
:
29 case wxSYS_COLOUR_WINDOWFRAME
:
30 case wxSYS_COLOUR_ACTIVEBORDER
:
31 case wxSYS_COLOUR_INACTIVEBORDER
:
32 case wxSYS_COLOUR_BTNFACE
:
33 return wxColor( 0xDD , 0xDD , 0xDD ) ;
36 case wxSYS_COLOUR_BTNSHADOW
:
37 return wxColor( 0x44 , 0x44 , 0x44 ) ;
40 case wxSYS_COLOUR_BTNTEXT
:
41 case wxSYS_COLOUR_MENUTEXT
:
42 case wxSYS_COLOUR_WINDOWTEXT
:
43 case wxSYS_COLOUR_CAPTIONTEXT
:
44 case wxSYS_COLOUR_INFOTEXT
:
45 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
48 case wxSYS_COLOUR_HIGHLIGHT
:
51 LMGetHiliteRGB(&hilite
) ;
52 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
55 case wxSYS_COLOUR_BTNHIGHLIGHT
:
56 case wxSYS_COLOUR_GRAYTEXT
:
57 return wxColor( 0xCC , 0xCC , 0xCC ) ;
60 case wxSYS_COLOUR_3DDKSHADOW
:
61 return wxColor( 0x44 , 0x44 , 0x44 ) ;
63 case wxSYS_COLOUR_3DLIGHT
:
64 return wxColor( 0xCC , 0xCC , 0xCC ) ;
66 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
69 LMGetHiliteRGB(&hilite
) ;
70 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
76 case wxSYS_COLOUR_INFOBK
:
77 case wxSYS_COLOUR_APPWORKSPACE
:
84 wxFont
wxSystemSettings::GetSystemFont(int index
)
88 case wxSYS_ANSI_VAR_FONT
:
89 case wxSYS_SYSTEM_FONT
:
90 case wxSYS_DEVICE_DEFAULT_FONT
:
91 case wxSYS_DEFAULT_GUI_FONT
:
93 return *wxSMALL_FONT
;
96 case wxSYS_OEM_FIXED_FONT
:
97 case wxSYS_ANSI_FIXED_FONT
:
98 case wxSYS_SYSTEM_FIXED_FONT
:
101 return *wxNORMAL_FONT
;
106 return *wxNORMAL_FONT
;
109 // Get a system metric, e.g. scrollbar size
110 int wxSystemSettings::GetSystemMetric(int index
)
114 case wxSYS_MOUSE_BUTTONS
:
115 return 2; // we emulate a two button mouse (ctrl + click = right button )
146 case wxSYS_HSCROLL_ARROW_X
:
148 case wxSYS_HSCROLL_ARROW_Y
:
158 case wxSYS_ICONSPACING_X
:
161 case wxSYS_ICONSPACING_Y
:
164 case wxSYS_WINDOWMIN_X
:
167 case wxSYS_WINDOWMIN_Y
:
176 case wxSYS_FRAMESIZE_X
:
179 case wxSYS_FRAMESIZE_Y
:
182 case wxSYS_SMALLICON_X
:
185 case wxSYS_SMALLICON_Y
:
188 case wxSYS_HSCROLL_Y
:
190 case wxSYS_VSCROLL_X
:
192 case wxSYS_VSCROLL_ARROW_X
:
194 case wxSYS_VSCROLL_ARROW_Y
:
198 case wxSYS_CAPTION_Y
:
204 case wxSYS_NETWORK_PRESENT
:
207 case wxSYS_PENWINDOWS_PRESENT
:
209 case wxSYS_SHOW_SOUNDS
:
212 case wxSYS_SWAP_BUTTONS
: