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_LISTBOX
:
37 return wxColor( 0xEE , 0xEE , 0xEE ) ;
39 case wxSYS_COLOUR_BTNSHADOW
:
40 return wxColor( 0x44 , 0x44 , 0x44 ) ;
43 case wxSYS_COLOUR_BTNTEXT
:
44 case wxSYS_COLOUR_MENUTEXT
:
45 case wxSYS_COLOUR_WINDOWTEXT
:
46 case wxSYS_COLOUR_CAPTIONTEXT
:
47 case wxSYS_COLOUR_INFOTEXT
:
48 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
51 case wxSYS_COLOUR_HIGHLIGHT
:
54 LMGetHiliteRGB(&hilite
) ;
55 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
58 case wxSYS_COLOUR_BTNHIGHLIGHT
:
59 case wxSYS_COLOUR_GRAYTEXT
:
60 return wxColor( 0xCC , 0xCC , 0xCC ) ;
63 case wxSYS_COLOUR_3DDKSHADOW
:
64 return wxColor( 0x44 , 0x44 , 0x44 ) ;
66 case wxSYS_COLOUR_3DLIGHT
:
67 return wxColor( 0xCC , 0xCC , 0xCC ) ;
69 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
72 LMGetHiliteRGB(&hilite
) ;
73 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
79 case wxSYS_COLOUR_INFOBK
:
80 case wxSYS_COLOUR_APPWORKSPACE
:
87 wxFont
wxSystemSettings::GetSystemFont(int index
)
91 case wxSYS_ANSI_VAR_FONT
:
92 case wxSYS_SYSTEM_FONT
:
93 case wxSYS_DEVICE_DEFAULT_FONT
:
94 case wxSYS_DEFAULT_GUI_FONT
:
96 return *wxSMALL_FONT
;
99 case wxSYS_OEM_FIXED_FONT
:
100 case wxSYS_ANSI_FIXED_FONT
:
101 case wxSYS_SYSTEM_FIXED_FONT
:
104 return *wxNORMAL_FONT
;
109 return *wxNORMAL_FONT
;
112 // Get a system metric, e.g. scrollbar size
113 int wxSystemSettings::GetSystemMetric(int index
)
117 case wxSYS_MOUSE_BUTTONS
:
118 return 2; // we emulate a two button mouse (ctrl + click = right button )
149 case wxSYS_HSCROLL_ARROW_X
:
151 case wxSYS_HSCROLL_ARROW_Y
:
161 case wxSYS_ICONSPACING_X
:
164 case wxSYS_ICONSPACING_Y
:
167 case wxSYS_WINDOWMIN_X
:
170 case wxSYS_WINDOWMIN_Y
:
179 case wxSYS_FRAMESIZE_X
:
182 case wxSYS_FRAMESIZE_Y
:
185 case wxSYS_SMALLICON_X
:
188 case wxSYS_SMALLICON_Y
:
191 case wxSYS_HSCROLL_Y
:
193 case wxSYS_VSCROLL_X
:
195 case wxSYS_VSCROLL_ARROW_X
:
197 case wxSYS_VSCROLL_ARROW_Y
:
201 case wxSYS_CAPTION_Y
:
207 case wxSYS_NETWORK_PRESENT
:
210 case wxSYS_PENWINDOWS_PRESENT
:
212 case wxSYS_SHOW_SOUNDS
:
215 case wxSYS_SWAP_BUTTONS
:
223 bool wxSystemSettings::GetCapability(int index
)
227 case wxSYS_CAN_ICONIZE_FRAME
:
228 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: