]> git.saurik.com Git - wxWidgets.git/blob - src/mac/settings.cpp
Whole lotta stuff for wxPlotWindow,
[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 return *wxWHITE ;
78 break ;
79 }
80 return *wxWHITE;
81 }
82
83 wxFont wxSystemSettings::GetSystemFont(int index)
84 {
85 switch (index)
86 {
87 case wxSYS_ANSI_VAR_FONT :
88 case wxSYS_SYSTEM_FONT :
89 case wxSYS_DEVICE_DEFAULT_FONT :
90 case wxSYS_DEFAULT_GUI_FONT :
91 {
92 return *wxSMALL_FONT ;
93 } ;
94 break ;
95 case wxSYS_OEM_FIXED_FONT :
96 case wxSYS_ANSI_FIXED_FONT :
97 case wxSYS_SYSTEM_FIXED_FONT :
98 default :
99 {
100 return *wxNORMAL_FONT ;
101 } ;
102 break ;
103
104 }
105 return *wxNORMAL_FONT;
106 }
107
108 // Get a system metric, e.g. scrollbar size
109 int wxSystemSettings::GetSystemMetric(int index)
110 {
111 switch ( index)
112 {
113 case wxSYS_MOUSE_BUTTONS:
114 return 2; // we emulate a two button mouse (ctrl + click = right button )
115 case wxSYS_BORDER_X:
116 // TODO
117 return 0;
118 case wxSYS_BORDER_Y:
119 // TODO
120 return 0;
121 case wxSYS_CURSOR_X:
122 // TODO
123 return 0;
124 case wxSYS_CURSOR_Y:
125 // TODO
126 return 0;
127 case wxSYS_DCLICK_X:
128 // TODO
129 return 0;
130 case wxSYS_DCLICK_Y:
131 // TODO
132 return 0;
133 case wxSYS_DRAG_X:
134 // TODO
135 return 0;
136 case wxSYS_DRAG_Y:
137 // TODO
138 return 0;
139 case wxSYS_EDGE_X:
140 // TODO
141 return 0;
142 case wxSYS_EDGE_Y:
143 // TODO
144 return 0;
145 case wxSYS_HSCROLL_ARROW_X:
146 return 16;
147 case wxSYS_HSCROLL_ARROW_Y:
148 return 16;
149 case wxSYS_HTHUMB_X:
150 return 16;
151 case wxSYS_ICON_X:
152 // TODO
153 return 0;
154 case wxSYS_ICON_Y:
155 // TODO
156 return 0;
157 case wxSYS_ICONSPACING_X:
158 // TODO
159 return 0;
160 case wxSYS_ICONSPACING_Y:
161 // TODO
162 return 0;
163 case wxSYS_WINDOWMIN_X:
164 // TODO
165 return 0;
166 case wxSYS_WINDOWMIN_Y:
167 // TODO
168 return 0;
169 case wxSYS_SCREEN_X:
170 // TODO
171 return 0;
172 case wxSYS_SCREEN_Y:
173 // TODO
174 return 0;
175 case wxSYS_FRAMESIZE_X:
176 // TODO
177 return 0;
178 case wxSYS_FRAMESIZE_Y:
179 // TODO
180 return 0;
181 case wxSYS_SMALLICON_X:
182 // TODO
183 return 0;
184 case wxSYS_SMALLICON_Y:
185 // TODO
186 return 0;
187 case wxSYS_HSCROLL_Y:
188 return 16;
189 case wxSYS_VSCROLL_X:
190 return 16;
191 case wxSYS_VSCROLL_ARROW_X:
192 return 16;
193 case wxSYS_VSCROLL_ARROW_Y:
194 return 16;
195 case wxSYS_VTHUMB_Y:
196 return 16;
197 case wxSYS_CAPTION_Y:
198 // TODO
199 return 0;
200 case wxSYS_MENU_Y:
201 // TODO
202 return 0;
203 case wxSYS_NETWORK_PRESENT:
204 // TODO
205 return 0;
206 case wxSYS_PENWINDOWS_PRESENT:
207 return 0;
208 case wxSYS_SHOW_SOUNDS:
209 // TODO
210 return 0;
211 case wxSYS_SWAP_BUTTONS:
212 return 0;
213 default:
214 return 0;
215 }
216 return 0;
217 }
218