wx.GestureEvent¶
This is the base class for all supported gesture events.
Added in version 4.1/wxWidgets-3.1.1.
Note
Gesture events are not generated by default, you must call wx.Window.EnableTouchEvents
with the appropriate parameter to request their generation.
Class Hierarchy¶
Known Subclasses¶
wx.LongPressEvent, wx.PanGestureEvent, wx.PressAndTapEvent, wx.RotateGestureEvent, wx.TwoFingerTapEvent, wx.ZoomGestureEvent
Methods Summary¶
Constructor. |
|
Returns the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event, center of box formed by 2 fingers for Two Finger Tap event and position of the pressed finger for Press and Tap Event. |
|
Returns |
|
Returns |
|
Sets the event to be the last in a gesture sequence. |
|
Sets the event to be the first in a gesture sequence. |
|
Sets the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event. |
Properties Summary¶
See |
Class API¶
- class wx.GestureEvent(Event)¶
Possible constructors:
GestureEvent(winid=0, type=wxEVT_NULL) -> None
This is the base class for all supported gesture events.
Methods¶
- __init__(self, winid=0, type=wxEVT_NULL)¶
Constructor.
- Parameters:
winid (wx.WindowID)
type (wx.EventType)
- Return type:
None
- GetPosition(self)¶
Returns the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event, center of box formed by 2 fingers for Two Finger Tap event and position of the pressed finger for Press and Tap Event.
- Return type:
- IsGestureEnd(self)¶
Returns
True
if the event was the last in a gesture sequence.- Return type:
bool
- IsGestureStart(self)¶
Returns
True
if the event was the first in a gesture sequence.- Return type:
bool
- SetGestureEnd(self, isEnd=True)¶
Sets the event to be the last in a gesture sequence.
- Parameters:
isEnd (bool)
- Return type:
None
- SetGestureStart(self, isStart=True)¶
Sets the event to be the first in a gesture sequence.
- Parameters:
isStart (bool)
- Return type:
None
- SetPosition(self, pos)¶
Sets the position where the event took effect, in client coordinates: position of Pan event, center of zoom for Zoom event, center of rotation for Rotate event.
- Parameters:
pos (wx.Point)
- Return type:
None
Properties¶
- Position¶
See
GetPosition
andSetPosition