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