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