API published in: S60 1st Ed
Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib
Required Capabilities
None
#include <eikedwin.h>
Inherits CEikBorderedControl, MEikScrollBarObserver, and MEikCcpuEditor.
Inherited by CAknNumericEdwin, and CEikGlobalTextEditor.
The properties of a particular Edwin object can be set using bitwise flags, which are defined in member enums (see TFlags
for example).
Edwins support Front End Processors, and so are a highly effective way of getting textual data from the user. The text currently being composed by the user is called the composition text.
Public Types |
|
enum | TFlags { EZeroEnumValue = 0x00000000, EKeepDocument = 0x00000001, ESegmentedStorage = 0x00000002, EWidthInPixels = 0x00000004, ENoAutoSelection = 0x00000008, EJustAutoCurEnd = 0x00000010, ENoWrap = 0x00000020, ELineCursor = 0x00000040, ENoHorizScrolling = 0x00000080, EInclusiveSizeFixed = 0x00000100, EUserSuppliedText = 0x00000200, EOwnsWindow = 0x00000400, EDisplayOnly = 0x00000800, EAlwaysShowSelection = 0x00001000, EReadOnly = 0x00002000, EAllowPictures = 0x00004000, EAllowUndo = 0x00008000, ENoLineOrParaBreaks = 0x00010000, EOnlyASCIIChars = 0x00020000, EResizable = 0x00040000, EIgnoreVirtualCursor = 0x00080000, ENoCustomDraw = 0x01000000, EAvkonEditor = 0x02000000, EAvkonDisableCursor = 0x04000000, EAvkonNotEditable = 0x08000000, EEdwinAlternativeWrapping = 0x10000000, EAvkonTabsEnabled = 0x20000000 } |
The following flags may be combined with a bitwise OR to form the aEdwinFlags argument to ConstructL (TInt, . More... |
|
enum | TClipboardFunc { ENoClipboard, ECut, ECopy, EPaste } |
Defines the possible commands for ClipboardL() . More... |
|
enum | TFindFlags { EFindDirectionUp = 0x01, EFindWholeWord = 0x02, EFindCaseSensitive = 0x04, EFindAgain = 0x08, ENoBusyMessage = 0x10, EReadOnlyFile = 0x20 } |
The following flags may be ORed together for text searches (see FindL() for example). More... |
|
enum | TSetContent { EUseText, ECopyText } |
When content is supplied to an Edwin using SetDocumentContentL() , this defines whether the new content is added to or has replaced the existing content. More... |
|
enum | TOwnershipType { EOwnsText, EDoesNotOwnText } |
Specifies whether the Edwin owns the document it is being used to edit. More... |
|
enum | TEdwinHotKeys { EHotKeyCut, EHotKeyCopy, EHotKeyPaste, EHotKeyUndo, EHotKeyFind, EHotKeyInsertChar, EHotKeyBold, EHotKeyItalic, EHotKeyUnderline, EHotKeyFont, EHotKeyInsertObject, EHotKeyEditObject, EHotKeyFormatObject } |
Enumerates the hotkeys that are defined an r_eik_edwin_ctrl_hotkeys or r_eik_edwin_shift_ctrl_hotkeys resource. More... |
|
Public Member Functions |
|
IMPORT_C | ~CEikEdwin () |
Destructor. |
|
IMPORT_C | CEikEdwin () |
C++ default constructor. |
|
IMPORT_C | CEikEdwin (const TGulBorder &aBorder) |
Constructor. |
|
IMPORT_C void | ConstructL (TInt aEdwinFlags=0, TInt aWidthInChars=0, TInt aTextLimit=0, TInt aNumberOfLines=0) |
Handles Symbian 2nd phase construction. |
|
IMPORT_C void | SetEdwinObserver (MEikEdwinObserver *aEdwinObserver) |
Sets the Edwin observer. |
|
IMPORT_C void | AddEdwinObserverL (MEikEdwinObserver *aEdwinObserver) |
Adds an observer of standard Edwin events to the list of observers, creating the list if necessary. |
|
IMPORT_C void | RemoveEdwinObserver (MEikEdwinObserver *aEdwinObserver) |
Removes the specified observer from the list of observers. |
|
IMPORT_C void | SetContainerWindowL () |
Creates the containing window for the Edwin if it does not already have one. |
|
IMPORT_C void | SetDocumentContentL (CGlobalText &aText, TSetContent aContent=CEikEdwin::ECopyText) |
Sets the Edwin’s editable content. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
From CCoeControl . |
|
IMPORT_C void | FocusChanged (TDrawNow aDrawNow) |
From CCoeControl . |
|
IMPORT_C void | ActivateL () |
From CCoeControl . |
|
IMPORT_C void | ConstructFromResourceL (TResourceReader &aReader) |
From CCoeControl . |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl . |
|
IMPORT_C TSize | MinimumSize () |
From CCoeControl . |
|
IMPORT_C void | Draw (const TRect &aRect) const |
From CCoeControl . |
|
IMPORT_C void | SetDimmed (TBool aDimmed) |
From CCoeControl . |
|
IMPORT_C void | SetContainerWindowL (const CCoeControl &aParent) |
From CCoeControl . |
|
virtual IMPORT_C void | GetColorUseListL (CArrayFix< TCoeColorUse > &aColorUseList) const |
From CCoeControl . |
|
virtual IMPORT_C void | HandleResourceChange (TInt aType) |
From CCoeControl . |
|
IMPORT_C TCoeInputCapabilities | InputCapabilities () const |
From CCoeControl . |
|
IMPORT_C void | SetInputCapabilitiesL (const TCoeInputCapabilities &aInputCapabilities) |
From CCoeControl . |
|
IMPORT_C void | WriteInternalStateL (RWriteStream &aWriteStream) const |
From CCoeControl . |
|
IMPORT_C void | HandleScrollEventL (CEikScrollBar *aScrollBar, TEikScrollEvent aEventType) |
From MEikScrollBarObserver . |
|
IMPORT_C void | OnReformatL (const CTextView *aTextView) |
From CTextView::MObserver . |
|
IMPORT_C TInt | TextLength () const |
Gets the number of characters in the document. |
|
IMPORT_C TInt | CursorPos () const |
Gets the cursor’s position within the document. |
|
IMPORT_C TInt | SelectionLength () const |
Gets the number of characters including non-printing characters within the selection. |
|
IMPORT_C TCursorSelection | Selection () const |
Gets the cursor selection. |
|
IMPORT_C void | ClearSelectionL () |
Removes the selection and any composition text. |
|
IMPORT_C void | SetSelectionL (TInt aCursorPos, TInt aAnchorPos) |
Sets the text selection. |
|
IMPORT_C void | SetCursorPosL (TInt aCursorPos, TBool aSelect) |
Sets the cursor’s position within the document. |
|
IMPORT_C void | SelectAllL () |
Selects the entire document. |
|
IMPORT_C void | CalculateWidth (TInt aWidthInChars) |
Recalculates the screen width of an Edwin from the specified number of character widths. |
|
IMPORT_C void | GetText (TDes &aDes) const |
Copies the entire document’s content into a descriptor. |
|
IMPORT_C HBufC * | GetTextInHBufL () const |
Gets a new buffer containing a copy of the whole text document. |
|
IMPORT_C void | SetTextL (const TDesC *aDes) |
Sets the document text of this Edwin from the contents of a descriptor. |
|
IMPORT_C void | ClipboardL (TClipboardFunc aClipboardFunc) |
Handles cut, copy and paste commands. |
|
IMPORT_C void | InsertFieldL (CTextField *aField, TUid aFieldType) |
Inserts a field at the current cursor position. |
|
IMPORT_C void | UpdateAllFieldsL () |
Updates all the fields in the document. |
|
IMPORT_C void | UpdateCurrentFieldL () |
Updates any text field at the current cursor position. |
|
IMPORT_C TInt | CountWords () |
Counts and returns the number of words in the document. |
|
IMPORT_C void | InsertFromTextFileL (const TFileName &aFileName, const CPlainText::TTextOrganisation aTextOrganisation=CPlainText::EOrganiseByLine) |
Inserts the contents of a text file into the text being edited at the current cursor position. |
|
IMPORT_C CPlainText * | Text () const |
Gets a pointer to the Edwin’s document contents. |
|
IMPORT_C void | CancelFepTransaction () |
Cancels any current transaction with the Edwin’s front-end processor. |
|
IMPORT_C void | HandleTextChangedL () |
Handles all modifications made by reformatting the entire document. |
|
IMPORT_C TInt | LayoutWidth () const |
Gets the width used for laying out the text inside the Edwin in pixels. |
|
IMPORT_C void | NotifyNewDocumentL () |
Formats and draws a new document, updates scrollbars if necessary. |
|
IMPORT_C void | NotifyNewFormatL () |
Reformats and redraws the document, updates scrollbars if necessary. |
|
IMPORT_C TBool | FindL (const TDesC *aFindText, TInt aFindFlags=0) |
Gets true if a substring is present in the text being edited before or after the cursor position. |
|
IMPORT_C TInt | FindTextL (const TDesC *aFindText, TInt aPos, TInt aFindFlags) |
Gets the cursor position of the matching text in the document. |
|
IMPORT_C void | ReplaceL (SEdwinFindModel *aFindModel) |
Replaces the highlighted text. |
|
IMPORT_C void | ReplaceAllL (SEdwinFindModel *aFindModel) |
Replaces all occurrences of a string with new text. |
|
IMPORT_C void | GetFindText (TDes *aFindText) |
Gets the current word or selection and searches for it. |
|
IMPORT_C void | UpdateScrollBarsL () |
Updates scrollbars. |
|
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL () |
Creates the Edwin scroll bar frame with no pre-allocation of memory for scroll bars. |
|
CEikScrollBarFrame * | CreatePreAllocatedScrollBarFrameL () |
Creates a pre-allocated scroll bar frame. |
|
CEikScrollBarFrame * | ScrollBarFrame () |
Gets the scroll bar frame surrounding this Edwin. |
|
IMPORT_C void | SetWordWrapL (TBool aWrapIsOn) |
Sets word wrapping on or off. |
|
virtual IMPORT_C TInt | LineCursorWidth () const |
Gets the width of a line cursor in pixels. |
|
IMPORT_C void | SetZoomFactorL (TZoomFactor *aZoomFactor) |
Sets the zoom factor of the document and reformats the document. |
|
IMPORT_C void | SetBackgroundColorL (TRgb aBackground) |
Sets the Edwin’s background colour. |
|
IMPORT_C void | SetWysiwygModeOn (TInt aLayoutWidth, MGraphicsDeviceMap *aDevice) |
Sets the format mode to be WYSIWYG. |
|
IMPORT_C void | SetWysiwygModeOff () |
Switches off the WYSIWYG mode. |
|
IMPORT_C void | UpdateLayoutWidth (TInt aLayoutWidth) |
Updates the text wrap width. |
|
IMPORT_C void | SendDataOverIrL () |
Sends the Edwin’s document using an infra red beamer. |
|
IMPORT_C void | ReceiveDataOverIrL () |
Receives an Edwin document using an infra red beamer. |
|
IMPORT_C void | SetAmountToFormatL (TBool aIsNewDoc=EFalse) |
Controls the formatting mode of the editor. |
|
IMPORT_C void | SetAmountToFormatL (TBool aIsNewDoc, TBool aReFormat) |
Controls the formatting mode of the editor. |
|
IMPORT_C void | SetPasteFromIrStore (TBool aPasteFromIrStore) |
Sets the EPasteFromIrStore flag. |
|
IMPORT_C void | PasteFromStoreL (CStreamStore &aStore, CStreamDictionary &aDict) |
Copies the contents of a stream store to the current cursor position, replacing any selected text. |
|
IMPORT_C void | CopyToStoreL (CStreamStore &aStore, CStreamDictionary &aDict) |
Copies the highlighted text into a stream store. |
|
IMPORT_C void | SetBorderViewMargins (TMargins8 aMargins) |
Sets the text view margins. |
|
IMPORT_C void | ForceScrollBarUpdateL () |
Forces the scrollbars to update now; this is a synchronous function. |
|
IMPORT_C void | SetDocumentOwnership (TOwnershipType aOwner) |
Sets whether the Edwin owns a document. |
|
IMPORT_C void | SetTextLimit (TInt aLimit) |
Sets the maximum number of characters that can be inserted. |
|
IMPORT_C void | RunCharMapDialogL () |
Displays a dialog allowing the user to choose a character from the character map. |
|
IMPORT_C TMargins8 | Margins () const |
Gets the text view margins. |
|
IMPORT_C TInt | UpperFullFormattingLength () const |
Gets the upper limit for formatting. |
|
IMPORT_C TInt | LowerPartialFormattingLength () const |
Gets the lower limit for formatting. |
|
IMPORT_C void | SetReadOnly (TBool aReadOnly) |
Sets the Edwin’s read-only flag so that documents displayed by Edwin cannot be edited by users. |
|
IMPORT_C TBool | IsReadOnly () const |
Determines whether the document being edited with Edwin is read-only. |
|
IMPORT_C void | CheckNotReadOnlyL () |
Determines whether the document being edited is read only. |
|
IMPORT_C void | SetAllowPictures (TBool aAllow) |
Sets whether the document accepts pictures. |
|
IMPORT_C void | CheckRemovePictures (TInt aStartPos, TInt aLength) |
Removes unwanted pictures. |
|
IMPORT_C void | SetRightWrapGutter (TInt aGap) |
Sets the minimum gap between text and the right hand edge of the Edwin when text is wrapped. |
|
IMPORT_C void | UndoL () |
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty. |
|
IMPORT_C void | ClearUndo () |
Deletes the undo store. |
|
IMPORT_C void | SetAllowUndo (TBool aAllow) |
Sets whether the undo operation is permitted. |
|
IMPORT_C TBool | SupportsUndo () const |
Gets whether Edwin is set to support the undo command. |
|
IMPORT_C TBool | CanUndo () const |
Tests whether an undo is possible. |
|
IMPORT_C void | SetWordDelimiters (TBool aPicture, TBool aPunctuation) |
Sets whether picture characters and/or punctuation should be treated as word delimiters in addition to whitespace. |
|
IMPORT_C void | GetWordInfo (TInt aCurrentPos, TInt &aStartPos, TInt &aLength) const |
Gets the start position and the length of the word in which the specified document position is located. |
|
IMPORT_C void | MoveCursorL (TCursorPosition::TMovementType aMovement, TBool aSelect) |
Sets the new cursor position. |
|
IMPORT_C void | MoveDisplayL (TCursorPosition::TMovementType aMovement) |
Scrolls the text either horizontally or vertically without affecting the cursor’s position. |
|
IMPORT_C void | CheckValidityOfChars (TInt aStartPos, TInt aLength) |
Removes all non-ASCII characters from the specified text. |
|
IMPORT_C void | SetOnlyASCIIChars (TBool aASCIIOnly) |
Sets the EOnlyASCIIChars flag. |
|
IMPORT_C TBool | OnlyASCIIChars () const |
Tests whether the EOnlyASCIIChars flag is set. |
|
TInt | AvgLinesInViewRect () const |
Gets the average number of lines shown in Edwin’s view. |
|
TInt | AvgCharsPerLine () const |
Gets the average number of characters on a line. |
|
void | SetAvgLinesInViewRect (TInt aAvgLines) |
Sets the average number of lines displayed in Edwin’s view. |
|
void | SetAvgCharsPerLine (TInt aAvgChars) |
Sets the average number of characters per line. |
|
IMPORT_C void | SetEdwinSizeObserver (MEikEdwinSizeObserver *aEdwinSizeObserver) |
Sets the Edwin size observer. |
|
IMPORT_C TInt | MinimumHeight () const |
Gets the minimum Edwin height. |
|
IMPORT_C TInt | MaximumHeight () const |
Gets the maximum Edwin height. |
|
IMPORT_C void | SetMinimumHeight (TInt aHeight) |
Sets the minimum Edwin height. |
|
IMPORT_C void | SetMaximumHeight (TInt aHeight) |
Sets the maximum Edwin height. |
|
IMPORT_C void | InsertDeleteCharsL (TInt aInsertPos, const TDesC &aText, const TCursorSelection &aDelete) |
Replaces the cursor selection with the identified text. |
|
IMPORT_C void | SetNonPrintingCharsVisibility (TNonPrintingCharVisibility aVisibility) |
Sets non-printing characters’ visibility. |
|
IMPORT_C TNonPrintingCharVisibility | NonPrintingCharsVisibility () const |
Sets non-printing characters’ visibility. |
|
IMPORT_C void | SetAvkonWrap (TBool aAvkonWrapIsOn) |
Sets the EAvkonEditor flag. |
|
IMPORT_C void | SetAknEditorCase (TInt aCase) |
Sets default case for the editor. |
|
IMPORT_C void | SetAknEditorPermittedCaseModes (TInt aPermittedCaseModes) |
Sets permitted cases for the editor. |
|
IMPORT_C void | SetAknEditorNumericKeymap (TAknEditorNumericKeymap aNumericKeymap) |
Sets number mode key mapping for '*' and '#' keys. |
|
IMPORT_C void | SetAknEditorInputMode (TInt aInputMode) |
Sets default input mode for the editor. |
|
IMPORT_C void | SetAknEditorAllowedInputModes (TInt aInputModes) |
Sets allowed input modes for the editor. |
|
IMPORT_C void | SetAknEditorSpecialCharacterTable (TInt aSCTResId) |
Sets editor specific special character table. |
|
IMPORT_C void | SetAknEditorFlags (TInt aFlags) |
Sets initial editor flags for the editor. |
|
IMPORT_C void | EnableCcpuSupportL (TBool aSupport) |
Enables or disables CCPU interface provided functionalities (cut, copy, paste and undo). |
|
IMPORT_C void | SetAknEditorCurrentInputMode (TInt aInputMode) |
Updates editor input mode. |
|
IMPORT_C TInt | AknEditorCurrentInputMode () |
Returns the input mode that has been saved to editor state. |
|
IMPORT_C void | SetAknEditorCurrentCase (TInt aCase) |
Updates editor case. |
|
IMPORT_C void | SetAknEditorLocalLanguage (TLanguage aLanguage) |
Sets new local input language for the editor. |
|
IMPORT_C void | NotifyEditorStateObserverOfStateChangeL () |
This call causes FEP to reset current editing state and new editing state is fetched from CAknEdwinState object. |
|
IMPORT_C void | SetSuppressBackgroundDrawing (TBool aSuppress) |
Used for suppressing all editor's background drawing. |
|
IMPORT_C TBool | IsBackgroundDrawingSuppressed () const |
Tests if the background drawing is suppressed. |
|
IMPORT_C void | SetTextLinesRect (const TRect &aRect) |
Used to prevent partial text lines from being drawn. |
|
IMPORT_C void | SetScrollRect (const TRect &aRect) |
Used to determine which area is used for scrolling. |
|
IMPORT_C TRect | GetTextLinesRect () const |
Gets the rectangle set for drawing only full lines. |
|
IMPORT_C void | SetMaximumHeightInLines (TInt aLines) |
Sets editor's maximum height in lines. |
|
IMPORT_C TInt | MaximumHeightInLines () const |
Gets editor maximum height in lines. |
|
IMPORT_C TBool | CcpuIsFocused () const |
Tests whether the editor is focused. |
|
IMPORT_C TBool | CcpuCanCut () const |
Tests whether the selected text can be cut. |
|
IMPORT_C void | CcpuCutL () |
Cuts selected text. |
|
IMPORT_C TBool | CcpuCanCopy () const |
Tests whether the selected text can be copied. |
|
IMPORT_C void | CcpuCopyL () |
Copies selected text. |
|
IMPORT_C TBool | CcpuCanPaste () const |
Tests whether text can be pasted from the clipboard. |
|
IMPORT_C void | CcpuPasteL () |
Pastes text from the clipboard to the editor. |
|
IMPORT_C TBool | CcpuCanUndo () const |
Tests is it possible to undo previous operation. |
|
IMPORT_C void | CcpuUndoL () |
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty. |
|
IMPORT_C TInt | AknEdwinFlags () const |
Gets edwin's flags from CAknEdwinState . |
|
IMPORT_C void | CreateTextViewL () |
Allocates memory for the Edwin text view. |
|
IMPORT_C CTextView * | TextView () const |
Gets Edwin text view. |
|
IMPORT_C CTextLayout * | TextLayout () const |
Gets Edwins text layout. |
|
IMPORT_C TBool | SetUndoBufferL (const TCursorSelection &aSelection) |
Sets undo buffer for the Edwin. |
|
IMPORT_C void | SetUndoableText (const TCursorSelection &aSelection) |
Sets new undoable text to the undo buffer. |
|
CAknEdwinState * | EditorState () const |
Gets the editor state. |
|
void | SetMaxLength (TInt aLength) |
Sets maximum length for the editor. |
|
TInt | MaxLength () const |
Gets the editor maximum length. |
|
IMPORT_C void | AddFlagToUserFlags (TUint32 aFlag) |
Adds user flags. |
|
IMPORT_C void | RemoveFlagFromUserFlags (TUint32 aFlag) |
Removes user flags. |
|
IMPORT_C TUint32 | UserFlags () const |
Gets user flags. |
|
IMPORT_C void | SetCharFormatLayer (CCharFormatLayer *aCharFormatLayer) |
Sets the character format layer for the editor. |
|
IMPORT_C void | SetParaFormatLayer (CParaFormatLayer *aParaFormatLayer) |
Sets the paragraph format layer for the editor. |
|
IMPORT_C void | SetSkinBackgroundControlContextL (MAknsControlContext *aContext) |
Sets within in the editor an externally owned Skins background control context. |
|
MAknsControlContext * | SkinBackgroundControlContext () const |
Access to Skins background control context that is potentially being used by the Editor. |
|
TBool | SkinEnabled () const |
Access to disposition of the editor to perform Skinning. |
|
IMPORT_C void | SetAlignment (TInt aAlignment) |
Stores the alignment value for an editor. |
|
void | DrawTextView () const |
Redraws text view. |
|
IMPORT_C void | SetPictographAnimationCallBack (TCallBack &aCallBack) |
Sets the callback, which the editor calls after having redrawn itself for animated pictographs. |
|
const TCallBack & | PictographAnimationCallBack () const |
Returns pictograph animation callback. |
|
IMPORT_C void | SetUpperFullFormattingLength (TInt aUpperFullFormattingLimit) |
This method sets the upper limit of full document formatting. |
|
IMPORT_C void | SetSuppressNotifyDraw (TBool aEnabled) |
Can be called to inhibit redrawing of the editor when NotifyNewFormatL() is called. |
|
IMPORT_C void | SetSuppressFormatting (TBool aSuppressed) |
Can be called to inhibit formatting of the editor. |
|
IMPORT_C void | SetTextSkinColorIdL (TInt aAknSkinIdForTextColor) |
Sets skin id for text. |
|
IMPORT_C void | SetHighlightStyleL (TAknsHighlightStyle aStyle) |
Sets highlight style. |
|
TInt | SkinColorId () const |
Gets skin id. |
|
TAknsHighlightStyle | HighlightStyle () const |
Gets highlight style. |
|
TRgb | EditorBackgroundColor (TRgb &aConditionalColor) const |
Called to determine the background color to draw. |
|
Static Public Member Functions |
|
static IMPORT_C TInt | IdleL (TAny *aPtr) |
Uses SetScrollBarsL() to set the scrollbars. |
|
Protected Types |
|
enum | TEnd { EStart, EEnd } |
Specifies the end points of the editable area. More... |
|
enum | TChunkSize { EChunkWord, EChunkPara } |
Specifies the chunk size as either a word, or a paragraph. More... |
|
enum | TEikEdwinFlags { ERichText = 0x00000001, EDragDouble = 0x00000002, ELeftDownInViewRect = 0x00000004, ENumericCharacters = 0x00000008, EHasOneLineOnly = 0x00000010, EPhoneNumberGrouping = 0x00000020, ESuppressNotifyDraw = 0x00000040, ESuppressFormatting = 0x00000080 } |
Specifies the chunk size as either a word, or a paragraph. More... |
|
Protected Member Functions |
|
IMPORT_C void | EditObserver (TInt aStartEdit, TInt aEditLength) |
From MEditObserver . |
|
IMPORT_C void | TrappedDraw (const TRect &aRect) const |
Draws the visible text and the cursor for DrawL(), but does not draw the border. |
|
IMPORT_C void | DrawContents () |
Draws the visible text and the cursor. |
|
IMPORT_C void | BaseConstructL () |
Completes the second-phase construction of a CEikEdwin object. |
|
IMPORT_C void | FormatTextL () |
Formats all the text in the text view. |
|
IMPORT_C TInt | DeleteHighlightL (TBool &aChanged, TBool aIsBackSpace=EFalse, TBool aPromptConfirmation=ETrue) |
Deletes the text under the cursor selection, also cancelling the selection. |
|
IMPORT_C TBool | OkToDeleteSelectionL () |
Confirms whether the deletion of the user’s selection is required. |
|
IMPORT_C void | DeleteL (TBool &aChanged, const TCursorSelection &aSelection, TBool aIsBackSpace=EFalse, TBool aAllowUndo=ETrue) |
Deletes the cursor’s selection. |
|
IMPORT_C void | TrappedSizeChanged () |
Handles errors that occur when handling a change in Edwin’s size. |
|
IMPORT_C void | HandleSizeChangedL () |
Handles a change in Edwin’s size. |
|
IMPORT_C void | CancelSelectionL (TEnd aEndOfSelectionToLeaveCursor) |
Cancels the selection and any FEP composition text. |
|
IMPORT_C void | MoveCursorToChunkStartL (TBool aSelect, TChunkSize aChunkSize, TEnd aEndScanningTowards) |
Moves the cursor to the beginning of the next word or paragraph. |
|
IMPORT_C void | CancelInsertCharFormat () |
Cancels the insertion of a character format. |
|
IMPORT_C void | PlaceDataOnClipboardL () |
Copies the contents of the cursor selection onto the clipboard. |
|
IMPORT_C void | ReportEdwinEventL (MEikEdwinObserver::TEdwinEvent aEventType) |
Reports an Edwin event of the specified type. |
|
IMPORT_C void | SetLineCursorDetailsL () |
Sets margin widths and line cursor width. |
|
virtual IMPORT_C void | CopyDocumentContentL (CGlobalText &aInText, CGlobalText &aOutText) |
Replaces the current Edwin text. |
|
IMPORT_C void | DisplayFindTextNotFound (TDes &aFindText) |
Displays an information message to indicate that the specified text could not be found. |
|
virtual IMPORT_C void | HandleTextPastedL (TInt aStartPos, TInt &aLength) |
Not implemented. |
|
virtual IMPORT_C CLafEdwinCustomDrawBase * | CreateCustomDrawL () |
Creates a new CLafEdwinCustomDrawBase instance. |
|
IMPORT_C void | ReadAknResourceL (TResourceReader &aReader) |
Used in ConstructFromResourceL() . |
|
IMPORT_C void | CreateLayoutL (MLayDoc *aLayDoc) |
Creates new text layout. |
|
IMPORT_C void | CreateTextAndLayoutL (CParaFormatLayer *aParaFormatLayer, CCharFormatLayer *aCharFormatLayer) |
Creates new instance of CGlobalText and text layout based on it. |
|
IMPORT_C void | CheckEdwinExtensionL () |
Checks that is Edwin's extension created. |
|
IMPORT_C CEikEdwinExtension * | EdwinExtension () |
Gets Edwin's extension. |
|
IMPORT_C TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
From MObjectProvider . |
|
Protected Attributes |
|
TUint32 | iEdwinUserFlags |
Edwin user flags. |
|
TUint32 | iEdwinInternalFlags |
Internal Edwin flags. |
|
CPlainText * | iText |
Edwin's text content. |
|
CTextView * | iTextView |
Edwin's text view. |
|
CTextLayout * | iLayout |
Edwin's text layout. |
|
TInt | iTextLimit |
Maximum length ot the edwin. |
|
TInt | iNumberOfLines |
Number of lines in Edwin. |
|
MGraphicsDeviceMap * | iZoomFactor |
Current zoom factor. |
|
TInt | iLastPointerDocPos |
Cursor position. |
|
TMargins8 | iMargins |
Edwin's margins. |
|
Friends |
|
class | CEikEdwinFepSupport |
class | CEikEdwinExtension |
Data Structures |
|
class | CEikEdwinExtension |
|
Specifies the chunk size as either a word, or a paragraph. |
|
Defines the possible commands for |
|
|
Specifies the chunk size as either a word, or a paragraph.
|
|
Specifies the end points of the editable area. |
|
The following flags may be ORed together for text searches (see |
|
The following flags may be combined with a bitwise OR to form the
..) or the flags field of an EDWIN resource structure run through
These flags are duplicated in
|
|
Specifies whether the Edwin owns the document it is being used to edit. If the Edwin owns the document, the document object is destroyed on destruction. |
|
When content is supplied to an Edwin using |
|
Destructor.
Deletes objects and frees resources owned by this object. The Edwin’s editable text is freed if the |
|
C++ default constructor.
Creates a new |
|
Constructor.
Creates a new
|
|
From Sets the Edwin as ready for drawing.
Reimplemented in CEikGlobalTextEditor, and CEikRichTextEditor. |
|
Adds an observer of standard Edwin events to the list of observers, creating the list if necessary.
May be called any number of times and is independent of calls to
|
|
Adds user flags.
See
|
|
Returns the input mode that has been saved to editor state.
|
|
Gets edwin's flags from
|
|
Gets the average number of characters on a line.
|
|
Gets the average number of lines shown in Edwin’s view.
|
|
Completes the second-phase construction of a
This protected function is called by Reimplemented in CEikGlobalTextEditor. |
|
Recalculates the screen width of an Edwin from the specified number of character widths.
This is called during construction. If the Edwin only allows editing of numbers, the width of the zero character (0) is used;
otherwise
If the
|
|
Cancels any current transaction with the Edwin’s front-end processor.
Any front-end input windows are removed, and any highlighted text being edited in the Edwin is removed. The Edwin is rolled
back to the state it was in before the FEP transaction started. This function is called by Cancelling outstanding FEP transactions before performing operations on the text programmatically is particularly important when the front-end processor is inline-editing an Edwin. |
|
Cancels the insertion of a character format. This can be used for rich text only. |
|
Cancels the selection and any FEP composition text. This function then repositions the cursor at the specified end of the currently selected text.
|
|
Tests whether an undo is possible.
Returns
|
|
Tests whether the selected text can be copied.
Implements MEikCcpuEditor. |
|
Tests whether the selected text can be cut.
Implements MEikCcpuEditor. |
|
Tests whether text can be pasted from the clipboard.
Implements MEikCcpuEditor. |
|
Tests is it possible to undo previous operation.
Implements MEikCcpuEditor. |
|
Copies selected text. Implements MEikCcpuEditor. |
|
Cuts selected text. Implements MEikCcpuEditor. |
|
Tests whether the editor is focused.
Implements MEikCcpuEditor. |
|
Pastes text from the clipboard to the editor. Implements MEikCcpuEditor. |
|
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty. Implements MEikCcpuEditor. |
|
Checks that is Edwin's extension created. If not, it will be created.
|
|
Determines whether the document being edited is read only.
Displays a message with |
|
Removes unwanted pictures.
If
|
|
Removes all non-ASCII characters from the specified text. This can be used to remove Unicode characters where they are not valid characters for example.
|
|
Removes the selection and any composition text. The cursor position is unaffected. If there is no selected region, this function has no effect. |
|
Deletes the undo store. |
|
Handles cut, copy and paste commands. This function also reports a change of state of the control to the observer when necessary.
|
|
From
Completes the construction of a new
Reimplemented in CAknIntegerEdwin, CEikFloatingPointEditor, CEikFixedPointEditor, CEikGlobalTextEditor, and CEikRichTextEditor. |
|
Handles Symbian 2nd phase construction.
Completes construction of a new
|
|
Replaces the current Edwin text.
Reimplemented in CEikRichTextEditor. |
|
Copies the highlighted text into a stream store.
|
|
Counts and returns the number of words in the document.
|
|
Creates a new
|
|
Creates new text layout.
|
|
Creates a pre-allocated scroll bar frame.
|
|
Creates the Edwin scroll bar frame with no pre-allocation of memory for scroll bars.
|
|
Creates new instance of
|
|
Allocates memory for the Edwin text view. |
|
Gets the cursor’s position within the document.
|
|
Deletes the text under the cursor selection, also cancelling the selection. This function asks the user to confirm this action if aPromptConfirmation is ETrue.
|
|
Deletes the cursor’s selection.
If no selection is made, this function deletes only one character. The argument
|
|
Displays an information message to indicate that the specified text could not be found.
The information message is constructed from
|
|
From Draws the control on request.
Reimplemented from CEikBorderedControl. |
|
Draws the visible text and the cursor. |
|
Redraws text view. Used for pictograph animations. |
|
From
Observer function called by the
Reimplemented in CEikRichTextEditor. |
|
Called to determine the background color to draw. It is not to be used if skinning is being used to draw the background. This API can be used two ways: i) If the caller has a default color to offer (to be used as a fallback if SetBackgroundColorL has not been called), then he should use the Input/Output parameter aConditionalColor, and ignore the return value. The output parameter will only be over-written by the set background color if SetBackgroundColorL has been called. ii) If the caller does not have a default color to offer, then he should pass in a dummy input parameter and use the return value.
|
|
Gets the editor state.
|
|
Gets Edwin's extension.
|
|
Enables or disables CCPU interface provided functionalities (cut, copy, paste and undo).
|
|
Gets true if a substring is present in the text being edited before or after the cursor position.
If
|
|
Gets the cursor position of the matching text in the document.
The search starts from
|
|
From Responds to focus-changed events.
|
|
Forces the scrollbars to update now; this is a synchronous function. |
|
Formats all the text in the text view.
Called by several functions, for example by |
|
From
Gets the list of logical colours employed in the drawing of the control, paired with an explanation of how they are used.
Appends the list to
Reimplemented from CEikBorderedControl. |
|
Gets the current word or selection and searches for it.
This function is called by
|
|
Copies the entire document’s content into a descriptor. It is the caller's responsibility to provide a large enough buffer.
|
|
Gets a new buffer containing a copy of the whole text document.
|
|
Gets the rectangle set for drawing only full lines. In case the feature is disabled, this returns an empty rect. This is intended for internal use.
|
|
Gets the start position and the length of the word in which the specified document position is located.
|
|
From Handles pointer events.
Reimplemented from CEikBorderedControl. Reimplemented in CAknNumericEdwin, CAknIntegerEdwin, CEikFloatingPointEditor, CEikFixedPointEditor, CEikGlobalTextEditor, and CEikRichTextEditor. |
|
From Handles a change to Edwin’s resources which are shared across the environment. Colours or fonts for example.
Reimplemented from CEikBorderedControl. Reimplemented in CAknIntegerEdwin, CEikFloatingPointEditor, and CEikFixedPointEditor. |
|
From Handles scrollbar key events.
Implements MEikScrollBarObserver. |
|
Handles a change in Edwin’s size. This function accounts for text wrap settings and whether the Edwin is ready to be redrawn and also calls functions to reformat text and to update the Edwin’s scroll bars. |
|
Handles all modifications made by reformatting the entire document.
Calls |
|
Not implemented.
|
|
Gets highlight style.
|
|
Uses
|
|
From Access to the input capabilities of the edwin. If this function is overrided in a subclass, the subclass should obtain this class' InputCapabilities' object provider through TCoeInputCapabilities::ObjectProvider() and set that as a part of the subclass' InputCapabilities object provider chain to ensure maximum functionality.
Reimplemented in CEikFloatingPointEditor, and CEikFixedPointEditor. |
|
Replaces the cursor selection with the identified text.
|
|
Inserts a field at the current cursor position. If a selection was made the field replaces that selection.
|
|
Inserts the contents of a text file into the text being edited at the current cursor position.
|
|
Tests if the background drawing is suppressed.
|
|
Determines whether the document being edited with Edwin is read-only.
|
|
Gets the width used for laying out the text inside the Edwin in pixels.
This may be larger or smaller than the width of the Edwin itself. See
|
|
Gets the width of a line cursor in pixels.
Reimplemented in CEikGlobalTextEditor. |
|
Gets the lower limit for formatting.
This returns the value of
|
|
Gets the text view margins.
|
|
Gets the maximum Edwin height.
Please do not use the following method for deciding heights if you are using edwins with Maximum Heights in forms. Use
|
|
Gets editor maximum height in lines.
|
|
Gets the editor maximum length.
|
|
Gets the minimum Edwin height.
|
|
From Gets the minimum size of this Edwin for automatic-layout control contexts such as dialogs.
|
|
From
Retrieves an object of the same type as that encapsulated in This function is used to allow controls to ask their owners for access to other objects that they own.
Other than in the case where NULL is returned, the object returned must be of the same object type - that is, the
|
|
Sets the new cursor position. If the cursor is no longer visible the document is scrolled to display the line containing the new cursor position. Scrollbars are also updated if present.
|
|
Moves the cursor to the beginning of the next word or paragraph. This function cancels any front end processing transaction currently in progress for the Edwin.
|
|
Scrolls the text either horizontally or vertically without affecting the cursor’s position.
|
|
Sets non-printing characters’ visibility.
|
|
This call causes FEP to reset current editing state and new editing state is fetched from |
|
Formats and draws a new document, updates scrollbars if necessary. |
|
Reformats and redraws the document, updates scrollbars if necessary. |
|
From Handles key events.
Reimplemented in CAknIntegerEdwin, CEikFloatingPointEditor, CEikFixedPointEditor, CEikGlobalTextEditor, and CEikRichTextEditor. |
|
Confirms whether the deletion of the user’s selection is required.
If the user’s selection is less than
If the user’s selection is greater than
|
|
Tests whether the
|
|
From Called after reformatting but before redisplay so that edit windows etc. can be resized.
|
|
Copies the contents of a stream store to the current cursor position, replacing any selected text. This function is used to paste data from the clipboard.
|
|
Returns pictograph animation callback. If it is not set, the function pointer is NULL.
|
|
Copies the contents of the cursor selection onto the clipboard. |
|
Used in Sets Avkon editor properties.
|
|
Receives an Edwin document using an infra red beamer. This function will leave if the data received is not a suitable type to be pasted into the Edwin. |
|
Removes the specified observer from the list of observers. Does nothing if aEdwinObserver is not an observer.
|
|
Removes user flags.
See
|
|
Replaces all occurrences of a string with new text.
Both old and new text are held in
|
|
Replaces the highlighted text.
See
|
|
Reports an Edwin event of the specified type.
The Edwin event is passed first to the Edwin observer and then to the list of observers, even if the first Edwin observer
is not set. If the Edwin has a custom drawer, and the event is of type
|
|
Displays a dialog allowing the user to choose a character from the character map. The selected character is inserted into the Edwin at the current cursor position. |
|
Gets the scroll bar frame surrounding this Edwin.
|
|
Selects the entire document. |
|
Gets the cursor selection.
If no text view is associated to the Edwin this returns
|
|
Gets the number of characters including non-printing characters within the selection.
|
|
Sends the Edwin’s document using an infra red beamer. |
|
Sets allowed input modes for the editor.
All input modes are allowed (
|
|
Sets default case for the editor.
The case is used when the editor is focused first time. Available case flags from
|
|
Updates editor case.
FEP is automatically notified of the case change in editor state and FEP takes new case to use immediately. Available case
flags from
|
|
Updates editor input mode.
FEP is automatically notified of the new input mode in editor state and FEP takes new input mode to use immediatelly. Current
inline editing is reset. This method should not be used for setting initial input mode for the editor. Use
|
|
Sets initial editor flags for the editor. This method can be used also to update editor flags after the editor is focused. FEP is automatically notified of the updated editor flags.
|
|
Sets default input mode for the editor.
The input mode is used when the editor is focused first time.
|
|
Sets new local input language for the editor. Global input language changes have not effect for the input language but the user can still change the input language from the edit menu.
|
|
Sets number mode key mapping for '*' and '#' keys.
The key mapping is used in editors when numeric input mode is used. Key mapping characters for '*' key are shown on special
character table if also text input modes are allowed in the editor but the current input mode is numeric mode.
|
|
Sets permitted cases for the editor.
Possible flags from
|
|
Sets editor specific special character table.
|
|
Stores the alignment value for an editor.
|
|
Sets whether the document accepts pictures.
|
|
Sets whether the undo operation is permitted.
|
|
Controls the formatting mode of the editor. The length of the text is compared against the current formatting mode thresholds. (See method SetUpperFullFormattingLength). If the length is greater than the upper limit of full formatting, then the editor is set to "band" formatting, where the editor attempts to format as little as is needed, e.g. the visible part of the editor. If the text length is less than the lower limit of band formatting, then the formatting mode is switched to full document formatting. This method has a flag to allow any immediate re-formatting to be suppressed. Formatting text can be a time-consuming operation. If the client is able to ensure that no reformatting is needed, (for instance if a further re-formatting API is going to be called later) then the reformatting flag can be called with EFalse. Otherwise, a re-format will take place within this method.
|
|
Controls the formatting mode of the editor. The length of the text is compared against current formatting mode thresholds. (See method SetUpperFullFormattingLength). If the length is greater than the upper limit of full formatting, then the editor is set to "band" formatting, where the editor attempts to format as little as is needed, e.g. the visible part of the editor. If the text length is less than the lower limit of band formatting, then the formatting mode is switched to full document formatting. This method performs an immediate re-formatting of all or part of the text with the new formatting mode.
|
|
Sets the average number of characters per line.
|
|
Sets the average number of lines displayed in Edwin’s view.
|
|
Sets the
|
|
Sets the Edwin’s background colour.
|
|
Sets the text view margins.
|
|
Sets the character format layer for the editor.
|
|
From
Sets the containing window for the Edwin by copying it from the specified parent. Also copies a control context from
|
|
Creates the containing window for the Edwin if it does not already have one. |
|
Sets the cursor’s position within the document. If the new position is not visible the text is scrolled so that the line containing the cursor is visible. This function also updates the scroll bar thumbs if present.
|
|
From Dims or undims the Edwin.
|
|
Sets the Edwin’s editable content.
Before calling this function you must get the
|
|
Sets whether the Edwin owns a document. Edwins can either be used as a standalone text editor control, or as an editor for text owned by another object. The document ownership setting determines whether the Edwin or another object owns the document.
|
|
Sets the Edwin observer. The Edwin’s observer will be called back with control events associated with the Edwin.
|
|
Sets the Edwin size observer. Does not imply transfer of ownership.
|
|
Sets highlight style.
|
|
From This method sets the input capabilities of the edwin. Ownership of the T-class is not transferred.
|
|
Sets margin widths and line cursor width. |
|
Sets the maximum Edwin height.
This function also decreases the minimum Edwin height if its value is greater than
Please do not use the following method for setting maximum heights if you are using edwins with maximum heights in forms.
Use
|
|
Sets editor's maximum height in lines.
|
|
Sets maximum length for the editor.
|
|
Sets the minimum Edwin height.
This function also increases the maximum Edwin height if its value is less than |
|
Sets non-printing characters’ visibility.
|
|
Sets the
|
|
Sets the paragraph format layer for the editor.
|
|
Sets the
|
|
Sets the callback, which the editor calls after having redrawn itself for animated pictographs.
|
|
Sets the Edwin’s read-only flag so that documents displayed by Edwin cannot be edited by users.
|
|
Sets the minimum gap between text and the right hand edge of the Edwin when text is wrapped. This value is used to calculate the layout area for text.
|
|
Used to determine which area is used for scrolling. |
|
Sets the text selection. Highlights the selected area and makes the new cursor position visible. Any previous selection is cancelled. This function also updates the scroll bar thumbs if present.
|
|
Sets within in the editor an externally owned Skins background control context. This background control context will then be used by the editor to draw background.
If this API is not called, then the editor IS skin enabled, (that is Setting this control context to NULL will have the effect of turning off background skinning.
|
|
Used for suppressing all editor's background drawing. This is intended for internal use. Note that when this is set, the background is not drawn with skin nor cleared, so the background MUST be drawn by the parent control every time the editor changes.
|
|
Can be called to inhibit formatting of the editor. Care is required to ensure that the necessary reformatting is carried out later on if this API is used. Note: When called with EFalse, it does not automatically trigger reformatting.
|
|
Can be called to inhibit redrawing of the editor when NotifyNewFormatL() is called.
|
|
Sets the document text of this Edwin from the contents of a descriptor. This function removes any pictures, any invalid characters and cancels any previous selection.
|
|
Sets the maximum number of characters that can be inserted.
|
|
Used to prevent partial text lines from being drawn. The client is responsible for giving a sane value. An empty rect disables this feature. This is intended for internal use.
|
|
Sets skin id for text.
|
|
Sets new undoable text to the undo buffer.
|
|
Sets undo buffer for the Edwin.
|
|
This method sets the upper limit of full document formatting. At construction, the mode is full document formatting, where the text formatter processes the whole document to determine its layout. When the text content is set, or when user input causes the length of text to exceed this value, the formatting mode switches to "Band" formatting, where the text formatter attempts to format as little as possible - optimally just the visible screen. A lower limit is calculated from the passed-in value, by the subtraction of a constant. When the text becomes smaller than this lower limit, the formatting switches to full document formatting. Internally-imposed limits prevent the client setting too small a value for proper operation of the text formatting. If this method is not called, the upper and lower limts are set to a large default values.
Access to the actual limits is available via the methods
|
|
Sets whether picture characters and/or punctuation should be treated as word delimiters in addition to whitespace.
|
|
Sets word wrapping on or off.
|
|
Switches off the WYSIWYG mode.
This function sets the new format mode to be |
|
Sets the format mode to be WYSIWYG.
|
|
Sets the zoom factor of the document and reformats the document.
|
|
Access to Skins background control context that is potentially being used by the Editor. This API will first check to see if an control context has been set by API, and if so, return that. If the background control context has been set to NULL by API, then it will return NULL. If the background control context has never been set by API, then this returns the control context (if one exists) that the object obtains from Object Provider.
|
|
Gets skin id.
|
|
Access to disposition of the editor to perform Skinning. This does not take into account whether the application is skin enabled or whether the environment is providing a background control context. It is only a function of whether editor's (default) disposition to skin has been countered by calls on the editor API.
|
|
Gets whether Edwin is set to support the undo command.
|
|
Gets a pointer to the Edwin’s document contents.
|
|
Gets Edwins text layout.
|
|
Gets the number of characters in the document.
|
|
Gets Edwin text view.
|
|
Draws the visible text and the cursor for DrawL(), but does not draw the border.
The
|
|
Handles errors that occur when handling a change in Edwin’s size.
Calls |
|
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty. |
|
Updates all the fields in the document. |
|
Updates any text field at the current cursor position. Updating involves calculating the new value for the field, and replacing the field’s existing text content with the new text. This function does nothing if the cursor is not within a text field. |
|
Updates the text wrap width. This function is for use in WYSIWYG mode only.
|
|
Updates scrollbars. |
|
Gets the upper limit for formatting.
This returns the value of
|
|
Gets user flags.
See
|
|
From In debug mode writes the internal state to the given stream. Does nothing in release mode.
Reimplemented from CEikBorderedControl. Reimplemented in CEikGlobalTextEditor, and CEikRichTextEditor. |
|
|
|
Internal Edwin flags. |
|
Edwin user flags. |
|
Cursor position. |
|
Edwin's text layout. |
|
Edwin's margins. |
|
Number of lines in Edwin. |
|
Edwin's text content. |
|
Maximum length ot the edwin. |
|
Edwin's text view. |
|
Current zoom factor. |