Location:
fepbase.h
Link against: fepbase.lib
MCoeFepAwareTextEditor_Extension1
Supported from 6.1
An interface class which may be derived from by text editors to enable FEPs to store state information inside the editor.
The CState
class, defined within the scope of MCoeFepAwareTextEditor_Extension1
represents the state information. This is information specific to the control which is only of interest to the FEP.
A class which implements this interface must implement the pure virtual functions State()
and SetStateTransferingOwnershipL()
, to get and set the state. The class should also implement the MCoeFepAwareTextEditor
interface. It must override the private virtual MCoeFepAwareTextEditor::Extension1()
to return a pointer to itself (the default implementation returns NULL). The private virtual MCoeFepAwareTextEditor::Extension1()
function is called by the public, non-virtual MCoeFepAwareTextEditor::Extension1()
function.
For example, if a FEP wants to set some state information in a text editor which is about to lose focus, the FEP should first call the editor's Extension1()
function. If this returns non-NULL, the FEP should call the editor's implementation of SetStateTransferingOwnershipL()
, passing in an object of a class derived from CState
, which holds the state information. It should also pass in a UID which uniquely identifies the FEP. Later, when focus returns to the editor, the FEP can call State()
to retrieve the state information it previously set. Note that CState
has several reserved functions, to enable it to be extended in future, while retaining backwards compatibility.
Defined in MCoeFepAwareTextEditor_Extension1
:
CState
, SetStateTransferingOwnershipL()
, State()
virtual void SetStateTransferingOwnershipL(CState* aState, TUid aTypeSafetyUid)=0;
Sets state information in the text editor.
This function must only transfer ownership of the state object after it has successfully done everything that can leave.
|
virtual CState* State(TUid aTypeSafetyUid)=0;
Gets the state information previously set using SetStateTransferingOwnershipL()
. This function does not transfer ownership. The function should first check that aTypeSafetyUid
matches the UID value previously specified by SetStateTransferingOwnershipL()
. If it doesn't match, the function should return NULL.
|
|
CState
State information for a text editor control. This is information specific to the control which is only of interest to the FEP which sets it.
|
Defined in MCoeFepAwareTextEditor_Extension1::CState
:
~CState()
, BaseConstructL()
, CState()
Inherited from CBase
:
operator new()
CState()
protected: CState();
Empty default constructor.
BaseConstructL()
protected: void BaseConstructL();
Empty second phase base class constructor. This function should be called from derived classes at the beginning of their ConstructL()
even though it is currently empty. This is because this class may be extended in future to own resources, which will be allocated in BaseConstructL()
.
~CState()
virtual ~CState();
Empty virtual destructor. This is present because the class may be extended in the future to own resources.