]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/motif/settings.cpp
sleep while waiting for the spawned process to terminate so that we don't eat 100...
[wxWidgets.git] / src / motif / settings.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: settings.cpp
3// Purpose: wxSettings
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// TODO: these settings should probably be configurable from some central or
13// per-user file, which can be edited using a Windows-control-panel clone.
14// Also they should be documented better. Some are very MS Windows-ish.
15
16#ifdef __GNUG__
17#pragma implementation "settings.h"
18#endif
19
20#include "wx/settings.h"
21#include "wx/gdicmn.h"
22
23wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
24{
25 switch (index)
26 {
27 case wxSYS_COLOUR_WINDOW:
28 {
29 return *wxWHITE;
30 }
31 case wxSYS_COLOUR_SCROLLBAR:
32 // case wxSYS_COLOUR_DESKTOP: // Same as wxSYS_COLOUR_BACKGROUND
33 case wxSYS_COLOUR_BACKGROUND:
34 case wxSYS_COLOUR_ACTIVECAPTION:
35 case wxSYS_COLOUR_INACTIVECAPTION:
36 case wxSYS_COLOUR_MENU:
37 case wxSYS_COLOUR_WINDOWFRAME:
38 case wxSYS_COLOUR_ACTIVEBORDER:
39 case wxSYS_COLOUR_INACTIVEBORDER:
40 case wxSYS_COLOUR_BTNFACE:
41 // case wxSYS_COLOUR_3DFACE: // Same as wxSYS_COLOUR_BTNFACE
42 case wxSYS_COLOUR_GRAYTEXT:
43 {
44 return wxColour("LIGHT GREY");
45 }
46 case wxSYS_COLOUR_BTNSHADOW:
47 // case wxSYS_COLOUR_3DSHADOW: // Same as wxSYS_COLOUR_BTNSHADOW
48 {
49 return wxColour("GREY");
50 }
51 case wxSYS_COLOUR_3DDKSHADOW:
52 {
53 return *wxBLACK;
54 }
55 case wxSYS_COLOUR_HIGHLIGHT:
56 {
57 return *wxBLUE;
58 }
59 case wxSYS_COLOUR_BTNHIGHLIGHT:
60 case wxSYS_COLOUR_LISTBOX:
61 // case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
62 {
63 return *wxWHITE;
64 }
65 case wxSYS_COLOUR_3DLIGHT:
66 {
67 return wxColour("LIGHT GREY");
68 }
69 case wxSYS_COLOUR_MENUTEXT:
70 case wxSYS_COLOUR_WINDOWTEXT:
71 case wxSYS_COLOUR_CAPTIONTEXT:
72 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
73 case wxSYS_COLOUR_BTNTEXT:
74 case wxSYS_COLOUR_INFOTEXT:
75 {
76 return *wxBLACK;
77 }
78 case wxSYS_COLOUR_HIGHLIGHTTEXT:
79 {
80 return *wxWHITE;
81 }
82 case wxSYS_COLOUR_INFOBK:
83 case wxSYS_COLOUR_APPWORKSPACE:
84 {
85 return wxColour("LIGHT GREY");
86 }
87
88 case wxSYS_COLOUR_HOTLIGHT:
89 case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
90 case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
91 case wxSYS_COLOUR_MENUHILIGHT:
92 case wxSYS_COLOUR_MENUBAR:
93 // TODO
94 return wxColour("LIGHT GREY");
95
96 default:
97 case wxSYS_COLOUR_MAX:
98 wxFAIL_MSG( _T("unknown colour") );
99 }
100 return *wxWHITE;
101}
102
103wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
104{
105 switch (index)
106 {
107 case wxSYS_SYSTEM_FIXED_FONT:
108 {
109 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
110 break;
111 }
112 case wxSYS_DEVICE_DEFAULT_FONT:
113 case wxSYS_SYSTEM_FONT:
114 case wxSYS_DEFAULT_GUI_FONT:
115 default:
116 {
117 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
118 break;
119 }
120 }
121
122 return wxFont();
123}
124
125// Get a system metric, e.g. scrollbar size
126int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
127{
128 switch ( index)
129 {
130 case wxSYS_MOUSE_BUTTONS:
131 // TODO
132 return 0;
133 case wxSYS_BORDER_X:
134 // TODO
135 return 0;
136 case wxSYS_BORDER_Y:
137 // TODO
138 return 0;
139 case wxSYS_CURSOR_X:
140 // TODO
141 return 0;
142 case wxSYS_CURSOR_Y:
143 // TODO
144 return 0;
145 case wxSYS_DCLICK_X:
146 // TODO
147 return 0;
148 case wxSYS_DCLICK_Y:
149 // TODO
150 return 0;
151 case wxSYS_DRAG_X:
152 // TODO
153 return 0;
154 case wxSYS_DRAG_Y:
155 // TODO
156 return 0;
157 case wxSYS_EDGE_X:
158 // TODO
159 return 0;
160 case wxSYS_EDGE_Y:
161 // TODO
162 return 0;
163 case wxSYS_HSCROLL_ARROW_X:
164 // TODO
165 return 0;
166 case wxSYS_HSCROLL_ARROW_Y:
167 // TODO
168 return 0;
169 case wxSYS_HTHUMB_X:
170 // TODO
171 return 0;
172 case wxSYS_ICON_X:
173 // TODO
174 return 0;
175 case wxSYS_ICON_Y:
176 // TODO
177 return 0;
178 case wxSYS_ICONSPACING_X:
179 // TODO
180 return 0;
181 case wxSYS_ICONSPACING_Y:
182 // TODO
183 return 0;
184 case wxSYS_WINDOWMIN_X:
185 // TODO
186 return 0;
187 case wxSYS_WINDOWMIN_Y:
188 // TODO
189 return 0;
190 case wxSYS_SCREEN_X:
191 // TODO
192 return 0;
193 case wxSYS_SCREEN_Y:
194 // TODO
195 return 0;
196 case wxSYS_FRAMESIZE_X:
197 // TODO
198 return 0;
199 case wxSYS_FRAMESIZE_Y:
200 // TODO
201 return 0;
202 case wxSYS_SMALLICON_X:
203 // TODO
204 return 0;
205 case wxSYS_SMALLICON_Y:
206 // TODO
207 return 0;
208 case wxSYS_HSCROLL_Y:
209 // TODO
210 return 0;
211 case wxSYS_VSCROLL_X:
212 // TODO
213 return 0;
214 case wxSYS_VSCROLL_ARROW_X:
215 // TODO
216 return 0;
217 case wxSYS_VSCROLL_ARROW_Y:
218 // TODO
219 return 0;
220 case wxSYS_VTHUMB_Y:
221 // TODO
222 return 0;
223 case wxSYS_CAPTION_Y:
224 // TODO
225 return 0;
226 case wxSYS_MENU_Y:
227 // TODO
228 return 0;
229 case wxSYS_NETWORK_PRESENT:
230 // TODO
231 return 0;
232 case wxSYS_PENWINDOWS_PRESENT:
233 // TODO
234 return 0;
235 case wxSYS_SHOW_SOUNDS:
236 // TODO
237 return 0;
238 case wxSYS_SWAP_BUTTONS:
239 // TODO
240 return 0;
241 default:
242 return 0;
243 }
244}
245
246bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
247{
248 switch (index)
249 {
250 case wxSYS_CAN_ICONIZE_FRAME:
251 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
252 return TRUE;
253
254 default:
255 return FALSE;
256 }
257}