Search documentation of wx

# View Source wxSetCursorEvent (wx v2.4.2)

Functions for wxSetCursorEvent class

A `wxSetCursorEvent` is generated from `wxWindow` when the mouse cursor is about to be set as a result of mouse motion.

This event gives the application the chance to perform specific mouse cursor processing based on the current position of the mouse within the window. Use `setCursor/2` to specify the cursor you want to be displayed.

See: `wx_misc:setCursor/1`, `wxWindow:setCursor/2`

This class is derived (and can use functions) from: `wxEvent`

wxWidgets docs: wxSetCursorEvent

## Events

Use `wxEvtHandler:connect/3` with `wxSetCursorEventType` to subscribe to events of this type.

# Summary

## Types

wxSetCursor()
wxSetCursorEvent()
wxSetCursorEventType()

## Functions

getCursor(This)

Returns a reference to the cursor specified by this event.

getX(This)

Returns the X coordinate of the mouse in client coordinates.

getY(This)

Returns the Y coordinate of the mouse in client coordinates.

hasCursor(This)

Returns true if the cursor specified by this event is a valid cursor.

setCursor(This, Cursor)

Sets the cursor associated with this event.

# Types

Link to this type

# wxSetCursor()

View Source

    -type wxSetCursor() ::
              #wxSetCursor{type :: wxSetCursorEvent:wxSetCursorEventType(),
                           x :: integer(),
                           y :: integer(),
                           cursor :: wxCursor:wxCursor()}.

Link to this type

# wxSetCursorEvent()

View Source

    -type wxSetCursorEvent() :: wx:wx_object().

Link to this type

# wxSetCursorEventType()

View Source

    -type wxSetCursorEventType() :: set_cursor.

# Functions

Link to this function

# getCursor(This)

View Source

    -spec getCursor(This) -> wxCursor:wxCursor() when This :: wxSetCursorEvent().

Returns a reference to the cursor specified by this event.

Link to this function

# getX(This)

View Source

    -spec getX(This) -> integer() when This :: wxSetCursorEvent().

Returns the X coordinate of the mouse in client coordinates.

Link to this function

# getY(This)

View Source

    -spec getY(This) -> integer() when This :: wxSetCursorEvent().

Returns the Y coordinate of the mouse in client coordinates.

Link to this function

# hasCursor(This)

View Source

    -spec hasCursor(This) -> boolean() when This :: wxSetCursorEvent().

Returns true if the cursor specified by this event is a valid cursor.

Remark: You cannot specify wxNullCursor with this event, as it is not considered a valid cursor.

Link to this function

# setCursor(This, Cursor)

View Source

    -spec setCursor(This, Cursor) -> ok when This :: wxSetCursorEvent(), Cursor :: wxCursor:wxCursor().

Sets the cursor associated with this event.