wx.GestureEvent¶This is the base class for all supported gesture events.
New 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.
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. |
Class API¶wx.GestureEvent(Event)¶Possible constructors:
GestureEvent(winid=0, type=wxEVT_NULL)
This is the base class for all supported gesture events.
__init__(self, winid=0, type=wxEVT_NULL)¶Constructor.
winid (wx.WindowID) –
type (wx.EventType) –
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.
IsGestureEnd(self)¶Returns True if the event was the last in a gesture sequence.
bool
IsGestureStart(self)¶Returns True if the event was the first in a gesture sequence.
bool
SetGestureEnd(self, isEnd=True)¶Sets the event to be the last in a gesture sequence.
isEnd (bool) –
SetGestureStart(self, isStart=True)¶Sets the event to be the first in a gesture sequence.
isStart (bool) –
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.
pos (wx.Point) –
Position¶See GetPosition and SetPosition