GestureHelper::MGestureEvent Class Reference

class GestureHelper::MGestureEvent

a gesture event

Member Functions Documentation

Code(TAxis)

TGestureCode Code ( TAxis aRelevantAxis ) const [pure virtual]

Parameters

TAxis aRelevantAxis indicates whether only x, y or both coordinates should be considered when determining the code. For example, if client specifies EAxisVertical as relevant axis, a swipe to left and slightly up would result in an "swipe up" code, and not "swipe left" code. If client specifies EAxisHorizontal or EAxisBoth, "swipe left" code is returned.

CurrentPos()

TPoint CurrentPos ( ) const [pure virtual]

Distance()

TPoint Distance ( ) const [pure virtual]

IsHolding()

TBool IsHolding ( ) const [pure virtual]

PinchCentrePoint()

TPoint PinchCentrePoint ( ) const [pure virtual]

Centre point of the two touch points

Used only for pinch. Returns TPoint(0,0) for other gestures.

PinchPercent()

TInt PinchPercent ( ) const [pure virtual]

Pinch distance

Used only for pinch. Returns 0 for other gestures.

Speed()

TRealPoint Speed ( ) const [pure virtual]

SpeedPercent(const TRect &)

TRealPoint SpeedPercent ( const TRect & aEdges ) const [pure virtual]

Abstracts the algorithm to calculate speed during swipe and hold. This algorithm (currently) assumes that max speed is achieved at the edges of an area.

Parameters

const TRect & aEdges represents the coordinates of the rectange on which speed is calculated. Speed will reach maximum if stylus is on the edge or beyond the rect. In practise, the value should match the area of the layout that contains the scrollable visuals. For example, if the control area is the whole screen, the rect should be the screen rect.

StartPos()

TPoint StartPos ( ) const [pure virtual]

Visual()

CAlfVisual * Visual ( ) const [pure virtual]

Member Enumerations Documentation

Enum TAxis

X and Y axes, or both

Enumerators

EAxisBoth
EAxisHorizontal
EAxisVertical