]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/settings.h
Corrected library association
[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,
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 */
83 enum 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 */
131 enum 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 */
141 enum 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
152 /**
153 @class wxSystemSettings
154
155 wxSystemSettings allows the application to ask for details about the system.
156 This can include settings such as standard colours, fonts,
157 and user interface element sizes.
158
159 @library{wxcore}
160 @category{misc}
161
162 @see wxFont, wxColour
163 */
164 class wxSystemSettings : public wxObject
165 {
166 public:
167 /**
168 Default constructor.
169
170 You don't need to create an instance of wxSystemSettings
171 since all of its functions are static.
172 */
173 wxSystemSettings();
174
175 /**
176 Returns a system colour.
177 @a index can be one of the ::wxSystemColour enum values.
178 */
179 static wxColour GetColour(wxSystemColour index);
180
181 /**
182 Returns a system font.
183 @a index can be one of the ::wxSystemFont enum values.
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.
190
191 The value of @a win determines if the metric returned is a global value or
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
194 close to the metric as possible (e.g a wxTopLevelWindow in case of the
195 wxSYS_CAPTION_Y metric).
196
197 @a index can be one of the ::wxSystemMetric enum values.
198
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
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,
203 one should still be given, as for example it might determine which displays
204 cursor width is requested with wxSYS_CURSOR_X.
205 */
206 static int GetMetric(wxSystemMetric index, wxWindow* win = NULL);
207
208 /**
209 Returns the screen type.
210 The return value is one of the ::wxSystemScreenType enum values.
211 */
212 static wxSystemScreenType GetScreenType();
213 };
214