]> git.saurik.com Git - wxWidgets.git/blame - src/mac/settings.cpp
corrections for modifications made to common mimetype code
[wxWidgets.git] / src / mac / settings.cpp
CommitLineData
e9576ca5
SC
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"
03e11df5 17#include "wx/gdicmn.h"
e9576ca5
SC
18
19wxColour wxSystemSettings::GetSystemColour(int index)
20{
519cb848
SC
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_BTNSHADOW:
37 return wxColor( 0x44 , 0x44 , 0x44 ) ;
38 break ;
39
40 case wxSYS_COLOUR_BTNTEXT:
41 case wxSYS_COLOUR_MENUTEXT:
42 case wxSYS_COLOUR_WINDOWTEXT:
43 case wxSYS_COLOUR_CAPTIONTEXT:
44 case wxSYS_COLOUR_INFOTEXT:
45 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
46 return *wxBLACK;
47 break ;
48 case wxSYS_COLOUR_HIGHLIGHT:
49 {
50 RGBColor hilite ;
51 LMGetHiliteRGB(&hilite) ;
52 return wxColor( hilite.red >> 8 , hilite.green >> 8 , hilite.blue >> 8 ) ;
53 }
54 break ;
55 case wxSYS_COLOUR_BTNHIGHLIGHT:
56 case wxSYS_COLOUR_GRAYTEXT:
57 return wxColor( 0xCC , 0xCC , 0xCC ) ;
58 break ;
59
60 case wxSYS_COLOUR_3DDKSHADOW:
61 return wxColor( 0x44 , 0x44 , 0x44 ) ;
62 break ;
63 case wxSYS_COLOUR_3DLIGHT:
64 return wxColor( 0xCC , 0xCC , 0xCC ) ;
65 break ;
66 case wxSYS_COLOUR_HIGHLIGHTTEXT :
67 {
68 RGBColor hilite ;
69 LMGetHiliteRGB(&hilite) ;
70 if ( ( hilite.red + hilite.green + hilite.blue ) == 0 )
71 return *wxWHITE ;
72 else
73 return *wxBLACK ;
74 }
75 break ;
76 case wxSYS_COLOUR_INFOBK :
77 case wxSYS_COLOUR_APPWORKSPACE:
78 return *wxWHITE ;
79 break ;
80 }
81 return *wxWHITE;
e9576ca5
SC
82}
83
84wxFont wxSystemSettings::GetSystemFont(int index)
85{
e9576ca5
SC
86 switch (index)
87 {
519cb848
SC
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
e9576ca5 105 }
519cb848 106 return *wxNORMAL_FONT;
e9576ca5
SC
107}
108
109// Get a system metric, e.g. scrollbar size
110int wxSystemSettings::GetSystemMetric(int index)
111{
112 switch ( index)
113 {
114 case wxSYS_MOUSE_BUTTONS:
519cb848 115 return 2; // we emulate a two button mouse (ctrl + click = right button )
e9576ca5
SC
116 case wxSYS_BORDER_X:
117 // TODO
519cb848 118 return 0;
e9576ca5
SC
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:
519cb848 147 return 16;
e9576ca5 148 case wxSYS_HSCROLL_ARROW_Y:
519cb848 149 return 16;
e9576ca5 150 case wxSYS_HTHUMB_X:
519cb848 151 return 16;
e9576ca5
SC
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:
519cb848 189 return 16;
e9576ca5 190 case wxSYS_VSCROLL_X:
519cb848 191 return 16;
e9576ca5 192 case wxSYS_VSCROLL_ARROW_X:
519cb848 193 return 16;
e9576ca5 194 case wxSYS_VSCROLL_ARROW_Y:
519cb848 195 return 16;
e9576ca5 196 case wxSYS_VTHUMB_Y:
519cb848 197 return 16;
e9576ca5
SC
198 case wxSYS_CAPTION_Y:
199 // TODO
519cb848 200 return 0;
e9576ca5
SC
201 case wxSYS_MENU_Y:
202 // TODO
519cb848 203 return 0;
e9576ca5
SC
204 case wxSYS_NETWORK_PRESENT:
205 // TODO
519cb848 206 return 0;
e9576ca5 207 case wxSYS_PENWINDOWS_PRESENT:
519cb848 208 return 0;
e9576ca5
SC
209 case wxSYS_SHOW_SOUNDS:
210 // TODO
211 return 0;
212 case wxSYS_SWAP_BUTTONS:
519cb848
SC
213 return 0;
214 default:
215 return 0;
e9576ca5
SC
216 }
217 return 0;
218}
219