]> git.saurik.com Git - wxWidgets.git/blob - src/mac/settings.cpp
fatal bug in wxSplitPath fixed
[wxWidgets.git] / src / mac / settings.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settings.cpp
3 // Purpose: wxSettings
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "settings.h"
14 #endif
15
16 #include "wx/settings.h"
17
18 wxColour wxSystemSettings::GetSystemColour(int index)
19 {
20 switch( index )
21 {
22 case wxSYS_COLOUR_SCROLLBAR :
23 case wxSYS_COLOUR_BACKGROUND:
24 case wxSYS_COLOUR_ACTIVECAPTION:
25 case wxSYS_COLOUR_INACTIVECAPTION:
26 case wxSYS_COLOUR_MENU:
27 case wxSYS_COLOUR_WINDOW:
28 case wxSYS_COLOUR_WINDOWFRAME:
29 case wxSYS_COLOUR_ACTIVEBORDER:
30 case wxSYS_COLOUR_INACTIVEBORDER:
31 case wxSYS_COLOUR_BTNFACE:
32 return wxColor( 0xDD , 0xDD , 0xDD ) ;
33 break ;
34
35 case wxSYS_COLOUR_BTNSHADOW:
36 return wxColor( 0x44 , 0x44 , 0x44 ) ;
37 break ;
38
39 case wxSYS_COLOUR_BTNTEXT:
40 case wxSYS_COLOUR_MENUTEXT:
41 case wxSYS_COLOUR_WINDOWTEXT:
42 case wxSYS_COLOUR_CAPTIONTEXT:
43 case wxSYS_COLOUR_INFOTEXT:
44 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
45 return *wxBLACK;
46 break ;
47 case wxSYS_COLOUR_HIGHLIGHT:
48 {
49 RGBColor hilite ;
50 LMGetHiliteRGB(&hilite) ;
51 return wxColor( hilite.red >> 8 , hilite.green >> 8 , hilite.blue >> 8 ) ;
52 }
53 break ;
54 case wxSYS_COLOUR_BTNHIGHLIGHT:
55 case wxSYS_COLOUR_GRAYTEXT:
56 return wxColor( 0xCC , 0xCC , 0xCC ) ;
57 break ;
58
59 case wxSYS_COLOUR_3DDKSHADOW:
60 return wxColor( 0x44 , 0x44 , 0x44 ) ;
61 break ;
62 case wxSYS_COLOUR_3DLIGHT:
63 return wxColor( 0xCC , 0xCC , 0xCC ) ;
64 break ;
65 case wxSYS_COLOUR_HIGHLIGHTTEXT :
66 {
67 RGBColor hilite ;
68 LMGetHiliteRGB(&hilite) ;
69 if ( ( hilite.red + hilite.green + hilite.blue ) == 0 )
70 return *wxWHITE ;
71 else
72 return *wxBLACK ;
73 }
74 break ;
75 case wxSYS_COLOUR_INFOBK :
76 case wxSYS_COLOUR_APPWORKSPACE:
77 case wxSYS_COLOUR_LISTBOX:
78 return *wxWHITE ;
79 break ;
80 }
81 return *wxWHITE;
82 }
83
84 wxFont wxSystemSettings::GetSystemFont(int index)
85 {
86 switch (index)
87 {
88 case wxSYS_ANSI_VAR_FONT :
89 case wxSYS_SYSTEM_FONT :
90 case wxSYS_DEVICE_DEFAULT_FONT :
91 case wxSYS_DEFAULT_GUI_FONT :
92 {
93 return *wxSMALL_FONT ;
94 } ;
95 break ;
96 case wxSYS_OEM_FIXED_FONT :
97 case wxSYS_ANSI_FIXED_FONT :
98 case wxSYS_SYSTEM_FIXED_FONT :
99 default :
100 {
101 return *wxNORMAL_FONT ;
102 } ;
103 break ;
104
105 }
106 return *wxNORMAL_FONT;
107 }
108
109 // Get a system metric, e.g. scrollbar size
110 int wxSystemSettings::GetSystemMetric(int index)
111 {
112 switch ( index)
113 {
114 case wxSYS_MOUSE_BUTTONS:
115 return 2; // we emulate a two button mouse (ctrl + click = right button )
116 case wxSYS_BORDER_X:
117 // TODO
118 return 0;
119 case wxSYS_BORDER_Y:
120 // TODO
121 return 0;
122 case wxSYS_CURSOR_X:
123 // TODO
124 return 0;
125 case wxSYS_CURSOR_Y:
126 // TODO
127 return 0;
128 case wxSYS_DCLICK_X:
129 // TODO
130 return 0;
131 case wxSYS_DCLICK_Y:
132 // TODO
133 return 0;
134 case wxSYS_DRAG_X:
135 // TODO
136 return 0;
137 case wxSYS_DRAG_Y:
138 // TODO
139 return 0;
140 case wxSYS_EDGE_X:
141 // TODO
142 return 0;
143 case wxSYS_EDGE_Y:
144 // TODO
145 return 0;
146 case wxSYS_HSCROLL_ARROW_X:
147 return 16;
148 case wxSYS_HSCROLL_ARROW_Y:
149 return 16;
150 case wxSYS_HTHUMB_X:
151 return 16;
152 case wxSYS_ICON_X:
153 // TODO
154 return 0;
155 case wxSYS_ICON_Y:
156 // TODO
157 return 0;
158 case wxSYS_ICONSPACING_X:
159 // TODO
160 return 0;
161 case wxSYS_ICONSPACING_Y:
162 // TODO
163 return 0;
164 case wxSYS_WINDOWMIN_X:
165 // TODO
166 return 0;
167 case wxSYS_WINDOWMIN_Y:
168 // TODO
169 return 0;
170 case wxSYS_SCREEN_X:
171 // TODO
172 return 0;
173 case wxSYS_SCREEN_Y:
174 // TODO
175 return 0;
176 case wxSYS_FRAMESIZE_X:
177 // TODO
178 return 0;
179 case wxSYS_FRAMESIZE_Y:
180 // TODO
181 return 0;
182 case wxSYS_SMALLICON_X:
183 // TODO
184 return 0;
185 case wxSYS_SMALLICON_Y:
186 // TODO
187 return 0;
188 case wxSYS_HSCROLL_Y:
189 return 16;
190 case wxSYS_VSCROLL_X:
191 return 16;
192 case wxSYS_VSCROLL_ARROW_X:
193 return 16;
194 case wxSYS_VSCROLL_ARROW_Y:
195 return 16;
196 case wxSYS_VTHUMB_Y:
197 return 16;
198 case wxSYS_CAPTION_Y:
199 // TODO
200 return 0;
201 case wxSYS_MENU_Y:
202 // TODO
203 return 0;
204 case wxSYS_NETWORK_PRESENT:
205 // TODO
206 return 0;
207 case wxSYS_PENWINDOWS_PRESENT:
208 return 0;
209 case wxSYS_SHOW_SOUNDS:
210 // TODO
211 return 0;
212 case wxSYS_SWAP_BUTTONS:
213 return 0;
214 default:
215 return 0;
216 }
217 return 0;
218 }
219