stmGesture::MGestureRecogniserIf Class Reference

class stmGesture::MGestureRecogniserIf

MGestureRecogniserIf defines the interface needed to be implemented by every gesture recognition element. The gesture recogniser gets the UI events and needs to determine whether they define the expected gesture.

Public Member Functions
~MGestureRecogniserIf ()
void enable (bool)
void enableLogging (bool)
TGestureUid gestureUid ()
bool isEnabled ()
TGestureRecognitionState recognise (int, MGestureEngineIf *)
void release ( MGestureEngineIf *)
void setOwner ( CCoeControl *)

Constructor & Destructor Documentation

~MGestureRecogniserIf()

~MGestureRecogniserIf ( ) [inline, virtual]

Virtual destuructor.

Member Functions Documentation

enable(bool)

void enable ( bool enableRecogniser ) [pure virtual]

Enable or disable recogniser. E.g. if two gestures are related so that a gesture ending recogniser needs to be activated to stop a t5imer driven behaviour it is useful to add the recogniser to the top of the list and then disable it until needed.

Parameters

bool enableRecogniser

enableLogging(bool)

void enableLogging ( bool loggingEnabled ) [pure virtual]

for testing purposes

Parameters

bool loggingEnabled

gestureUid()

TGestureUid gestureUid ( ) const [pure virtual]

Return the type of the gesture recogniser

isEnabled()

bool isEnabled ( ) [pure virtual]

Get the state of the gesture recogniser, whether it is enabled or not

recognise(int, MGestureEngineIf *)

TGestureRecognitionState recognise ( int numOfActiveStreams,
MGestureEngineIf * ge
) [pure virtual]

Process the UI event. Note that a gesture may take control only if it sends out a gesture notification. (or is it so?) Until no gesture recogniser has sent a gesture notification, all recognisers who have not returned ENotMyGesture are eligible, based on the order they are in the list.

The gesture engine may be either in dynamic gestures mode or fixed gestures mode. In dynamic gestures mode each time an UI event is processed, engine will call each gesture recogniser until one of the recognisers returns EGestureActive.

In fixed gestures mode the index of the gesture recogniser first returning EGestureActive is stored and the subsequent UI events are processed so that only that recogniser is allowed to send gesture notification. If it returns !=EGestureActive, it relinguishes the control.

Parameters

int numOfActiveStreams : indicates how many pointers are currently active.
MGestureEngineIf * ge the gesture engine. The Gesture recogniser uses this to get the current active events.

release(MGestureEngineIf *)

void release ( MGestureEngineIf * ge ) [pure virtual]

In dynamic gestures mode the gesture engine will call release of the recogniser who lost activation status because a preceding recogniser in the list took control.

Note that the recogniser must then do whatever (if anything) is needed to cancel the gesture.

Parameters

MGestureEngineIf * ge

setOwner(CCoeControl *)

void setOwner ( CCoeControl * owner ) [pure virtual]

Parameters

CCoeControl * owner