***************** wx.SystemSettings ***************** Inheritance diagram for `wx.SystemSettings`: | .. inheritance-diagram:: wx.SystemSettings | Description =========== `wx.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. .. seealso:: `wx.Font `_, `wx.Colour `_ Derived From ^^^^^^^^^^^^^ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetColour <#GetColour>`_ * `GetFont <#GetFont>`_ * `GetMetric <#GetMetric>`_ * `GetScreenType <#GetScreenType>`_ * `HasFeature <#HasFeature>`_ * `SetScreenType <#SetScreenType>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() Default constructor. You don't need to create an instance of `wx.SystemSettings` since all of its functions are static. -------- .. method:: GetColour(index) Returns a system colour. **Parameters:** * `index` (int): `index` can be one of: ====================================================== ============================================== Colour Index Flag Description ====================================================== ============================================== ``wx.SYS_COLOUR_SCROLLBAR`` The scrollbar grey area. ``wx.SYS_COLOUR_BACKGROUND`` The desktop colour. ``wx.SYS_COLOUR_ACTIVECAPTION`` Active window caption. ``wx.SYS_COLOUR_INACTIVECAPTION`` Inactive window caption. ``wx.SYS_COLOUR_MENU`` Menu background. ``wx.SYS_COLOUR_WINDOW`` Window background. ``wx.SYS_COLOUR_WINDOWFRAME`` Window frame. ``wx.SYS_COLOUR_MENUTEXT`` Menu text. ``wx.SYS_COLOUR_WINDOWTEXT`` Text in windows. ``wx.SYS_COLOUR_CAPTIONTEXT`` Text in caption, size box and scrollbar arrow box. ``wx.SYS_COLOUR_ACTIVEBORDER`` Active window border. ``wx.SYS_COLOUR_INACTIVEBORDER`` Inactive window border. ``wx.SYS_COLOUR_APPWORKSPACE`` Background colour MDI applications. ``wx.SYS_COLOUR_HIGHLIGHT`` Item(s) selected in a control. ``wx.SYS_COLOUR_HIGHLIGHTTEXT`` Text of item(s) selected in a control. ``wx.SYS_COLOUR_BTNFACE`` Face shading on push buttons. ``wx.SYS_COLOUR_BTNSHADOW`` Edge shading on push buttons. ``wx.SYS_COLOUR_GRAYTEXT`` Greyed (disabled) text. ``wx.SYS_COLOUR_BTNTEXT`` Text on push buttons. ``wx.SYS_COLOUR_INACTIVECAPTIONTEXT`` Colour of text in active captions. ``wx.SYS_COLOUR_BTNHIGHLIGHT`` Highlight colour for buttons (same as ``wx.SYS_COLOUR_3DHILIGHT``). ``wx.SYS_COLOUR_3DDKSHADOW`` Dark shadow for three-dimensional display elements. ``wx.SYS_COLOUR_3DLIGHT`` Light colour for three-dimensional display elements. ``wx.SYS_COLOUR_INFOTEXT`` Text colour for tooltip controls. ``wx.SYS_COLOUR_INFOBK`` Background colour for tooltip controls. ``wx.SYS_COLOUR_DESKTOP`` Same as ``wx.SYS_COLOUR_BACKGROUND``. ``wx.SYS_COLOUR_3DFACE`` Same as ``wx.SYS_COLOUR_BTNFACE``. ``wx.SYS_COLOUR_3DSHADOW`` Same as ``wx.SYS_COLOUR_BTNSHADOW``. ``wx.SYS_COLOUR_3DHIGHLIGHT`` Same as ``wx.SYS_COLOUR_BTNHIGHLIGHT``. ``wx.SYS_COLOUR_3DHILIGHT`` Same as ``wx.SYS_COLOUR_BTNHIGHLIGHT``. ``wx.SYS_COLOUR_BTNHILIGHT`` Same as ``wx.SYS_COLOUR_BTNHIGHLIGHT``. ====================================================== ============================================== | **Returns:** `wx.Colour `_ .. note:: In wxPython this static method is implemented in Python also as a standalone function named `wx.SystemSettings_GetColour <../wxFunctions.html#SystemSettings_GetColour>`_ -------- .. method:: GetFont(index) Returns a system font. **Parameters:** * `index` (int): `index` can be one of: ====================================================== ============================================== Font Index Flag Description ====================================================== ============================================== ``wx.SYS_OEM_FIXED_FONT`` Original equipment manufacturer dependent fixed-pitch font. ``wx.SYS_ANSI_FIXED_FONT`` Windows fixed-pitch font. ``wx.SYS_ANSI_VAR_FONT`` Windows variable-pitch (proportional) font. ``wx.SYS_SYSTEM_FONT`` System font. ``wx.SYS_DEVICE_DEFAULT_FONT`` Device-dependent font (Windows NT only). ``wx.SYS_DEFAULT_GUI_FONT`` Default font for user interface objects such as menus and dialog boxes. Note that with modern GUIs nothing guarantees that the same font is used for all GUI elements, so some controls might use a different font by default. ====================================================== ============================================== | **Returns:** `wx.Font `_ .. note:: In wxPython this static method is implemented in Python also as a standalone function named `wx.SystemSettings_GetFont <../wxFunctions.html#SystemSettings_GetFont>`_ -------- .. method:: 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 `wx.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 `wx.TopLevelWindow `_ in case of the ``wx.SYS_CAPTION_Y`` metric). **Parameters:** * `index` (int). `index` can be one of: ====================================================== ============================================== Metric Index Flag Description ====================================================== ============================================== ``wx.SYS_MOUSE_BUTTONS`` Number of buttons on mouse, or zero if no mouse was installed. ``wx.SYS_BORDER_X`` Width of single border. ``wx.SYS_BORDER_Y`` Height of single border. ``wx.SYS_CURSOR_X`` Width of cursor. ``wx.SYS_CURSOR_Y`` Height of cursor. ``wx.SYS_DCLICK_X`` Width in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click. ``wx.SYS_DCLICK_Y`` Height in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click. ``wx.SYS_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. ``wx.SYS_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. ``wx.SYS_EDGE_X`` Width of a 3D border, in pixels. ``wx.SYS_EDGE_Y`` Height of a 3D border, in pixels. ``wx.SYS_HSCROLL_ARROW_X`` Width of arrow bitmap on horizontal scrollbar. ``wx.SYS_HSCROLL_ARROW_Y`` Height of arrow bitmap on horizontal scrollbar. ``wx.SYS_HTHUMB_X`` Width of horizontal scrollbar thumb. ``wx.SYS_ICON_X`` The default width of an icon. ``wx.SYS_ICON_Y`` The default height of an icon. ``wx.SYS_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. ``wx.SYS_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. ``wx.SYS_WINDOWMIN_X`` Minimum width of a window. ``wx.SYS_WINDOWMIN_Y`` Minimum height of a window. ``wx.SYS_SCREEN_X`` Width of the screen in pixels. ``wx.SYS_SCREEN_Y`` Height of the screen in pixels. ``wx.SYS_FRAMESIZE_X`` Width of the window frame for a ``wx.THICK_FRAME`` window. ``wx.SYS_FRAMESIZE_Y`` Height of the window frame for a ``wx.THICK_FRAME`` window. ``wx.SYS_SMALLICON_X`` Recommended width of a small icon (in window captions, and small icon view). ``wx.SYS_SMALLICON_Y`` Recommended height of a small icon (in window captions, and small icon view). ``wx.SYS_HSCROLL_Y`` Height of horizontal scrollbar in pixels. ``wx.SYS_VSCROLL_X`` Width of vertical scrollbar in pixels. ``wx.SYS_VSCROLL_ARROW_X`` Width of arrow bitmap on a vertical scrollbar. ``wx.SYS_VSCROLL_ARROW_Y`` Height of arrow bitmap on a vertical scrollbar. ``wx.SYS_VTHUMB_Y`` Height of vertical scrollbar thumb. ``wx.SYS_CAPTION_Y`` Height of normal caption area. ``wx.SYS_MENU_Y`` Height of single-line menu bar. ``wx.SYS_NETWORK_PRESENT`` 1 if there is a network present, 0 otherwise. ``wx.SYS_PENWINDOWS_PRESENT`` 1 if PenWindows is installed, 0 otherwise. ``wx.SYS_SHOW_SOUNDS`` Non-zero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; zero otherwise. ``wx.SYS_SWAP_BUTTONS`` Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise. ====================================================== ============================================== | * `win` (`wx.Window `_): 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 ``wx.SYS_CURSOR_X``. | **Returns:** `int` .. note:: In wxPython this static method is implemented in Python also as a standalone function named `wx.SystemSettings_GetMetric <../wxFunctions.html#SystemSettings_GetMetric>`_ -------- .. method:: GetScreenType() Returns the screen type. The return value is one of: ====================================================== ============================================== Screen Type Flag Description ====================================================== ============================================== ``wx.SYS_SCREEN_NONE`` Undefined screen type ``wx.SYS_SCREEN_TINY`` Tiny screen, less than 320x240 ``wx.SYS_SCREEN_PDA`` PDA screen, 320x240 or more but less than 640x480 ``wx.SYS_SCREEN_SMALL`` Small screen, 640x480 or more but less than 800x600 ``wx.SYS_SCREEN_DESKTOP`` Desktop screen, 800x600 or more. ====================================================== ============================================== | **Returns:** `int` -------- .. method:: HasFeature(index) | **Parameters:** * `index` (int) | **Returns:** `bool` -------- .. method:: SetScreenType(screen) | **Parameters:** * `screen` (int)