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