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 void ActivateL ( )

Initialize context configuration on the Gesture Engine.

AddListenerL(MStmGestureListener *, TInt)

IMPORT_C void AddListenerL ( MStmGestureListener * aListener,
TInt aPos = 0
)

Add listener to the gesture processing context.

Parameters

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

Config()

CStmGestureParameters & Config ( ) [inline]

gesture configuration

ConstructL()

void ConstructL ( ) [private]

ContextControl()

CCoeControl * ContextControl ( ) [inline]

Context control

Deactivate()

IMPORT_C void Deactivate ( )

deactivate context configuration on the Gesture Engine.

DispatchGestureEventL(TStmGestureUid, MStmGesture *)

void DispatchGestureEventL ( TStmGestureUid aUid,
MStmGesture * aGesture
) [private]

Parameters

TStmGestureUid aUid
MStmGesture * aGesture

EnableRecognizerL(TStmGestureUid)

void EnableRecognizerL ( TStmGestureUid aUid ) [private]

Parameters

TStmGestureUid aUid

EnableRecognizersL()

void EnableRecognizersL ( ) [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 TInt RemoveListener ( MStmGestureListener * aListener )

Remove listener from the gesture processing context.

Parameters

MStmGestureListener * aListener Listener object

SetContext(CCoeControl *)

IMPORT_C void SetContext ( CCoeControl * aControl )

To set the context configuration in Gesture Engine.

Parameters

CCoeControl * aControl

SetLogging(TInt)

void SetLogging ( TInt aEnabled ) [inline]

Enable Logging

Parameters

TInt aEnabled

SuspendRecognizer(TStmGestureUid)

void SuspendRecognizer ( TStmGestureUid aUid ) [private]

Parameters

TStmGestureUid aUid

gestureEnter(MStmGesture &)

void gestureEnter ( 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)

void gestureExit ( TStmGestureUid gestureUid ) [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]