|
|
|
Location:
EIKEDWIN.H
Link against: eikcoctl.lib
class CEikEdwin : public CEikBorderedControl, public MEikScrollBarObserver, public CTextView::MObserver, public MEditObserver, public MQikCommandListOwner, public MQikCommandHandler, public MQikControlStreamInterface, public MQikTextRepresentationInterface;
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.
MQikTextRepresentationInterface - MQikTextRepresentationInterface should be implemented by controls that are normally shown in a container pop-out e.gMQikControlStreamInterface - MQikControlStreamInterface is used by controls to be able to handle cancel behaviour from e.gMQikCommandHandler - Interface for classes responsible of executing commandsMQikCommandListOwner - Interface for classes adding commandsMEditObserver - Specifies the mixin protocol for a rich text edit observerCTextView::MObserver - Provides notification to the owner of the text view object of changes to the formattingMEikScrollBarObserver - This mixin is implemented by classes wishing to receive notification about scroll events from a scroll barMEikBorderedControl - Interface for bordered controlsMObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCEikBorderedControl - A control which is drawn surrounded by a rectangular borderCEikEdwin - Base class for controls that display and allow manipulation of textDefined in CEikEdwin:
ActivateL(), AddEdwinObserverL(), AvgCharsPerLine(), AvgLinesInViewRect(), BaseConstructL(), Border(), CEikEdwin(), CEikEdwin(), CEikEdwin_Reserved_1(), CalculateHeight(), CalculateWidth(), CanUndo(), CancelFepTransaction(), CancelInsertCharFormat(), CancelSelectionL(), CheckNotReadOnlyL(), CheckRemovePictures(), CheckValidityOfChars(), ClearSelectionL(), ClearUndo(), ClipboardL(), ComponentControl(), ConstructFromResourceL(), ConstructL(), CopyDocumentContentL(), CopyToStoreL(), CountComponentControls(), CountWords(), CreateCustomDrawL(), CreateLayoutL(), CreatePreAllocatedScrollBarFrameL(), CreateScrollBarFrameL(), CreateTextAndLayoutL(), CreateTextViewL(), CursorPos(), DeleteContentL(), DeleteHighlightL(), DeleteL(), DisplayFindTextNotFound(), Draw(), DrawContents(), EAllowPictures, EAllowUndo, EAlwaysShowSelection, EChunkPara, EChunkWord, ECopy, ECopyText, ECursorWrapOff, ECursorWrapOn, ECursorWrapUpOff, ECustomWrap, ECut, EDisableAutoCurEnd, EDisableSkinning, EDisplayOnly, EDoesNotOwnText, EDragDouble, EEnableAutoSelection, EEnd, EFindAgain, EFindCaseSensitive, EFindDirectionUp, EFindWholeWord, EHotKeyBold, EHotKeyCopy, EHotKeyCut, EHotKeyEditObject, EHotKeyFind, EHotKeyFont, EHotKeyFormatObject, EHotKeyInsertChar, EHotKeyInsertObject, EHotKeyItalic, EHotKeyPaste, EHotKeySelectAll, EHotKeyUnderline, EHotKeyUndo, EIgnoreVirtualCursor, EInclusiveSizeFixed, EJustAutoCurEnd, EKeepDocument, ELeftDownInViewRect, ELineCursor, ENoAutoSelection, ENoBusyMessage, ENoClipboard, ENoCursorWrap, ENoCursorWrapUp, ENoCustomDraw, ENoHorizScrolling, ENoLineOrParaBreaks, ENoTextParsers, ENoWrap, ENumericCharacters, EOnlyASCIIChars, EOwnsText, EOwnsWindow, EPaste, EReadOnly, EReadOnlyFile, EResizable, ERichText, ESegmentedStorage, EStart, EUseText, EUserSuppliedText, EWidthInPixels, EditObserver(), FindL(), FindNextVisualStartOfWordL(), FindTextL(), FocusChanged(), ForceScrollBarUpdateL(), FormatTextL(), GetColorUseListL(), GetFindText(), GetHelpContext(), GetText(), GetTextInHBufL(), GetWordInfo(), HandleCommandL(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HandleScrollEventL(), HandleSizeChangedL(), HandleTextChangedL(), HandleTextPastedL(), HasBorder(), IdleL(), InputCapabilities(), InsertDeleteCharsL(), InsertFieldL(), InsertFromTextFileL(), IsReadOnly(), IsSkinningDisabled(), LayoutWidth(), LineCursorWidth(), LowerPartialFormattingLength(), MakeVisible(), MapCommandHandler(), Margins(), MaximumHeight(), MinimumHeight(), MinimumSize(), MopSupplyObject(), MoveCursorL(), MoveCursorToChunkStartL(), MoveDisplayL(), NonPrintingCharsVisibility(), NotifyInvalidOperationOnReadOnlyL(), NotifyNewDocumentL(), NotifyNewFormatL(), OfferKeyEventL(), OkToDeleteSelectionL(), OnReformatL(), OnlyASCIIChars(), PasteFromStoreL(), PlaceDataOnClipboardL(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), ReceiveDataOverIrL(), RemoveEdwinObserver(), ReplaceAllL(), ReplaceL(), ReportEdwinEventL(), RequestRelayout(), RestoreUserDataL(), RunCharMapDialogL(), ScrollBarFrame(), SelectAllL(), Selection(), SelectionLength(), SendDataOverIrL(), SetAdjacent(), SetAllowPictures(), SetAllowUndo(), SetAmountToFormatL(), SetAvgCharsPerLine(), SetAvgLinesInViewRect(), SetBackgroundColorL(), SetBorder(), SetBorder(), SetBorderViewMargins(), SetContainerWindowL(), SetContainerWindowL(), SetControlValueObserver(), SetCursorPosL(), SetCursorVisibilityL(), SetCursorWrap(), SetDimmed(), SetDocumentContentL(), SetDocumentOwnership(), SetEdwinClipboardObserverL(), SetEdwinObserver(), SetEdwinSizeObserver(), SetInputCapabilitiesL(), SetLayoutManagerL(), SetLineCursorDetailsL(), SetMaximumHeight(), SetMinimumHeight(), SetNeighbor(), SetNonPrintingCharsVisibility(), SetNumberOfLinesL(), SetOnlyASCIIChars(), SetParent(), SetPasteFromIrStore(), SetPreferredWidthInChars(), SetReadOnly(), SetResizableL(), SetRightWrapGutter(), SetSelectionL(), SetTextBaselineSpacing(), SetTextL(), SetTextLimit(), SetUndoBufferL(), SetUndoableText(), SetWordDelimiters(), SetWordWrapL(), SetWysiwygModeOff(), SetWysiwygModeOn(), SetZoomFactorL(), SizeChanged(), StoreUserDataL(), SupportsUndo(), TChunkSize, TClipboardFunc, TEdwinCursorWrapValues, TEdwinHotKeys, TEikEdwinFlags, TEnd, TFindFlags, TFlags, TOwnershipType, TSetContent, Text(), TextBaselineOffset(), TextLayout(), TextLength(), TextLimit(), TextRepresentationL(), TextView(), TrappedDraw(), TrappedSizeChanged(), UndoL(), UpdateAllFieldsL(), UpdateCommandsAfterNavigationChange(), UpdateCommandsAfterStateChange(), UpdateCurrentFieldL(), UpdateLayoutWidth(), UpdateScrollBarsL(), UpperFullFormattingLength(), WriteInternalStateL(), iEdwinInternalFlags, iEdwinUserFlags, iLastPointerDocPos, iLayout, iMargins, iNumberOfLines, iText, iTextLimit, iTextView, iUndoStore, iZoomFactor, ~CEikEdwin()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeControl:
AccumulatedZoom(),
ActivateGc(),
BackedUpWindow(),
Background(),
CapturesPointer(),
ClaimPointerGrab(),
CloseWindow(),
ComponentArrayExists(),
Components(),
ControlContext(),
ControlEnv(),
CopyControlContextFrom(),
CreateBackedUpWindowL(),
CreateWindowL(),
DeactivateGc(),
DrawBackground(),
DrawDeferred(),
DrawForeground(),
DrawNow(),
DrawableWindow(),
EAbsoluteZoom,
ERelativeZoom,
EnableDragEvents(),
FindBackground(),
FindFontProvider(),
GetColor(),
GetGc(),
GetTextDrawer(),
GrabbingComponent(),
HandleComponentControlsResourceChange(),
HandleRedrawEvent(),
HitTest(),
IgnoreEventsUntilNextPointerUp(),
Index(),
InitComponentArrayL(),
IsActivated(),
IsBackedUp(),
IsBeingDestroyed(),
IsBlank(),
IsDimmed(),
IsFocused(),
IsNonFocusing(),
IsReadyToDraw(),
IsVisible(),
LayoutManager(),
MaximumWidth(),
MopNext(),
Observer(),
OverrideColorL(),
OwnsWindow(),
Parent(),
Position(),
PositionRelativeToScreen(),
Rect(),
RecursivelyMergedInputCapabilities(),
ReportEventL(),
Reserved_2(),
ResetGc(),
ScreenFont(),
SetAllowStrayPointers(),
SetBackground(),
SetBlank(),
SetCanDrawOutsideRect(),
SetComponentsToInheritVisibility(),
SetControlContext(),
SetCornerAndSize(),
SetExtent(),
SetExtentToWholeScreen(),
SetFocus(),
SetFocusing(),
SetFontProviderL(),
SetGc(),
SetGloballyCapturing(),
SetHitTest(),
SetMaximumWidth(),
SetMopParent(),
SetNonFocusing(),
SetObserver(),
SetPointerCapture(),
SetPosition(),
SetRect(),
SetSize(),
SetSizeWithoutNotification(),
SetUniqueHandle(),
Size(),
SystemGc(),
TZoomType,
TextDrawer(),
UniqueHandle(),
Window(),
ZoomWithType(),
iCoeEnv,
iContext,
iPosition,
iSize
Inherited from CEikBorderedControl:
iBorder
Inherited from MEikBorderedControl:
ETypeId,
anonymous
Inherited from MObjectProvider:
MObjectProvider_Reserved1(),
MObjectProvider_Reserved2(),
MopGetObject(),
MopGetObjectNoChaining()
Inherited from MQikCommandHandler:
HandleAttemptDimmedSelectionL()
IMPORT_C ~CEikEdwin();
Deletes objects and frees resources owned by this object.
The Edwins editable text is freed if the EKeepDocument flag is not set.
IMPORT_C CEikEdwin();
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);
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.
|
IMPORT_C 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.
|
IMPORT_C void SetEdwinObserver(MEikEdwinObserver *aEdwinObserver);
Sets the Edwin observer.
The Edwins observer will be called back with control events associated with the Edwin.
|
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 .
|
IMPORT_C void RemoveEdwinObserver(MEikEdwinObserver *aEdwinObserver);
Removes the specified observer from the list of observers.
Does nothing if aEdwinObserver is not an observer.
|
IMPORT_C void SetDocumentContentL(CGlobalText &aText, TSetContent aContent=CEikEdwin::ECopyText);
Sets the Edwins 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.
|
virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Handles key events.
|
|
virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);
Responds to focus-changed events.
|
virtual IMPORT_C 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.
|
virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);
Handles pointer events.
|
virtual IMPORT_C TSize MinimumSize();
Gets the minimum size of this Edwin for automatic-layout control contexts such as dialogs.
|
virtual IMPORT_C void Draw(const TRect &aRect) const;
Draws the control on request.
|
virtual IMPORT_C void SetDimmed(TBool aDimmed);
Dims or undims the Edwin.
|
virtual IMPORT_C void SetContainerWindowL(const CCoeControl &aParent);
Sets the containing window for the Edwin by copying it from the specified parent.
|
virtual IMPORT_C 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 .
|
virtual IMPORT_C void HandleResourceChange(TInt aType);
Handles a change to Edwins resources which are shared across the environment.
Colours or fonts for example.
|
virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;
Gets the control's input capabilities. From CCoeControl .
|
IMPORT_C void SetInputCapabilitiesL(const TCoeInputCapabilities &aInputCapabilities);
Sets the Edwins input capabilities.
|
virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;
Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
|
virtual IMPORT_C void PrepareForFocusGainL();
Notifier called upon before the control gains focus.
virtual IMPORT_C void PrepareForFocusLossL();
Notifier called upon before the control loses focus.
virtual IMPORT_C void HandleScrollEventL(CEikScrollBar *aScrollBar, TEikScrollEvent aEventType);
Handles scroll bar events passed by this Edwins scroll bars.
|
virtual IMPORT_C 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.
|
virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);
From MQikCommandListOwner
|
|
virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);
From MQikCommandHandler
|
virtual IMPORT_C void StoreUserDataL(RWriteStream &aWriteStream) const;
Method to store the current user data of the control
|
virtual IMPORT_C void RestoreUserDataL(RReadStream &aReadStream);
Method to restore saved user data of the control
|
virtual IMPORT_C HBufC *TextRepresentationL() const;
Method to get the textual representation of the control.
|
virtual IMPORT_C void SetControlValueObserver(MQikControlValueObserver *aObserver);
This method is used to set the control value observer that shall later be notified of control value changes.
|
IMPORT_C void SetNumberOfLinesL(TInt aMaxNumberOfLines);
Sets the number of lines visible on screen. For resizable Edwins (that grow and shrink as the user types), 0 (zero) means no maximum number of lines. For non-resizable Edwins 0 (zero) has the same effect as 1 (one).
|
IMPORT_C void SetResizableL(TBool aGrowingAsYouType);
Set EResizable to enable the the edwin to grow with the text up to iMaxNumberOfLines
|
IMPORT_C TInt TextLength() const;
Gets the number of characters in the document.
|
IMPORT_C TInt CursorPos() const;
Gets the cursors position within the document.
|
IMPORT_C TInt SelectionLength() const;
Gets the number of characters including non-printing characters within the selection.
|
IMPORT_C TCursorSelection Selection() const;
Gets the cursor selection.
If no text view is associated to the Edwin this returns TCursorSelection(0,0) .
|
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 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.
|
IMPORT_C void SetCursorPosL(TInt aCursorPos, TBool aSelect);
Sets the cursors 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.
|
| Interface status: | deprecated |
IMPORT_C void CalculateWidth(TInt aWidthInChars);
Recalculates and sets the screen width of an Edwin from the specified number of character widths.
Note that calling this method will change the width of the control. 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.
This method has been deprecated. Do not use.
|
IMPORT_C void SetPreferredWidthInChars(TInt aWidthInChars);
Sets the preferred width of the control based on mean character width of the font used.
If the Edwin only allows editing of numbers, the width of the zero character (0 ) is used; otherwise CFont::MaxNormalCharWidthInPixels() is used.
|
IMPORT_C void GetText(TDes &aDes) const;
Copies the entire documents content into a descriptor.
It is the caller's responsibility to provide a large enough buffer.
|
IMPORT_C HBufC *GetTextInHBufL() const;
Gets a new buffer containing a copy of the whole text document.
|
IMPORT_C void SetTextL(const TDesC *aDes);
Sets the document text of this Edwin from the contents of a descriptor.
This function removes any pictures, any invalid characters and cancels any previous selection.
|
|
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.
|
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.
|
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 fields existing text content with the new text.This function does nothing if the cursor is not within a text field.
IMPORT_C TInt CountWords();
Counts and returns the number of words in the document.