
The arguments hotSpotX and hotSpotY are only used when there's no hotspot info in the resource/image-file to load (e.g. More.Ĭonstructs a cursor by passing a string resource name or filename. Pointer to an object which is the object's reference-counted data. Protected Attributes inherited from wxObject More.ĬloneRefData (const wxObjectRefData *data) constĬreates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More.Ĭreates a new instance of the wxObjectRefData-derived class specific to this object and returns it. Protected Member Functions inherited from wxObjectĮnsure that this object's data is not shared with any other object. The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. Operator new (size_t size, const wxString &filename=NULL, int lineNum=0) The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. This is the same of AllocExclusive() but this method is public. More.ĭecrements the reference count in the associated data, and if it is zero, deletes the data. Makes this object refer to the data in clone. Returns true if this object has the same data pointer as obj. More.ĭetermines whether this class is a subclass of (or the same class as) the given class. Returns the wxObject::m_refData pointer, i.e. This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).

Public Member Functions inherited from wxObjectĭefault ctor initializes to NULL the internal reference data. Public Member Functions inherited from wxGDIObject More.Īssignment operator, using reference counting. More.Ĭopy constructor, uses reference counting. More.Ĭonstructs a cursor using a cursor identifier. WxCursor (const wxString &cursorName, wxBitmapType type=wxCURSOR_DEFAULT_TYPE, int hotSpotX=0, int hotSpotY=0)Ĭonstructs a cursor by passing a string resource name or filename. WxCursor (const char bits, int width, int height, int hotSpotX=-1, int hotSpotY=-1, const char maskBits=NULL)Ĭonstructs a cursor by passing an array of bits (XBM data). See also wxBitmap, wxIcon, wxWindow::SetCursor(), wxSetCursor(), wxStockCursor
#Change cursor color hots windows
It works on Windows and GTK+.Ĭategory: Graphics Device Interface (GDI)

The following is an example of creating a cursor from 32x32 bitmap data (down_bits) and a mask (down_mask) where 1 is black and 0 is white for the bits, and 1 is opaque and 0 is transparent for the mask. The wxWidgets convention is to set the cursor for a window, as in X, rather than to set it globally as in MS Windows, although a global wxSetCursor() function is also available for MS Windows use.

Platform-specific methods for creating a wxCursor object are catered for, and this is an occasion where conditional compilation will probably be required (see wxIcon for an example).Ī single cursor object may be used in many windows (any subwindow type). Therefore, separate cursors will be created for the different environments.

A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click.Īs with icons, cursors in X and MS Windows are created in a different manner.
