]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/settings.h
Add ctors for wxFileSystemWatcherEvent
[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$
526954c5 6// Licence: wxWindows licence
23324ae1
FM
7/////////////////////////////////////////////////////////////////////////////
8
4876436a
FM
9
10/**
11 Possible values for wxSystemSettings::GetFont() parameter.
d6e329cf 12
a4d291f0
FM
13 These values map 1:1 the native values supported by the Windows' @c GetStockObject
14 function. Note that other ports (other than wxMSW) will try to provide meaningful
15 fonts but they usually map the same font to various @c wxSYS_*_FONT values.
4876436a
FM
16*/
17enum wxSystemFont
18{
a4d291f0
FM
19 /// Original equipment manufacturer dependent fixed-pitch font.
20 wxSYS_OEM_FIXED_FONT = 10,
d6e329cf 21
a4d291f0
FM
22 /// Windows fixed-pitch (monospaced) font.
23 wxSYS_ANSI_FIXED_FONT,
d6e329cf 24
a4d291f0
FM
25 /// Windows variable-pitch (proportional) font.
26 wxSYS_ANSI_VAR_FONT,
27
d6e329cf 28 /// System font. By default, the system uses the system font to draw menus,
a4d291f0
FM
29 /// dialog box controls, and text.
30 wxSYS_SYSTEM_FONT,
d6e329cf 31
a4d291f0
FM
32 /// Device-dependent font (Windows NT and later only).
33 wxSYS_DEVICE_DEFAULT_FONT,
4876436a
FM
34
35 /**
36 Default font for user interface objects such as menus and dialog boxes.
37 Note that with modern GUIs nothing guarantees that the same font is used
38 for all GUI elements, so some controls might use a different font by default.
39 */
40 wxSYS_DEFAULT_GUI_FONT
41};
42
43
44/**
45 Possible values for wxSystemSettings::GetColour() parameter.
d6e329cf 46
a4d291f0
FM
47 These values map 1:1 the native values supported by the Windows' @c GetSysColor
48 function. Note that other ports (other than wxMSW) will try to provide meaningful
49 colours but they usually map the same colour to various @c wxSYS_COLOUR_* values.
4876436a
FM
50*/
51enum wxSystemColour
52{
53 wxSYS_COLOUR_SCROLLBAR, //!< The scrollbar grey area.
a4d291f0
FM
54 wxSYS_COLOUR_DESKTOP, //!< The desktop colour.
55 wxSYS_COLOUR_ACTIVECAPTION, //!< Active window caption colour.
56 wxSYS_COLOUR_INACTIVECAPTION, //!< Inactive window caption colour.
57 wxSYS_COLOUR_MENU, //!< Menu background colour.
58 wxSYS_COLOUR_WINDOW, //!< Window background colour.
59 wxSYS_COLOUR_WINDOWFRAME, //!< Window frame colour.
60 wxSYS_COLOUR_MENUTEXT, //!< Colour of the text used in the menus.
61 wxSYS_COLOUR_WINDOWTEXT, //!< Colour of the text used in generic windows.
62 wxSYS_COLOUR_CAPTIONTEXT, //!< Colour of the text used in captions, size boxes and scrollbar arrow boxes.
63 wxSYS_COLOUR_ACTIVEBORDER, //!< Active window border colour.
64 wxSYS_COLOUR_INACTIVEBORDER, //!< Inactive window border colour.
65 wxSYS_COLOUR_APPWORKSPACE, //!< Background colour for MDI applications.
66 wxSYS_COLOUR_HIGHLIGHT, //!< Colour of item(s) selected in a control.
67 wxSYS_COLOUR_HIGHLIGHTTEXT, //!< Colour of the text of item(s) selected in a control.
68 wxSYS_COLOUR_BTNFACE, //!< Face shading colour on push buttons.
69 wxSYS_COLOUR_BTNSHADOW, //!< Edge shading colour on push buttons.
70 wxSYS_COLOUR_GRAYTEXT, //!< Colour of greyed (disabled) text.
71 wxSYS_COLOUR_BTNTEXT, //!< Colour of the text on push buttons.
72 wxSYS_COLOUR_INACTIVECAPTIONTEXT, //!< Colour of the text in active captions.
73 wxSYS_COLOUR_BTNHIGHLIGHT, //!< Highlight colour for buttons.
74 wxSYS_COLOUR_3DDKSHADOW, //!< Dark shadow colour for three-dimensional display elements.
4876436a
FM
75 wxSYS_COLOUR_3DLIGHT, //!< Light colour for three-dimensional display elements.
76 wxSYS_COLOUR_INFOTEXT, //!< Text colour for tooltip controls.
77 wxSYS_COLOUR_INFOBK, //!< Background colour for tooltip controls.
d13b34d3 78 wxSYS_COLOUR_LISTBOX, //!< Background colour for list-like controls.
a4d291f0 79 wxSYS_COLOUR_HOTLIGHT, //!< Colour for a hyperlink or hot-tracked item.
d6e329cf 80
a4d291f0 81 /**
d6e329cf 82 Right side colour in the color gradient of an active window's title bar.
a4d291f0
FM
83 @c wxSYS_COLOUR_ACTIVECAPTION specifies the left side color.
84 */
4876436a 85 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
d6e329cf 86
a4d291f0 87 /**
d6e329cf 88 Right side colour in the color gradient of an inactive window's title bar.
a4d291f0
FM
89 @c wxSYS_COLOUR_INACTIVECAPTION specifies the left side color.
90 */
4876436a 91 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
d6e329cf 92
a4d291f0 93 /**
d6e329cf 94 The colour used to highlight menu items when the menu appears as a flat menu.
a4d291f0
FM
95 The highlighted menu item is outlined with @c wxSYS_COLOUR_HIGHLIGHT.
96 */
4876436a 97 wxSYS_COLOUR_MENUHILIGHT,
d6e329cf 98
a4d291f0 99 /**
d6e329cf 100 The background colour for the menu bar when menus appear as flat menus.
a4d291f0
FM
101 However, @c wxSYS_COLOUR_MENU continues to specify the background color of the menu popup.
102 */
4876436a 103 wxSYS_COLOUR_MENUBAR,
d6e329cf 104
9f2968ad
VZ
105 /**
106 Text colour for list-like controls.
d6e329cf 107
9f2968ad
VZ
108 @since 2.9.0
109 */
110 wxSYS_COLOUR_LISTBOXTEXT,
4876436a 111
887b919b
JS
112 /**
113 Text colour for the unfocused selection of list-like controls.
114
115 @since 2.9.1
116 */
117 wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT,
118
d6e329cf
FM
119 wxSYS_COLOUR_MAX
120
121
122
a4d291f0 123 // synonyms:
d6e329cf 124
a4d291f0
FM
125 wxSYS_COLOUR_BACKGROUND = wxSYS_COLOUR_DESKTOP,
126 //!< Synonym for @c wxSYS_COLOUR_DESKTOP.
127 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
128 //!< Synonym for @c wxSYS_COLOUR_BTNFACE.
129 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
130 //!< Synonym for @c wxSYS_COLOUR_BTNSHADOW.
131 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
132 //!< Synonym for @c wxSYS_COLOUR_BTNHIGHLIGHT.
133 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
134 //!< Synonym for @c wxSYS_COLOUR_BTNHIGHLIGHT.
135 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
136 //!< Synonym for @c wxSYS_COLOUR_BTNHIGHLIGHT.
d6e329cf 137
a4d291f0 138 /**
d13b34d3 139 Synonym for @c wxSYS_COLOUR_BTNFACE.
d6e329cf 140
a4d291f0
FM
141 On wxMSW this colour should be used as the background colour of
142 wxFrames which are used as containers of controls; this is in fact the
d6e329cf
FM
143 same colour used for the borders of controls like e.g. wxNotebook or
144 for the background of e.g. wxPanel.
145
a4d291f0
FM
146 @since 2.9.0
147 */
d6e329cf 148 wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE
4876436a
FM
149};
150
151/**
152 Possible values for wxSystemSettings::GetMetric() index parameter.
153*/
154enum wxSystemMetric
155{
156 wxSYS_MOUSE_BUTTONS, //!< Number of buttons on mouse, or zero if no mouse was installed.
157 wxSYS_BORDER_X, //!< Width of single border.
158 wxSYS_BORDER_Y, //!< Height of single border.
159 wxSYS_CURSOR_X, //!< Width of cursor.
160 wxSYS_CURSOR_Y, //!< Height of cursor.
161 wxSYS_DCLICK_X, //!< Width in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
162 wxSYS_DCLICK_Y, //!< Height in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
4876436a
FM
163 wxSYS_DRAG_X, //!< Width in pixels of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins.
164 wxSYS_DRAG_Y, //!< Height in pixels of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins.
165 wxSYS_EDGE_X, //!< Width of a 3D border, in pixels.
166 wxSYS_EDGE_Y, //!< Height of a 3D border, in pixels.
167 wxSYS_HSCROLL_ARROW_X, //!< Width of arrow bitmap on horizontal scrollbar.
168 wxSYS_HSCROLL_ARROW_Y, //!< Height of arrow bitmap on horizontal scrollbar.
169 wxSYS_HTHUMB_X, //!< Width of horizontal scrollbar thumb.
170 wxSYS_ICON_X, //!< The default width of an icon.
171 wxSYS_ICON_Y, //!< The default height of an icon.
172 wxSYS_ICONSPACING_X, //!< Width of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of this size when arranged.
173 wxSYS_ICONSPACING_Y, //!< Height of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of this size when arranged.
174 wxSYS_WINDOWMIN_X, //!< Minimum width of a window.
175 wxSYS_WINDOWMIN_Y, //!< Minimum height of a window.
176 wxSYS_SCREEN_X, //!< Width of the screen in pixels.
177 wxSYS_SCREEN_Y, //!< Height of the screen in pixels.
178 wxSYS_FRAMESIZE_X, //!< Width of the window frame for a wxTHICK_FRAME window.
179 wxSYS_FRAMESIZE_Y, //!< Height of the window frame for a wxTHICK_FRAME window.
180 wxSYS_SMALLICON_X, //!< Recommended width of a small icon (in window captions, and small icon view).
181 wxSYS_SMALLICON_Y, //!< Recommended height of a small icon (in window captions, and small icon view).
182 wxSYS_HSCROLL_Y, //!< Height of horizontal scrollbar in pixels.
183 wxSYS_VSCROLL_X, //!< Width of vertical scrollbar in pixels.
184 wxSYS_VSCROLL_ARROW_X, //!< Width of arrow bitmap on a vertical scrollbar.
185 wxSYS_VSCROLL_ARROW_Y, //!< Height of arrow bitmap on a vertical scrollbar.
186 wxSYS_VTHUMB_Y, //!< Height of vertical scrollbar thumb.
187 wxSYS_CAPTION_Y, //!< Height of normal caption area.
188 wxSYS_MENU_Y, //!< Height of single-line menu bar.
189 wxSYS_NETWORK_PRESENT, //!< 1 if there is a network present, 0 otherwise.
190 wxSYS_PENWINDOWS_PRESENT, //!< 1 if PenWindows is installed, 0 otherwise.
191 wxSYS_SHOW_SOUNDS, //!< Non-zero if the user requires an application to present information
192 //!< visually in situations where it would otherwise present the information
193 //!< only in audible form; zero otherwise.
194 wxSYS_SWAP_BUTTONS, //!< Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise.
30dc2e86 195 wxSYS_DCLICK_MSEC //!< Maximal time, in milliseconds, which may pass between subsequent clicks for a double click to be generated.
4876436a
FM
196};
197
198/**
199 Possible values for wxSystemSettings::HasFeature() parameter.
200*/
201enum wxSystemFeature
202{
203 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
204 wxSYS_CAN_ICONIZE_FRAME,
205 wxSYS_TABLET_PRESENT
206};
207
208/**
d6e329cf 209 Values for different screen designs. See wxSystemSettings::GetScreenType().
4876436a
FM
210*/
211enum wxSystemScreenType
212{
213 wxSYS_SCREEN_NONE = 0, //!< Undefined screen type.
214
215 wxSYS_SCREEN_TINY, //!< Tiny screen, less than 320x240
216 wxSYS_SCREEN_PDA, //!< PDA screen, 320x240 or more but less than 640x480
217 wxSYS_SCREEN_SMALL, //!< Small screen, 640x480 or more but less than 800x600
218 wxSYS_SCREEN_DESKTOP //!< Desktop screen, 800x600 or more
219};
220
221
23324ae1
FM
222/**
223 @class wxSystemSettings
7c913512 224
4876436a 225 wxSystemSettings allows the application to ask for details about the system.
e3527f7b
FM
226
227 This can include settings such as standard colours, fonts, and user interface
228 element sizes.
7c913512 229
23324ae1 230 @library{wxcore}
3c99e2fd 231 @category{cfg}
7c913512 232
d6e329cf 233 @see wxFont, wxColour, wxSystemOptions
23324ae1
FM
234*/
235class wxSystemSettings : public wxObject
236{
237public:
238 /**
4876436a
FM
239 Default constructor.
240
241 You don't need to create an instance of wxSystemSettings
23324ae1
FM
242 since all of its functions are static.
243 */
244 wxSystemSettings();
245
246 /**
247 Returns a system colour.
e3527f7b
FM
248
249 @param index
250 Can be one of the ::wxSystemColour enum values.
251
252 @return
253 The returned colour is always valid.
23324ae1
FM
254 */
255 static wxColour GetColour(wxSystemColour index);
256
257 /**
258 Returns a system font.
e3527f7b
FM
259
260 @param index
261 Can be one of the ::wxSystemFont enum values.
262
263 @return
264 The returned font is always valid.
23324ae1
FM
265 */
266 static wxFont GetFont(wxSystemFont index);
267
268 /**
269 Returns the value of a system metric, or -1 if the metric is not supported on
270 the current system.
4876436a 271
4cc4bfaf 272 The value of @a win determines if the metric returned is a global value or
23324ae1
FM
273 a wxWindow based value, in which case it might determine the widget, the
274 display the window is on, or something similar. The window given should be as
d13b34d3 275 close to the metric as possible (e.g. a wxTopLevelWindow in case of the
4876436a 276 wxSYS_CAPTION_Y metric).
3c4f71cc 277
4876436a 278 @a index can be one of the ::wxSystemMetric enum values.
3c4f71cc 279
4cc4bfaf
FM
280 @a win is a pointer to the window for which the metric is requested.
281 Specifying the @a win parameter is encouraged, because some metrics on some
4876436a
FM
282 ports are not supported without one,or they might be capable of reporting
283 better values if given one. If a window does not make sense for a metric,
23324ae1 284 one should still be given, as for example it might determine which displays
4876436a 285 cursor width is requested with wxSYS_CURSOR_X.
23324ae1 286 */
4cc4bfaf 287 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
23324ae1
FM
288
289 /**
4876436a
FM
290 Returns the screen type.
291 The return value is one of the ::wxSystemScreenType enum values.
23324ae1
FM
292 */
293 static wxSystemScreenType GetScreenType();
d6e329cf
FM
294
295 /**
296 Returns @true if the port has certain feature.
297 See the ::wxSystemFeature enum values.
298 */
299 static bool HasFeature(wxSystemFeature index);
23324ae1 300};
e54c96f1 301