]> git.saurik.com Git - wxWidgets.git/blob - src/mac/settings.cpp
Fixed to recognise the FINAL=hybrid make flag and to then use the
[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 #include "wx/gdicmn.h"
18
19 wxColour wxSystemSettings::GetSystemColour(int index)
20 {
21 switch( index )
22 {
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 ) ;
34 break ;
35
36 case wxSYS_COLOUR_LISTBOX :
37 return wxColor( 0xEE , 0xEE , 0xEE ) ;
38 break ;
39 case wxSYS_COLOUR_BTNSHADOW:
40 return wxColor( 0x44 , 0x44 , 0x44 ) ;
41 break ;
42
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:
49 return *wxBLACK;
50 break ;
51 case wxSYS_COLOUR_HIGHLIGHT:
52 {
53 RGBColor hilite ;
54 LMGetHiliteRGB(&hilite) ;
55 return wxColor( hilite.red >> 8 , hilite.green >> 8 , hilite.blue >> 8 ) ;
56 }
57 break ;
58 case wxSYS_COLOUR_BTNHIGHLIGHT:
59 case wxSYS_COLOUR_GRAYTEXT:
60 return wxColor( 0xCC , 0xCC , 0xCC ) ;
61 break ;
62
63 case wxSYS_COLOUR_3DDKSHADOW:
64 return wxColor( 0x44 , 0x44 , 0x44 ) ;
65 break ;
66 case wxSYS_COLOUR_3DLIGHT:
67 return wxColor( 0xCC , 0xCC , 0xCC ) ;
68 break ;
69 case wxSYS_COLOUR_HIGHLIGHTTEXT :
70 {
71 RGBColor hilite ;
72 LMGetHiliteRGB(&hilite) ;
73 if ( ( hilite.red + hilite.green + hilite.blue ) == 0 )
74 return *wxWHITE ;
75 else
76 return *wxBLACK ;
77 }
78 break ;
79 case wxSYS_COLOUR_INFOBK :
80 case wxSYS_COLOUR_APPWORKSPACE:
81 return *wxWHITE ;
82 break ;
83 }
84 return *wxWHITE;
85 }
86
87 wxFont wxSystemSettings::GetSystemFont(int index)
88 {
89 switch (index)
90 {
91 case wxSYS_ANSI_VAR_FONT :
92 case wxSYS_SYSTEM_FONT :
93 case wxSYS_DEVICE_DEFAULT_FONT :
94 case wxSYS_DEFAULT_GUI_FONT :
95 {
96 return *wxSMALL_FONT ;
97 } ;
98 break ;
99 case wxSYS_OEM_FIXED_FONT :
100 case wxSYS_ANSI_FIXED_FONT :
101 case wxSYS_SYSTEM_FIXED_FONT :
102 default :
103 {
104 return *wxNORMAL_FONT ;
105 } ;
106 break ;
107
108 }
109 return *wxNORMAL_FONT;
110 }
111
112 // Get a system metric, e.g. scrollbar size
113 int wxSystemSettings::GetSystemMetric(int index)
114 {
115 switch ( index)
116 {
117 case wxSYS_MOUSE_BUTTONS:
118 return 2; // we emulate a two button mouse (ctrl + click = right button )
119 case wxSYS_BORDER_X:
120 // TODO
121 return 0;
122 case wxSYS_BORDER_Y:
123 // TODO
124 return 0;
125 case wxSYS_CURSOR_X:
126 // TODO
127 return 0;
128 case wxSYS_CURSOR_Y:
129 // TODO
130 return 0;
131 case wxSYS_DCLICK_X:
132 // TODO
133 return 0;
134 case wxSYS_DCLICK_Y:
135 // TODO
136 return 0;
137 case wxSYS_DRAG_X:
138 // TODO
139 return 0;
140 case wxSYS_DRAG_Y:
141 // TODO
142 return 0;
143 case wxSYS_EDGE_X:
144 // TODO
145 return 0;
146 case wxSYS_EDGE_Y:
147 // TODO
148 return 0;
149 case wxSYS_HSCROLL_ARROW_X:
150 return 16;
151 case wxSYS_HSCROLL_ARROW_Y:
152 return 16;
153 case wxSYS_HTHUMB_X:
154 return 16;
155 case wxSYS_ICON_X:
156 // TODO
157 return 0;
158 case wxSYS_ICON_Y:
159 // TODO
160 return 0;
161 case wxSYS_ICONSPACING_X:
162 // TODO
163 return 0;
164 case wxSYS_ICONSPACING_Y:
165 // TODO
166 return 0;
167 case wxSYS_WINDOWMIN_X:
168 // TODO
169 return 0;
170 case wxSYS_WINDOWMIN_Y:
171 // TODO
172 return 0;
173 case wxSYS_SCREEN_X:
174 // TODO
175 return 0;
176 case wxSYS_SCREEN_Y:
177 // TODO
178 return 0;
179 case wxSYS_FRAMESIZE_X:
180 // TODO
181 return 0;
182 case wxSYS_FRAMESIZE_Y:
183 // TODO
184 return 0;
185 case wxSYS_SMALLICON_X:
186 // TODO
187 return 0;
188 case wxSYS_SMALLICON_Y:
189 // TODO
190 return 0;
191 case wxSYS_HSCROLL_Y:
192 return 16;
193 case wxSYS_VSCROLL_X:
194 return 16;
195 case wxSYS_VSCROLL_ARROW_X:
196 return 16;
197 case wxSYS_VSCROLL_ARROW_Y:
198 return 16;
199 case wxSYS_VTHUMB_Y:
200 return 16;
201 case wxSYS_CAPTION_Y:
202 // TODO
203 return 0;
204 case wxSYS_MENU_Y:
205 // TODO
206 return 0;
207 case wxSYS_NETWORK_PRESENT:
208 // TODO
209 return 0;
210 case wxSYS_PENWINDOWS_PRESENT:
211 return 0;
212 case wxSYS_SHOW_SOUNDS:
213 // TODO
214 return 0;
215 case wxSYS_SWAP_BUTTONS:
216 return 0;
217 default:
218 return 0;
219 }
220 return 0;
221 }
222