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"
20 wxColour
wxSystemSettings::GetSystemColour(int index
)
23 wxGetOsVersion( &major
, &minor
);
27 case wxSYS_COLOUR_SCROLLBAR
:
28 case wxSYS_COLOUR_BACKGROUND
:
29 case wxSYS_COLOUR_ACTIVECAPTION
:
30 case wxSYS_COLOUR_INACTIVECAPTION
:
31 case wxSYS_COLOUR_MENU
:
32 case wxSYS_COLOUR_WINDOW
:
33 case wxSYS_COLOUR_WINDOWFRAME
:
34 case wxSYS_COLOUR_ACTIVEBORDER
:
35 case wxSYS_COLOUR_INACTIVEBORDER
:
36 case wxSYS_COLOUR_BTNFACE
:
37 return wxColor( 0xDD , 0xDD , 0xDD ) ;
40 case wxSYS_COLOUR_LISTBOX
:
45 return wxColor( 0xEE , 0xEE , 0xEE ) ;
48 case wxSYS_COLOUR_BTNSHADOW
:
49 return wxColor( 0x44 , 0x44 , 0x44 ) ;
52 case wxSYS_COLOUR_BTNTEXT
:
53 case wxSYS_COLOUR_MENUTEXT
:
54 case wxSYS_COLOUR_WINDOWTEXT
:
55 case wxSYS_COLOUR_CAPTIONTEXT
:
56 case wxSYS_COLOUR_INFOTEXT
:
57 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
60 case wxSYS_COLOUR_HIGHLIGHT
:
63 LMGetHiliteRGB(&hilite
) ;
64 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
67 case wxSYS_COLOUR_BTNHIGHLIGHT
:
68 case wxSYS_COLOUR_GRAYTEXT
:
69 return wxColor( 0xCC , 0xCC , 0xCC ) ;
72 case wxSYS_COLOUR_3DDKSHADOW
:
73 return wxColor( 0x44 , 0x44 , 0x44 ) ;
75 case wxSYS_COLOUR_3DLIGHT
:
76 return wxColor( 0xCC , 0xCC , 0xCC ) ;
78 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
81 LMGetHiliteRGB(&hilite
) ;
82 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
88 case wxSYS_COLOUR_INFOBK
:
89 case wxSYS_COLOUR_APPWORKSPACE
:
96 wxFont
wxSystemSettings::GetSystemFont(int index
)
100 case wxSYS_ANSI_VAR_FONT
:
101 case wxSYS_SYSTEM_FONT
:
102 case wxSYS_DEVICE_DEFAULT_FONT
:
103 case wxSYS_DEFAULT_GUI_FONT
:
105 return *wxSMALL_FONT
;
108 case wxSYS_OEM_FIXED_FONT
:
109 case wxSYS_ANSI_FIXED_FONT
:
110 case wxSYS_SYSTEM_FIXED_FONT
:
113 return *wxNORMAL_FONT
;
118 return *wxNORMAL_FONT
;
121 // Get a system metric, e.g. scrollbar size
122 int wxSystemSettings::GetSystemMetric(int index
)
126 case wxSYS_MOUSE_BUTTONS
:
127 return 2; // we emulate a two button mouse (ctrl + click = right button )
158 case wxSYS_HSCROLL_ARROW_X
:
160 case wxSYS_HSCROLL_ARROW_Y
:
170 case wxSYS_ICONSPACING_X
:
173 case wxSYS_ICONSPACING_Y
:
176 case wxSYS_WINDOWMIN_X
:
179 case wxSYS_WINDOWMIN_Y
:
188 case wxSYS_FRAMESIZE_X
:
191 case wxSYS_FRAMESIZE_Y
:
194 case wxSYS_SMALLICON_X
:
197 case wxSYS_SMALLICON_Y
:
200 case wxSYS_HSCROLL_Y
:
202 case wxSYS_VSCROLL_X
:
204 case wxSYS_VSCROLL_ARROW_X
:
206 case wxSYS_VSCROLL_ARROW_Y
:
210 case wxSYS_CAPTION_Y
:
216 case wxSYS_NETWORK_PRESENT
:
219 case wxSYS_PENWINDOWS_PRESENT
:
221 case wxSYS_SHOW_SOUNDS
:
224 case wxSYS_SWAP_BUTTONS
:
232 bool wxSystemSettings::GetCapability(int index
)
236 case wxSYS_CAN_ICONIZE_FRAME
:
237 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: