]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/settings.h
even more interface fixes
[wxWidgets.git] / interface / wx / settings.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: settings.h
e54c96f1 3// Purpose: interface of wxSystemSettings
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxSystemSettings
7c913512 11
23324ae1
FM
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.
7c913512 15
23324ae1
FM
16 @library{wxcore}
17 @category{misc}
7c913512 18
e54c96f1 19 @see wxFont, wxColour
23324ae1
FM
20*/
21class wxSystemSettings : public wxObject
22{
23public:
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.
4cc4bfaf 32 @a index can be one of:
3c4f71cc 33
23324ae1 34 @b wxSYS_COLOUR_SCROLLBAR
3c4f71cc 35
23324ae1 36 The scrollbar grey area.
3c4f71cc 37
23324ae1 38 @b wxSYS_COLOUR_BACKGROUND
3c4f71cc 39
23324ae1 40 The desktop colour.
3c4f71cc 41
23324ae1 42 @b wxSYS_COLOUR_ACTIVECAPTION
3c4f71cc 43
23324ae1 44 Active window caption.
3c4f71cc 45
23324ae1 46 @b wxSYS_COLOUR_INACTIVECAPTION
3c4f71cc 47
23324ae1 48 Inactive window caption.
3c4f71cc 49
23324ae1 50 @b wxSYS_COLOUR_MENU
3c4f71cc 51
23324ae1 52 Menu background.
3c4f71cc 53
23324ae1 54 @b wxSYS_COLOUR_WINDOW
3c4f71cc 55
23324ae1 56 Window background.
3c4f71cc 57
23324ae1 58 @b wxSYS_COLOUR_WINDOWFRAME
3c4f71cc 59
23324ae1 60 Window frame.
3c4f71cc 61
23324ae1 62 @b wxSYS_COLOUR_MENUTEXT
3c4f71cc 63
23324ae1 64 Menu text.
3c4f71cc 65
23324ae1 66 @b wxSYS_COLOUR_WINDOWTEXT
3c4f71cc 67
23324ae1 68 Text in windows.
3c4f71cc 69
23324ae1 70 @b wxSYS_COLOUR_CAPTIONTEXT
3c4f71cc 71
23324ae1 72 Text in caption, size box and scrollbar arrow box.
3c4f71cc 73
23324ae1 74 @b wxSYS_COLOUR_ACTIVEBORDER
3c4f71cc 75
23324ae1 76 Active window border.
3c4f71cc 77
23324ae1 78 @b wxSYS_COLOUR_INACTIVEBORDER
3c4f71cc 79
23324ae1 80 Inactive window border.
3c4f71cc 81
23324ae1 82 @b wxSYS_COLOUR_APPWORKSPACE
3c4f71cc 83
23324ae1 84 Background colour MDI applications.
3c4f71cc 85
23324ae1 86 @b wxSYS_COLOUR_HIGHLIGHT
3c4f71cc 87
23324ae1 88 Item(s) selected in a control.
3c4f71cc 89
23324ae1 90 @b wxSYS_COLOUR_HIGHLIGHTTEXT
3c4f71cc 91
23324ae1 92 Text of item(s) selected in a control.
3c4f71cc 93
23324ae1 94 @b wxSYS_COLOUR_BTNFACE
3c4f71cc 95
23324ae1 96 Face shading on push buttons.
3c4f71cc 97
23324ae1 98 @b wxSYS_COLOUR_BTNSHADOW
3c4f71cc 99
23324ae1 100 Edge shading on push buttons.
3c4f71cc 101
23324ae1 102 @b wxSYS_COLOUR_GRAYTEXT
3c4f71cc 103
23324ae1 104 Greyed (disabled) text.
3c4f71cc 105
23324ae1 106 @b wxSYS_COLOUR_BTNTEXT
3c4f71cc 107
23324ae1 108 Text on push buttons.
3c4f71cc 109
23324ae1 110 @b wxSYS_COLOUR_INACTIVECAPTIONTEXT
3c4f71cc 111
23324ae1 112 Colour of text in active captions.
3c4f71cc 113
23324ae1 114 @b wxSYS_COLOUR_BTNHIGHLIGHT
3c4f71cc 115
23324ae1 116 Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
3c4f71cc 117
23324ae1 118 @b wxSYS_COLOUR_3DDKSHADOW
3c4f71cc 119
23324ae1 120 Dark shadow for three-dimensional display elements.
3c4f71cc 121
23324ae1 122 @b wxSYS_COLOUR_3DLIGHT
3c4f71cc 123
23324ae1 124 Light colour for three-dimensional display elements.
3c4f71cc 125
23324ae1 126 @b wxSYS_COLOUR_INFOTEXT
3c4f71cc 127
23324ae1 128 Text colour for tooltip controls.
3c4f71cc 129
23324ae1 130 @b wxSYS_COLOUR_INFOBK
3c4f71cc 131
23324ae1 132 Background colour for tooltip controls.
3c4f71cc 133
23324ae1 134 @b wxSYS_COLOUR_DESKTOP
3c4f71cc 135
23324ae1 136 Same as wxSYS_COLOUR_BACKGROUND.
3c4f71cc 137
23324ae1 138 @b wxSYS_COLOUR_3DFACE
3c4f71cc 139
23324ae1 140 Same as wxSYS_COLOUR_BTNFACE.
3c4f71cc 141
23324ae1 142 @b wxSYS_COLOUR_3DSHADOW
3c4f71cc 143
23324ae1 144 Same as wxSYS_COLOUR_BTNSHADOW.
3c4f71cc 145
23324ae1 146 @b wxSYS_COLOUR_3DHIGHLIGHT
3c4f71cc 147
23324ae1 148 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
3c4f71cc 149
23324ae1 150 @b wxSYS_COLOUR_3DHILIGHT
3c4f71cc 151
23324ae1 152 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
3c4f71cc 153
23324ae1 154 @b wxSYS_COLOUR_BTNHILIGHT
3c4f71cc 155
23324ae1
FM
156 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
157 */
158 static wxColour GetColour(wxSystemColour index);
159
160 /**
161 Returns a system font.
4cc4bfaf 162 @a index can be one of:
3c4f71cc 163
23324ae1 164 @b wxSYS_OEM_FIXED_FONT
3c4f71cc 165
23324ae1 166 Original equipment manufacturer dependent fixed-pitch font.
3c4f71cc 167
23324ae1 168 @b wxSYS_ANSI_FIXED_FONT
3c4f71cc 169
23324ae1 170 Windows fixed-pitch font.
3c4f71cc 171
23324ae1 172 @b wxSYS_ANSI_VAR_FONT
3c4f71cc 173
23324ae1 174 Windows variable-pitch (proportional) font.
3c4f71cc 175
23324ae1 176 @b wxSYS_SYSTEM_FONT
3c4f71cc 177
23324ae1 178 System font.
3c4f71cc 179
23324ae1 180 @b wxSYS_DEVICE_DEFAULT_FONT
3c4f71cc 181
23324ae1 182 Device-dependent font (Windows NT only).
3c4f71cc 183
23324ae1 184 @b wxSYS_DEFAULT_GUI_FONT
3c4f71cc 185
23324ae1
FM
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.
4cc4bfaf 196 The value of @a win determines if the metric returned is a global value or
23324ae1
FM
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).
4cc4bfaf 202 @a index can be one of:
3c4f71cc 203
23324ae1 204 @b wxSYS_MOUSE_BUTTONS
3c4f71cc 205
23324ae1 206 Number of buttons on mouse, or zero if no mouse was installed.
3c4f71cc 207
23324ae1 208 @b wxSYS_BORDER_X
3c4f71cc 209
23324ae1 210 Width of single border.
3c4f71cc 211
23324ae1 212 @b wxSYS_BORDER_Y
3c4f71cc 213
23324ae1 214 Height of single border.
3c4f71cc 215
23324ae1 216 @b wxSYS_CURSOR_X
3c4f71cc 217
23324ae1 218 Width of cursor.
3c4f71cc 219
23324ae1 220 @b wxSYS_CURSOR_Y
3c4f71cc 221
23324ae1 222 Height of cursor.
3c4f71cc 223
23324ae1 224 @b wxSYS_DCLICK_X
3c4f71cc 225
23324ae1
FM
226 Width in pixels of rectangle within which two successive mouse
227 clicks must fall to generate a double-click.
3c4f71cc 228
23324ae1 229 @b wxSYS_DCLICK_Y
3c4f71cc 230
23324ae1
FM
231 Height in pixels of rectangle within which two successive mouse
232 clicks must fall to generate a double-click.
3c4f71cc 233
23324ae1 234 @b wxSYS_DCLICK_MSEC
3c4f71cc 235
23324ae1
FM
236 Maximal time, in milliseconds, which may
237 pass between subsequent clicks for a double click to be generated.
3c4f71cc 238
23324ae1 239 @b wxSYS_DRAG_X
3c4f71cc 240
23324ae1
FM
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.
3c4f71cc 244
23324ae1 245 @b wxSYS_DRAG_Y
3c4f71cc 246
23324ae1
FM
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.
3c4f71cc 250
23324ae1 251 @b wxSYS_EDGE_X
3c4f71cc 252
7c913512 253 Width of a 3D border, in pixels.
3c4f71cc 254
23324ae1 255 @b wxSYS_EDGE_Y
3c4f71cc 256
7c913512 257 Height of a 3D border, in pixels.
3c4f71cc 258
23324ae1 259 @b wxSYS_HSCROLL_ARROW_X
3c4f71cc 260
23324ae1 261 Width of arrow bitmap on horizontal scrollbar.
3c4f71cc 262
23324ae1 263 @b wxSYS_HSCROLL_ARROW_Y
3c4f71cc 264
23324ae1 265 Height of arrow bitmap on horizontal scrollbar.
3c4f71cc 266
23324ae1 267 @b wxSYS_HTHUMB_X
3c4f71cc 268
23324ae1 269 Width of horizontal scrollbar thumb.
3c4f71cc 270
23324ae1 271 @b wxSYS_ICON_X
3c4f71cc 272
23324ae1 273 The default width of an icon.
3c4f71cc 274
23324ae1 275 @b wxSYS_ICON_Y
3c4f71cc 276
23324ae1 277 The default height of an icon.
3c4f71cc 278
23324ae1 279 @b wxSYS_ICONSPACING_X
3c4f71cc 280
23324ae1
FM
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.
3c4f71cc 283
23324ae1 284 @b wxSYS_ICONSPACING_Y
3c4f71cc 285
23324ae1
FM
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.
3c4f71cc 288
23324ae1 289 @b wxSYS_WINDOWMIN_X
3c4f71cc 290
23324ae1 291 Minimum width of a window.
3c4f71cc 292
23324ae1 293 @b wxSYS_WINDOWMIN_Y
3c4f71cc 294
23324ae1 295 Minimum height of a window.
3c4f71cc 296
23324ae1 297 @b wxSYS_SCREEN_X
3c4f71cc 298
23324ae1 299 Width of the screen in pixels.
3c4f71cc 300
23324ae1 301 @b wxSYS_SCREEN_Y
3c4f71cc 302
23324ae1 303 Height of the screen in pixels.
3c4f71cc 304
23324ae1 305 @b wxSYS_FRAMESIZE_X
3c4f71cc 306
23324ae1 307 Width of the window frame for a wxTHICK_FRAME window.
3c4f71cc 308
23324ae1 309 @b wxSYS_FRAMESIZE_Y
3c4f71cc 310
23324ae1 311 Height of the window frame for a wxTHICK_FRAME window.
3c4f71cc 312
23324ae1 313 @b wxSYS_SMALLICON_X
3c4f71cc 314
23324ae1 315 Recommended width of a small icon (in window captions, and small icon view).
3c4f71cc 316
23324ae1 317 @b wxSYS_SMALLICON_Y
3c4f71cc 318
23324ae1 319 Recommended height of a small icon (in window captions, and small icon view).
3c4f71cc 320
23324ae1 321 @b wxSYS_HSCROLL_Y
3c4f71cc 322
23324ae1 323 Height of horizontal scrollbar in pixels.
3c4f71cc 324
23324ae1 325 @b wxSYS_VSCROLL_X
3c4f71cc 326
23324ae1 327 Width of vertical scrollbar in pixels.
3c4f71cc 328
23324ae1 329 @b wxSYS_VSCROLL_ARROW_X
3c4f71cc 330
23324ae1 331 Width of arrow bitmap on a vertical scrollbar.
3c4f71cc 332
23324ae1 333 @b wxSYS_VSCROLL_ARROW_Y
3c4f71cc 334
23324ae1 335 Height of arrow bitmap on a vertical scrollbar.
3c4f71cc 336
23324ae1 337 @b wxSYS_VTHUMB_Y
3c4f71cc 338
23324ae1 339 Height of vertical scrollbar thumb.
3c4f71cc 340
23324ae1 341 @b wxSYS_CAPTION_Y
3c4f71cc 342
23324ae1 343 Height of normal caption area.
3c4f71cc 344
23324ae1 345 @b wxSYS_MENU_Y
3c4f71cc 346
23324ae1 347 Height of single-line menu bar.
3c4f71cc 348
23324ae1 349 @b wxSYS_NETWORK_PRESENT
3c4f71cc 350
23324ae1 351 1 if there is a network present, 0 otherwise.
3c4f71cc 352
23324ae1 353 @b wxSYS_PENWINDOWS_PRESENT
3c4f71cc 354
23324ae1 355 1 if PenWindows is installed, 0 otherwise.
3c4f71cc 356
23324ae1 357 @b wxSYS_SHOW_SOUNDS
3c4f71cc 358
23324ae1
FM
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.
3c4f71cc 363
23324ae1 364 @b wxSYS_SWAP_BUTTONS
3c4f71cc 365
23324ae1
FM
366 Non-zero if the meanings of the left and right mouse buttons are swapped; zero
367 otherwise.
3c4f71cc 368
4cc4bfaf
FM
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
23324ae1
FM
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 */
4cc4bfaf 378 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
23324ae1
FM
379
380 /**
381 Returns the screen type. The return value is one of:
3c4f71cc 382
23324ae1 383 @b wxSYS_SCREEN_NONE
3c4f71cc 384
23324ae1 385 Undefined screen type
3c4f71cc 386
23324ae1 387 @b wxSYS_SCREEN_TINY
3c4f71cc 388
23324ae1 389 Tiny screen, less than 320x240
3c4f71cc 390
23324ae1 391 @b wxSYS_SCREEN_PDA
3c4f71cc 392
23324ae1 393 PDA screen, 320x240 or more but less than 640x480
3c4f71cc 394
23324ae1 395 @b wxSYS_SCREEN_SMALL
3c4f71cc 396
23324ae1 397 Small screen, 640x480 or more but less than 800x600
3c4f71cc 398
23324ae1 399 @b wxSYS_SCREEN_DESKTOP
3c4f71cc 400
23324ae1
FM
401 Desktop screen, 800x600 or more
402 */
403 static wxSystemScreenType GetScreenType();
404};
e54c96f1 405