CStmGestureContext Class Reference

class CStmGestureContext : public CBase, public stmGesture::MGestureListener

Gesture context represents a certain configuration of gesture parameters (including what gestures are enabled) and gesture listeners. Context can be created beforehand and reused later. The assumed use of a context is to have rough correspondence between UI view and enabled gestures.

Note:

Gesture contexts are created by an instance of CStmGestureEngine.

Inherits from

Constructor & Destructor Documentation

CStmGestureContext(CStmGestureEngine &)

CStmGestureContext(CStmGestureEngine &aEngine)

Constructor

Parameters

CStmGestureEngine & aEngine

~CStmGestureContext()

~CStmGestureContext()

Member Functions Documentation

ActivateL()

IMPORT_C voidActivateL()

Initialize context configuration on the Gesture Engine.

AddListenerL(MStmGestureListener *, TInt)

IMPORT_C voidAddListenerL(MStmGestureListener *aListener,
TIntaPos = 0
)

Add listener to the gesture processing context.

Parameters

MStmGestureListener * aListenerListener object
TInt aPos = 0Position of inserted listener which determines order in which it receives gesture events (0 == first, before existing)

Config()

CStmGestureParameters &Config()[inline]

gesture configuration

ConstructL()

voidConstructL()[private]

ContextControl()

CCoeControl *ContextControl()[inline]

Context control

Deactivate()

IMPORT_C voidDeactivate()

deactivate context configuration on the Gesture Engine.

DispatchGestureEventL(TStmGestureUid, MStmGesture *)

voidDispatchGestureEventL(TStmGestureUidaUid,
MStmGesture *aGesture
)[private]

Parameters

TStmGestureUid aUid
MStmGesture * aGesture

EnableRecognizerL(TStmGestureUid)

voidEnableRecognizerL(TStmGestureUidaUid)[private]

Parameters

TStmGestureUid aUid

EnableRecognizersL()

voidEnableRecognizersL()[private]

Id()

TInt Id()const [inline]

Context id

IsActive()

TBool IsActive()[inline]

is gesture context is active ?

Listeners()

const RPointerArray< MStmGestureListener > &Listeners()const [inline]

To get the list of listeners

RemoveListener(MStmGestureListener *)

IMPORT_C TIntRemoveListener(MStmGestureListener *aListener)

Remove listener from the gesture processing context.

Parameters

MStmGestureListener * aListenerListener object

SetContext(CCoeControl *)

IMPORT_C voidSetContext(CCoeControl *aControl)

To set the context configuration in Gesture Engine.

Parameters

CCoeControl * aControl

SetLogging(TInt)

voidSetLogging(TIntaEnabled)[inline]

Enable Logging

Parameters

TInt aEnabled

SuspendRecognizer(TStmGestureUid)

voidSuspendRecognizer(TStmGestureUidaUid)[private]

Parameters

TStmGestureUid aUid

gestureEnter(MStmGesture &)

voidgestureEnter(MStmGesture &theGesture)[virtual]

The method that will be called by the gesture framework to inform about a gesture being recognised.

Parameters

MStmGesture & theGesture

gestureExit(TStmGestureUid)

voidgestureExit(TStmGestureUidgestureUid)[virtual]
The method to inform the listener that the gesture has ended. This happens if another gesture is recognised or e.g. the Release UI event is handled.
Note:

Some gestures produce only gestureEnter() callback and no gestureExit().

Parameters

TStmGestureUid gestureUid

getOwner()

CCoeControl *getOwner()[virtual]

The listener needs to provide the target control (CCoeControl*) to the standard gestures. Since the gesture framework processes all events in the application, the gesture recognisers check whether the events are targeted to the listener owning control. Not all gesture recognisers need to perform this check.

Member Data Documentation

TBool iActivated

TBool iActivated[private]

CStmGestureParameters * iConfig

CStmGestureParameters *iConfig[private]

TInt iCtxtId

TInt iCtxtId[private]

CStmGestureEngine & iEngine

CStmGestureEngine &iEngine[private]

CGestureEventSender * iEventSender

CGestureEventSender *iEventSender[private]

RPointerArray< MStmGestureListener > iListeners

RPointerArray< MStmGestureListener >iListeners[private]

TBool iLogging

TBool iLogging[private]

CCoeControl * iOwnerControl

CCoeControl *iOwnerControl[private]

MStmGestureRecogniser * iRecognizers

MStmGestureRecogniser *iRecognizers[private]