MCoeFepObserver Class Reference

#include <mw/fepbase.h>

Link against: fepbase.lib

class MCoeFepObserver
Public Member Functions
virtual IMPORT_C voidHandleCompletionOfTransactionL()
virtual IMPORT_C voidHandleStartOfTransactionL()

Detailed Description

Specifies the mixin protocol for observing a FEP transaction.

Applications which need to implement this protocol should derive from this class. The functions are not pure virtual because most applications will only need to override one of them.

See also: CCoeFep::MakeDeferredFunctionCall()

Member Function Documentation

HandleCompletionOfTransactionL ( )

IMPORT_C voidHandleCompletionOfTransactionL()[virtual]

If an application needs to get more information about a FEP transaction than is provided by the FEP framework, (for example, a Japanese FEP may want the pronunciation of the transaction's text as well as the text itself), then it should override this function to retrieve the information it wants from the FEP.

This assumes that the application knows which concrete FEP is above it so that it can call the specialised functions in that FEP. An application can safely do this by calling CCoeEnv::Fep() to get the address of the current FEP (this is NULL if there is no FEP above it) and downcasting this address to the specific derived class of the FEP it is expecting, on condition that the CCoeEnv::FepUid() function returns the UID of the FEP it is expecting.

This function is called by the FEP framework. If the FEP is doing inline editing, HandleCompletionOfTransactionL() is called inside MCoeFepAwareTextEditor's CommitFepInlineEditL(). If it isn't doing inline editing, HandleCompletionOfTransactionL() is called (inside an active object) after the key events generated by one or more calls to CCoeFep's SimulateKeyEventsL() have been sent to the application.

HandleStartOfTransactionL ( )

IMPORT_C voidHandleStartOfTransactionL()[virtual]

Handles the start of a FEP transaction.

The implementation of this function might move focus to an existing edit window, or might launch a new dialog (if the dialog should appear as soon as the user starts composing their text in the FEP rather than when the text contained in the FEP is committed to it).

This function should be called by the FEP when it receives the first event which begins a FEP transaction. It should be called after using CoeFep::MakeDeferredFunctionCall() to handle the event.

The FEP calls this function indirectly by calling CCoeEnv::ForEachFepObserverCall() passing in FepObserverHandleStartOfTransactionL. Internally, this calls HandleStartOfTransactionL() for each MCoeFepObserver object that has been registered with the control environment by calling CCoeEnv::AddFepObserverL().

See also: CCoeFep::MakeDeferredFunctionCall()