Contents Up Previous Next

wxMouseEvent is-a wxEvent

A mouse event identifier is passed to the canvas on-event handler. The state of the mouse buttons (and some keys) can be examined by calling the following functions.

wxMouseEvent button
wxMouseEvent button-down
wxMouseEvent control-down
wxMouseEvent dragging
wxMouseEvent left-down
wxMouseEvent left-up
wxMouseEvent is-button
wxMouseEvent middle-down
wxMouseEvent middle-up
wxMouseEvent position-x
wxMouseEvent position-y
wxMouseEvent right-down
wxMouseEvent right-up
wxMouseEvent shift-down


wxMouseEvent button

bool ( button long button)

Returns TRUE if the given button is changing state. button may be 1, 2 or 3 (left, middle and right buttons respectively).


wxMouseEvent button-down

bool ( button-down)

Returns TRUE if the event is a mouse button down event.


wxMouseEvent control-down

bool ( control-down)

Returns TRUE if the control key is down.


wxMouseEvent dragging

bool ( dragging)

Returns TRUE if the event is a dragging event (holding a mouse button down and moving).


wxMouseEvent left-down

bool ( left-down)

Returns TRUE if the left mouse button is down.


wxMouseEvent left-up

bool ( left-up)

Returns TRUE if the left mouse button is up.


wxMouseEvent is-button

bool ( is-button)

Returns TRUE the event is a button press or release.


wxMouseEvent middle-down

bool ( middle-down)

Returns TRUE if the middle mouse button is down.


wxMouseEvent middle-up

bool ( middle-up)

Returns TRUE if the middle mouse button is up.


wxMouseEvent position-x

double ( position-x)

Returns the mouse x-position.


wxMouseEvent position-y

double ( position-y)

Returns the mouse y-position.


wxMouseEvent right-down

bool ( right-down)

Returns TRUE if the right mouse button is down.


wxMouseEvent right-up

bool ( right-up)

Returns TRUE if the right mouse button is up.


wxMouseEvent shift-down

bool ( shift-down)

Returns TRUE if the shift key is down.