interface/wx/gdicmn.h File Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
gdicmn.h File Reference

## Classes
class | wxRealPoint
| A wxRealPoint is a useful data structure for graphics operations. More...
class | wxRect
| Represents a rectangle with integer coordinates. More...
class | wxPoint
| A wxPoint is a useful data structure for graphics operations. More...
class | wxColourDatabase
| wxWidgets maintains a database of standard RGB colours for a predefined set of named colours. More...
class | wxSize
| A wxSize is a useful data structure for graphics operations. More...

## Macros
#define | wxBITMAP(bitmapName)
| This macro loads a bitmap from either application resources (on the platforms for which they exist, i.e. Windows) or from an XPM file.
#define | wxBITMAP_PNG(bitmapName)
| Creates a bitmap from either application resources or embedded image data in PNG format.
#define | wxBITMAP_PNG_FROM_DATA(bitmapName)
| Creates a bitmap from embedded image data in PNG format.
#define | wxICON(iconName)
| This macro loads an icon from either application resources (on the platforms for which they exist, i.e. Windows) or from an XPM file.

## Enumerations
enum | wxBitmapType { wxBITMAP_TYPE_INVALID , wxBITMAP_TYPE_BMP , wxBITMAP_TYPE_BMP_RESOURCE , wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE , wxBITMAP_TYPE_ICO , wxBITMAP_TYPE_ICO_RESOURCE , wxBITMAP_TYPE_CUR , wxBITMAP_TYPE_CUR_RESOURCE , wxBITMAP_TYPE_XBM , wxBITMAP_TYPE_XBM_DATA , wxBITMAP_TYPE_XPM , wxBITMAP_TYPE_XPM_DATA , wxBITMAP_TYPE_TIFF , wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF , wxBITMAP_TYPE_TIFF_RESOURCE , wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE , wxBITMAP_TYPE_GIF , wxBITMAP_TYPE_GIF_RESOURCE , wxBITMAP_TYPE_PNG , wxBITMAP_TYPE_PNG_RESOURCE , wxBITMAP_TYPE_JPEG , wxBITMAP_TYPE_JPEG_RESOURCE , wxBITMAP_TYPE_PNM , wxBITMAP_TYPE_PNM_RESOURCE , wxBITMAP_TYPE_PCX , wxBITMAP_TYPE_PCX_RESOURCE , wxBITMAP_TYPE_PICT , wxBITMAP_TYPE_PICT_RESOURCE , wxBITMAP_TYPE_ICON , wxBITMAP_TYPE_ICON_RESOURCE , wxBITMAP_TYPE_ANI , wxBITMAP_TYPE_IFF , wxBITMAP_TYPE_TGA , wxBITMAP_TYPE_MACCURSOR , wxBITMAP_TYPE_MACCURSOR_RESOURCE , wxBITMAP_TYPE_ANY = 50 }
| Bitmap type flags. More...
enum | wxPolygonFillMode { wxODDEVEN_RULE = 1 , wxWINDING_RULE }
| Polygon filling mode. More...
enum | wxStockCursor { wxCURSOR_NONE , wxCURSOR_ARROW , wxCURSOR_RIGHT_ARROW , wxCURSOR_BULLSEYE , wxCURSOR_CHAR , wxCURSOR_CROSS , wxCURSOR_HAND , wxCURSOR_IBEAM , wxCURSOR_LEFT_BUTTON , wxCURSOR_MAGNIFIER , wxCURSOR_MIDDLE_BUTTON , wxCURSOR_NO_ENTRY , wxCURSOR_PAINT_BRUSH , wxCURSOR_PENCIL , wxCURSOR_POINT_LEFT , wxCURSOR_POINT_RIGHT , wxCURSOR_QUESTION_ARROW , wxCURSOR_RIGHT_BUTTON , wxCURSOR_SIZENESW , wxCURSOR_SIZENS , wxCURSOR_SIZENWSE , wxCURSOR_SIZEWE , wxCURSOR_SIZING , wxCURSOR_SPRAYCAN , wxCURSOR_WAIT , wxCURSOR_WATCH , wxCURSOR_BLANK , wxCURSOR_DEFAULT , wxCURSOR_COPY_ARROW , wxCURSOR_CROSS_REVERSE , wxCURSOR_DOUBLE_ARROW , wxCURSOR_BASED_ARROW_UP , wxCURSOR_BASED_ARROW_DOWN , wxCURSOR_ARROWWAIT , wxCURSOR_MAX }
| Standard cursors. More...
enum | wxEllipsizeFlags { wxELLIPSIZE_FLAGS_NONE = 0 , wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS = 1 , wxELLIPSIZE_FLAGS_EXPAND_TABS = 2 , wxELLIPSIZE_FLAGS_DEFAULT }
| Flags used by wxControl::Ellipsize function. More...
enum | wxEllipsizeMode { wxELLIPSIZE_NONE , wxELLIPSIZE_START , wxELLIPSIZE_MIDDLE , wxELLIPSIZE_END }
| The different ellipsization modes supported by the wxControl::Ellipsize and wxRendererNative::DrawItemText() functions. More...

## Functions
bool | wxColourDisplay ()
| Returns true if the display is colour, false otherwise.
int | wxDisplayDepth ()
| Returns the depth of the display (a value of 1 denotes a monochrome display).
void | wxSetCursor (const wxCursor &cursor)
| Globally sets the cursor; only has an effect on Windows, Mac and GTK+.
void | wxClientDisplayRect (int *x, int *y, int *width, int *height)
| Returns the dimensions of the work area on the display.
wxRect | wxGetClientDisplayRect ()
| Returns the dimensions of the work area on the display.
wxSize | wxGetDisplayPPI ()
| Returns the display resolution in pixels per inch.
void | wxDisplaySize (int *width, int *height)
| Returns the display size in pixels.
wxSize | wxGetDisplaySize ()
| Returns the display size in pixels.
void | wxDisplaySizeMM (int *width, int *height)
| Returns the display size in millimeters.
wxSize | wxGetDisplaySizeMM ()
| Returns the display size in millimeters.

## Variables
const wxPoint | wxDefaultPosition
| Global instance of a wxPoint initialized with values (-1,-1).
wxColourDatabase * | wxTheColourDatabase
| Global instance of a wxColourDatabase.
const wxSize | wxDefaultSize
| Global instance of a wxSize object initialized to (-1,-1).

## Enumeration Type Documentation

## ◆ wxBitmapType

enum wxBitmapType

Bitmap type flags.

See wxBitmap and wxImage classes.

Enumerator
wxBITMAP_TYPE_INVALID |
wxBITMAP_TYPE_BMP |
wxBITMAP_TYPE_BMP_RESOURCE |
wxBITMAP_TYPE_RESOURCE |
wxBITMAP_TYPE_ICO |
wxBITMAP_TYPE_ICO_RESOURCE |
wxBITMAP_TYPE_CUR |
wxBITMAP_TYPE_CUR_RESOURCE |
wxBITMAP_TYPE_XBM |
wxBITMAP_TYPE_XBM_DATA |
wxBITMAP_TYPE_XPM |
wxBITMAP_TYPE_XPM_DATA |
wxBITMAP_TYPE_TIFF |
wxBITMAP_TYPE_TIF |
wxBITMAP_TYPE_TIFF_RESOURCE |
wxBITMAP_TYPE_TIF_RESOURCE |
wxBITMAP_TYPE_GIF |
wxBITMAP_TYPE_GIF_RESOURCE |
wxBITMAP_TYPE_PNG |
wxBITMAP_TYPE_PNG_RESOURCE |
wxBITMAP_TYPE_JPEG |
wxBITMAP_TYPE_JPEG_RESOURCE |
wxBITMAP_TYPE_PNM |
wxBITMAP_TYPE_PNM_RESOURCE |
wxBITMAP_TYPE_PCX |
wxBITMAP_TYPE_PCX_RESOURCE |
wxBITMAP_TYPE_PICT |
wxBITMAP_TYPE_PICT_RESOURCE |
wxBITMAP_TYPE_ICON |
wxBITMAP_TYPE_ICON_RESOURCE |
wxBITMAP_TYPE_ANI |
wxBITMAP_TYPE_IFF |
wxBITMAP_TYPE_TGA |
wxBITMAP_TYPE_MACCURSOR |
wxBITMAP_TYPE_MACCURSOR_RESOURCE |
wxBITMAP_TYPE_ANY |

## ◆ wxEllipsizeFlags

enum wxEllipsizeFlags

Flags used by wxControl::Ellipsize function.

Enumerator
wxELLIPSIZE_FLAGS_NONE | No special flags.
wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS | Take mnemonics into account when calculating the text width. With this flag when calculating the size of the passed string, mnemonics characters (see wxControl::SetLabel) will be automatically reduced to a single character. This leads to correct calculations only if the string passed to Ellipsize() will be used with wxControl::SetLabel. If you don't want ampersand to be interpreted as mnemonics (e.g. because you use wxControl::SetLabelText) then don't use this flag.
wxELLIPSIZE_FLAGS_EXPAND_TABS | Expand tabs in spaces when calculating the text width. This flag tells wxControl::Ellipsize() to calculate the width of tab characters `'\t'` as 6 spaces.
wxELLIPSIZE_FLAGS_DEFAULT | The default flags for wxControl::Ellipsize.

## ◆ wxEllipsizeMode

enum wxEllipsizeMode

The different ellipsization modes supported by the wxControl::Ellipsize and wxRendererNative::DrawItemText() functions.

Enumerator
wxELLIPSIZE_NONE | Don't ellipsize the text at all. Since 2.9.1
wxELLIPSIZE_START | Put the ellipsis at the start of the string, if the string needs ellipsization.
wxELLIPSIZE_MIDDLE | Put the ellipsis in the middle of the string, if the string needs ellipsization.
wxELLIPSIZE_END | Put the ellipsis at the end of the string, if the string needs ellipsization.

## ◆ wxPolygonFillMode

enum wxPolygonFillMode

Polygon filling mode.

See wxDC::DrawPolygon.

Enumerator
wxODDEVEN_RULE |
wxWINDING_RULE |

## ◆ wxStockCursor

enum wxStockCursor

Standard cursors.

Notice that under wxMSW some of these cursors are defined in `wx.rc` file and not by the system itself so you should include this file from your own resource file (possibly creating a trivial resource file just containing a single include line if you don't need it otherwise) to be able to use them.

See wxCursor.

Enumerator
wxCURSOR_NONE |
wxCURSOR_ARROW | A standard arrow cursor.
wxCURSOR_RIGHT_ARROW | A standard arrow cursor pointing to the right.
wxCURSOR_BULLSEYE | Bullseye cursor.
wxCURSOR_CHAR | Rectangular character cursor.
wxCURSOR_CROSS | A cross cursor.
wxCURSOR_HAND | A hand cursor.
wxCURSOR_IBEAM | An I-beam cursor (vertical line).
wxCURSOR_LEFT_BUTTON | Represents a mouse with the left button depressed.
wxCURSOR_MAGNIFIER | A magnifier icon.
wxCURSOR_MIDDLE_BUTTON | Represents a mouse with the middle button depressed.
wxCURSOR_NO_ENTRY | A no-entry sign cursor.
wxCURSOR_PAINT_BRUSH | A paintbrush cursor.
wxCURSOR_PENCIL | A pencil cursor.
wxCURSOR_POINT_LEFT | A cursor that points left.
wxCURSOR_POINT_RIGHT | A cursor that points right.
wxCURSOR_QUESTION_ARROW | An arrow and question mark.
wxCURSOR_RIGHT_BUTTON | Represents a mouse with the right button depressed.
wxCURSOR_SIZENESW | A sizing cursor pointing NE-SW.
wxCURSOR_SIZENS | A sizing cursor pointing N-S.
wxCURSOR_SIZENWSE | A sizing cursor pointing NW-SE.
wxCURSOR_SIZEWE | A sizing cursor pointing W-E.
wxCURSOR_SIZING | A general sizing cursor.
wxCURSOR_SPRAYCAN | A spraycan cursor.
wxCURSOR_WAIT | A wait cursor.
wxCURSOR_WATCH | A watch cursor.
wxCURSOR_BLANK | Transparent cursor.
wxCURSOR_DEFAULT | Standard X11 cursor (only in wxGTK).
wxCURSOR_COPY_ARROW | MacOS Theme Plus arrow (only in wxMac).
wxCURSOR_CROSS_REVERSE | Only available on wxX11.
wxCURSOR_DOUBLE_ARROW | Only available on wxX11.
wxCURSOR_BASED_ARROW_UP | Only available on wxX11.
wxCURSOR_BASED_ARROW_DOWN | Only available on wxX11.
wxCURSOR_ARROWWAIT | A wait cursor with a standard arrow.
wxCURSOR_MAX |

## Variable Documentation

## ◆ wxDefaultPosition

const wxPoint wxDefaultPosition

Global instance of a wxPoint initialized with values (-1,-1).

## ◆ wxDefaultSize

const wxSize wxDefaultSize

Global instance of a wxSize object initialized to (-1,-1).

## ◆ wxTheColourDatabase

wxColourDatabase* wxTheColourDatabase

Global instance of a wxColourDatabase.