]>
git.saurik.com Git - wxWidgets.git/blob - interface/settings.h
10ff1cea2e138cc570853012f2ecfc2499c04a03
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxSystemSettings class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxSystemSettings
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.
23 class wxSystemSettings
: public wxObject
27 Default constructor. You don't need to create an instance of wxSystemSettings
28 since all of its functions are static.
33 Returns a system colour.
35 @e index can be one of:
38 @b wxSYS_COLOUR_SCROLLBAR
41 The scrollbar grey area.
43 @b wxSYS_COLOUR_BACKGROUND
48 @b wxSYS_COLOUR_ACTIVECAPTION
51 Active window caption.
53 @b wxSYS_COLOUR_INACTIVECAPTION
56 Inactive window caption.
63 @b wxSYS_COLOUR_WINDOW
68 @b wxSYS_COLOUR_WINDOWFRAME
73 @b wxSYS_COLOUR_MENUTEXT
78 @b wxSYS_COLOUR_WINDOWTEXT
83 @b wxSYS_COLOUR_CAPTIONTEXT
86 Text in caption, size box and scrollbar arrow box.
88 @b wxSYS_COLOUR_ACTIVEBORDER
93 @b wxSYS_COLOUR_INACTIVEBORDER
96 Inactive window border.
98 @b wxSYS_COLOUR_APPWORKSPACE
101 Background colour MDI applications.
103 @b wxSYS_COLOUR_HIGHLIGHT
106 Item(s) selected in a control.
108 @b wxSYS_COLOUR_HIGHLIGHTTEXT
111 Text of item(s) selected in a control.
113 @b wxSYS_COLOUR_BTNFACE
116 Face shading on push buttons.
118 @b wxSYS_COLOUR_BTNSHADOW
121 Edge shading on push buttons.
123 @b wxSYS_COLOUR_GRAYTEXT
126 Greyed (disabled) text.
128 @b wxSYS_COLOUR_BTNTEXT
131 Text on push buttons.
133 @b wxSYS_COLOUR_INACTIVECAPTIONTEXT
136 Colour of text in active captions.
138 @b wxSYS_COLOUR_BTNHIGHLIGHT
141 Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
143 @b wxSYS_COLOUR_3DDKSHADOW
146 Dark shadow for three-dimensional display elements.
148 @b wxSYS_COLOUR_3DLIGHT
151 Light colour for three-dimensional display elements.
153 @b wxSYS_COLOUR_INFOTEXT
156 Text colour for tooltip controls.
158 @b wxSYS_COLOUR_INFOBK
161 Background colour for tooltip controls.
163 @b wxSYS_COLOUR_DESKTOP
166 Same as wxSYS_COLOUR_BACKGROUND.
168 @b wxSYS_COLOUR_3DFACE
171 Same as wxSYS_COLOUR_BTNFACE.
173 @b wxSYS_COLOUR_3DSHADOW
176 Same as wxSYS_COLOUR_BTNSHADOW.
178 @b wxSYS_COLOUR_3DHIGHLIGHT
181 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
183 @b wxSYS_COLOUR_3DHILIGHT
186 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
188 @b wxSYS_COLOUR_BTNHILIGHT
191 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
193 static wxColour
GetColour(wxSystemColour index
);
196 Returns a system font.
198 @e index can be one of:
201 @b wxSYS_OEM_FIXED_FONT
204 Original equipment manufacturer dependent fixed-pitch font.
206 @b wxSYS_ANSI_FIXED_FONT
209 Windows fixed-pitch font.
211 @b wxSYS_ANSI_VAR_FONT
214 Windows variable-pitch (proportional) font.
221 @b wxSYS_DEVICE_DEFAULT_FONT
224 Device-dependent font (Windows NT only).
226 @b wxSYS_DEFAULT_GUI_FONT
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.
234 static wxFont
GetFont(wxSystemFont index
);
237 Returns the value of a system metric, or -1 if the metric is not supported on
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
243 metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y
246 @e index can be one of:
249 @b wxSYS_MOUSE_BUTTONS
252 Number of buttons on mouse, or zero if no mouse was installed.
257 Width of single border.
262 Height of single border.
277 Width in pixels of rectangle within which two successive mouse
278 clicks must fall to generate a double-click.
283 Height in pixels of rectangle within which two successive mouse
284 clicks must fall to generate a double-click.
289 Maximal time, in milliseconds, which may
290 pass between subsequent clicks for a double click to be generated.
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
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
309 Width of a 3D border, in pixels.
314 Height of a 3D border, in pixels.
316 @b wxSYS_HSCROLL_ARROW_X
319 Width of arrow bitmap on horizontal scrollbar.
321 @b wxSYS_HSCROLL_ARROW_Y
324 Height of arrow bitmap on horizontal scrollbar.
329 Width of horizontal scrollbar thumb.
334 The default width of an icon.
339 The default height of an icon.
341 @b wxSYS_ICONSPACING_X
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.
347 @b wxSYS_ICONSPACING_Y
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.
356 Minimum width of a window.
361 Minimum height of a window.
366 Width of the screen in pixels.
371 Height of the screen in pixels.
376 Width of the window frame for a wxTHICK_FRAME window.
381 Height of the window frame for a wxTHICK_FRAME window.
386 Recommended width of a small icon (in window captions, and small icon view).
391 Recommended height of a small icon (in window captions, and small icon view).
396 Height of horizontal scrollbar in pixels.
401 Width of vertical scrollbar in pixels.
403 @b wxSYS_VSCROLL_ARROW_X
406 Width of arrow bitmap on a vertical scrollbar.
408 @b wxSYS_VSCROLL_ARROW_Y
411 Height of arrow bitmap on a vertical scrollbar.
416 Height of vertical scrollbar thumb.
421 Height of normal caption area.
426 Height of single-line menu bar.
428 @b wxSYS_NETWORK_PRESENT
431 1 if there is a network present, 0 otherwise.
433 @b wxSYS_PENWINDOWS_PRESENT
436 1 if PenWindows is installed, 0 otherwise.
441 Non-zero if the user requires an application to present information visually in
443 where it would otherwise present the information only in audible form; zero
446 @b wxSYS_SWAP_BUTTONS
449 Non-zero if the meanings of the left and right mouse buttons are swapped; zero
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
461 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= @NULL
);
464 Returns the screen type. The return value is one of:
470 Undefined screen type
475 Tiny screen, less than 320x240
480 PDA screen, 320x240 or more but less than 640x480
482 @b wxSYS_SCREEN_SMALL
485 Small screen, 640x480 or more but less than 800x600
487 @b wxSYS_SCREEN_DESKTOP
490 Desktop screen, 800x600 or more
492 static wxSystemScreenType
GetScreenType();