#include <mw/fepbase.h>
Link against: fepbase.lib
class MCoeFepAwareTextEditor_Extension1 |
Public Member Functions | |
---|---|
virtual IMPORT_C MCoeFepLayDocExtension * | GetFepLayDocExtension(TBool &) |
virtual IMPORT_C void | SetCursorType(TBool &, const TTextCursor &) |
pure virtual void | SetStateTransferingOwnershipL(CState *, TUid) |
virtual IMPORT_C void | StartFepInlineEditL(TBool &, const TCursorSelection &, const TDesC &, TInt, TBool, const MFormCustomDraw *, MFepInlineTextFormatRetriever &, MFepPointerEventHandlerDuringInlineEdit &) |
pure virtual CState * | State(TUid) |
An interface class which may be derived from by text editors to enable FEPs to store state information inside the editor. To be overridden by text-editors
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.
IMPORT_C MCoeFepLayDocExtension * | GetFepLayDocExtension | ( | TBool & | aSetToTrue | ) | [virtual] |
Retrieves the current MCoeFepLayDocExtension object from the text editor By not setting aSetToTrue to ETrue, we're explicitly saying that this method is not implemented here
Parameters | |
---|---|
aSetToTrue | is set to Etrue if the method implemented. |
IMPORT_C void | SetCursorType | ( | TBool & | aSetToTrue, |
const TTextCursor & | aTextCursor | |||
) | [virtual] |
Changes the cursor displayed to indicate different modes of operation. For example how text is enterered By not setting aSetToTrue to ETrue, we're explicitly saying that this method is not implemented here
Parameters | |
---|---|
aSetToTrue | set to ETrue if method implemented. |
aTextCursor | The new cursor to be displayed. |
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.
Parameters | |
---|---|
aState | Pointer to the state information object. |
aTypeSafetyUid | A UID which uniquely identifies the FEP which is calling this function. The text editor should store this value for use by the State() function. |
IMPORT_C void | StartFepInlineEditL | ( | TBool & | aSetToTrue, |
const TCursorSelection & | aCursorSelection, | |||
const TDesC & | aInitialInlineText, | |||
TInt | aPositionOfInsertionPointInInlineText, | |||
TBool | aCursorVisibility, | |||
const MFormCustomDraw * | aCustomDraw, | |||
MFepInlineTextFormatRetriever & | aInlineTextFormatRetriever, | |||
MFepPointerEventHandlerDuringInlineEdit & | aPointerEventHandlerDuringInlineEdit | |||
) | [virtual] |
Updates the inline text.
Called when a character is added to or deleted from the inline text.
The descriptor aNewInlineText contains the entire new inline text string, not just the new text to be combined with the old inline text.
Starts a FEP inline editing transaction.
Before starting the transaction, sets the range of characters in the text editor which should be selected using aCursorSelection, without visually highlighting the selected characters.
This method can be used to avoid flicker when selecting a range of characters followed by starting a FEP inline editing transaction.
Inserts a descriptor containing the initial inline text into the text editor. The inline text should normally replace any selected text.
Parameters | |
---|---|
aSetToTrue | Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that this is the implemented version and not the previous reserved funtion. |
aCursorSelection | The position of any hilighted text. |
aPositionOfInsertionPointInInlineText | The position of the insertion point (i.e. the cursor) within the inline text string aNewInlineText. This is an offset from the start of the string. |
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.
Parameters | |
---|---|
aTypeSafetyUid | A UID which uniquely identifies the FEP which is calling this function. The purpose of this is to enable the FEP to safely downcast the CState pointer returned by this function to a pointer to a derived class known about by the FEP. |