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
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).
bool ( button-down)
Returns TRUE if the event is a mouse button down event.
bool ( control-down)
Returns TRUE if the control key is down.
bool ( dragging)
Returns TRUE if the event is a dragging event (holding a mouse button down and moving).
bool ( left-down)
Returns TRUE if the left mouse button is down.
bool ( left-up)
Returns TRUE if the left mouse button is up.
bool ( is-button)
Returns TRUE the event is a button press or release.
bool ( middle-down)
Returns TRUE if the middle mouse button is down.
bool ( middle-up)
Returns TRUE if the middle mouse button is up.
double ( position-x)
Returns the mouse x-position.
double ( position-y)
Returns the mouse y-position.
bool ( right-down)
Returns TRUE if the right mouse button is down.
bool ( right-up)
Returns TRUE if the right mouse button is up.
bool ( shift-down)
Returns TRUE if the shift key is down.