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 #include "wx/mac/uma.h"
22 // ----------------------------------------------------------------------------
23 // wxSystemSettingsNative
24 // ----------------------------------------------------------------------------
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 wxColour
wxSystemSettingsNative::GetColour(wxSystemColour index
)
33 wxGetOsVersion( &major
, &minor
);
37 case wxSYS_COLOUR_SCROLLBAR
:
38 case wxSYS_COLOUR_BACKGROUND
:
39 case wxSYS_COLOUR_ACTIVECAPTION
:
40 case wxSYS_COLOUR_INACTIVECAPTION
:
41 case wxSYS_COLOUR_MENU
:
42 case wxSYS_COLOUR_WINDOW
:
43 case wxSYS_COLOUR_WINDOWFRAME
:
44 case wxSYS_COLOUR_ACTIVEBORDER
:
45 case wxSYS_COLOUR_INACTIVEBORDER
:
46 case wxSYS_COLOUR_BTNFACE
:
47 return wxColor( 0xDD , 0xDD , 0xDD ) ;
50 case wxSYS_COLOUR_LISTBOX
:
55 return wxColor( 0xEE , 0xEE , 0xEE ) ;
58 case wxSYS_COLOUR_BTNSHADOW
:
59 return wxColor( 0x44 , 0x44 , 0x44 ) ;
62 case wxSYS_COLOUR_BTNTEXT
:
63 case wxSYS_COLOUR_MENUTEXT
:
64 case wxSYS_COLOUR_WINDOWTEXT
:
65 case wxSYS_COLOUR_CAPTIONTEXT
:
66 case wxSYS_COLOUR_INFOTEXT
:
67 case wxSYS_COLOUR_INACTIVECAPTIONTEXT
:
70 case wxSYS_COLOUR_HIGHLIGHT
:
73 LMGetHiliteRGB(&hilite
) ;
74 return wxColor( hilite
.red
>> 8 , hilite
.green
>> 8 , hilite
.blue
>> 8 ) ;
77 case wxSYS_COLOUR_BTNHIGHLIGHT
:
78 case wxSYS_COLOUR_GRAYTEXT
:
79 return wxColor( 0xCC , 0xCC , 0xCC ) ;
82 case wxSYS_COLOUR_3DDKSHADOW
:
83 return wxColor( 0x44 , 0x44 , 0x44 ) ;
85 case wxSYS_COLOUR_3DLIGHT
:
86 return wxColor( 0xCC , 0xCC , 0xCC ) ;
88 case wxSYS_COLOUR_HIGHLIGHTTEXT
:
91 LMGetHiliteRGB(&hilite
) ;
92 if ( ( hilite
.red
+ hilite
.green
+ hilite
.blue
) == 0 )
98 case wxSYS_COLOUR_INFOBK
:
99 case wxSYS_COLOUR_APPWORKSPACE
:
106 // ----------------------------------------------------------------------------
108 // ----------------------------------------------------------------------------
110 wxFont
wxSystemSettingsNative::GetFont(wxSystemFont index
)
114 case wxSYS_ANSI_VAR_FONT
:
115 case wxSYS_SYSTEM_FONT
:
116 case wxSYS_DEVICE_DEFAULT_FONT
:
117 case wxSYS_DEFAULT_GUI_FONT
:
119 return *wxSMALL_FONT
;
122 case wxSYS_OEM_FIXED_FONT
:
123 case wxSYS_ANSI_FIXED_FONT
:
124 case wxSYS_SYSTEM_FIXED_FONT
:
127 return *wxNORMAL_FONT
;
132 return *wxNORMAL_FONT
;
135 // ----------------------------------------------------------------------------
136 // system metrics/features
137 // ----------------------------------------------------------------------------
139 // Get a system metric, e.g. scrollbar size
140 int wxSystemSettingsNative::GetMetric(wxSystemMetric index
)
144 case wxSYS_MOUSE_BUTTONS
:
145 return 2; // we emulate a two button mouse (ctrl + click = right button )
176 case wxSYS_HSCROLL_ARROW_X
:
178 case wxSYS_HSCROLL_ARROW_Y
:
188 case wxSYS_ICONSPACING_X
:
191 case wxSYS_ICONSPACING_Y
:
194 case wxSYS_WINDOWMIN_X
:
197 case wxSYS_WINDOWMIN_Y
:
206 case wxSYS_FRAMESIZE_X
:
209 case wxSYS_FRAMESIZE_Y
:
212 case wxSYS_SMALLICON_X
:
215 case wxSYS_SMALLICON_Y
:
218 case wxSYS_HSCROLL_Y
:
220 case wxSYS_VSCROLL_X
:
222 case wxSYS_VSCROLL_ARROW_X
:
224 case wxSYS_VSCROLL_ARROW_Y
:
228 case wxSYS_CAPTION_Y
:
234 case wxSYS_NETWORK_PRESENT
:
237 case wxSYS_PENWINDOWS_PRESENT
:
239 case wxSYS_SHOW_SOUNDS
:
242 case wxSYS_SWAP_BUTTONS
:
250 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index
)
254 case wxSYS_CAN_ICONIZE_FRAME
:
255 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: