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 // ----------------------------------------------------------------------------
21 // wxSystemSettingsNative
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 // ----------------------------------------------------------------------------
28 wxColour
wxSystemSettingsNative::GetColour(wxSystemColour index
)
31 wxGetOsVersion( &major
, &minor
);
35 case wxSYS_COLOUR_SCROLLBAR
:
36 case wxSYS_COLOUR_BACKGROUND
:
37 case wxSYS_COLOUR_ACTIVECAPTION
:
38 case wxSYS_COLOUR_INACTIVECAPTION
:
39 case wxSYS_COLOUR_MENU
:
40 case wxSYS_COLOUR_WINDOW
:
41 case wxSYS_COLOUR_WINDOWFRAME
:
42 case wxSYS_COLOUR_ACTIVEBORDER
:
43 case wxSYS_COLOUR_INACTIVEBORDER
:
44 case wxSYS_COLOUR_BTNFACE
:
45 return wxColor( 0xDD , 0xDD , 0xDD ) ;
48 case wxSYS_COLOUR_LISTBOX
:
53 return wxColor( 0xEE , 0xEE , 0xEE ) ;
56 case wxSYS_COLOUR_BTNSHADOW
:
57 return wxColor( 0x44 , 0x44 , 0x44 ) ;
60 case wxSYS_COLOUR_BTNTEXT
:
61 case wxSYS_COLOUR_MENUTEXT
:
62 case wxSYS_COLOUR_WINDOWTEXT
:
63 case wxSYS_COLOUR_CAPTIONTEXT
:
64 case wxSYS_COLOUR_INFOTEXT
:
65 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
68 case wxSYS_COLOUR_HIGHLIGHT
:
71 LMGetHiliteRGB(&hilite
) ;
72 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
75 case wxSYS_COLOUR_BTNHIGHLIGHT
:
76 case wxSYS_COLOUR_GRAYTEXT
:
77 return wxColor( 0xCC , 0xCC , 0xCC ) ;
80 case wxSYS_COLOUR_3DDKSHADOW
:
81 return wxColor( 0x44 , 0x44 , 0x44 ) ;
83 case wxSYS_COLOUR_3DLIGHT
:
84 return wxColor( 0xCC , 0xCC , 0xCC ) ;
86 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
89 LMGetHiliteRGB(&hilite
) ;
90 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
96 case wxSYS_COLOUR_INFOBK
:
97 case wxSYS_COLOUR_APPWORKSPACE
:
104 // ----------------------------------------------------------------------------
106 // ----------------------------------------------------------------------------
108 wxFont
wxSystemSettingsNative::GetFont(wxSystemFont index
)
112 case wxSYS_ANSI_VAR_FONT
:
113 case wxSYS_SYSTEM_FONT
:
114 case wxSYS_DEVICE_DEFAULT_FONT
:
115 case wxSYS_DEFAULT_GUI_FONT
:
117 return *wxSMALL_FONT
;
120 case wxSYS_OEM_FIXED_FONT
:
121 case wxSYS_ANSI_FIXED_FONT
:
122 case wxSYS_SYSTEM_FIXED_FONT
:
125 return *wxNORMAL_FONT
;
130 return *wxNORMAL_FONT
;
133 // ----------------------------------------------------------------------------
134 // system metrics/features
135 // ----------------------------------------------------------------------------
137 // Get a system metric, e.g. scrollbar size
138 int wxSystemSettingsNative::GetMetric(wxSystemMetric index
)
142 case wxSYS_MOUSE_BUTTONS
:
143 return 2; // we emulate a two button mouse (ctrl + click = right button )
174 case wxSYS_HSCROLL_ARROW_X
:
176 case wxSYS_HSCROLL_ARROW_Y
:
186 case wxSYS_ICONSPACING_X
:
189 case wxSYS_ICONSPACING_Y
:
192 case wxSYS_WINDOWMIN_X
:
195 case wxSYS_WINDOWMIN_Y
:
204 case wxSYS_FRAMESIZE_X
:
207 case wxSYS_FRAMESIZE_Y
:
210 case wxSYS_SMALLICON_X
:
213 case wxSYS_SMALLICON_Y
:
216 case wxSYS_HSCROLL_Y
:
218 case wxSYS_VSCROLL_X
:
220 case wxSYS_VSCROLL_ARROW_X
:
222 case wxSYS_VSCROLL_ARROW_Y
:
226 case wxSYS_CAPTION_Y
:
232 case wxSYS_NETWORK_PRESENT
:
235 case wxSYS_PENWINDOWS_PRESENT
:
237 case wxSYS_SHOW_SOUNDS
:
240 case wxSYS_SWAP_BUTTONS
:
248 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index
)
252 case wxSYS_CAN_ICONIZE_FRAME
:
253 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: