Location:
eikedwin.h
Link against: eikcoctl.lib
CEikEdwin
Supported from 6.0
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 if present on the target machine, 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.
|
Defined in CEikEdwin
:
ActivateL()
, AddEdwinObserverL()
, AvgCharsPerLine()
, AvgLinesInViewRect()
, BaseConstructL()
, CEikEdwin()
, CalculateWidth()
, CanUndo()
, CancelFepTransaction()
, CancelInsertCharFormat()
, CancelSelectionL()
, CheckNotReadOnlyL()
, CheckRemovePictures()
, CheckValidityOfChars()
, ClearSelectionL()
, ClearUndo()
, ClipboardL()
, ConstructFromResourceL()
, ConstructL()
, CopyDocumentContentL()
, CopyToStoreL()
, CountWords()
, CreatePreAllocatedScrollBarFrameL()
, CreateScrollBarFrameL()
, CreateTextViewL()
, CursorPos()
, DeleteHighlightL()
, DeleteL()
, DisplayFindTextNotFound()
, Draw()
, DrawContents()
, EAllowPictures
, EAllowUndo
, EAlwaysShowSelection
, EChunkPara
, EChunkWord
, ECopy
, ECopyText
, ECut
, EDisplayOnly
, EDoesNotOwnText
, EEnd
, EFindAgain
, EFindCaseSensitive
, EFindDirectionUp
, EFindWholeWord
, EHotKeyBold
, EHotKeyCopy
, EHotKeyCut
, EHotKeyEditObject
, EHotKeyFind
, EHotKeyFont
, EHotKeyFormatObject
, EHotKeyInsertChar
, EHotKeyInsertObject
, EHotKeyItalic
, EHotKeyPaste
, EHotKeyUnderline
, EHotKeyUndo
, EIgnoreVirtualCursor
, EInclusiveSizeFixed
, EJustAutoCurEnd
, EKeepDocument
, ELineCursor
, ENoAutoSelection
, ENoBusyMessage
, ENoClipboard
, ENoHorizScrolling
, ENoLineOrParaBreaks
, ENoWrap
, EOnlyASCIIChars
, EOwnsText
, EOwnsWindow
, EPaste
, EReadOnly
, EResizable
, ESegmentedStorage
, EStart
, EUseText
, EUserSuppliedText
, EWidthInPixels
, FindL()
, FindTextL()
, FocusChanged()
, ForceScrollBarUpdateL()
, FormatTextL()
, GetColorUseListL()
, GetFindText()
, GetText()
, GetTextInHBufL()
, GetWordInfo()
, HandlePointerEventL()
, HandleResourceChange()
, HandleScrollEventL()
, HandleSizeChangedL()
, HandleTextChangedL()
, HandleTextPastedL()
, InputCapabilities()
, InsertDeleteCharsL()
, InsertFieldL()
, InsertFromTextFileL()
, IsReadOnly()
, IsValidChar()
, LayoutWidth()
, LineCursorWidth()
, LowerPartialFormattingLength()
, Margins()
, MaximumHeight()
, MinimumHeight()
, MinimumSize()
, MoveCursorL()
, MoveCursorToChunkStartL()
, MoveDisplayL()
, NonPrintingCharsVisibility()
, NotifyNewDocumentL()
, NotifyNewFormatL()
, OfferKeyEventL()
, OkToDeleteSelectionL()
, OnReformatL()
, OnlyASCIIChars()
, PasteFromStoreL()
, PlaceDataOnClipboardL()
, ReceiveDataOverIrL()
, RemoveEdwinObserver()
, ReplaceAllL()
, ReplaceL()
, ReportEdwinEventL()
, RunCharMapDialogL()
, ScrollBarFrame()
, SelectAllL()
, Selection()
, SelectionLength()
, SendDataOverIrL()
, SetAllowPictures()
, SetAllowUndo()
, SetAmountToFormatL()
, SetAvgCharsPerLine()
, SetAvgLinesInViewRect()
, SetBackgroundColorL()
, SetBorderViewMargins()
, SetContainerWindowL()
, SetCursorPosL()
, SetDimmed()
, SetDocumentContentL()
, SetDocumentOwnership()
, SetEdwinObserver()
, SetEdwinSizeObserver()
, SetInputCapabilitiesL()
, SetLineCursorDetailsL()
, SetMaximumHeight()
, SetMinimumHeight()
, SetNonPrintingCharsVisibility()
, SetOnlyASCIIChars()
, SetPasteFromIrStore()
, SetReadOnly()
, SetRightWrapGutter()
, SetSelectionL()
, SetTextL()
, SetTextLimit()
, SetWordDelimiters()
, SetWordWrapL()
, SetWysiwygModeOff()
, SetWysiwygModeOn()
, SetZoomFactorL()
, SupportsUndo()
, TChunkSize
, TClipboardFunc
, TEdwinHotKeys
, TEnd
, TFindFlags
, TFlags
, TOwnershipType
, TSetContent
, Text()
, TextLength()
, TrappedDraw()
, TrappedSizeChanged()
, UndoL()
, UpdateAllFieldsL()
, UpdateCurrentFieldL()
, UpdateLayoutWidth()
, UpdateScrollBarsL()
, UpperFullFormattingLength()
, iEdwinInternalFlags
, iEdwinUserFlags
, iLastPointerDocPos
, iLayout
, iMargins
, iNumberOfLines
, iText
, iTextLimit
, iTextView
, iZoomFactor
, ~CEikEdwin()
Inherited from CBase
:
operator new()
Inherited from CCoeControl
:
ActivateGc()
,
BackedUpWindow()
,
CapturesPointer()
,
ClaimPointerGrab()
,
CloseWindow()
,
ComponentControl()
,
ControlContext()
,
ControlEnv()
,
CopyControlContextFrom()
,
CountComponentControls()
,
CreateBackedUpWindowL()
,
CreateWindowL()
,
DeactivateGc()
,
DrawDeferred()
,
DrawNow()
,
DrawableWindow()
,
EnableDragEvents()
,
GetColor()
,
GetHelpContext()
,
GrabbingComponent()
,
HandleComponentControlsResourceChange()
,
HandlePointerBufferReadyL()
,
HandleRedrawEvent()
,
IgnoreEventsUntilNextPointerUp()
,
Index()
,
IsActivated()
,
IsBackedUp()
,
IsBeingDestroyed()
,
IsBlank()
,
IsDimmed()
,
IsFocused()
,
IsNonFocusing()
,
IsReadyToDraw()
,
IsVisible()
,
MakeVisible()
,
Observer()
,
OverrideColorL()
,
OwnsWindow()
,
Position()
,
PositionChanged()
,
PositionRelativeToScreen()
,
PrepareForFocusGainL()
,
PrepareForFocusLossL()
,
Rect()
,
RecursivelyMergedInputCapabilities()
,
ReportEventL()
,
ResetGc()
,
SetAllowStrayPointers()
,
SetBlank()
,
SetCanDrawOutsideRect()
,
SetComponentsToInheritVisibility()
,
SetContainerWindow()
,
SetControlContext()
,
SetCornerAndSize()
,
SetCornerAndSizeL()
,
SetExtent()
,
SetExtentL()
,
SetExtentToWholeScreen()
,
SetExtentToWholeScreenL()
,
SetFocus()
,
SetFocusing()
,
SetGloballyCapturing()
,
SetNeighbor()
,
SetNonFocusing()
,
SetObserver()
,
SetPointerCapture()
,
SetPosition()
,
SetRect()
,
SetRectL()
,
SetSize()
,
SetSizeL()
,
SetSizeWithoutNotification()
,
SetSizeWithoutNotificationL()
,
Size()
,
SizeChanged()
,
SizeChangedL()
,
SystemGc()
,
Window()
Inherited from CEikBorderedControl
:
Border()
,
HasBorder()
,
SetAdjacent()
,
SetBorder()
,
iBorder
Inherited from MEikScrollBarObserver
:
EEikScrollBottom
,
EEikScrollDown
,
EEikScrollEnd
,
EEikScrollHome
,
EEikScrollLeft
,
EEikScrollPageDown
,
EEikScrollPageLeft
,
EEikScrollPageRight
,
EEikScrollPageUp
,
EEikScrollRight
,
EEikScrollThumbDragHoriz
,
EEikScrollThumbDragVert
,
EEikScrollThumbReleaseHoriz
,
EEikScrollThumbReleaseVert
,
EEikScrollTop
,
EEikScrollUp
,
TEikScrollEvent
CEikEdwin();
Default constructor. Creates a new Edwin, FEP support for the new editor will not be present if there is insufficient memory.
CEikEdwin(const TGulBorder& aBorder);
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.
|
void ConstructL(TInt aEdwinFlags=0,TInt aWidthInChars=0,TInt aTextLimit=0,TInt aNumberOfLines=0);
Completes construction of a new Edwin, initialising its heap-stored members from the supplied arguments. This function will leave if any of the pointer members being constructed leave.
|
void ConstructFromResourceL(TResourceReader& aReader);
Completes the construction of a new Edwin. This function
initialises the heap-stored members from an EDWIN
resource and
will leave if any of the pointer members being constructed leave.
|
protected: void BaseConstructL();
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 SetEdwinObserver(MEikEdwinObserver* aObserver);
Sets the Edwin observer. The Edwin’s observer will be called back with control events associated with the Edwin.
|
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
.
|
void RemoveEdwinObserver(MEikEdwinObserver* aEdwinObserver);
Removes the specified observer from the list of observers. Does
nothing if aEdwinObserver
is not an observer.
|
void SetContainerWindowL(const CCoeControl& aParent);
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.
|
void SetDocumentContentL(CGlobalText& aText,TSetContent aContent);
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.
|
~CEikEdwin();
Deletes objects and frees resources owned by this object. The
Edwin’s editable text is freed if the EKeepDocument
flag is
not set.
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.
|
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.
|
void SetWordWrapL(TBool aWrapIsOn);
Sets word wrapping on or off.
|
void SetAllowPictures(TBool aAllow);
Sets whether the document accepts pictures.
|
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.
|
void SetWordDelimiters(TBool aPicture,TBool aPunctuation);
Sets whether picture characters and/or punctuation should be treated as word delimiters in addition to whitespace.
|
TInt MaximumHeight() const;
Gets the maximum Edwin height.
|
void SetMaximumHeight(TInt aHeight);
Sets the maximum Edwin height. This function also decreases the
minimum Edwin height if its value is greater than aHeight
.
|
TInt MinimumHeight() const;
Gets the minimum Edwin height.
|
void SetMinimumHeight(TInt aHeight);
Sets the minimum Edwin height. This function also increases the
maximum Edwin height if its value is less than aHeight
.
|
void SetEdwinSizeObserver(MEikEdwinSizeObserver* aEdwinSizeObserver);
Sets the Edwin size observer. Does not imply transfer of ownership.
|
void SetReadOnly(TBool aReadOnly);
Sets the Edwin’s read-only flag so that documents displayed by Edwin cannot be edited by users.
|
TBool IsReadOnly() const;
Determines whether the document being edited with Edwin is read-only.
|
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.
The editable text in a CEikEdwin
is stored in an
object of class CPlainText
(or one of its subclasses). The
following methods provide a standard interface to this protected
field.
TInt TextLength() const;
Gets the number of characters in the document.
|
HBufC* GetTextInHBufL() const;
Gets a new buffer containing a copy of the whole text document.
|
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.
|
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.
|
TInt CountWords();
Counts and returns the number of words in the document.
|
CPlainText* Text() const;
Gets a pointer to the Edwin’s document contents.
|
TInt SelectionLength() const;
Gets the number of characters including non-printing characters within the selection.
|
TCursorSelection Selection() const;
Gets the cursor selection. If no text view is associated to the
Edwin this returns TCursorSelection(0,0)
.
|
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.
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.
|
TInt CursorPos() const;
Gets the cursor’s position within the document.
|
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 SendDataOverIrL();
Sends the Edwin’s document using an infra red beamer.
|
void ReceiveDataOverIrL();
Receives an Edwin document using an infra red beamer.
|
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.
|
void PlaceDataOnClipboardL();
Copies the contents of the cursor selection onto the clipboard.
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.
|
|
void CopyToStoreL(CStreamStore& aStore,CStreamDictionary& aDict);
Copies the highlighted text into a stream store.
|
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.
|
void SetTextLimit(TInt aLimit);
Sets the maximum number of characters that can be inserted.
|
void InsertDeleteCharsL(TInt aInsertPos,const TDesC& aText,const TCursorSelection& aDelete);
Replaces the cursor selection with the identified text.
|
void InsertFieldL(CTextField* aField,TUid aFieldType);
Inserts a field at the current cursor position. If a selection was made the field replaces that selection.
|
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.
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.
virtual TInt LineCursorWidth() const;
Gets the width of a line cursor in pixels.
|
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.
|
TMargins8 Margins() const;
Gets the text view margins.
|
void SetBorderViewMargins(TMargins8 aMargins);
Sets the text view margins.
|
void SetBackgroundColorL(TRgb aBackground);
Sets the Edwin’s background colour.
|
void SetZoomFactorL(TZoomFactor* aZoomFactor);
Sets the zoom factor of the document and reformats the document.
|
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.
|
|
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
.
|
|
void ReplaceL(SEdwinFindModel* aFindModel);
Replaces the highlighted text. See SEdwinFindModel
struct.
|
void ReplaceAllL(SEdwinFindModel* aFindModel);
Replaces all occurrences of a string with new text. Both old
and new text are held in aFindModel
.
|
|
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.
|
Scroll bars are updated asynchronously using the private function
CIdle
. Scroll bar calculations are time consuming, so the task of
updating them is performed in the background at a lower
priority.
void UpdateScrollBarsL();
Updates the scroll bars asynchronously. This function returns immediately after generating a call back to update the scroll bars if there is not one waiting to be serviced already.
void ForceScrollBarUpdateL();
Forces the scrollbars to update now; this is a synchronous function.
CEikScrollBarFrame* CreateScrollBarFrameL();
Creates the Edwin scroll bar frame with no pre-allocation of memory for scroll bars.
|
CEikScrollBarFrame* CreateScrollBarFrameL(TBool aPreAlloc);
Creates the Edwin scroll bar frame with an option to pre-allocate memory for the scroll bars.
|
|
CEikScrollBarFrame* CreatePreAllocatedScrollBarFrameL();
Creates a pre-allocated scroll bar frame.
|
CEikScrollBarFrame* ScrollBarFrame();
Gets the scroll bar frame surrounding this Edwin.
|
WYSIWYG mode depends on a text layout being set. These methods
will panic in debug builds with a code of EEikPanicEdwinNoLayout
if the Edwin’s text layout has not been set.
void SetWysiwygModeOn(TInt aLayoutWidth, MGraphicsDeviceMap* aDevice);
Sets the format mode to be WYSIWYG.
|
void SetWysiwygModeOff();
Switches off the WYSIWYG mode. This function sets the new
format mode to be EFScreenMode
.
void UpdateLayoutWidth(TInt aLayoutWidth);
Updates the text wrap width. This function is for use in WYSIWYG mode only.
|
void OnReformatL(const CTextView* aTextView);
Responds to text height change. Reports the event
EEventSizeChanging
to the Edwin observer when the text view height
changes. This function checks the new height is within the minimum and maximum
Edwin height limits and redraws the Edwin within those limits.
|
void SetAmountToFormatL(TBool aIsNewDoc = EFalse);
Sets the amount to format. This function is called by
NotifyNewDocumentL()
, OfferKeyEventL()
and other
functions, and sets an appropriate amount of the document for formatting. At
least the portion of text currently displayed will be marked as
formattable.
|
void NotifyNewDocumentL();
Formats and draws a new document, updates scrollbars if necessary.
void NotifyNewFormatL();
Reformats and redraws the document, updates scrollbars if necessary.
protected: void FormatTextL();
Formats all the text in the text view. Called by several
functions, for example by CEikEdwin::HandleTextChangedL()
and
CEikEdwin::SetTextL()
.
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.
void SetNonPrintingCharsVisibility(TNonPrintingCharVisibility aVisibility);
Sets non-printing characters’ visibility.
|
TNonPrintingCharVisibility NonPrintingCharsVisibility();
Gets non-printing characters’ visibility.
|
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.
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.
|
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.
|
void UndoL();
Undoes the most recent text operation when the Edwin supports this feature and when the undo store is not empty.
void SetAllowUndo(TBool aAllow);
Sets whether the undo operation is permitted.
|
TBool SupportsUndo() const;
Gets whether Edwin is set to support the undo command.
|
TBool CanUndo() const;
Tests whether an undo is possible. Returns ETrue
only if the undo store is available to Edwin.
|
The following functions are used by OfferKeyEventL()
and HandlePointerEventL()
to perform a user’s
commands.
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.
|
void MoveDisplayL(TCursorPosition::TMovementType aMovement);
Scrolls the text either horizontally or vertically without affecting the cursor’s position.
|
void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType);
Handles scroll bar events passed by this Edwin’s scroll bars.
|
The following functions provide appropriate implementations of functions declared virtual in CCoeControl. Full descriptions of their behaviour are given in the documentation for that class.
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
Handles key events.
|
|
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
Handles pointer events.
|
void FocusChanged(TDrawNow aDrawNow);
Responds to focus-changed events.
|
TSize MinimumSize();
Gets the minimum size of this Edwin for automatic-layout control contexts such as dialogs.
|
void Draw(const TRect& aRect) const;
Draws the control on request.
|
void SetDimmed(TBool aDimmed);
Dims or undims the Edwin.
|
void SetInputCapabilitiesL(const TCoeInputCapabilities& aInputCapabilities);
Sets the Edwin’s input capabilities.
|
protected: void TrappedDraw(const TRect& aRect) const;
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.
|
TInt AvgCharsPerLine() const;
Gets the average number of characters on a line.
|
TInt AvgLinesInViewRect() const;
Gets the average number of lines shown in Edwin’s view.
|
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.
|
void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;
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
.
|
void HandleResourceChange(TInt aType);
Handles a change to Edwin’s resources which are shared across the environment. Colours or fonts for example.
|
TCoeInputCapabilities InputCapabilities() const;
Gets Edwin’s input capabilities.
|
TBool IsValidChar(TInt aChar) const;
Checks whether the specified character is an ASCII character.
|
|
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.
|
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
.
|
TBool OnlyASCIIChars() const;
Tests whether the EOnlyASCIIChars
flag is set.
|
void SetOnlyASCIIChars(TBool aASCIIOnly);
Sets the EOnlyASCIIChars
flag.
|
void SetAvgCharsPerLine(TInt aAvgChars);
Sets the average number of characters per line.
|
void SetAvgLinesInViewRect(TInt aAvgLines);
Sets the average number of lines displayed in Edwin’s view.
|
void SetPasteFromIrStore(TBool aPasteFromIrStore);
Sets the EPasteFromIrStore
flag.
|
protected: void CancelInsertCharFormat();
Cancels the insertion of a character format. This can be used for rich text only.
protected: void CancelSelectionL(TEnd aEndOfSelectionToLeaveCursor);
Cancels the selection and any FEP composition text. This function then repositions the cursor at the specified end of the currently selected text.
|
void CopyDocumentContentL(CGlobalText& aInText,CGlobalText& aOutText);
Replaces the current Edwin text.
|
protected:
TInt DeleteHighlightL
(TBool& aChanged,
TBool aIsBackSpace,
TBool aPromptConfirmation);
Deletes the text under the cursor selection, also cancelling
the selection. This function asks the user to confirm this action if
aPromptConfirmation
is ETrue
.
|
|
void DeleteL (TBool& aChanged,const TCursorSelection& aSelection,TBool aIsBackSpace,TBool aAllowUndo);
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.
|
void DisplayFindTextNotFound(TDes& aFindText);
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
.
|
void HandleSizeChangedL();
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.
void HandleTextPastedL(TInt,TInt&)
Handles pasting of text. The default implementation of this function is empty.
|
void MoveCursorToChunkStartL(TBool aSelect,TChunkSize aChunkSize,TEnd aEndScanningTowards);
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.
|
protected: TBool OkToDeleteSelectionL();
Confirms whether 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.
|
void ReportEdwinEventL(MEikEdwinObserver::TEdwinEvent aEventType);
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.
|
void TrappedSizeChanged();
Handles errors that occur when handling a change in
Edwin’s size. Calls
CEikonEnv::NotifyIdleErrorWhileRedrawing()
.
TOwnershipType
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.
|
TFlags
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.)
|
TFindFlags
The following flags may be ORed together for text searches (see
FindL()
for example).
|
TChunkSize
Specifies the chunk size as either a word, or a paragraph.
|
TEnd
Specifies the end points of the editable area.
|
TEdwinHotKeys
Order of hotkeys defined an Edwin resource structure. Not all are applicable to plain text editors.
|
TClipboardFunc
The following symbols specify actions for ClipboardL().
|
TSetContent
When content is supplied to an Edwin using SetDocumentContentL(), the Edwin can either copy the supplied content into its existing content, or it can replace its existing content with the supplied content.
|
TInt iLastPointerDocPos
The last pointer event position. When a pointer event occurs in a different location, a navigation event is sent to the Edwin observer.
struct SEdwinFindModel;
This struct describes the features of a search-and-replace
operation on a CEikEdwin
. See
CEikEdwin::ReplaceL()
.
Defined in SEdwinFindModel
:
iFlags
, iReplaceOption
, iReplaceText
, iText
TReplaceOption iReplaceOption
Replace options.