.TH wxCursor 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxCursor \- Functions for wxCursor class .SH DESCRIPTION .LP 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\&. As with icons, cursors in X and MS Windows are created in a different manner\&. Therefore, separate cursors will be created for the different environments\&. Platform-specific methods for creating a \fIwxCursor\fR\& object are catered for, and this is an occasion where conditional compilation will probably be required (see \fIwxIcon\fR\& for an example)\&. .LP A single cursor object may be used in many windows (any subwindow type)\&. 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 \fIwx_misc:setCursor/1\fR\& function is also available for MS Windows use\&. .LP Creating a Custom Cursor .LP 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\&. It works on Windows and GTK+\&. .LP Predefined objects (include wx\&.hrl): .LP See: \fIwxBitmap\fR\&, \fIwxIcon\fR\&, \fIwxWindow:setCursor/2\fR\&, \fIwx_misc:setCursor/1\fR\&, ?wxStockCursor .LP This class is derived (and can use functions) from: \fIwxBitmap\fR\& .LP wxWidgets docs: wxCursor .SH DATA TYPES .nf \fBwxCursor()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxCursor() .br .fi .br .RS .LP Default constructor\&. .RE .LP .nf .B new(CursorName) -> wxCursor() .br .fi .br .nf .B new(Image) -> wxCursor() .br .fi .br .nf .B new(CursorId) -> wxCursor() .br .fi .br .RS .LP Types: .RS 3 CursorId = wx:wx_enum() .br .RE .RE .RS .LP Constructs a cursor using a cursor identifier\&. .RE .LP .nf .B new(CursorName, Options :: [Option]) -> wxCursor() .br .fi .br .RS .LP Types: .RS 3 CursorName = unicode:chardata() .br Option = .br {type, wx:wx_enum()} | .br {hotSpotX, integer()} | .br {hotSpotY, integer()} .br .RE .RE .RS .LP Constructs a cursor by passing a string resource name or filename\&. .LP The arguments \fIhotSpotX\fR\& and \fIhotSpotY\fR\& are only used when there\&'s no hotspot info in the resource/image-file to load (e\&.g\&. when using \fIwxBITMAP_TYPE_ICO\fR\& under wxMSW or \fIwxBITMAP_TYPE_XPM\fR\& under wxGTK)\&. .RE .LP .nf .B destroy(This :: wxCursor()) -> ok .br .fi .br .RS .LP Destroys the cursor\&. .LP See reference-counted object destruction for more info\&. .LP A cursor can be reused for more than one window, and does not get destroyed when the window is destroyed\&. wxWidgets destroys all cursors on application exit, although it is best to clean them up explicitly\&. .RE .LP .nf .B ok(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxCursor() .br .RE .RE .RS .LP See: \fIisOk/1\fR\&\&. .RE .LP .nf .B isOk(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxCursor() .br .RE .RE .RS .LP Returns true if cursor data is present\&. .RE