X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4d291f0abad3eb90d500c5cc0665c6406e27306..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/settings.h diff --git a/interface/wx/settings.h b/interface/wx/settings.h index 4464efef5e..b2528fa8a6 100644 --- a/interface/wx/settings.h +++ b/interface/wx/settings.h @@ -3,13 +3,13 @@ // Purpose: interface of wxSystemSettings // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** Possible values for wxSystemSettings::GetFont() parameter. - + These values map 1:1 the native values supported by the Windows' @c GetStockObject function. Note that other ports (other than wxMSW) will try to provide meaningful fonts but they usually map the same font to various @c wxSYS_*_FONT values. @@ -18,17 +18,17 @@ enum wxSystemFont { /// Original equipment manufacturer dependent fixed-pitch font. wxSYS_OEM_FIXED_FONT = 10, - + /// Windows fixed-pitch (monospaced) font. wxSYS_ANSI_FIXED_FONT, - + /// Windows variable-pitch (proportional) font. wxSYS_ANSI_VAR_FONT, - /// System font. By default, the system uses the system font to draw menus, + /// System font. By default, the system uses the system font to draw menus, /// dialog box controls, and text. wxSYS_SYSTEM_FONT, - + /// Device-dependent font (Windows NT and later only). wxSYS_DEVICE_DEFAULT_FONT, @@ -43,7 +43,7 @@ enum wxSystemFont /** Possible values for wxSystemSettings::GetColour() parameter. - + These values map 1:1 the native values supported by the Windows' @c GetSysColor function. Note that other ports (other than wxMSW) will try to provide meaningful colours but they usually map the same colour to various @c wxSYS_COLOUR_* values. @@ -75,42 +75,53 @@ enum wxSystemColour wxSYS_COLOUR_3DLIGHT, //!< Light colour for three-dimensional display elements. wxSYS_COLOUR_INFOTEXT, //!< Text colour for tooltip controls. wxSYS_COLOUR_INFOBK, //!< Background colour for tooltip controls. - wxSYS_COLOUR_LISTBOX, //!< Background colour for list-like contols. + wxSYS_COLOUR_LISTBOX, //!< Background colour for list-like controls. wxSYS_COLOUR_HOTLIGHT, //!< Colour for a hyperlink or hot-tracked item. - + /** - Right side colour in the color gradient of an active window's title bar. + Right side colour in the color gradient of an active window's title bar. @c wxSYS_COLOUR_ACTIVECAPTION specifies the left side color. */ wxSYS_COLOUR_GRADIENTACTIVECAPTION, - + /** - Right side colour in the color gradient of an inactive window's title bar. + Right side colour in the color gradient of an inactive window's title bar. @c wxSYS_COLOUR_INACTIVECAPTION specifies the left side color. */ wxSYS_COLOUR_GRADIENTINACTIVECAPTION, - + /** - The colour used to highlight menu items when the menu appears as a flat menu. + The colour used to highlight menu items when the menu appears as a flat menu. The highlighted menu item is outlined with @c wxSYS_COLOUR_HIGHLIGHT. */ wxSYS_COLOUR_MENUHILIGHT, - + /** - The background colour for the menu bar when menus appear as flat menus. + The background colour for the menu bar when menus appear as flat menus. However, @c wxSYS_COLOUR_MENU continues to specify the background color of the menu popup. */ wxSYS_COLOUR_MENUBAR, - + /** Text colour for list-like controls. - + @since 2.9.0 */ wxSYS_COLOUR_LISTBOXTEXT, + /** + Text colour for the unfocused selection of list-like controls. + + @since 2.9.1 + */ + wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT, + + wxSYS_COLOUR_MAX + + + // synonyms: - + wxSYS_COLOUR_BACKGROUND = wxSYS_COLOUR_DESKTOP, //!< Synonym for @c wxSYS_COLOUR_DESKTOP. wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, @@ -123,19 +134,18 @@ enum wxSystemColour //!< Synonym for @c wxSYS_COLOUR_BTNHIGHLIGHT. wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, //!< Synonym for @c wxSYS_COLOUR_BTNHIGHLIGHT. - + /** - Synonim for @c wxSYS_COLOUR_BTNFACE. - + Synonym for @c wxSYS_COLOUR_BTNFACE. + On wxMSW this colour should be used as the background colour of wxFrames which are used as containers of controls; this is in fact the - same colour used for the borders of controls like e.g. wxNotebook. - + same colour used for the borders of controls like e.g. wxNotebook or + for the background of e.g. wxPanel. + @since 2.9.0 */ - wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE, - - wxSYS_COLOUR_MAX + wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE }; /** @@ -150,7 +160,6 @@ enum wxSystemMetric wxSYS_CURSOR_Y, //!< Height of cursor. wxSYS_DCLICK_X, //!< Width in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click. wxSYS_DCLICK_Y, //!< Height in pixels of rectangle within which two successive mouse clicks must fall to generate a double-click. - wxSYS_DCLICK_MSEC, //!< Maximal time, in milliseconds, which may pass between subsequent clicks for a double click to be generated. 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. 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. wxSYS_EDGE_X, //!< Width of a 3D border, in pixels. @@ -183,7 +192,7 @@ enum wxSystemMetric //!< visually in situations where it would otherwise present the information //!< only in audible form; zero otherwise. wxSYS_SWAP_BUTTONS, //!< Non-zero if the meanings of the left and right mouse buttons are swapped; zero otherwise. - wxSYS_DCLICK_MSEC + wxSYS_DCLICK_MSEC //!< Maximal time, in milliseconds, which may pass between subsequent clicks for a double click to be generated. }; /** @@ -197,7 +206,7 @@ enum wxSystemFeature }; /** - Values for different screen designs. + Values for different screen designs. See wxSystemSettings::GetScreenType(). */ enum wxSystemScreenType { @@ -214,13 +223,14 @@ enum wxSystemScreenType @class wxSystemSettings 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. + + This can include settings such as standard colours, fonts, and user interface + element sizes. @library{wxcore} @category{cfg} - @see wxFont, wxColour + @see wxFont, wxColour, wxSystemOptions */ class wxSystemSettings : public wxObject { @@ -235,13 +245,23 @@ public: /** Returns a system colour. - @a index can be one of the ::wxSystemColour enum values. + + @param index + Can be one of the ::wxSystemColour enum values. + + @return + The returned colour is always valid. */ static wxColour GetColour(wxSystemColour index); /** Returns a system font. - @a index can be one of the ::wxSystemFont enum values. + + @param index + Can be one of the ::wxSystemFont enum values. + + @return + The returned font is always valid. */ static wxFont GetFont(wxSystemFont index); @@ -252,7 +272,7 @@ public: The value of @a 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 + close to the metric as possible (e.g. a wxTopLevelWindow in case of the wxSYS_CAPTION_Y metric). @a index can be one of the ::wxSystemMetric enum values. @@ -271,5 +291,11 @@ public: The return value is one of the ::wxSystemScreenType enum values. */ static wxSystemScreenType GetScreenType(); + + /** + Returns @true if the port has certain feature. + See the ::wxSystemFeature enum values. + */ + static bool HasFeature(wxSystemFeature index); };