GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.wxpython.org — wx.MouseEvent — wxPython 4.3.2 Docs
|
Constructor. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
If the argument is omitted, this returns |
|
If the argument is omitted, this returns |
|
If the argument is omitted, this returns |
|
Returns |
|
Returns |
|
Returns the mouse button which generated this event or |
|
Returns the number of mouse clicks for this event: 1 for a simple click, 2 for a double-click, 3 for a triple-click and so on. |
|
Returns the configured number of columns (or whatever) to be scrolled per wheel action. |
|
Returns the configured number of lines (or whatever) to be scrolled per wheel action. |
|
Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled). |
|
For magnify (pinch to zoom) events: returns the change in magnification. |
|
Gets the axis the wheel operation concerns. |
|
Get wheel delta, normally 120. |
|
Get wheel rotation, positive or negative indicates direction of rotation. |
|
Returns |
|
Returns |
|
Returns |
|
On Mac, has the user selected “Natural” scrolling in their System Preferences? Currently |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Properties Summary¶See |
|
See |
|
See |
|
See |
Class API¶Possible constructors:
MouseEvent(mouseEventType=wxEVT_NULL) -> None
This event class contains information about the events generated by the mouse: they include mouse buttons press and release events and mouse move events.
Constructor.
Valid event types are:
wxEVT_ENTER_WINDOW
wxEVT_LEAVE_WINDOW
wxEVT_LEFT_DOWN
wxEVT_LEFT_UP
wxEVT_LEFT_DCLICK
wxEVT_MIDDLE_DOWN
wxEVT_MIDDLE_UP
wxEVT_MIDDLE_DCLICK
wxEVT_RIGHT_DOWN
wxEVT_RIGHT_UP
wxEVT_RIGHT_DCLICK
wxEVT_AUX1_DOWN
wxEVT_AUX1_UP
wxEVT_AUX1_DCLICK
wxEVT_AUX2_DOWN
wxEVT_AUX2_UP
wxEVT_AUX2_DCLICK
wxEVT_MOTION
wxEVT_MOUSEWHEEL
wxEVT_MAGNIFY
mouseEventType (wx.EventType)
None
Returns True if the event was a first extra button double click.
bool
Returns True if the first extra button mouse button changed to down.
bool
Returns True if the first extra button mouse button changed to up.
bool
Returns True if the event was a second extra button double click.
bool
Returns True if the second extra button mouse button changed to down.
bool
Returns True if the second extra button mouse button changed to up.
bool
Returns True if the event was generated by the specified button.
but (MouseButton)
bool
See also
MouseState.ButtoinIsDown()
If the argument is omitted, this returns True if the event was a mouse double click event.
Otherwise the argument specifies which double click event was generated (see wx.Button for the possible values).
but (MouseButton)
bool
If the argument is omitted, this returns True if the event was a mouse button down event.
Otherwise the argument specifies which button-down event was generated (see wx.Button for the possible values).
but (MouseButton)
bool
If the argument is omitted, this returns True if the event was a mouse button up event.
Otherwise the argument specifies which button-up event was generated (see wx.Button for the possible values).
but (MouseButton)
bool
Returns True if this was a dragging event (motion while a button is depressed).
bool
See also
Returns True if the mouse was entering the window.
bool
See also
Returns the mouse button which generated this event or MOUSE_BTN_NONE if no button is involved (for mouse move, enter or leave event, for example).
Otherwise MOUSE_BTN_LEFT is returned for the left button down, up and double click events, MOUSE_BTN_MIDDLE and MOUSE_BTN_RIGHT for the same events for the middle and the right buttons respectively.
int
Returns the number of mouse clicks for this event: 1 for a simple click, 2 for a double-click, 3 for a triple-click and so on.
Currently this function is implemented only in Mac and returns -1 for the other platforms (you can still distinguish simple clicks from double-clicks as they generate different kinds of events however).
int
Added in version 2.9.0.
Returns the configured number of columns (or whatever) to be scrolled per wheel action.
Default value under most platforms is three.
int
Added in version 2.9.5.
See also
Returns the configured number of lines (or whatever) to be scrolled per wheel action.
Default value under most platforms is three.
int
See also
Returns the logical mouse position in pixels (i.e. translated according to the translation set for the DC, which usually indicates that the window has been scrolled).
For magnify (pinch to zoom) events: returns the change in magnification.
A value of 0 means no change, a positive value means we should enlarge (or zoom in), a negative value means we should shrink (or zoom out).
This method is only valid to call for wxEVT_MAGNIFY events which are currently only generated under macOS.
float
Added in version 4.1/wxWidgets-3.1.0.
See also
Gets the axis the wheel operation concerns.
Usually the mouse wheel is used to scroll vertically so MOUSE_WHEEL_VERTICAL is returned but some mice (and most trackpads) also allow to use the wheel to scroll horizontally in which case MOUSE_WHEEL_HORIZONTAL is returned.
Notice that before wxWidgets 2.9.4 this method returned int .
Get wheel delta, normally 120.
This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.
int
Get wheel rotation, positive or negative indicates direction of rotation.
Current devices all send an event when rotation is at least +/-WheelDelta, but finer resolution devices can be created in the future.
Because of this you shouldn’t assume that one event is equal to 1 line, but you should be able to either do partial line scrolling or wait until several events accumulate before scrolling.
int
Returns True if the event was a mouse button event (not necessarily a button down event - that may be tested using ButtonDown ).
bool
Returns True if the system has been setup to do page scrolling with the mouse wheel instead of line scrolling.
bool
Returns True if the event was synthesized from a touch event.
bool
Added in version 4.3/wxWidgets-3.3.0.
On Mac, has the user selected “Natural” scrolling in their System Preferences? Currently False on all other OS’s.
“Natural” scrolling means that content scrolling happens in the opposite direction, and if you are indeed scrolling content then you don’t need to use this function because macOS has already inverted the scroll direction. But there can be special situations where you want the mouse wheel action to work always in the same direction and in that case you will need this function.
bool
Added in version 4.1/wxWidgets-3.1.3.
Returns True if the mouse was leaving the window.
bool
See also
Entering .
Returns True if the event was a left double click.
bool
Returns True if the left mouse button changed to down.
bool
Returns True if the left mouse button changed to up.
bool
Returns True if the event is a magnify (i.e. pinch to zoom) event.
Such events are currently generated only under macOS.
bool
Added in version 4.1/wxWidgets-3.1.0.
See also
Returns True if the Meta key was down at the time of the event.
bool
Returns True if the event was a middle double click.
bool
Returns True if the middle mouse button changed to down.
bool
Returns True if the middle mouse button changed to up.
bool
Returns True if this was a motion event and no mouse buttons were pressed.
If any mouse button is held pressed, then this method returns False and Dragging returns True.
bool
Returns True if the event was a right double click.
bool
Returns True if the right mouse button changed to down.
bool
Returns True if the right mouse button changed to up.
bool
None
None
None
None
None
See GetLinesPerAction and SetLinesPerAction
See GetWheelAxis and SetWheelAxis
See GetWheelDelta and SetWheelDelta
See GetWheelRotation and SetWheelRotation