wxWidgets: wxSystemSettings Class Reference

| Version: 3.0.4

Public Member Functions | Static Public Member Functions | List of all members
wxSystemSettings Class Reference
Class List by Category » Application and System configuration

`#include </usr/src/ports/wxWidgets3.0/wxWidgets3.0-3.0.4-1.x86_64/src/wxWidgets-3.0.4/interface/wx/settings.h>`

## Detailed Description

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.

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

See also
  wxFont, wxColour, wxSystemOptions

## Public Member Functions
| wxSystemSettings ()
| Default constructor. More...

## Static Public Member Functions
static wxColour | GetColour (wxSystemColour index)
| Returns a system colour. More...
static wxFont | GetFont (wxSystemFont index)
| Returns a system font. More...
static int | GetMetric (wxSystemMetric index, wxWindow *win=NULL)
| Returns the value of a system metric, or -1 if the metric is not supported on the current system. More...
static wxSystemScreenType | GetScreenType ()
| Returns the screen type. More...
static bool | HasFeature (wxSystemFeature index)
| Returns true if the port has certain feature. More...

## Constructor & Destructor Documentation

## ◆ wxSystemSettings()

wxSystemSettings::wxSystemSettings | ( |  | ) |

Default constructor.

You don't need to create an instance of wxSystemSettings since all of its functions are static.

## Member Function Documentation

## ◆ GetColour()

static wxColour wxSystemSettings::GetColour | ( | wxSystemColour | index | ) |
| static

Returns a system colour.

Parameters

  index | Can be one of the wxSystemColour enum values.

Returns
  The returned colour is always valid.

## ◆ GetFont()

static wxFont wxSystemSettings::GetFont | ( | wxSystemFont | index | ) |
| static

Returns a system font.

Parameters

  index | Can be one of the wxSystemFont enum values.

Returns
  The returned font is always valid.

## ◆ GetMetric()

static int wxSystemSettings::GetMetric | ( | wxSystemMetric | index,
|  | wxWindow * | win = `NULL`
| ) |  |
| static

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()

static wxSystemScreenType wxSystemSettings::GetScreenType | ( |  | ) |
| static

Returns the screen type.

The return value is one of the wxSystemScreenType enum values.

## ◆ HasFeature()

static bool wxSystemSettings::HasFeature | ( | wxSystemFeature | index | ) |
| static

Returns true if the port has certain feature.

See the wxSystemFeature enum values.