]> git.saurik.com Git - wxWidgets.git/blob - interface/settings.h
don't compile the test in the build configurations where it's not supported (trying...
[wxWidgets.git] / interface / settings.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settings.h
3 // Purpose: interface of wxSystemSettings
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSystemSettings
11 @wxheader{settings.h}
12
13 wxSystemSettings allows the application to ask for details about
14 the system. This can include settings such as standard colours, fonts,
15 and user interface element sizes.
16
17 @library{wxcore}
18 @category{misc}
19
20 @see wxFont, wxColour
21 */
22 class wxSystemSettings : public wxObject
23 {
24 public:
25 /**
26 Default constructor. You don't need to create an instance of wxSystemSettings
27 since all of its functions are static.
28 */
29 wxSystemSettings();
30
31 /**
32 Returns a system colour.
33 @a index can be one of:
34
35 @b wxSYS_COLOUR_SCROLLBAR
36
37 The scrollbar grey area.
38
39 @b wxSYS_COLOUR_BACKGROUND
40
41 The desktop colour.
42
43 @b wxSYS_COLOUR_ACTIVECAPTION
44
45 Active window caption.
46
47 @b wxSYS_COLOUR_INACTIVECAPTION
48
49 Inactive window caption.
50
51 @b wxSYS_COLOUR_MENU
52
53 Menu background.
54
55 @b wxSYS_COLOUR_WINDOW
56
57 Window background.
58
59 @b wxSYS_COLOUR_WINDOWFRAME
60
61 Window frame.
62
63 @b wxSYS_COLOUR_MENUTEXT
64
65 Menu text.
66
67 @b wxSYS_COLOUR_WINDOWTEXT
68
69 Text in windows.
70
71 @b wxSYS_COLOUR_CAPTIONTEXT
72
73 Text in caption, size box and scrollbar arrow box.
74
75 @b wxSYS_COLOUR_ACTIVEBORDER
76
77 Active window border.
78
79 @b wxSYS_COLOUR_INACTIVEBORDER
80
81 Inactive window border.
82
83 @b wxSYS_COLOUR_APPWORKSPACE
84
85 Background colour MDI applications.
86
87 @b wxSYS_COLOUR_HIGHLIGHT
88
89 Item(s) selected in a control.
90
91 @b wxSYS_COLOUR_HIGHLIGHTTEXT
92
93 Text of item(s) selected in a control.
94
95 @b wxSYS_COLOUR_BTNFACE
96
97 Face shading on push buttons.
98
99 @b wxSYS_COLOUR_BTNSHADOW
100
101 Edge shading on push buttons.
102
103 @b wxSYS_COLOUR_GRAYTEXT
104
105 Greyed (disabled) text.
106
107 @b wxSYS_COLOUR_BTNTEXT
108
109 Text on push buttons.
110
111 @b wxSYS_COLOUR_INACTIVECAPTIONTEXT
112
113 Colour of text in active captions.
114
115 @b wxSYS_COLOUR_BTNHIGHLIGHT
116
117 Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
118
119 @b wxSYS_COLOUR_3DDKSHADOW
120
121 Dark shadow for three-dimensional display elements.
122
123 @b wxSYS_COLOUR_3DLIGHT
124
125 Light colour for three-dimensional display elements.
126
127 @b wxSYS_COLOUR_INFOTEXT
128
129 Text colour for tooltip controls.
130
131 @b wxSYS_COLOUR_INFOBK
132
133 Background colour for tooltip controls.
134
135 @b wxSYS_COLOUR_DESKTOP
136
137 Same as wxSYS_COLOUR_BACKGROUND.
138
139 @b wxSYS_COLOUR_3DFACE
140
141 Same as wxSYS_COLOUR_BTNFACE.
142
143 @b wxSYS_COLOUR_3DSHADOW
144
145 Same as wxSYS_COLOUR_BTNSHADOW.
146
147 @b wxSYS_COLOUR_3DHIGHLIGHT
148
149 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
150
151 @b wxSYS_COLOUR_3DHILIGHT
152
153 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
154
155 @b wxSYS_COLOUR_BTNHILIGHT
156
157 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
158 */
159 static wxColour GetColour(wxSystemColour index);
160
161 /**
162 Returns a system font.
163 @a index can be one of:
164
165 @b wxSYS_OEM_FIXED_FONT
166
167 Original equipment manufacturer dependent fixed-pitch font.
168
169 @b wxSYS_ANSI_FIXED_FONT
170
171 Windows fixed-pitch font.
172
173 @b wxSYS_ANSI_VAR_FONT
174
175 Windows variable-pitch (proportional) font.
176
177 @b wxSYS_SYSTEM_FONT
178
179 System font.
180
181 @b wxSYS_DEVICE_DEFAULT_FONT
182
183 Device-dependent font (Windows NT only).
184
185 @b wxSYS_DEFAULT_GUI_FONT
186
187 Default font for user interface
188 objects such as menus and dialog boxes. Note that with modern GUIs nothing
189 guarantees that the same font is used for all GUI elements, so some controls
190 might use a different font by default.
191 */
192 static wxFont GetFont(wxSystemFont index);
193
194 /**
195 Returns the value of a system metric, or -1 if the metric is not supported on
196 the current system.
197 The value of @a win determines if the metric returned is a global value or
198 a wxWindow based value, in which case it might determine the widget, the
199 display the window is on, or something similar. The window given should be as
200 close to the
201 metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y
202 metric).
203 @a index can be one of:
204
205 @b wxSYS_MOUSE_BUTTONS
206
207 Number of buttons on mouse, or zero if no mouse was installed.
208
209 @b wxSYS_BORDER_X
210
211 Width of single border.
212
213 @b wxSYS_BORDER_Y
214
215 Height of single border.
216
217 @b wxSYS_CURSOR_X
218
219 Width of cursor.
220
221 @b wxSYS_CURSOR_Y
222
223 Height of cursor.
224
225 @b wxSYS_DCLICK_X
226
227 Width in pixels of rectangle within which two successive mouse
228 clicks must fall to generate a double-click.
229
230 @b wxSYS_DCLICK_Y
231
232 Height in pixels of rectangle within which two successive mouse
233 clicks must fall to generate a double-click.
234
235 @b wxSYS_DCLICK_MSEC
236
237 Maximal time, in milliseconds, which may
238 pass between subsequent clicks for a double click to be generated.
239
240 @b wxSYS_DRAG_X
241
242 Width in pixels of a rectangle centered on a drag point
243 to allow for limited movement of the mouse pointer before a drag operation
244 begins.
245
246 @b wxSYS_DRAG_Y
247
248 Height in pixels of a rectangle centered on a drag point
249 to allow for limited movement of the mouse pointer before a drag operation
250 begins.
251
252 @b wxSYS_EDGE_X
253
254 Width of a 3D border, in pixels.
255
256 @b wxSYS_EDGE_Y
257
258 Height of a 3D border, in pixels.
259
260 @b wxSYS_HSCROLL_ARROW_X
261
262 Width of arrow bitmap on horizontal scrollbar.
263
264 @b wxSYS_HSCROLL_ARROW_Y
265
266 Height of arrow bitmap on horizontal scrollbar.
267
268 @b wxSYS_HTHUMB_X
269
270 Width of horizontal scrollbar thumb.
271
272 @b wxSYS_ICON_X
273
274 The default width of an icon.
275
276 @b wxSYS_ICON_Y
277
278 The default height of an icon.
279
280 @b wxSYS_ICONSPACING_X
281
282 Width of a grid cell for items in large icon view,
283 in pixels. Each item fits into a rectangle of this size when arranged.
284
285 @b wxSYS_ICONSPACING_Y
286
287 Height of a grid cell for items in large icon view,
288 in pixels. Each item fits into a rectangle of this size when arranged.
289
290 @b wxSYS_WINDOWMIN_X
291
292 Minimum width of a window.
293
294 @b wxSYS_WINDOWMIN_Y
295
296 Minimum height of a window.
297
298 @b wxSYS_SCREEN_X
299
300 Width of the screen in pixels.
301
302 @b wxSYS_SCREEN_Y
303
304 Height of the screen in pixels.
305
306 @b wxSYS_FRAMESIZE_X
307
308 Width of the window frame for a wxTHICK_FRAME window.
309
310 @b wxSYS_FRAMESIZE_Y
311
312 Height of the window frame for a wxTHICK_FRAME window.
313
314 @b wxSYS_SMALLICON_X
315
316 Recommended width of a small icon (in window captions, and small icon view).
317
318 @b wxSYS_SMALLICON_Y
319
320 Recommended height of a small icon (in window captions, and small icon view).
321
322 @b wxSYS_HSCROLL_Y
323
324 Height of horizontal scrollbar in pixels.
325
326 @b wxSYS_VSCROLL_X
327
328 Width of vertical scrollbar in pixels.
329
330 @b wxSYS_VSCROLL_ARROW_X
331
332 Width of arrow bitmap on a vertical scrollbar.
333
334 @b wxSYS_VSCROLL_ARROW_Y
335
336 Height of arrow bitmap on a vertical scrollbar.
337
338 @b wxSYS_VTHUMB_Y
339
340 Height of vertical scrollbar thumb.
341
342 @b wxSYS_CAPTION_Y
343
344 Height of normal caption area.
345
346 @b wxSYS_MENU_Y
347
348 Height of single-line menu bar.
349
350 @b wxSYS_NETWORK_PRESENT
351
352 1 if there is a network present, 0 otherwise.
353
354 @b wxSYS_PENWINDOWS_PRESENT
355
356 1 if PenWindows is installed, 0 otherwise.
357
358 @b wxSYS_SHOW_SOUNDS
359
360 Non-zero if the user requires an application to present information visually in
361 situations
362 where it would otherwise present the information only in audible form; zero
363 otherwise.
364
365 @b wxSYS_SWAP_BUTTONS
366
367 Non-zero if the meanings of the left and right mouse buttons are swapped; zero
368 otherwise.
369
370 @a win is a pointer to the window for which the metric is requested.
371 Specifying the @a win parameter is encouraged, because some metrics on some
372 ports are not supported without one,
373 or they might be capable of reporting better values if given one. If a window
374 does not make sense for a metric,
375 one should still be given, as for example it might determine which displays
376 cursor width is requested with
377 wxSYS_CURSOR_X.
378 */
379 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
380
381 /**
382 Returns the screen type. The return value is one of:
383
384 @b wxSYS_SCREEN_NONE
385
386 Undefined screen type
387
388 @b wxSYS_SCREEN_TINY
389
390 Tiny screen, less than 320x240
391
392 @b wxSYS_SCREEN_PDA
393
394 PDA screen, 320x240 or more but less than 640x480
395
396 @b wxSYS_SCREEN_SMALL
397
398 Small screen, 640x480 or more but less than 800x600
399
400 @b wxSYS_SCREEN_DESKTOP
401
402 Desktop screen, 800x600 or more
403 */
404 static wxSystemScreenType GetScreenType();
405 };
406