class CEikEdwin : public CEikBorderedControl |
Base class for controls that display and allow manipulation of text.
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.
Protected Member Enumerations | |
---|---|
enum | TChunkSize { EChunkWord, EChunkPara } |
enum | TEikEdwinFlags { ERichText = 0x00000001, EDragDouble = 0x00000002, ELeftDownInViewRect = 0x00000004, ENumericCharacters = 0x00000008, EHasOneLineOnly = 0x00000010, EPhoneNumberGrouping = 0x00000020, ESuppressNotifyDraw = 0x00000040, ESuppressFormatting = 0x00000080, ESkipBackgroundDrawer = 0x00000100 } |
enum | TEnd { EStart, EEnd } |
Private Member Enumerations | |
---|---|
enum | anonymous { EWysiwygOn = 0x00000010, EUnderOneScreenFormattedText = 0x00000020, EPictureDelimits = 0x00000040, EPunctuationDelimits = 0x00000080, EPasteFromIrStore = 0x00000100, ELockScrollBarState = 0x00000200, EOnReformatting = 0x00000400 } |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
IMPORT_C | CEikEdwin | ( | ) |
C++ default constructor.
Creates a new Edwin, FEP support for the new editor will not be present if there is insufficient memory.
IMPORT_C | CEikEdwin | ( | const TGulBorder & | aBorder | ) |
Constructor.
Creates a new Edwin, specifying the border to use. As with the default constructor, FEP support for the new editor will not be present if there is insufficient memory. S60 Edwin does not support / draw any borders.
const TGulBorder & aBorder | The Edwin border. |
IMPORT_C | ~CEikEdwin | ( | ) |
Destructor.
Deletes objects and frees resources owned by this object. The Edwin s editable text is freed if the EKeepDocument flag is not set.
IMPORT_C void | AddEdwinObserverL | ( | MEikEdwinObserver * | aEdwinObserver | ) |
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 SetEdwinObserver.
MEikEdwinObserver * aEdwinObserver | The observer to add to the list of observers. |
IMPORT_C void | AddFlagToUserFlags | ( | TUint32 | aFlag | ) |
Adds user flags. See TFlags.
TUint32 aFlag | Flags to add. |
TBool | AdjustCursorForSmileyL | ( | TInt | aOldCursor, |
TCursorSelection & | aSelect | |||
) |
TInt aOldCursor | |
TCursorSelection & aSelect |
TBool | AdjustCursorPosByMovementL | ( | TCursorPosition::TMovementType | aMovement, |
TBool | aSelect | |||
) | [private] |
TCursorPosition::TMovementType aMovement | |
TBool aSelect |
TRect | AdjustDrawRectForSmiley | ( | const TRect & | aRect | ) | const |
const TRect & aRect |
IMPORT_C TInt | AknEditorCurrentInputMode | ( | ) |
Returns the input mode that has been saved to editor state.
S60 2.6
Input Mode that is saved to editor state.
IMPORT_C TInt | AknEditorFlags | ( | ) |
Gets editor flags from the editor. editor flags if existed return KErrNotFound
IMPORT_C TInt | AknEdwinFlags | ( | ) | const |
Gets edwin's flags from CAknEdwinState.
The control's flags.
TInt | AvgCharsPerLine | ( | ) | const [inline] |
Gets the average number of characters on a line.
The average number of characters on a line.
TInt | AvgLinesInViewRect | ( | ) | const [inline] |
Gets the average number of lines shown in Edwin s view.
The average number of lines.
IMPORT_C void | BaseConstructL | ( | ) | [protected] |
Completes the second-phase construction of a CEikEdwin object. This protected function is called by ConstructL() and ConstructFromResourceL() after the Edwin s size, flags and text limit have been set. Derived classes should call either this function or CEikEdwin s ConstructL() or ConstructFromResourceL() functions during their construction before initialising their own members.
void | CalculateLineMetricsForBandFormattingL | ( | ) | [private] |
When Band formatting is started, this should be called to update the cached metrics used for the scroll bar calculations.
IMPORT_C void | CalculateWidth | ( | TInt | aWidthInChars | ) |
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 CFont::MaxNormalCharWidthInPixels() is used.
If the EWidthInPixels flag has been set, the aWidthInChars argument is measured in pixels, not characters.
TInt aWidthInChars | Width in either pixels or characters. |
IMPORT_C TBool | CanUndo | ( | ) | const |
Tests whether an undo is possible. Returns ETrue only if the undo store is available to Edwin.
ETrue if the undo store is available. EFalse if the undo store is not available.
IMPORT_C void | CancelFepTransaction | ( | ) |
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 CEikEdwin itself when the document content, the cursor position or the current selection is changed.
Cancelling outstanding FEP transactions before performing operations on the text programmatically is particularly important when the front-end processor is inline-editing an Edwin.
IMPORT_C void | CancelInsertCharFormat | ( | ) | [protected] |
Cancels the insertion of a character format. This can be used for rich text only.
IMPORT_C void | CancelSelectionL | ( | TEnd | aEndOfSelectionToLeaveCursor | ) | [protected] |
Cancels the selection and any FEP composition text. This function then repositions the cursor at the specified end of the currently selected text.
TEnd aEndOfSelectionToLeaveCursor | The end of the current selection at which the cursor is repositioned. |
IMPORT_C TBool | CcpuCanCopy | ( | ) | const |
Tests whether the selected text can be copied.
ETrue if it is possible to copy the selected text.
IMPORT_C TBool | CcpuCanCut | ( | ) | const |
Tests whether the selected text can be cut.
ETrue if it is possible to cut the selected text.
IMPORT_C TBool | CcpuCanPaste | ( | ) | const |
Tests whether text can be pasted from the clipboard.
ETrue if it is possible to paste the clipboard text.
IMPORT_C TBool | CcpuCanUndo | ( | ) | const |
Tests is it possible to undo previous operation.
ETrue if it is possible to undo previous operation.
IMPORT_C TBool | CcpuIsFocused | ( | ) | const |
Tests whether the editor is focused.
If editor is focused, ETrue is returned.
IMPORT_C void | CcpuUndoL | ( | ) |
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty
TBool | CharIsNeutral | ( | TInt | aPos | ) | const [private] |
Returns ETrue if the character at aPos is neutral
EFalse iff the character is not neutral
TInt aPos | index in editor; must be a valid index |
TInt | CheckAllowedCharsL | ( | const TDesC & | aChars, |
CClipboard & | aClipboard, | |||
TBool | aRichText | |||
) | const [private] |
IMPORT_C void | CheckEdwinExtensionL | ( | ) | [protected] |
Checks that is Edwin's extension created. If not, it will be created.
leave
KErrNoMemory If the Edwin FEP support pointer is NULL.
IMPORT_C void | CheckNotReadOnlyL | ( | ) |
Determines whether the document being edited is read only. Displays a message with CEikonEnv::InfoMsg() if the document is set as read-only.
IMPORT_C void | CheckRemovePictures | ( | TInt | aStartPos, |
TInt | aLength | |||
) |
Removes unwanted pictures. If EAllowPictures has been set, returns immediately. Otherwise, this function checks the document text between two bounds and removes all pictures in that range.
IMPORT_C void | CheckValidityOfChars | ( | TInt | aStartPos, |
TInt | aLength | |||
) |
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.
IMPORT_C void | ClearSelectionL | ( | ) |
Removes the selection and any composition text. The cursor position is unaffected. If there is no selected region, this function has no effect.
IMPORT_C void | ClipboardL | ( | TClipboardFunc | aClipboardFunc | ) |
Handles cut, copy and paste commands. This function also reports a change of state of the control to the observer when necessary.
TClipboardFunc aClipboardFunc | Clipboard operation. |
IMPORT_C CCoeControl * | ComponentControl | ( | TInt | aIndex | ) | const [private, virtual] |
TInt aIndex |
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
From CCoeControl.
Completes the construction of a new Edwin. This function initialises the heap-stored members from an EDWIN resource.
TResourceReader & aReader | A reader positioned for reading from an EDWIN resource. |
IMPORT_C void | ConstructL | ( | TInt | aEdwinFlags = 0, |
TInt | aWidthInChars = 0, | |||
TInt | aTextLimit = 0, | |||
TInt | aNumberOfLines = 0 | |||
) |
Handles Symbian 2nd phase construction. Completes construction of a new Edwin, initialising its heap-stored members from the supplied arguments.
TInt aEdwinFlags = 0 | Bitwise ORed combination of flags from TFlags. Default value is 0. |
TInt aWidthInChars = 0 | Specifies the width for the Edwin, in characters or pixels: see the EWidthInPixels flag. Default value is 0. |
TInt aTextLimit = 0 | Maximum length for the text to present as editable. Default value is 0. |
TInt aNumberOfLines = 0 | Height for the Edwin, in lines. Default value is 0. |
TBool | ConvertSmileyForDeleteL | ( | TInt | aDocPos, |
TBool | aBackSpace | |||
) | [private] |
void | ConvertSmileyForDeleteL | ( | const TCursorSelection & | aSelect | ) | [private] |
const TCursorSelection & aSelect |
void | ConvertTextForSmileyL | ( | TCursorSelection | aSelect, |
TBool | aTextToCode, | |||
TBool | aRedraw = ETrue | |||
) | [private] |
TCursorSelection aSelect | |
TBool aTextToCode | |
TBool aRedraw = ETrue |
void | ConvertVisibleTextForSmileyL | ( | TBool | aTextToCode | ) |
TBool aTextToCode |
IMPORT_C void | CopyDocumentContentL | ( | CGlobalText & | aInText, |
CGlobalText & | aOutText | |||
) | [protected, virtual] |
Replaces the current Edwin text.
CGlobalText & aInText | Text with which the current text is replaced. |
CGlobalText & aOutText | On return, the replaced text. |
IMPORT_C void | CopyToStoreL | ( | CStreamStore & | aStore, |
CStreamDictionary & | aDict | |||
) |
Copies the highlighted text into a stream store.
CStreamStore & aStore | Store to write to. |
CStreamDictionary & aDict | Stream dictionary. |
IMPORT_C TInt | CountWords | ( | ) |
Counts and returns the number of words in the document.
The number of words in the document.
IMPORT_C CLafEdwinCustomDrawBase * | CreateCustomDrawL | ( | ) | [protected, virtual] |
Creates a new CLafEdwinCustomDrawBase instance.
Pointer to new custom CLafEdwinCustomDrawBase object.
IMPORT_C void | CreateLayoutL | ( | MLayDoc * | aLayDoc | ) | [protected] |
Creates new text layout.
MLayDoc * aLayDoc | Pointer to the MLayDoc implementation that is the source of the text and formatting information. |
CEikScrollBarFrame * | CreatePreAllocatedScrollBarFrameL | ( | ) | [inline] |
Creates a pre-allocated scroll bar frame.
Pre-allocated scroll bar frame.
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL | ( | ) |
Creates the Edwin scroll bar frame with no pre-allocation of memory for scroll bars.
The scroll bar frame.
IMPORT_C CEikScrollBarFrame * | CreateScrollBarFrameL | ( | TBool | aPreAlloc | ) | [private] |
TBool aPreAlloc |
void | CreateScrollBarFrameLayout | ( | TEikScrollBarFrameLayout & | aLayout | ) | const [private] |
TEikScrollBarFrameLayout & aLayout |
IMPORT_C void | CreateTextAndLayoutL | ( | CParaFormatLayer * | aParaFormatLayer, |
CCharFormatLayer * | aCharFormatLayer | |||
) | [protected] |
Creates new instance of CGlobalText and text layout based on it.
CParaFormatLayer * aParaFormatLayer | Paragraph format layer pointer for CGlobalText constructor. |
CCharFormatLayer * aCharFormatLayer | Character format layer pointer for CGlobalText constructor. |
IMPORT_C TInt | CursorPos | ( | ) | const |
Gets the cursor s position within the document.
The cursor s position within the document.
IMPORT_C TInt | DeleteHighlightL | ( | TBool & | aChanged, |
TBool | aIsBackSpace = EFalse, | |||
TBool | aPromptConfirmation = ETrue | |||
) | [protected] |
Deletes the text under the cursor selection, also cancelling the selection. This function asks the user to confirm this action if aPromptConfirmation is ETrue.
The cursor position in the text after deletion.
TBool & aChanged | On return, ETrue if the text was changed. |
TBool aIsBackSpace = EFalse | ETrue if this is in response to backspace being pressed. Determines whether character formatting is preserved or not. Default value is EFalse. |
TBool aPromptConfirmation = ETrue | Optional. ETrue to ask the user to confirm this action. Default value is ETrue. |
IMPORT_C void | DeleteL | ( | TBool & | aChanged, |
const TCursorSelection & | aSelection, | |||
TBool | aIsBackSpace = EFalse, | |||
TBool | aAllowUndo = ETrue | |||
) | [protected] |
Deletes the cursor s selection. If no selection is made, this function deletes only one character. The argument aIsBackSpace determines whether to preserve the character formatting or not.
TBool & aChanged | On return, ETrue if the text was changed. |
const TCursorSelection & aSelection | The cursor selection describing the position to be deleted. |
TBool aIsBackSpace = EFalse | ETrue if this in response to backspace being pressed. Determines whether character formatting is preserved or not. |
TBool aAllowUndo = ETrue | ETrue if the user is permitted to undo this change. |
IMPORT_C void | DisplayFindTextNotFound | ( | TDes & | aFindText | ) | [protected] |
Displays an information message to indicate that the specified text could not be found. The information message is constructed from R_EIK_TBUF_CANNOT_FIND_TEXT.
TDes & aFindText | The text that could not be found. |
TKeyResponse | DoOfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [private] |
const TKeyEvent & aKeyEvent | |
TEventCode aType |
void | DoPasteFromStoreL | ( | const CStreamStore & | aStore, |
const CStreamDictionary & | aDict | |||
) | [private] |
const CStreamStore & aStore | |
const CStreamDictionary & aDict |
void | DoReplaceAllL | ( | SEdwinFindModel * | aModel, |
TBool & | aTextFound, | |||
TBool & | aReplaced | |||
) | [private] |
SEdwinFindModel * aModel | |
TBool & aTextFound | |
TBool & aReplaced |
void | DoReportEventL | ( | MCoeControlObserver::TCoeEvent | aEvent | ) | [private] |
MCoeControlObserver::TCoeEvent aEvent |
void | DoSetUndoBufferL | ( | const TCursorSelection & | aSelection | ) | [private] |
const TCursorSelection & aSelection |
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [virtual] |
From CCoeControl.
Draws the control on request.
const TRect & aRect | If supplied, the rectangle in which to draw the Edwin. |
void | DrawBackgroundAroundTextView | ( | CWindowGc & | gc, |
const TRect & | aOuterRect, | |||
const TRect & | aInnerRect, | |||
const TRgb & | aBackgroundColor | |||
) | const [private] |
void | DrawSmileyInTextL | ( | RRegion & | rgn, |
const TRect & | aDrawRect, | |||
CBitmapContext & | aGc, | |||
CFont & | aFont, | |||
const TDesC & | aText, | |||
const TPoint & | aPt | |||
) |
void | DrawViewBackground | ( | TBool | aStart | ) | const |
Draws background to the whole view area. Call with parameter value ETrue must be followed by a call with EFalse or otherwise window's redraw isn't ended properly and graphics context is not deactivated.
TBool aStart | If true then window area occupied by editor's view is invalidated and redraw is began. Also graphics context is activated. EFalse ends the redraw and deactivates graphics context. |
IMPORT_C void | EditObserver | ( | TInt | aStartEdit, |
TInt | aEditLength | |||
) | [protected] |
From MEditObserver.
Observer function called by the CRichText object when the object is edited to give notification of changes to its text buffer. In this way, the control knows how the text object has changed and can reformat and redraw the text object appropriately.
TRgb | EditorBackgroundColor | ( | TRgb & | aConditionalColor | ) | const |
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.
TRgb for the color to be used for background.
TRgb & aConditionalColor | Output parameter. Returns a color set by SetBackgroundColorL. It is unchanged if background color has not been set by SetBackgroundColorL |
CAknEdwinState * | EditorState | ( | ) | const |
Gets the editor state.
Pointer to editor state object.
IMPORT_C CEikEdwinExtension * | EdwinExtension | ( | ) | [protected] |
Gets Edwin's extension.
Pointer to Edwin's extension.
IMPORT_C void | EnableCcpuSupportL | ( | TBool | aSupport | ) |
Enables or disables CCPU interface provided functionalities (cut, copy, paste and undo).
TBool aSupport | CCPU support enabled if ETrue. |
IMPORT_C void | EnableKineticScrollingL | ( | TBool | aEnable | ) |
Enables kinetic scrolling in editor.
Note that when kinetic scrolling is enabled, it is no longer possible to disable it with this function.
S60 v5.2
TBool aEnable | ETrue if kinetic scrolling should be enabled. |
void | EnableRateScrolling | ( | TBool | aEnable | ) | [private] |
Enables rate scrolling in editor.
TBool aEnable | ETrue if rate scrolling should be enabled. |
void | EnableSmileySupportL | ( | TBool | aEnableSmiley | ) |
TBool aEnableSmiley |
void | ExtendedRangeForSmiley | ( | TCursorSelection & | aSelect | ) | [private] |
TCursorSelection & aSelect |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
HBufC * | ExtractTextLC | ( | TCursorSelection | aSelect | ) |
TCursorSelection aSelect |
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. If aFindText is NULL, then the current word or selection will be searched for again.
ETrue if aFindText is found.
IMPORT_C TInt | FindTextL | ( | const TDesC * | aFindText, |
TInt | aPos, | |||
TInt | aFindFlags | |||
) |
Gets the cursor position of the matching text in the document. The search starts from aPos. If aFindText is NULL, then the current word or selection will be searched for. If the substring cannot be found, this function returns KErrNotFound.
KErrNotFound if the text was not found, otherwise the position of the matched substring.
IMPORT_C void | FocusChanged | ( | TDrawNow | aDrawNow | ) | [virtual] |
From CCoeControl.
Responds to focus-changed events.
TDrawNow aDrawNow | Not used. |
IMPORT_C void | ForceScrollBarUpdateL | ( | ) |
Forces the scrollbars to update now; this is a synchronous function.
IMPORT_C void | FormatTextL | ( | ) | [protected] |
Formats all the text in the text view. Called by several functions, for example by CEikEdwin::HandleTextChangedL() and CEikEdwin::SetTextL().
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
From CCoeControl.
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 aColorUseList.
CArrayFix< TCoeColorUse > & aColorUseList | The list of logical colours. |
TBool | GetExposedDirectionOfText | ( | TInt | aPos, |
TBool | aForward, | |||
TBool & | aIsRightToLeft | |||
) | const [private] |
Looks through the editor's text starting at character aPos, looking for a strongly directional character. Direction of search can be set. Search is carried out until a strong character is found or the end (or beginning) of the editor text has been reached.
EFalse if no strong character was found.
TBool | GetExposedDirectionOfTextInDescriptor | ( | const TDesC & | aText, |
TBool | aForward, | |||
TBool & | aIsRightToLeft | |||
) | const [private] |
Looks through the passed descriptor, looking for a strongly directional character. Direction of search can be set. Search starts at the begining if searching forward; starts at the end if searching backwards.
Search is carried out until a strong character is found or the end (or beginning) of the descriptor has been reached.
EFalse if no strong character was found.
IMPORT_C void | GetFindText | ( | TDes * | aFindText | ) |
Gets the current word or selection and searches for it. This function is called by FindL() and FindTextL() when no text to search for is given.
TDes * aFindText | An empty descriptor. |
TBool | GetStrongDirectionality | ( | TChar | aChar, |
TBool & | aRightToLeft | |||
) | const [private] |
Returns whether the character is strongly directional
EFalse if the character is not strongly directional.
IMPORT_C void | GetText | ( | TDes & | aDes | ) | const |
Copies the entire document s content into a descriptor. It is the caller's responsibility to provide a large enough buffer.
TDes & aDes | An initialised descriptor which on return contains a copy of the content of this Edwin. |
IMPORT_C HBufC * | GetTextInHBufL | ( | ) | const |
Gets a new buffer containing a copy of the whole text document.
A new copy of the document text.
IMPORT_C TRect | GetTextLinesRect | ( | ) | const |
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.
The rect which contains text lines to be drawn
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 | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl.
Handles pointer events.
const TPointerEvent & aPointerEvent | Pointer event to respond to. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
From CCoeControl.
Handles a change to Edwin s resources which are shared across the environment. Colours or fonts for example.
TInt aType | The type of resource that was changed. |
IMPORT_C void | HandleScrollEventL | ( | CEikScrollBar * | aScrollBar, |
TEikScrollEvent | aEventType | |||
) |
From MEikScrollBarObserver.
Handles scrollbar key events.
CEikScrollBar * aScrollBar | The scrollbar. |
TEikScrollEvent aEventType | The type of key event. |
void | HandleScrollEventWithPhysics | ( | CEikScrollBar * | aScrollBar | ) |
Handles scrollbar events with kinetic scrolling.
CEikScrollBar * aScrollBar | The scrollbar. |
void | HandleSelectionForSmiley | ( | TCursorSelection | aSelect | ) | [private] |
TCursorSelection aSelect |
IMPORT_C void | HandleSizeChangedL | ( | ) | [protected] |
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.
IMPORT_C void | HandleTextChangedL | ( | ) |
Handles all modifications made by reformatting the entire document. Calls CEikEdwin::FormatText() and redraws Edwin contents and scroll bars if they are ready to be redrawn.
IMPORT_C void | HandleTextPastedL | ( | TInt | aStartPos, |
TInt & | aLength | |||
) | [protected, virtual] |
Not implemented.
TAknsHighlightStyle | HighlightStyle | ( | ) | const |
Gets highlight style.
The highlight style.
IMPORT_C TInt | IdleL | ( | TAny * | aPtr | ) | [static] |
Uses SetScrollBarsL() to set the scrollbars.
Integer value of EFalse.
TAny * aPtr | Pointer to CEikEdwin instance. |
IMPORT_C TCoeInputCapabilities | InputCapabilities | ( | ) | const [virtual] |
From CCoeControl.
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.
The Edwin input capabilities.
IMPORT_C void | InsertDeleteCharsL | ( | TInt | aInsertPos, |
const TDesC & | aText, | |||
const TCursorSelection & | aDelete | |||
) |
Replaces the cursor selection with the identified text.
TInt aInsertPos | The position at which text will be inserted. |
const TDesC & aText | The text to insert. |
const TCursorSelection & aDelete | The cursor-selected text that will be replaced by aText. |
IMPORT_C void | InsertFieldL | ( | CTextField * | aField, |
TUid | aFieldType | |||
) |
Inserts a field at the current cursor position. If a selection was made the field replaces that selection.
CTextField * aField | Text field to insert. |
TUid aFieldType | Type of the field. |
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.
const TFileName & aFileName | The file to open and read. |
const CPlainText::TTextOrganisation aTextOrganisation = CPlainText::EOrganiseByLine | How to handle line breaks. Default value is CPlainText::EOrganiseByLine. |
IMPORT_C TBool | IsBackgroundDrawingSuppressed | ( | ) | const |
Tests if the background drawing is suppressed.
ETrue if the background drawing is suppressed
TBool | IsNewHeightWithinMinimumAndMaximum | ( | TInt | aNewHeight | ) | const [private] |
TInt aNewHeight |
TBool | IsPurePhoneNumberEditor | ( | ) | const [private] |
Returns EFalse iff ( phone number had only numeric input modes AND the keymap is a phone number type keymap ). Phone number type keymaps are: EAknEditorStandardNumberModeKeymap EAknEditorFixedDiallingNumberModeKeymap
EFalse if the phone number will only contain a pure phone number
IMPORT_C TBool | IsReadOnly | ( | ) | const |
Determines whether the document being edited with Edwin is read-only.
ETrue if the document being edited is read-only. EFalse otherwise.
TBool | IsSelectionVisible | ( | ) | [private] |
check the selection content is visible character or not
TBool | KineticScrollingEnabled | ( | ) | const |
Returns ETrue if kinetic scrolling is enabled.
ETrue if kinetic scrolling is enabled.
IMPORT_C TInt | LayoutWidth | ( | ) | const |
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 SetWysiwygModeOn() for example.
Width of the text layout area in pixels.
IMPORT_C TInt | LineCursorWidth | ( | ) | const [virtual] |
Gets the width of a line cursor in pixels.
Always 0.
IMPORT_C TInt | LowerPartialFormattingLength | ( | ) | const |
Gets the lower limit for formatting. This returns the value of KPartialFormattingLowerThreshold which determines when a switch is made from formatting only visible text to formatting all text. When the text length exceeds the KFullFormattingUpperThreshold only visible text is formatted. If some characters are deleted so that the text length is less than KFullFormattingUpperThreshold the entire text is still not formatted. Instead, reformatting occurs only when the number of characters is less than the value of KPartialFormattingLowerThreshold.
The value of KPartialFormattingLowerThreshold.
void | MakeCharFormatLayerMatchL | ( | CCharFormatLayer * | aCharFormatLayer | ) | [private] |
CCharFormatLayer * aCharFormatLayer |
void | MakeParaFormatLayerMatchL | ( | CParaFormatLayer * | aParaFormatLayer | ) | [private] |
CParaFormatLayer * aParaFormatLayer |
TInt | MaxLength | ( | ) | const [inline] |
Gets the editor maximum length.
The editor maximum length
IMPORT_C TInt | MaximumHeight | ( | ) | const |
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 MaximumHeightInLines instead.
The maximum Edwin height.
IMPORT_C TInt | MaximumHeightInLines | ( | ) | const |
Gets editor maximum height in lines.
Maximum height in lines.
IMPORT_C TInt | MinimumHeight | ( | ) | const |
Gets the minimum Edwin height.
The minimum Edwin height.
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
From CCoeControl.
Gets the minimum size of this Edwin for automatic-layout control contexts such as dialogs.
Minimum size for the control.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
From MObjectProvider.
Retrieves an object of the same type as that encapsulated in aId.
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 ETypeId member of the object pointed to by the pointer returned by this function must be equal to the iUid member of aId.
Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.
TTypeUid aId | An encapsulated object type ID. |
IMPORT_C void | MoveCursorL | ( | TCursorPosition::TMovementType | aMovement, |
TBool | aSelect | |||
) |
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.
TCursorPosition::TMovementType aMovement | The cursor movement. |
TBool aSelect | If ETrue, the selection is extended. This corresponds to holding down the Shift key on a machine keyboard. |
IMPORT_C void | MoveCursorToChunkStartL | ( | TBool | aSelect, |
TChunkSize | aChunkSize, | |||
TEnd | aEndScanningTowards | |||
) | [protected] |
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.
TBool aSelect | If ETrue the chunk is selected, otherwise EFalse. |
TChunkSize aChunkSize | The chunk size, this can be either a word or a paragraph. See TChunkSize enum. |
TEnd aEndScanningTowards | Which direction to scan towards, the start or the end of the document. |
IMPORT_C void | MoveDisplayL | ( | TCursorPosition::TMovementType | aMovement | ) |
Scrolls the text either horizontally or vertically without affecting the cursor s position.
TCursorPosition::TMovementType aMovement | The cursor's movement. |
TBool | NeedToChangeFormattingModeL | ( | ) | const [private] |
Standard check on upper and lower formatting thresholds versus current textview formatting mode.
EFalse iff the formatting mode does not need changing
TBool | NeedsNeutralProtection | ( | TInt | aPosOfLowEndOfDelete, |
TInt | aLengthToDelete, | |||
TDes & | aNewText, | |||
TBool & | aForwardProtectionNeeded | |||
) | [private] |
Main routine for neutral protection. This routine returns a boolean stating if there is a requirement for protection, but also returns the text that should replace the to-be-deleted text.
EFalse iff no deletion is to be performed
IMPORT_C TNonPrintingCharVisibility | NonPrintingCharsVisibility | ( | ) | const |
Sets non-printing characters?visibility.
Non-printing characters?visibility.
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 | NotifyInvalidOperationOnReadOnlyL | ( | ) | [private, virtual] |
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 TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
const TKeyEvent & aKeyEvent | The key event. |
TEventCode aType | The type of the event: EEventKeyDown, EEventKeyUp or EEventKey. |
IMPORT_C TBool | OkToDeleteSelectionL | ( | ) | [protected] |
Confirms whether the deletion of the user s selection is required.
If the user s selection is less than KBlockDeleteWarningSize and does not contain a picture, this function returns ETrue.
If the user s selection is greater than KBlockDeleteWarningSize or contains a picture, this function asks the user to confirm deletion of their selection and then returns the user s response.
ETrue.
IMPORT_C void | OnReformatL | ( | const CTextView * | aTextView | ) |
From CTextView::MObserver.
Called after reformatting but before redisplay so that edit windows etc. can be resized.
const CTextView * aTextView | Not used. |
IMPORT_C TBool | OnlyASCIIChars | ( | ) | const |
Tests whether the EOnlyASCIIChars flag is set.
ETrue if the EOnlyASCIIChars flag is set.
IMPORT_C void | PasteFromStoreL | ( | CStreamStore & | aStore, |
CStreamDictionary & | aDict | |||
) |
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.
CStreamStore & aStore | Store from which to read. |
CStreamDictionary & aDict | Stream dictionary. |
const TCallBack & | PictographAnimationCallBack | ( | ) | const |
Returns pictograph animation callback. If it is not set, the function pointer is NULL.
Pictograph animation callback
TInt | PixelsOutOfBorder | ( | ) | const |
Returns amount of pixels how much we are out of borders.
Amount of pixels scrolled out of borders.
IMPORT_C void | PlaceDataOnClipboardL | ( | ) | [protected] |
Copies the contents of the cursor selection onto the clipboard.
IMPORT_C void | ReadAknResourceL | ( | TResourceReader & | aReader | ) | [protected] |
Used in ConstructFromResourceL(). Sets Avkon editor properties.
TResourceReader & aReader | A reader positioned for reading from an EDWIN resource. |
IMPORT_C void | ReceiveDataOverIrL | ( | ) |
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.
IMPORT_C void | RemoveEdwinObserver | ( | MEikEdwinObserver * | aEdwinObserver | ) |
Removes the specified observer from the list of observers. Does nothing if aEdwinObserver is not an observer.
MEikEdwinObserver * aEdwinObserver | The observer to remove from the list of observers. |
IMPORT_C void | RemoveFlagFromUserFlags | ( | TUint32 | aFlag | ) |
Removes user flags. See TFlags.
TUint32 aFlag | Flags to remove. |
IMPORT_C void | ReplaceAllL | ( | SEdwinFindModel * | aFindModel | ) |
Replaces all occurrences of a string with new text. Both old and new text are held in aFindModel.
leave
This function will leave if the replace operation fails unexpectedly.
SEdwinFindModel * aFindModel | Pointer to the replacement text. |
IMPORT_C void | ReplaceL | ( | SEdwinFindModel * | aFindModel | ) |
Replaces the highlighted text. See SEdwinFindModel struct.
SEdwinFindModel * aFindModel | Pointer to the replacement text. |
void | ReplaceSelectionWithTextL | ( | const TDesC & | aNewText, |
TInt | aCursorPosInNewText, | |||
TBool & | aFormatHasChanged | |||
) | [private] |
Routine to perform the operation of replacing a selection with new text. This is intended for internal use.
The current selection, if non-zero length is deleted, and replace with aNewText if non-zero length iTextView must be set.
const TDesC & aNewText | Replacement text. May be zero length. |
TInt aCursorPosInNewText | This is the position, relative to the beginning of the newtext, that you want the cursor to be at when the operation is complete |
TBool & aFormatHasChanged | Set this to ETrue if you want the reformatting to start at the beginning of the paragraph. EFalse if just to reformat the line. This variable may also be set by the call to DeleteHighlight that this code executes, so it may be set to ETrue upon return, even if EFalse was passed. |
void | ReportChinesePopupEventL | ( | TBool | aChinesePopupOpen | ) |
TBool aChinesePopupOpen |
IMPORT_C void | ReportEdwinEventL | ( | MEikEdwinObserver::TEdwinEvent | aEventType | ) | [protected] |
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 EEventFormatChanged, the event is passed to the custom drawer. If the Edwin has an observer the event is passed to that observer. If no observer is set for the Edwin, this function passes the event to each observer in the observer list.
MEikEdwinObserver::TEdwinEvent aEventType | The type of event to report. |
void | RestoreCursorState | ( | ) |
Show cursor again if needed (based on stored cursor visibility info).
IMPORT_C void | RunCharMapDialogL | ( | ) |
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.
CEikScrollBarFrame * | ScrollBarFrame | ( | ) | [inline] |
Gets the scroll bar frame surrounding this Edwin.
Pointer to this Edwin s scroll bar frame.
TKeyResponse | ScrollReadOnlyNoCursorDisplayL | ( | TUint | aKeyCode | ) | [private] |
TUint aKeyCode |
TInt | ScrollView | ( | TInt | aPixelsToScroll, |
TBool & | aBorderExceeded, | |||
TInt & | aRestOfPixels | |||
) |
Scrolls view by amount of pixels. Stops scrolling when beginning or end of content exceeded. This function should be used when scrolling starts from inside content (in other words in normal situation when begin- or end-border has not yet exceeded)
Amount of scrolled pixels.
TInt | ScrollViewWithBounce | ( | TInt | aPixelsToScroll, |
TBool & | aEndOfBounce, | |||
TInt & | aRestOfPixels | |||
) |
Scrolls view by amount of pixels.
This function should be used to scroll when we have already exceeded begin- or end-border (we are out of borders). This function supports scrolling so that there can be empty space above or below the editor content (used in bounce effect). Stops scrolling when we return back to inside borders.
Amount of scrolled pixels.
IMPORT_C TCursorSelection | Selection | ( | ) | const |
Gets the cursor selection. If no text view is associated to the Edwin this returns TCursorSelection(0,0).
The current selection.
IMPORT_C TInt | SelectionLength | ( | ) | const |
Gets the number of characters including non-printing characters within the selection.
The number of characters within the selection.
IMPORT_C void | SendDataOverIrL | ( | ) |
Sends the Edwin s document using an infra red beamer.
IMPORT_C void | SetAknEditorAllowedInputModes | ( | TInt | aInputModes | ) |
Sets allowed input modes for the editor. All input modes are allowed (EAknEditorAllInputModes) if the value is not set from EDWIN resource allowed_input_modes or with this API.
TInt aInputModes | Input modes that are allowed in the editor. |
IMPORT_C void | SetAknEditorCase | ( | TInt | aCase | ) |
Sets default case for the editor. The case is used when the editor is focused first time. Available case flags from uikon.hrh are EAknEditorUpperCase, EAknEditorLowerCase and EAknEditorTextCase. EAknEditorTextCase is used if the initial case is not set from EDWIN resource default_case or with this API.
TInt aCase | Initial case to be used in the editor. |
IMPORT_C void | SetAknEditorCurrentCase | ( | TInt | aCase | ) |
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 uikon.hrh are EAknEditorUpperCase, EAknEditorLowerCase and EAknEditorTextCase. This method should not be used to set initial case for the editor. Use SetAknEditorCase() method instead for setting initial case.
TInt aCase | New case for the editor. |
IMPORT_C void | SetAknEditorCurrentInputMode | ( | TInt | aInputMode | ) |
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 SetAknEditorInputMode() method instead for setting initial input mode.
TInt aInputMode | New input mode for the editor. |
IMPORT_C void | SetAknEditorFlags | ( | TInt | aFlags | ) |
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.
TInt aFlags | Avkon editor flags for the editor. |
IMPORT_C void | SetAknEditorInputMode | ( | TInt | aInputMode | ) |
Sets default input mode for the editor. The input mode is used when the editor is focused first time. EAknEditorTextInputMode is used if the initial input mode is not set from EDWIN resource default_input_mode or with this API.
TInt aInputMode | Initial input mode to be used in the editor. |
IMPORT_C void | SetAknEditorLocalLanguage | ( | TLanguage | aLanguage | ) |
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.
TLanguage aLanguage | Editor local input language. |
IMPORT_C void | SetAknEditorNumericKeymap | ( | TAknEditorNumericKeymap | aNumericKeymap | ) |
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. EAknEditorStandardNumberModeKeymap is used in editors that allow only numeric input if the mapping is not set from EDWIN resource numeric_keymap or with this API. EAknEditorAlphanumericNumberModeKeymap is used as default if the editor allows also text input mode.
TAknEditorNumericKeymap aNumericKeymap | Key mapping used in an editor with number input mode. |
IMPORT_C void | SetAknEditorPermittedCaseModes | ( | TInt | aPermittedCaseModes | ) |
Sets permitted cases for the editor. Possible flags from uikon.hrh are EAknEditorAllCaseModes, EAknEditorUpperCase, EAknEditorLowerCase and EAknEditorTextCase. EAknEditorAllCaseModes is used if the value is not set from EDWIN resource allowed_case_modes or with this API.
TInt aPermittedCaseModes | Case modes that are available in the editor. |
IMPORT_C void | SetAknEditorSpecialCharacterTable | ( | TInt | aSCTResId | ) |
Sets editor specific special character table.
TInt aSCTResId | Special character table dialog resource. |
IMPORT_C void | SetAlignment | ( | TInt | aAlignment | ) |
Stores the alignment value for an editor.
TInt aAlignment | Editor alignment to be stored - must be supplied as one of the values in Avkon editor alignment enum i.e.: EAknEditorAlignCenter, EAknEditorAlignLeft, EAknEditorAlignRight, EAknEditorAlignBidi |
IMPORT_C void | SetAllowPictures | ( | TBool | aAllow | ) |
Sets whether the document accepts pictures.
TBool aAllow | ETrue sets the document to accept pictures, EFalse sets the document to not accept pictures. |
IMPORT_C void | SetAllowUndo | ( | TBool | aAllow | ) |
Sets whether the undo operation is permitted.
TBool aAllow | ETrue to permit undo operations. EFalse to not permit undo operations. |
IMPORT_C void | SetAmountToFormatL | ( | TBool | aIsNewDoc = EFalse | ) |
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.
TBool aIsNewDoc = EFalse | If EFalse, attempts to perform re-formatting based upon current formatting If not EFalse, whole document it formatted from scratch Note: This parameter is ignored if aReFormat is EFalse |
IMPORT_C void | SetAmountToFormatL | ( | TBool | aIsNewDoc, |
TBool | aReFormat | |||
) |
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.
3.1
void | SetAvgCharsPerLine | ( | TInt | aAvgChars | ) | [inline] |
Sets the average number of characters per line.
TInt aAvgChars | The average number of characters per line. |
void | SetAvgLinesInViewRect | ( | TInt | aAvgLines | ) | [inline] |
Sets the average number of lines displayed in Edwin s view.
TInt aAvgLines | The average number of lines to display. |
IMPORT_C void | SetAvkonWrap | ( | TBool | aAvkonWrapIsOn | ) |
Sets the EAvkonEditor flag.
TBool aAvkonWrapIsOn | If ETrue EAvkonEditor flag is set. |
IMPORT_C void | SetBackgroundColorL | ( | TRgb | aBackground | ) |
Sets the Edwin s background colour.
TRgb aBackground | New value for the background colour. |
IMPORT_C void | SetBorderViewMargins | ( | TMargins8 | aMargins | ) |
Sets the text view margins.
TMargins8 aMargins | New value for the view s margins. |
IMPORT_C void | SetCharFormatLayer | ( | CCharFormatLayer * | aCharFormatLayer | ) |
Sets the character format layer for the editor. Ownership of the CCharFormatLayer is transferred.
CCharFormatLayer * aCharFormatLayer | Pointer to the character format layer object. |
IMPORT_C void | SetContainerWindowL | ( | ) |
Creates the containing window for the Edwin if it does not already have one.
IMPORT_C void | SetContainerWindowL | ( | const CCoeControl & | aParent | ) | [virtual] |
From CCoeControl.
Sets the containing window for the Edwin by copying it from the specified parent. Also copies a control context from aParent if one has not been previously set.
const CCoeControl & aParent | The control to set as this Edwin s parent. |
IMPORT_C void | SetCursorPosL | ( | TInt | aCursorPos, |
TBool | aSelect | |||
) |
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.
void | SetCursorVisibilityL | ( | TBool | aEmphasis | ) | [private] |
TBool aEmphasis |
IMPORT_C void | SetCursorVisible | ( | TBool | aVisible | ) |
Used to control cursor visibility
TBool aVisible |
IMPORT_C void | SetDimmed | ( | TBool | aDimmed | ) | [virtual] |
From CCoeControl.
Dims or undims the Edwin.
TBool aDimmed | ETrue to dim the Edwin. EFalse to undim the Edwin. |
IMPORT_C void | SetDocumentContentL | ( | CGlobalText & | aText, |
TSetContent | aContent = CEikEdwin::ECopyText | |||
) |
Sets the Edwin s editable content. Before calling this function you must get the iText pointer as iText is replaced by aText. You must also free the memory by deleting the previous iText contents.
CGlobalText & aText | New value for the content. |
TSetContent aContent = CEikEdwin::ECopyText | Specifies whether to use aText itself, or to copy its content. Default value is CEikEdwin::ECopyText. |
IMPORT_C void | SetDocumentOwnership | ( | TOwnershipType | aOwner | ) |
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.
TOwnershipType aOwner | Whether Edwin or another object owns the document. See TOwnershipType. |
IMPORT_C void | SetEdwinObserver | ( | MEikEdwinObserver * | aEdwinObserver | ) |
Sets the Edwin observer. The Edwin s observer will be called back with control events associated with the Edwin.
MEikEdwinObserver * aEdwinObserver | New observer. |
IMPORT_C void | SetEdwinSizeObserver | ( | MEikEdwinSizeObserver * | aEdwinSizeObserver | ) |
Sets the Edwin size observer. Does not imply transfer of ownership.
MEikEdwinSizeObserver * aEdwinSizeObserver | The Edwin size observer. |
IMPORT_C void | SetHighlightStyleL | ( | TAknsHighlightStyle | aStyle | ) |
Sets highlight style.
TAknsHighlightStyle aStyle | The highlight style. |
IMPORT_C void | SetInputCapabilitiesL | ( | const TCoeInputCapabilities & | aInputCapabilities | ) |
From CCoeControl.
This method sets the input capabilities of the edwin. Ownership of the T-class is not transferred.
leave
KErrNoMemory Edwin FEB support object is not created.
const TCoeInputCapabilities & aInputCapabilities | Reference to an input capabilities object on the heap. |
void | SetKeyboardRepeatRate | ( | TTimeIntervalMicroSeconds32 | aKeyRepeatRate | ) | const [private] |
TTimeIntervalMicroSeconds32 aKeyRepeatRate |
void | SetKineticScrollingScrollBarModel | ( | TEikScrollBarModel & | aVertModel | ) | const [private] |
Sets vertical scrollbar model with kinetic scrolling.
TEikScrollBarModel & aVertModel | Vertical scrollbar model |
void | SetKineticScrollingScrollBarsL | ( | ) | [private] |
Sets scrollbars with kinetic scrolling.
IMPORT_C void | SetLineCursorDetailsL | ( | ) | [protected] |
Sets margin widths and line cursor width.
void | SetMaxLength | ( | TInt | aLength | ) | [inline] |
Sets maximum length for the editor.
TInt aLength | Maximum length for the editor. |
IMPORT_C void | SetMaximumHeight | ( | TInt | aHeight | ) |
Sets the maximum Edwin height. This function also decreases the minimum Edwin height if its value is greater than aHeight.
Please do not use the following method for setting maximum heights if you are using edwins with maximum heights in forms. Use MaximumHeightInLines instead.
TInt aHeight | The maximum Edwin height. |
IMPORT_C void | SetMaximumHeightInLines | ( | TInt | aLines | ) |
Sets editor's maximum height in lines.
TInt aLines | Maximum height in lines. |
IMPORT_C void | SetMinimumHeight | ( | TInt | aHeight | ) |
Sets the minimum Edwin height. This function also increases the maximum Edwin height if its value is less than aHeight.
TInt aHeight |
IMPORT_C void | SetNonPrintingCharsVisibility | ( | TNonPrintingCharVisibility | aVisibility | ) |
Sets non-printing characters?visibility.
TNonPrintingCharVisibility aVisibility | Non-printing characters?visibility. |
IMPORT_C void | SetOnlyASCIIChars | ( | TBool | aASCIIOnly | ) |
Sets the EOnlyASCIIChars flag.
TBool aASCIIOnly | If ETrue the EOnlyASCIIChars flag will be set. If EFalse the EOnlyASCIIChars flag will be removed. |
IMPORT_C void | SetParaFormatLayer | ( | CParaFormatLayer * | aParaFormatLayer | ) |
Sets the paragraph format layer for the editor. Ownership of the CParaFormatLayer is transferred.
CParaFormatLayer * aParaFormatLayer | Pointer to the paragraph format layer object. |
IMPORT_C void | SetPasteFromIrStore | ( | TBool | aPasteFromIrStore | ) |
Sets the EPasteFromIrStore flag.
TBool aPasteFromIrStore | ETrue to set the EPasteFromIrStore flag. EFalse to remove the EPasteFromIrStore flag. |
IMPORT_C void | SetPictographAnimationCallBack | ( | TCallBack & | aCallBack | ) |
Sets the callback, which the editor calls after having redrawn itself for animated pictographs. CEikCaptionedControl uses it to draw the highlight frame on top of the editor.
S60 2.6
TCallBack & aCallBack | The callback. |
IMPORT_C void | SetReadOnly | ( | TBool | aReadOnly | ) |
Sets the Edwin s read-only flag so that documents displayed by Edwin cannot be edited by users.
TBool aReadOnly | ETrue to set Edwin to display documents as read-only. EFalse otherwise. |
IMPORT_C void | SetRightWrapGutter | ( | TInt | aGap | ) |
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.
TInt aGap | Size of the gutter in pixels. |
IMPORT_C void | SetScrollRect | ( | const TRect & | aRect | ) |
Used to determine which area is used for scrolling
const TRect & aRect |
IMPORT_C void | SetSelectionL | ( | TInt | aCursorPos, |
TInt | aAnchorPos | |||
) |
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.
void | SetSelectionVisibilityL | ( | TBool | aIsVisable | ) | [private] |
TBool aIsVisable |
IMPORT_C void | SetSkinBackgroundControlContextL | ( | MAknsControlContext * | aContext | ) |
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 CEikEdwins are skin enabled by default) but it will try to find a control context with which to perform background drawing from the Control Environment, via the Object Provider.
Setting this control context to NULL will have the effect of turning off background skinning.
MAknsControlContext * aContext | Control context to store. Not owned. Can be NULL. |
IMPORT_C void | SetSuppressBackgroundDrawing | ( | TBool | aSuppress | ) |
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.
TBool aSuppress | If ETrue, suppress background drawing |
IMPORT_C void | SetSuppressFormatting | ( | TBool | aSuppressed | ) |
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.
3.1
TBool aSuppressed | If ETrue, inhibit formatting from now on, if EFalse, re-enable formatting from now on. |
IMPORT_C void | SetSuppressNotifyDraw | ( | TBool | aEnabled | ) |
Can be called to inhibit redrawing of the editor when NotifyNewFormatL() is called.
TBool aEnabled | If ETrue, inhibit redrawing when notified of new format from now on. |
IMPORT_C void | SetTextL | ( | const TDesC * | aDes | ) |
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.
const TDesC * aDes | Descriptor from which to copy. |
IMPORT_C void | SetTextLimit | ( | TInt | aLimit | ) |
Sets the maximum number of characters that can be inserted.
TInt aLimit | New maximum for the number of characters that can be inserted. |
IMPORT_C void | SetTextLinesRect | ( | const TRect & | aRect | ) |
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.
const TRect & aRect | The rect which contains text lines to be drawn |
IMPORT_C void | SetTextSkinColorIdL | ( | TInt | aAknSkinIdForTextColor | ) |
Sets skin id for text.
TInt aAknSkinIdForTextColor | The skin id. |
IMPORT_C TBool | SetUndoBufferL | ( | const TCursorSelection & | aSelection | ) |
Sets undo buffer for the Edwin.
ETrue if buffer was set.
const TCursorSelection & aSelection | The current selection. |
IMPORT_C void | SetUndoableText | ( | const TCursorSelection & | aSelection | ) |
Sets new undoable text to the undo buffer.
const TCursorSelection & aSelection | The current selection. |
IMPORT_C void | SetUpperFullFormattingLength | ( | TInt | aUpperFullFormattingLimit | ) |
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 UpperFullFormattingLength() and LowerPartialFormattingLength().
3.0
TInt aUpperFullFormattingLimit | The upper limit of full document formatting. |
void | SetVertScrollBarModelByCharactersL | ( | TEikScrollBarModel & | aVertModel | ) | const [private] |
TEikScrollBarModel & aVertModel |
void | SetVirtualCursorStateL | ( | TBool | aIsFocused | ) | const [private] |
TBool aIsFocused |
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 | SetWordWrapL | ( | TBool | aWrapIsOn | ) |
Sets word wrapping on or off.
TBool aWrapIsOn | ETrue enables word wrapping, EFalse disables word wrapping. |
IMPORT_C void | SetWysiwygModeOff | ( | ) |
Switches off the WYSIWYG mode. This function sets the new format mode to be EFScreenMode.
IMPORT_C void | SetWysiwygModeOn | ( | TInt | aLayoutWidth, |
MGraphicsDeviceMap * | aDevice | |||
) |
Sets the format mode to be WYSIWYG.
TInt aLayoutWidth | Formatting width in twips. |
MGraphicsDeviceMap * aDevice | Mapping between twips and pixels on the target device. |
IMPORT_C void | SetZoomFactorL | ( | TZoomFactor * | aZoomFactor | ) |
Sets the zoom factor of the document and reformats the document.
TZoomFactor * aZoomFactor | New value for the zooming factor. |
MAknsControlContext * | SkinBackgroundControlContext | ( | ) | const |
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.
Pointer to control context potentially in use, or NULL.
TBool | SkinEnabled | ( | ) | const |
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.
EFalse if SetSkinBackgroundControlContextL has been called with NULL in its most recent call.
TBool | SkipBackgroundDrawer | ( | ) | const |
Can be used by custom drawers to check if background drawing should be performed. This is meant to be used only if editor has MCoeControlBackground object attached.
ETrue if custom drawer shouldn't draw background.
void | StoreCursorState | ( | ) |
If cursor is visible, disables it and stores cursor visibility info.
IMPORT_C TBool | SupportsUndo | ( | ) | const |
Gets whether Edwin is set to support the undo command.
ETrue if edits can be undone. EFalse if edits cannot be undone.
IMPORT_C CPlainText * | Text | ( | ) | const |
Gets a pointer to the Edwin s document contents.
A CPlainText pointer which contains the document.
IMPORT_C CTextLayout * | TextLayout | ( | ) | const |
Gets Edwins text layout.
Pointer to the text layout.
IMPORT_C TInt | TextLength | ( | ) | const |
Gets the number of characters in the document.
The number of characters in the document.
IMPORT_C CTextView * | TextView | ( | ) | const |
Gets Edwin text view.
Pointer to the Edwin text view.
IMPORT_C void | TrappedDraw | ( | const TRect & | aRect | ) | const [protected] |
Draws the visible text and the cursor for DrawL(), but does not draw the border. The DrawL() function is trapped to handle problems due to insufficient resources being available.
const TRect & aRect | Rectangle in which to draw. |
IMPORT_C void | TrappedSizeChanged | ( | ) | [protected] |
Handles errors that occur when handling a change in Edwin s size. Calls CEikonEnv::NotifyIdleErrorWhileRedrawing().
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 | UpdateCurrentFieldL | ( | ) |
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.
IMPORT_C void | UpdateLayoutWidth | ( | TInt | aLayoutWidth | ) |
Updates the text wrap width. This function is for use in WYSIWYG mode only.
TInt aLayoutWidth | New width to wrap text at in WYSIWYG mode in twips. |
IMPORT_C TInt | UpperFullFormattingLength | ( | ) | const |
Gets the upper limit for formatting. This returns the value of KFullFormattingUpperThreshold which determines the maximum number of characters that can be formatted, if it is exceeded then only visible text is formatted. This is used with KPartialFormattingLowerThreshold to control the extent of text formatting.
The value of KFullFormattingUpperThreshold.
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [virtual] |
From CCoeControl.
In debug mode writes the internal state to the given stream. Does nothing in release mode.
RWriteStream & aWriteStream | A stream for writing the internal state. |
EWysiwygOn = 0x00000010 | |
EUnderOneScreenFormattedText = 0x00000020 | |
EPictureDelimits = 0x00000040 | |
EPunctuationDelimits = 0x00000080 | |
EPasteFromIrStore = 0x00000100 | |
ELockScrollBarState = 0x00000200 | |
EOnReformatting = 0x00000400 |
Specifies the chunk size as either a word, or a paragraph.
EChunkWord |
A word. |
EChunkPara |
A paragraph. |
Defines the possible commands for ClipboardL().
ENoClipboard |
Do nothing. |
ECut |
Cut. |
ECopy |
Copy. |
EPaste |
Paste. |
Enumerates the hotkeys that are defined an r_eik_edwin_ctrl_hotkeys or r_eik_edwin_shift_ctrl_hotkeys resource.
Not all are applicable to plain text editors.
EHotKeyCut |
Cut. |
EHotKeyCopy |
Copy. |
EHotKeyPaste |
Paste. |
EHotKeyUndo |
Undo. |
EHotKeyFind |
Find. |
EHotKeyInsertChar |
Insert a character. |
EHotKeyBold |
Bold. |
EHotKeyItalic |
Italic. |
EHotKeyUnderline |
Underline. |
EHotKeyFont |
Font. |
EHotKeyInsertObject |
Insert an object. |
EHotKeyEditObject |
Edit an object. |
EHotKeyFormatObject |
Format an object. |
Specifies the chunk size as either a word, or a paragraph.
ERichText = 0x00000001 |
Rich text editor used. |
EDragDouble = 0x00000002 |
For double item dragging. |
ELeftDownInViewRect = 0x00000004 |
If set, indicates the pointer being pressed inside the editor rectangle. |
ENumericCharacters = 0x00000008 |
Used to calculate initial width. |
EHasOneLineOnly = 0x00000010 |
Edwin has one line and is not resizable. |
EPhoneNumberGrouping = 0x00000020 |
Custom formatter is installed to find and format phone numbers (CEikRichTextEditor only). |
ESuppressNotifyDraw = 0x00000040 | |
ESuppressFormatting = 0x00000080 | |
ESkipBackgroundDrawer = 0x00000100 |
Specifies the end points of the editable area.
EStart |
The start of the editable area. |
EEnd |
The end of the editable area. |
The following flags may be ORed together for text searches (see FindL() for example).
EFindDirectionUp = 0x01 |
Search progresses up the screen. |
EFindWholeWord = 0x02 |
Only whole-word matches count. |
EFindCaseSensitive = 0x04 |
Search is case-sensitive. |
EFindAgain = 0x08 |
Finds again. |
ENoBusyMessage = 0x10 |
Does not display a busy message. |
EReadOnlyFile = 0x20 |
The following flags may be combined with a bitwise OR to form the aEdwinFlags argument to ConstructL(TInt, ...) or the flags field of an EDWIN resource structure run through ConstructFromResourceL().
These flags are duplicated in uikon.hrh (see EEikEdwinKeepDocument etc.)
EZeroEnumValue = 0x00000000 | |
EKeepDocument = 0x00000001 |
If set, CEikEdwin does not destroy its content on destruction. |
ESegmentedStorage = 0x00000002 |
If set, the content buffer uses segmented storage (see CEditableText::ESegmentedStorage). |
EWidthInPixels = 0x00000004 |
The size specified in the resource used to construct the object is given in pixels, not character widths. |
ENoAutoSelection = 0x00000008 |
No automatic selection takes place. Normally the entire text is selected whenever the Edwin is created, resized or has its text set as one operation. |
EJustAutoCurEnd = 0x00000010 |
If set, then whenever the control is activated the cursor is moved to the end of the text. |
ENoWrap = 0x00000020 |
Does not wrap the text being edited. |
ELineCursor = 0x00000040 |
Uses a line cursor instead of a block cursor. |
ENoHorizScrolling = 0x00000080 |
Does not perform horizontal scrolling. |
EInclusiveSizeFixed = 0x00000100 |
If set, scroll bars required to edit long documents appear inside the Edwin. This reduces the area used to display the Edwin. If not set, scroll bars appear outside the Edwin. |
EUserSuppliedText = 0x00000200 |
Sets the Edwin s height according to the number of lines of text supplied by the user. |
EOwnsWindow = 0x00000400 |
The Edwin is a window-owning control. |
EDisplayOnly = 0x00000800 |
The Edwin does not respond to input at all. |
EAlwaysShowSelection = 0x00001000 |
Does not hide the selection if the Edwin loses focus. |
EReadOnly = 0x00002000 |
The Edwin is read-only so users cannot add text to any document it displays. |
EAllowPictures = 0x00004000 |
If set, no special attempt will be made to delete the embedded pictures cleanly. This flag does not apply to Edwins which do not edit rich text. |
EAllowUndo = 0x00008000 |
The Edwin supports undo operations. |
ENoLineOrParaBreaks = 0x00010000 |
Does not allow line or paragraph breaks in the text being edited. |
EOnlyASCIIChars = 0x00020000 |
Allows only ASCII characters. |
EResizable = 0x00040000 |
The Edwin is resizable. |
EIgnoreVirtualCursor = 0x00080000 |
The Edwin ignores the virtual cursor. |
ENoCustomDraw = 0x01000000 |
No custom draw is done. |
EAvkonEditor = 0x02000000 |
Changes layout to Avkon style. |
EAvkonDisableCursor = 0x04000000 |
Hides cursor. |
EAvkonNotEditable = 0x08000000 |
Changes text editor to non-editable mode. |
EEdwinAlternativeWrapping = 0x10000000 |
Sets the Avkon wrapping rules ON. |
EAvkonTabsEnabled = 0x20000000 |
Enables tab key handling |
EAvkonDisableVKB = 0x40000000 |
Disable VKB input |
EAvkonEnableSmileySupport = 0x80000000 |
Enable Smiley Support |
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.
EOwnsText |
Document is owned by the Edwin. |
EDoesNotOwnText |
Document is owned by some other object. |
When content is supplied to an Edwin using SetDocumentContentL(), this defines whether the new content is added to or has replaced the existing content.
EUseText |
Replaces the Edwin s existing content. |
ECopyText |
Copies the supplied content into the existing content. |
CArrayPtr< MEikEdwinObserver > * | iObserverArray | [private] |