.. include:: headings.inc .. _SetCursorEvent: ========================================================================================================================================== |phoenix_title| **SetCursorEvent** ========================================================================================================================================== A :ref:`SetCursorEvent` is generated from :ref:`Window` 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 :meth:`SetCursorEvent.SetCursor` to specify the cursor you want to be displayed. .. _SetCursorEvent-events: |events| Events Emitted by this Class ===================================== Handlers bound for the following event types will receive a :ref:`SetCursorEvent` parameter. - EVT_SET_CURSOR: Process a ``wxEVT_SET_CURSOR`` event. .. seealso:: :func:`SetCursor`, :func:`Window.wxSetCursor` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **SetCursorEvent** .. raw:: html

Inheritance diagram of SetCursorEvent

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~SetCursorEvent.__init__` Constructor, used by the library itself internally to initialize the event object. :meth:`~SetCursorEvent.GetCursor` Returns a reference to the cursor specified by this event. :meth:`~SetCursorEvent.GetX` Returns the X coordinate of the mouse in client coordinates. :meth:`~SetCursorEvent.GetY` Returns the Y coordinate of the mouse in client coordinates. :meth:`~SetCursorEvent.HasCursor` Returns ``True`` if the cursor specified by this event is a valid cursor. :meth:`~SetCursorEvent.SetCursor` Sets the cursor associated with this event. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~SetCursorEvent.Cursor` See :meth:`~SetCursorEvent.GetCursor` and :meth:`~SetCursorEvent.SetCursor` :attr:`~SetCursorEvent.X` See :meth:`~SetCursorEvent.GetX` :attr:`~SetCursorEvent.Y` See :meth:`~SetCursorEvent.GetY` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: SetCursorEvent(Event) A SetCursorEvent is generated from Window when the mouse cursor is about to be set as a result of mouse motion. **Possible constructors**:: SetCursorEvent(x=0, y=0) .. method:: __init__(self, x=0, y=0) Constructor, used by the library itself internally to initialize the event object. :param `x`: :type `x`: int :param `y`: :type `y`: int .. method:: GetCursor(self) Returns a reference to the cursor specified by this event. :rtype: :ref:`Cursor` .. method:: GetX(self) Returns the X coordinate of the mouse in client coordinates. :rtype: `int` .. method:: GetY(self) Returns the Y coordinate of the mouse in client coordinates. :rtype: `int` .. method:: HasCursor(self) Returns ``True`` if the cursor specified by this event is a valid cursor. :rtype: `bool` .. note:: You cannot specify NullCursor with this event, as it is not considered a valid cursor. .. method:: SetCursor(self, cursor) Sets the cursor associated with this event. :param `cursor`: :type `cursor`: Cursor .. attribute:: Cursor See :meth:`~SetCursorEvent.GetCursor` and :meth:`~SetCursorEvent.SetCursor` .. attribute:: X See :meth:`~SetCursorEvent.GetX` .. attribute:: Y See :meth:`~SetCursorEvent.GetY`