Public Member Functions

# wxSetCursorEvent Class Reference
[Events]

`#include <wx/event.h>`

Inheritance diagram for wxSetCursorEvent:
[legend]

## Detailed Description

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 wxSetCursorEvent::SetCursor to specify the cursor you want to be displayed.

## Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxSetCursorEvent& event)

Event macros:

- EVT_SET_CURSOR(func):
  Process a `wxEVT_SET_CURSOR` event.

##

Library: wxCore
Category: Events

See also:
  wxSetCursor, wxWindow::wxSetCursor

## Public Member Functions
| wxSetCursorEvent (wxCoord x=0, wxCoord y=0)
| Constructor, used by the library itself internally to initialize the event object.
const wxCursor & | GetCursor () const
| Returns a reference to the cursor specified by this event.
wxCoord | GetX () const
| Returns the X coordinate of the mouse in client coordinates.
wxCoord | GetY () const
| Returns the Y coordinate of the mouse in client coordinates.
bool | HasCursor () const
| Returns true if the cursor specified by this event is a valid cursor.
void | SetCursor (const wxCursor &cursor)
| Sets the cursor associated with this event.

List of all members.

## Constructor & Destructor Documentation

wxSetCursorEvent::wxSetCursorEvent | ( | wxCoord | x = `0`,
|  | wxCoord | y = `0` |
| ) |  |  |

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

## Member Function Documentation

const wxCursor& wxSetCursorEvent::GetCursor | ( |  | ) | const

Returns a reference to the cursor specified by this event.

wxCoord wxSetCursorEvent::GetX | ( |  | ) | const

Returns the X coordinate of the mouse in client coordinates.

wxCoord wxSetCursorEvent::GetY | ( |  | ) | const

Returns the Y coordinate of the mouse in client coordinates.

bool wxSetCursorEvent::HasCursor | ( |  | ) | const

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

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

void wxSetCursorEvent::SetCursor | ( | const wxCursor & | cursor | ) |

Sets the cursor associated with this event.

|  | [ top ]