]>
git.saurik.com Git - wxWidgets.git/blob - interface/settings.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSystemSettings
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.
22 class wxSystemSettings
: public wxObject
26 Default constructor. You don't need to create an instance of wxSystemSettings
27 since all of its functions are static.
32 Returns a system colour.
33 @a index can be one of:
35 @b wxSYS_COLOUR_SCROLLBAR
37 The scrollbar grey area.
39 @b wxSYS_COLOUR_BACKGROUND
43 @b wxSYS_COLOUR_ACTIVECAPTION
45 Active window caption.
47 @b wxSYS_COLOUR_INACTIVECAPTION
49 Inactive window caption.
55 @b wxSYS_COLOUR_WINDOW
59 @b wxSYS_COLOUR_WINDOWFRAME
63 @b wxSYS_COLOUR_MENUTEXT
67 @b wxSYS_COLOUR_WINDOWTEXT
71 @b wxSYS_COLOUR_CAPTIONTEXT
73 Text in caption, size box and scrollbar arrow box.
75 @b wxSYS_COLOUR_ACTIVEBORDER
79 @b wxSYS_COLOUR_INACTIVEBORDER
81 Inactive window border.
83 @b wxSYS_COLOUR_APPWORKSPACE
85 Background colour MDI applications.
87 @b wxSYS_COLOUR_HIGHLIGHT
89 Item(s) selected in a control.
91 @b wxSYS_COLOUR_HIGHLIGHTTEXT
93 Text of item(s) selected in a control.
95 @b wxSYS_COLOUR_BTNFACE
97 Face shading on push buttons.
99 @b wxSYS_COLOUR_BTNSHADOW
101 Edge shading on push buttons.
103 @b wxSYS_COLOUR_GRAYTEXT
105 Greyed (disabled) text.
107 @b wxSYS_COLOUR_BTNTEXT
109 Text on push buttons.
111 @b wxSYS_COLOUR_INACTIVECAPTIONTEXT
113 Colour of text in active captions.
115 @b wxSYS_COLOUR_BTNHIGHLIGHT
117 Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
119 @b wxSYS_COLOUR_3DDKSHADOW
121 Dark shadow for three-dimensional display elements.
123 @b wxSYS_COLOUR_3DLIGHT
125 Light colour for three-dimensional display elements.
127 @b wxSYS_COLOUR_INFOTEXT
129 Text colour for tooltip controls.
131 @b wxSYS_COLOUR_INFOBK
133 Background colour for tooltip controls.
135 @b wxSYS_COLOUR_DESKTOP
137 Same as wxSYS_COLOUR_BACKGROUND.
139 @b wxSYS_COLOUR_3DFACE
141 Same as wxSYS_COLOUR_BTNFACE.
143 @b wxSYS_COLOUR_3DSHADOW
145 Same as wxSYS_COLOUR_BTNSHADOW.
147 @b wxSYS_COLOUR_3DHIGHLIGHT
149 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
151 @b wxSYS_COLOUR_3DHILIGHT
153 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
155 @b wxSYS_COLOUR_BTNHILIGHT
157 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
159 static wxColour
GetColour(wxSystemColour index
);
162 Returns a system font.
163 @a index can be one of:
165 @b wxSYS_OEM_FIXED_FONT
167 Original equipment manufacturer dependent fixed-pitch font.
169 @b wxSYS_ANSI_FIXED_FONT
171 Windows fixed-pitch font.
173 @b wxSYS_ANSI_VAR_FONT
175 Windows variable-pitch (proportional) font.
181 @b wxSYS_DEVICE_DEFAULT_FONT
183 Device-dependent font (Windows NT only).
185 @b wxSYS_DEFAULT_GUI_FONT
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.
192 static wxFont
GetFont(wxSystemFont index
);
195 Returns the value of a system metric, or -1 if the metric is not supported on
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
201 metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y
203 @a index can be one of:
205 @b wxSYS_MOUSE_BUTTONS
207 Number of buttons on mouse, or zero if no mouse was installed.
211 Width of single border.
215 Height of single border.
227 Width in pixels of rectangle within which two successive mouse
228 clicks must fall to generate a double-click.
232 Height in pixels of rectangle within which two successive mouse
233 clicks must fall to generate a double-click.
237 Maximal time, in milliseconds, which may
238 pass between subsequent clicks for a double click to be generated.
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
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
254 Width of a 3D border, in pixels.
258 Height of a 3D border, in pixels.
260 @b wxSYS_HSCROLL_ARROW_X
262 Width of arrow bitmap on horizontal scrollbar.
264 @b wxSYS_HSCROLL_ARROW_Y
266 Height of arrow bitmap on horizontal scrollbar.
270 Width of horizontal scrollbar thumb.
274 The default width of an icon.
278 The default height of an icon.
280 @b wxSYS_ICONSPACING_X
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.
285 @b wxSYS_ICONSPACING_Y
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.
292 Minimum width of a window.
296 Minimum height of a window.
300 Width of the screen in pixels.
304 Height of the screen in pixels.
308 Width of the window frame for a wxTHICK_FRAME window.
312 Height of the window frame for a wxTHICK_FRAME window.
316 Recommended width of a small icon (in window captions, and small icon view).
320 Recommended height of a small icon (in window captions, and small icon view).
324 Height of horizontal scrollbar in pixels.
328 Width of vertical scrollbar in pixels.
330 @b wxSYS_VSCROLL_ARROW_X
332 Width of arrow bitmap on a vertical scrollbar.
334 @b wxSYS_VSCROLL_ARROW_Y
336 Height of arrow bitmap on a vertical scrollbar.
340 Height of vertical scrollbar thumb.
344 Height of normal caption area.
348 Height of single-line menu bar.
350 @b wxSYS_NETWORK_PRESENT
352 1 if there is a network present, 0 otherwise.
354 @b wxSYS_PENWINDOWS_PRESENT
356 1 if PenWindows is installed, 0 otherwise.
360 Non-zero if the user requires an application to present information visually in
362 where it would otherwise present the information only in audible form; zero
365 @b wxSYS_SWAP_BUTTONS
367 Non-zero if the meanings of the left and right mouse buttons are swapped; zero
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
379 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
382 Returns the screen type. The return value is one of:
386 Undefined screen type
390 Tiny screen, less than 320x240
394 PDA screen, 320x240 or more but less than 640x480
396 @b wxSYS_SCREEN_SMALL
398 Small screen, 640x480 or more but less than 800x600
400 @b wxSYS_SCREEN_DESKTOP
402 Desktop screen, 800x600 or more
404 static wxSystemScreenType
GetScreenType();