]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/settings.h
Cleanup of wxSocket::_Wait():
[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$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
4876436a
FM
9
10/**
11 Possible values for wxSystemSettings::GetFont() parameter.
12*/
13enum wxSystemFont
14{
15 wxSYS_OEM_FIXED_FONT = 10, //!< Original equipment manufacturer dependent fixed-pitch font.
16 wxSYS_ANSI_FIXED_FONT, //!< Windows fixed-pitch font.
17 wxSYS_ANSI_VAR_FONT, //!< Windows variable-pitch (proportional) font.
18 wxSYS_SYSTEM_FONT, //!< System font.
19 wxSYS_DEVICE_DEFAULT_FONT, //!< Device-dependent font (Windows NT only).
20 wxSYS_DEFAULT_PALETTE, //!< @todo docme.
21 wxSYS_SYSTEM_FIXED_FONT, //!< @todo docme.
22
23 /**
24 Default font for user interface objects such as menus and dialog boxes.
25 Note that with modern GUIs nothing guarantees that the same font is used
26 for all GUI elements, so some controls might use a different font by default.
27 */
28 wxSYS_DEFAULT_GUI_FONT
29};
30
31
32/**
33 Possible values for wxSystemSettings::GetColour() parameter.
34*/
35enum wxSystemColour
36{
37 wxSYS_COLOUR_SCROLLBAR, //!< The scrollbar grey area.
38 wxSYS_COLOUR_BACKGROUND, //!< The desktop colour.
39 wxSYS_COLOUR_ACTIVECAPTION, //!< Active window caption.
40 wxSYS_COLOUR_INACTIVECAPTION, //!< Inactive window caption.
41 wxSYS_COLOUR_MENU, //!< Menu background.
42 wxSYS_COLOUR_WINDOW, //!< Window background.
43 wxSYS_COLOUR_WINDOWFRAME, //!< Window frame.
44 wxSYS_COLOUR_MENUTEXT, //!< Menu text.
45 wxSYS_COLOUR_WINDOWTEXT, //!< Text in windows.
46 wxSYS_COLOUR_CAPTIONTEXT, //!< Text in caption, size box and scrollbar arrow box.
47 wxSYS_COLOUR_ACTIVEBORDER, //!< Active window border.
48 wxSYS_COLOUR_INACTIVEBORDER, //!< Inactive window border.
49 wxSYS_COLOUR_APPWORKSPACE, //!< Background colour MDI applications.
50 wxSYS_COLOUR_HIGHLIGHT, //!< Item(s) selected in a control.
51 wxSYS_COLOUR_HIGHLIGHTTEXT, //!< Text of item(s) selected in a control.
52 wxSYS_COLOUR_BTNFACE, //!< Face shading on push buttons.
53 wxSYS_COLOUR_BTNSHADOW, //!< Edge shading on push buttons.
54 wxSYS_COLOUR_GRAYTEXT, //!< Greyed (disabled) text.
55 wxSYS_COLOUR_BTNTEXT, //!< Text on push buttons.
56 wxSYS_COLOUR_INACTIVECAPTIONTEXT, //!< Colour of text in active captions.
57 wxSYS_COLOUR_BTNHIGHLIGHT, //!< Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
58 wxSYS_COLOUR_3DDKSHADOW, //!< Dark shadow for three-dimensional display elements.
59 wxSYS_COLOUR_3DLIGHT, //!< Light colour for three-dimensional display elements.
60 wxSYS_COLOUR_INFOTEXT, //!< Text colour for tooltip controls.
61 wxSYS_COLOUR_INFOBK, //!< Background colour for tooltip controls.
62
63 wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
64 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
65 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
66 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
67 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
68 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
69
70 wxSYS_COLOUR_LISTBOX,
71 wxSYS_COLOUR_HOTLIGHT,
72 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
73 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
74 wxSYS_COLOUR_MENUHILIGHT,
75 wxSYS_COLOUR_MENUBAR,
76
77 wxSYS_COLOUR_MAX
78};
79
80/**
81 Possible values for wxSystemSettings::GetMetric() index parameter.
82*/
83enum wxSystemMetric
84{
85 wxSYS_MOUSE_BUTTONS, //!< Number of buttons on mouse, or zero if no mouse was installed.
86 wxSYS_BORDER_X, //!< Width of single border.
87 wxSYS_BORDER_Y, //!< Height of single border.
88 wxSYS_CURSOR_X, //!< Width of cursor.
89 wxSYS_CURSOR_Y, //!< Height of cursor.
90 wxSYS_DCLICK_X, //!< Width in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
91 wxSYS_DCLICK_Y, //!< Height in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
92 wxSYS_DCLICK_MSEC, //!< Maximal time, in milliseconds, which may pass between subsequent clicks for a double click to be generated.
93 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.
94 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.
95 wxSYS_EDGE_X, //!< Width of a 3D border, in pixels.
96 wxSYS_EDGE_Y, //!< Height of a 3D border, in pixels.
97 wxSYS_HSCROLL_ARROW_X, //!< Width of arrow bitmap on horizontal scrollbar.
98 wxSYS_HSCROLL_ARROW_Y, //!< Height of arrow bitmap on horizontal scrollbar.
99 wxSYS_HTHUMB_X, //!< Width of horizontal scrollbar thumb.
100 wxSYS_ICON_X, //!< The default width of an icon.
101 wxSYS_ICON_Y, //!< The default height of an icon.
102 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.
103 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.
104 wxSYS_WINDOWMIN_X, //!< Minimum width of a window.
105 wxSYS_WINDOWMIN_Y, //!< Minimum height of a window.
106 wxSYS_SCREEN_X, //!< Width of the screen in pixels.
107 wxSYS_SCREEN_Y, //!< Height of the screen in pixels.
108 wxSYS_FRAMESIZE_X, //!< Width of the window frame for a wxTHICK_FRAME window.
109 wxSYS_FRAMESIZE_Y, //!< Height of the window frame for a wxTHICK_FRAME window.
110 wxSYS_SMALLICON_X, //!< Recommended width of a small icon (in window captions, and small icon view).
111 wxSYS_SMALLICON_Y, //!< Recommended height of a small icon (in window captions, and small icon view).
112 wxSYS_HSCROLL_Y, //!< Height of horizontal scrollbar in pixels.
113 wxSYS_VSCROLL_X, //!< Width of vertical scrollbar in pixels.
114 wxSYS_VSCROLL_ARROW_X, //!< Width of arrow bitmap on a vertical scrollbar.
115 wxSYS_VSCROLL_ARROW_Y, //!< Height of arrow bitmap on a vertical scrollbar.
116 wxSYS_VTHUMB_Y, //!< Height of vertical scrollbar thumb.
117 wxSYS_CAPTION_Y, //!< Height of normal caption area.
118 wxSYS_MENU_Y, //!< Height of single-line menu bar.
119 wxSYS_NETWORK_PRESENT, //!< 1 if there is a network present, 0 otherwise.
120 wxSYS_PENWINDOWS_PRESENT, //!< 1 if PenWindows is installed, 0 otherwise.
121 wxSYS_SHOW_SOUNDS, //!< Non-zero if the user requires an application to present information
122 //!< visually in situations where it would otherwise present the information
123 //!< only in audible form; zero otherwise.
124 wxSYS_SWAP_BUTTONS, //!< Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise.
125 wxSYS_DCLICK_MSEC
126};
127
128/**
129 Possible values for wxSystemSettings::HasFeature() parameter.
130*/
131enum wxSystemFeature
132{
133 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
134 wxSYS_CAN_ICONIZE_FRAME,
135 wxSYS_TABLET_PRESENT
136};
137
138/**
139 Values for different screen designs.
140*/
141enum wxSystemScreenType
142{
143 wxSYS_SCREEN_NONE = 0, //!< Undefined screen type.
144
145 wxSYS_SCREEN_TINY, //!< Tiny screen, less than 320x240
146 wxSYS_SCREEN_PDA, //!< PDA screen, 320x240 or more but less than 640x480
147 wxSYS_SCREEN_SMALL, //!< Small screen, 640x480 or more but less than 800x600
148 wxSYS_SCREEN_DESKTOP //!< Desktop screen, 800x600 or more
149};
150
151
23324ae1
FM
152/**
153 @class wxSystemSettings
7c913512 154
4876436a
FM
155 wxSystemSettings allows the application to ask for details about the system.
156 This can include settings such as standard colours, fonts,
23324ae1 157 and user interface element sizes.
7c913512 158
23324ae1
FM
159 @library{wxcore}
160 @category{misc}
7c913512 161
e54c96f1 162 @see wxFont, wxColour
23324ae1
FM
163*/
164class wxSystemSettings : public wxObject
165{
166public:
167 /**
4876436a
FM
168 Default constructor.
169
170 You don't need to create an instance of wxSystemSettings
23324ae1
FM
171 since all of its functions are static.
172 */
173 wxSystemSettings();
174
175 /**
176 Returns a system colour.
4876436a 177 @a index can be one of the ::wxSystemColour enum values.
23324ae1
FM
178 */
179 static wxColour GetColour(wxSystemColour index);
180
181 /**
182 Returns a system font.
4876436a 183 @a index can be one of the ::wxSystemFont enum values.
23324ae1
FM
184 */
185 static wxFont GetFont(wxSystemFont index);
186
187 /**
188 Returns the value of a system metric, or -1 if the metric is not supported on
189 the current system.
4876436a 190
4cc4bfaf 191 The value of @a win determines if the metric returned is a global value or
23324ae1
FM
192 a wxWindow based value, in which case it might determine the widget, the
193 display the window is on, or something similar. The window given should be as
4876436a
FM
194 close to the metric as possible (e.g a wxTopLevelWindow in case of the
195 wxSYS_CAPTION_Y metric).
3c4f71cc 196
4876436a 197 @a index can be one of the ::wxSystemMetric enum values.
3c4f71cc 198
4cc4bfaf
FM
199 @a win is a pointer to the window for which the metric is requested.
200 Specifying the @a win parameter is encouraged, because some metrics on some
4876436a
FM
201 ports are not supported without one,or they might be capable of reporting
202 better values if given one. If a window does not make sense for a metric,
23324ae1 203 one should still be given, as for example it might determine which displays
4876436a 204 cursor width is requested with wxSYS_CURSOR_X.
23324ae1 205 */
4cc4bfaf 206 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
23324ae1
FM
207
208 /**
4876436a
FM
209 Returns the screen type.
210 The return value is one of the ::wxSystemScreenType enum values.
23324ae1
FM
211 */
212 static wxSystemScreenType GetScreenType();
213};
e54c96f1 214