]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/settings.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSystemSettings
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxSystemSettings
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.
21 class wxSystemSettings
: public wxObject
25 Default constructor. You don't need to create an instance of wxSystemSettings
26 since all of its functions are static.
31 Returns a system colour.
32 @a index can be one of:
34 @b wxSYS_COLOUR_SCROLLBAR
36 The scrollbar grey area.
38 @b wxSYS_COLOUR_BACKGROUND
42 @b wxSYS_COLOUR_ACTIVECAPTION
44 Active window caption.
46 @b wxSYS_COLOUR_INACTIVECAPTION
48 Inactive window caption.
54 @b wxSYS_COLOUR_WINDOW
58 @b wxSYS_COLOUR_WINDOWFRAME
62 @b wxSYS_COLOUR_MENUTEXT
66 @b wxSYS_COLOUR_WINDOWTEXT
70 @b wxSYS_COLOUR_CAPTIONTEXT
72 Text in caption, size box and scrollbar arrow box.
74 @b wxSYS_COLOUR_ACTIVEBORDER
78 @b wxSYS_COLOUR_INACTIVEBORDER
80 Inactive window border.
82 @b wxSYS_COLOUR_APPWORKSPACE
84 Background colour MDI applications.
86 @b wxSYS_COLOUR_HIGHLIGHT
88 Item(s) selected in a control.
90 @b wxSYS_COLOUR_HIGHLIGHTTEXT
92 Text of item(s) selected in a control.
94 @b wxSYS_COLOUR_BTNFACE
96 Face shading on push buttons.
98 @b wxSYS_COLOUR_BTNSHADOW
100 Edge shading on push buttons.
102 @b wxSYS_COLOUR_GRAYTEXT
104 Greyed (disabled) text.
106 @b wxSYS_COLOUR_BTNTEXT
108 Text on push buttons.
110 @b wxSYS_COLOUR_INACTIVECAPTIONTEXT
112 Colour of text in active captions.
114 @b wxSYS_COLOUR_BTNHIGHLIGHT
116 Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
118 @b wxSYS_COLOUR_3DDKSHADOW
120 Dark shadow for three-dimensional display elements.
122 @b wxSYS_COLOUR_3DLIGHT
124 Light colour for three-dimensional display elements.
126 @b wxSYS_COLOUR_INFOTEXT
128 Text colour for tooltip controls.
130 @b wxSYS_COLOUR_INFOBK
132 Background colour for tooltip controls.
134 @b wxSYS_COLOUR_DESKTOP
136 Same as wxSYS_COLOUR_BACKGROUND.
138 @b wxSYS_COLOUR_3DFACE
140 Same as wxSYS_COLOUR_BTNFACE.
142 @b wxSYS_COLOUR_3DSHADOW
144 Same as wxSYS_COLOUR_BTNSHADOW.
146 @b wxSYS_COLOUR_3DHIGHLIGHT
148 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
150 @b wxSYS_COLOUR_3DHILIGHT
152 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
154 @b wxSYS_COLOUR_BTNHILIGHT
156 Same as wxSYS_COLOUR_BTNHIGHLIGHT.
158 static wxColour
GetColour(wxSystemColour index
);
161 Returns a system font.
162 @a index can be one of:
164 @b wxSYS_OEM_FIXED_FONT
166 Original equipment manufacturer dependent fixed-pitch font.
168 @b wxSYS_ANSI_FIXED_FONT
170 Windows fixed-pitch font.
172 @b wxSYS_ANSI_VAR_FONT
174 Windows variable-pitch (proportional) font.
180 @b wxSYS_DEVICE_DEFAULT_FONT
182 Device-dependent font (Windows NT only).
184 @b wxSYS_DEFAULT_GUI_FONT
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.
191 static wxFont
GetFont(wxSystemFont index
);
194 Returns the value of a system metric, or -1 if the metric is not supported on
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
200 metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y
202 @a index can be one of:
204 @b wxSYS_MOUSE_BUTTONS
206 Number of buttons on mouse, or zero if no mouse was installed.
210 Width of single border.
214 Height of single border.
226 Width in pixels of rectangle within which two successive mouse
227 clicks must fall to generate a double-click.
231 Height in pixels of rectangle within which two successive mouse
232 clicks must fall to generate a double-click.
236 Maximal time, in milliseconds, which may
237 pass between subsequent clicks for a double click to be generated.
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
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
253 Width of a 3D border, in pixels.
257 Height of a 3D border, in pixels.
259 @b wxSYS_HSCROLL_ARROW_X
261 Width of arrow bitmap on horizontal scrollbar.
263 @b wxSYS_HSCROLL_ARROW_Y
265 Height of arrow bitmap on horizontal scrollbar.
269 Width of horizontal scrollbar thumb.
273 The default width of an icon.
277 The default height of an icon.
279 @b wxSYS_ICONSPACING_X
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.
284 @b wxSYS_ICONSPACING_Y
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.
291 Minimum width of a window.
295 Minimum height of a window.
299 Width of the screen in pixels.
303 Height of the screen in pixels.
307 Width of the window frame for a wxTHICK_FRAME window.
311 Height of the window frame for a wxTHICK_FRAME window.
315 Recommended width of a small icon (in window captions, and small icon view).
319 Recommended height of a small icon (in window captions, and small icon view).
323 Height of horizontal scrollbar in pixels.
327 Width of vertical scrollbar in pixels.
329 @b wxSYS_VSCROLL_ARROW_X
331 Width of arrow bitmap on a vertical scrollbar.
333 @b wxSYS_VSCROLL_ARROW_Y
335 Height of arrow bitmap on a vertical scrollbar.
339 Height of vertical scrollbar thumb.
343 Height of normal caption area.
347 Height of single-line menu bar.
349 @b wxSYS_NETWORK_PRESENT
351 1 if there is a network present, 0 otherwise.
353 @b wxSYS_PENWINDOWS_PRESENT
355 1 if PenWindows is installed, 0 otherwise.
359 Non-zero if the user requires an application to present information visually in
361 where it would otherwise present the information only in audible form; zero
364 @b wxSYS_SWAP_BUTTONS
366 Non-zero if the meanings of the left and right mouse buttons are swapped; zero
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
378 static int GetMetric(wxSystemMetric index
, wxWindow
* win
= NULL
);
381 Returns the screen type. The return value is one of:
385 Undefined screen type
389 Tiny screen, less than 320x240
393 PDA screen, 320x240 or more but less than 640x480
395 @b wxSYS_SCREEN_SMALL
397 Small screen, 640x480 or more but less than 800x600
399 @b wxSYS_SCREEN_DESKTOP
401 Desktop screen, 800x600 or more
403 static wxSystemScreenType
GetScreenType();