]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/settings.h
Default to wxConvUTF8 (not wxConvAuto) in wxDataInputStream and wxDataOutputStream...
[wxWidgets.git] / interface / wx / settings.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settings.h
3 // Purpose: interface of wxSystemSettings
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 /**
11 Possible values for wxSystemSettings::GetFont() parameter.
12 */
13 enum 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 */
35 enum 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, ///< Background colour for list-like contols.
71 wxSYS_COLOUR_HOTLIGHT,
72 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
73 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
74 wxSYS_COLOUR_MENUHILIGHT,
75 wxSYS_COLOUR_MENUBAR,
76 /**
77 Text colour for list-like controls.
78
79 @since 2.9.0
80 */
81 wxSYS_COLOUR_LISTBOXTEXT,
82
83 wxSYS_COLOUR_MAX
84 };
85
86 /**
87 Possible values for wxSystemSettings::GetMetric() index parameter.
88 */
89 enum wxSystemMetric
90 {
91 wxSYS_MOUSE_BUTTONS, //!< Number of buttons on mouse, or zero if no mouse was installed.
92 wxSYS_BORDER_X, //!< Width of single border.
93 wxSYS_BORDER_Y, //!< Height of single border.
94 wxSYS_CURSOR_X, //!< Width of cursor.
95 wxSYS_CURSOR_Y, //!< Height of cursor.
96 wxSYS_DCLICK_X, //!< Width in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
97 wxSYS_DCLICK_Y, //!< Height in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click.
98 wxSYS_DCLICK_MSEC, //!< Maximal time, in milliseconds, which may pass between subsequent clicks for a double click to be generated.
99 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.
100 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.
101 wxSYS_EDGE_X, //!< Width of a 3D border, in pixels.
102 wxSYS_EDGE_Y, //!< Height of a 3D border, in pixels.
103 wxSYS_HSCROLL_ARROW_X, //!< Width of arrow bitmap on horizontal scrollbar.
104 wxSYS_HSCROLL_ARROW_Y, //!< Height of arrow bitmap on horizontal scrollbar.
105 wxSYS_HTHUMB_X, //!< Width of horizontal scrollbar thumb.
106 wxSYS_ICON_X, //!< The default width of an icon.
107 wxSYS_ICON_Y, //!< The default height of an icon.
108 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.
109 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.
110 wxSYS_WINDOWMIN_X, //!< Minimum width of a window.
111 wxSYS_WINDOWMIN_Y, //!< Minimum height of a window.
112 wxSYS_SCREEN_X, //!< Width of the screen in pixels.
113 wxSYS_SCREEN_Y, //!< Height of the screen in pixels.
114 wxSYS_FRAMESIZE_X, //!< Width of the window frame for a wxTHICK_FRAME window.
115 wxSYS_FRAMESIZE_Y, //!< Height of the window frame for a wxTHICK_FRAME window.
116 wxSYS_SMALLICON_X, //!< Recommended width of a small icon (in window captions, and small icon view).
117 wxSYS_SMALLICON_Y, //!< Recommended height of a small icon (in window captions, and small icon view).
118 wxSYS_HSCROLL_Y, //!< Height of horizontal scrollbar in pixels.
119 wxSYS_VSCROLL_X, //!< Width of vertical scrollbar in pixels.
120 wxSYS_VSCROLL_ARROW_X, //!< Width of arrow bitmap on a vertical scrollbar.
121 wxSYS_VSCROLL_ARROW_Y, //!< Height of arrow bitmap on a vertical scrollbar.
122 wxSYS_VTHUMB_Y, //!< Height of vertical scrollbar thumb.
123 wxSYS_CAPTION_Y, //!< Height of normal caption area.
124 wxSYS_MENU_Y, //!< Height of single-line menu bar.
125 wxSYS_NETWORK_PRESENT, //!< 1 if there is a network present, 0 otherwise.
126 wxSYS_PENWINDOWS_PRESENT, //!< 1 if PenWindows is installed, 0 otherwise.
127 wxSYS_SHOW_SOUNDS, //!< Non-zero if the user requires an application to present information
128 //!< visually in situations where it would otherwise present the information
129 //!< only in audible form; zero otherwise.
130 wxSYS_SWAP_BUTTONS, //!< Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise.
131 wxSYS_DCLICK_MSEC
132 };
133
134 /**
135 Possible values for wxSystemSettings::HasFeature() parameter.
136 */
137 enum wxSystemFeature
138 {
139 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
140 wxSYS_CAN_ICONIZE_FRAME,
141 wxSYS_TABLET_PRESENT
142 };
143
144 /**
145 Values for different screen designs.
146 */
147 enum wxSystemScreenType
148 {
149 wxSYS_SCREEN_NONE = 0, //!< Undefined screen type.
150
151 wxSYS_SCREEN_TINY, //!< Tiny screen, less than 320x240
152 wxSYS_SCREEN_PDA, //!< PDA screen, 320x240 or more but less than 640x480
153 wxSYS_SCREEN_SMALL, //!< Small screen, 640x480 or more but less than 800x600
154 wxSYS_SCREEN_DESKTOP //!< Desktop screen, 800x600 or more
155 };
156
157
158 /**
159 @class wxSystemSettings
160
161 wxSystemSettings allows the application to ask for details about the system.
162 This can include settings such as standard colours, fonts,
163 and user interface element sizes.
164
165 @library{wxcore}
166 @category{misc}
167
168 @see wxFont, wxColour
169 */
170 class wxSystemSettings : public wxObject
171 {
172 public:
173 /**
174 Default constructor.
175
176 You don't need to create an instance of wxSystemSettings
177 since all of its functions are static.
178 */
179 wxSystemSettings();
180
181 /**
182 Returns a system colour.
183 @a index can be one of the ::wxSystemColour enum values.
184 */
185 static wxColour GetColour(wxSystemColour index);
186
187 /**
188 Returns a system font.
189 @a index can be one of the ::wxSystemFont enum values.
190 */
191 static wxFont GetFont(wxSystemFont index);
192
193 /**
194 Returns the value of a system metric, or -1 if the metric is not supported on
195 the current system.
196
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
200 close to the metric as possible (e.g a wxTopLevelWindow in case of the
201 wxSYS_CAPTION_Y metric).
202
203 @a index can be one of the ::wxSystemMetric enum values.
204
205 @a win is a pointer to the window for which the metric is requested.
206 Specifying the @a win parameter is encouraged, because some metrics on some
207 ports are not supported without one,or they might be capable of reporting
208 better values if given one. If a window does not make sense for a metric,
209 one should still be given, as for example it might determine which displays
210 cursor width is requested with wxSYS_CURSOR_X.
211 */
212 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
213
214 /**
215 Returns the screen type.
216 The return value is one of the ::wxSystemScreenType enum values.
217 */
218 static wxSystemScreenType GetScreenType();
219 };
220