Table Of Contents

Previous topic

SystemScreenType

Next topic

TZ

This Page

phoenix_title SystemSettings

SystemSettings allows the application to ask for details about the system.

This can include settings such as standard colours, fonts, and user interface element sizes.


class_hierarchy Inheritance Diagram

Inheritance diagram for class SystemSettings

Inheritance diagram of SystemSettings


method_summary Methods Summary

__init__ Default constructor.
GetColour Returns a system colour.
GetFont Returns a system font.
GetMetric Returns the value of a system metric, or -1 if the metric is not supported on the current system.
GetScreenType Returns the screen type.
HasFeature Returns True if the port has certain feature.

api Class API



class SystemSettings(Object)

SystemSettings allows the application to ask for details about the system.

Possible constructors:

SystemSettings()

Methods



__init__(self)

Default constructor.

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



static GetColour(index)

Returns a system colour.

Parameters:index (SystemColour) – Can be one of the SystemColour enum values.
Return type: Colour
Returns:The returned colour is always valid.


static GetFont(index)

Returns a system font.

Parameters:index (SystemFont) – Can be one of the SystemFont enum values.
Return type: Font
Returns:The returned font is always valid.


static GetMetric(index, win=None)

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 Window 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 TopLevelWindow in case of the SYS_CAPTION_Y metric).

index can be one of the SystemMetric 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 SYS_CURSOR_X.

Parameters:
Return type:

int



static GetScreenType()

Returns the screen type.

The return value is one of the SystemScreenType enum values.

Return type: SystemScreenType


static HasFeature(index)

Returns True if the port has certain feature.

See the SystemFeature enum values.

Parameters:index (SystemFeature) –
Return type:bool