Location:
fepbase.h
MCoeFepObserver
Supported from 6.0
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.
Defined in MCoeFepObserver
:
HandleCompletionOfTransactionL()
, HandleStartOfTransactionL()
virtual void HandleStartOfTransactionL();
Handles the start of a FEP transaction. The implementation of
this function might move focus to an existing edit window
(CEikEdwin
), 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 cone environment by calling
CCoeEnv::AddFepObserverL()
.
virtual void HandleCompletionOfTransactionL();
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 HandleCompletionOfTransactionL()
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.