wxRuby Documentation Home

Wx::SetCursorEvent

A SetCursorEvent is generated 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 set_cursor to
specify the cursor you want to be displayed.

Derived from

Event

Object

See also

::SetCursor
Window#set_cursor

Event table macros

To process a set cursor event, use this event handler macro to direct input to a member
function that takes a SetCursorEvent argument.

evt_set_cursor() { | event | … } Process a EVT_SET_CURSOR event.

Methods

SetCursorEvent.new

SetCursorEvent.new(%(arg-type)Integer% x = 0, Integer y = 0)

Constructor, used by the library itself internally to initialize the event
object.

SetCursorEvent#get_cursor

Cursor get_cursor()

Returns a reference to the cursor specified by this event.

SetCursorEvent#get_x

Integer get_x()

Returns the X coordinate of the mouse in client coordinates.

SetCursorEvent#get_y

Integer get_y()

Returns the Y coordinate of the mouse in client coordinates.

SetCursorEvent#has_cursor

Boolean has_cursor()

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

Remarks

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

SetCursorEvent#set_cursor

set_cursor(%(arg-type)Cursor% cursor)

Sets the cursor associated with this event.

[This page automatically generated from the Textile source at 2023-06-03 08:07:33 +0000]