#include <wx/settings.h>
wxSystemSettings allows the application to ask for details about the system.
This can include settings such as standard colours, fonts, and user interface element sizes.
- See also
- wxFont, wxColour, wxSystemOptions
◆ wxSystemSettings()
wxSystemSettings::wxSystemSettings |
( |
| ) |
|
Default constructor.
You don't need to create an instance of wxSystemSettings since all of its functions are static.
◆ GetAppearance()
Returns the object describing the current system appearance.
- Since
- 3.1.3
◆ GetColour()
Returns a system colour.
- Parameters
-
- Returns
- The returned colour is always valid.
◆ GetFont()
Returns a system font.
- Parameters
-
- Returns
- The returned font is always valid.
◆ GetMetric()
Returns the value of a system metric, or -1 if the metric is not supported on the current system.
The value of win determines if the metric returned is a global value or a wxWindow based value, in which case it might determine the widget, the display the window is on, or something similar. The window given should be as close to the metric as possible (e.g. a wxTopLevelWindow in case of the wxSYS_CAPTION_Y metric).
index can be one of the wxSystemMetric enum values.
win is a pointer to the window for which the metric is requested. Specifying the win parameter is encouraged, because some metrics on some ports are not supported without one, or they might be capable of reporting better values if given one. If a window does not make sense for a metric, one should still be given, as for example it might determine which displays cursor width is requested with wxSYS_CURSOR_X.
◆ GetScreenType()
◆ HasFeature()
Returns true if the port has certain feature.
See the wxSystemFeature enum values.
◆ SelectLightDark()
Select one of the two colours depending on whether light or dark mode is used.
This is just a convenient helper using wxSystemAppearance::IsDark() to select between the two colours.
- Parameters
-
colForLight | Colour returned when using light appearance. |
colForDark | Colour returned when using dark appearance, as detected by wxSystemAppearance::IsDark(). |
- Since
- 3.3.0