Guiliani  Version 2.4 revision 5970 (build 3)
CGUIMultiLineEdit Class Reference

A multiple line edit control. More...

#include <GUIMultiLineEdit.h>

Inheritance diagram for CGUIMultiLineEdit:

Public Member Functions

 CGUIMultiLineEdit (CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &kInitStr="", eC_Bool bWordWrap=false, eC_Bool bEditable=true, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIMultiLineEdit (CGUICompositeObject *const pkParent, const CGUIRect &kRect, const eC_String &kInitStr="", eC_Bool bWordWrap=false, eC_Bool bEditable=true, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIMultiLineEdit (const CGUIMultiLineEdit &rkSource)
 
 CGUIMultiLineEdit ()
 
virtual ~CGUIMultiLineEdit ()
 
void AdjustYPositionOfText (CGUIEditableText *pCurEditableText)
 
void Append (const eC_String &rkText)
 
virtual void DoAnimate (const eC_Value &vTimes=eC_FromInt(1))
 
virtual eC_Bool DoButtonDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoDoubleClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDrag (const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoUserEvent (CGUIEvent *const pEvent)
 
void Empty ()
 
eC_UInt GetCurrentCursorIndex () const
 
eC_Bool GetEditable () const
 
eC_String GetEntireText () const
 
void GetFocus ()
 
FontResource_t GetFont () const
 
eC_Float GetFontSpacing () const
 
eC_UInt GetSelectionColor () const
 
eC_UInt GetSelectionEndIndex () const
 
eC_UInt GetSelectionStartIndex () const
 
void GetTextColor (eC_UInt &uiTextColorStandard, eC_UInt &uiTextColorHighlighted, eC_UInt &uiTextColorGrayedOut, eC_UInt &uiTextColorPressed)
 
void InsertString (const eC_String &kInsertStr)
 
eC_Bool IsWordWrap () const
 
void LoseFocus ()
 
CGUIMultiLineEditoperator= (const CGUIMultiLineEdit &rkSource)
 
virtual void ReadFromStream ()
 
virtual void RemoveObject (CGUIObject *pObject)
 Removes an object from the scrolled container. More...
 
virtual void ScrollToFocussedObject ()
 
void SetEditable (eC_Bool bEditable)
 
void SetFont (const FontResource_t &eFontID)
 
void SetFontSpacing (const eC_Float &fFontSpacing)
 
void SetSelectionColor (eC_UInt uiSelectionColor)
 
void SetText (const eC_String &kWholeStr)
 
void SetTextColor (const eC_UInt &uiTextColorStandard, const eC_UInt &uiTextColorHighlighted, const eC_UInt &uiTextColorGrayedOut, const eC_UInt &uiTextColorPressed)
 
void SetWordWrap (eC_Bool bWordWrap)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 
- Public Member Functions inherited from CGUIScrollView
 CGUIScrollView (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIScrollView (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIScrollView (const CGUIScrollView &rkSource)
 
 CGUIScrollView ()
 
virtual void AdjustScrollBars ()
 
virtual eC_Bool DoScrollDown (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollLeft (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollRight (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual eC_Bool DoScrollUp (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
virtual CGUICompositeObjectGetClipper () const
 
virtual CGUICompositeObjectGetContainer () const
 
CGUIScrollBarGetHorizontalScrollbar ()
 
CGUIScrollBarGetVerticalScrollbar ()
 
virtual eC_Bool IsHorizontalScrollBarAtBottom () const
 
virtual eC_Bool IsVerticalScrollBarAtRight () const
 
CGUIScrollViewoperator= (const CGUIScrollView &rkSource)
 
virtual void RestoreScrollPosition ()
 
virtual void SaveScrollPosition ()
 Stores the scroll positions (values of both scroll bars)
 
virtual void ScrollToObject (CGUIObject *pkObject)
 
void SetAutoAdjustContainerSize (const eC_Bool bAutoAdjustContainerSize)
 
void SetAutoAdjustScrollViewLayout (const eC_Bool bAutoAdjustScrollViewLayout)
 
virtual void SetHeight (const eC_Value &vHeight)
 
virtual void SetHorizontalScrollBarAtBottom (const eC_Bool bIsAtBottom)
 
virtual void SetScrollingInertia (const eC_Value vInertia)
 
virtual void SetScrollingViewport (const eC_Value vX, const eC_Value vY)
 
virtual void SetVerticalScrollBarAtRight (const eC_Bool bIsAtRight)
 
virtual void SetWidth (const eC_Value &vWidth)
 
virtual void StartScrollingAnimation ()
 Called when the Scrollview wishes to start scrolling. Overriding methods should call the base class implementation.
 
virtual void StopScrollingAnimation ()
 Called when the scrolling animation is over. Overriding methods should call the base class implementation.
 
- Public Member Functions inherited from CGUICompositeObject
 CGUICompositeObject ()
 
 CGUICompositeObject (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUICompositeObject (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUICompositeObject (const CGUICompositeObject &kSource)
 
virtual ~CGUICompositeObject ()
 This destructor is automatically virtual, as the base class destructor is virtual.
 
eC_Bool BringToFront (const CGUIObject *pkObject)
 
eC_Bool CanBeCyclicFocussed () const
 
virtual eC_Bool DoPostDraw ()
 
void DrawOnTop (CGUIObject *pkObject)
 
void DrawOnTopOf (CGUIObject *const pkObject, CGUIObject *const pDrawOnTopOf)
 
virtual CGUIObjectFindObject (const eC_Value &vAbsX, const eC_Value &vAbsY)
 
void Flip (const eC_Bool &rbVertical)
 
eC_Bool FocusAny ()
 
virtual eC_Bool FocusNext (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
virtual eC_Bool FocusPrevious (CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
 
const CGUIObjectGetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName) const
 
CGUIObjectGetAndCheckObjectByID (ObjectHandle_t eObjID, const eC_String &kObjectName)
 
CGUIObjectGetChild (const eC_UInt uIndex) const
 
CGUIObjectGetChild (const eC_UInt uIndex)
 
const ObjectPtrListGetChildObjectsList () const
 
const ObjectPtrListGetDrawOrderList () const
 
eC_Int GetIndexOfChild (const CGUIObject *pkObject) const
 
eC_UInt GetNumberOfChildren () const
 
CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false)
 
const CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const
 
eC_Bool InsertChildAt (const eC_UInt cuiIndex, CGUIObject *pkChild)
 
void InvalidateChildren ()
 Invalidates all chidren, but not this parent.
 
eC_Bool IsAncestorOf (const CGUIObject *pkObject) const
 
virtual eC_Bool IsCompositeObject () const
 
eC_Bool LowerOneLevel (const CGUIObject *pkObject)
 
CGUICompositeObjectoperator= (const CGUICompositeObject &kSource)
 
eC_Bool RaiseOneLevel (const CGUIObject *pkObject)
 
virtual void RefreshLayout (CGUILayouter::eMovedEdges_t eMovedEdges) const
 
void RemoveAllChildren ()
 
void Rotate (const eC_UInt &ruiDegrees, const eC_Bool &rbFirst=false)
 
eC_Bool SendToBack (const CGUIObject *pkObject)
 
virtual void SetClickThrough (const eC_Bool &bClickThrough)
 
virtual void SetClickThrough (const eC_Bool &bClickThrough, const eC_Bool &bChildrenClickThrough)
 
void SetCyclicFocus (const eC_Bool &bCyclicFocus)
 
virtual void SetDisabled (const eC_Bool &bDisabled)
 
virtual void SetDisabled (const eC_Bool &bDisabled, const eC_Bool &bChildrenDisabled)
 
virtual void SetFocussable (const eC_Bool &bFocussable)
 
virtual void SetFocussable (const eC_Bool &bFocussable, const eC_Bool &bChildrenFocussable)
 
virtual void SetGrayedOut (const eC_Bool &bGrayedOut)
 
virtual void SetGrayedOut (const eC_Bool &bGrayedOut, const eC_Bool &bChildrenGrayedOut)
 
virtual void SetInvisible (const eC_Bool &bInvisible)
 
virtual void SetInvisible (const eC_Bool &bInvisible, const eC_Bool &bChildrenInvisible)
 
- Public Member Functions inherited from CGUIObject
 CGUIObject (CGUICompositeObject *const pParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject (CGUICompositeObject *const pParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
 
 CGUIObject ()
 
 CGUIObject (const CGUIObject &kSource)
 
virtual ~CGUIObject ()
 
void AddValueObserver (CGUIObserver *pObserver)
 
eC_Bool CalculateInvalidatedRect (CGUIRect &rRect) const
 
virtual eC_Bool ClaimFocus ()
 
virtual void CreateSnapshot (eC_UInt uiBackColor=0x00)
 
eC_Bool DataPoolConnectorExists () const
 
void DeleteSnapshot ()
 
virtual void DisableSnapshotDrawing (eC_Bool bDeleteSnapshot=true)
 
virtual eC_Bool DoDraw ()
 
virtual eC_Bool DoDrawSnapshot ()
 
virtual void EnableSnapshotDrawing ()
 
CGUIRect GetAbsRect () const
 
eC_Value GetAbsXPos () const
 
eC_Value GetAbsXPosCenter () const
 
eC_Value GetAbsXPosREdge () const
 
eC_Value GetAbsYPos () const
 
eC_Value GetAbsYPosBEdge () const
 
eC_Value GetAbsYPosCenter () const
 
eC_UByte GetAlpha () const
 
CGUIBehaviourDecoratorGetBehaviour ()
 
const CGUIBehaviourDecoratorGetBehaviour () const
 
GUIBitmapPlaneID_t GetBitmapID () const
 
CGUIBitmapPlaneGetBitmapPlane () const
 
CGUIRect GetCurrentAbsRect () const
 
eC_Value GetCurrentAbsXPos () const
 
eC_Value GetCurrentAbsXPosCenter () const
 
eC_Value GetCurrentAbsXPosREdge () const
 
eC_Value GetCurrentAbsYPos () const
 
eC_Value GetCurrentAbsYPosBEdge () const
 
eC_Value GetCurrentAbsYPosCenter () const
 
CDataPoolConnectorGetDataPoolConnector ()
 
eC_Value GetDistanceBottom () const
 
eC_Value GetDistanceRight () const
 
eC_Value GetHalfHeight () const
 
eC_Value GetHalfWidth () const
 
eC_Value GetHeight () const
 
ObjectHandle_t GetID () const
 
CGUILayouterGetLayouter ()
 
const CGUILayouterGetLayouter () const
 
ObjectHandle_t GetNeighborBottomID () const
 
ObjectHandle_t GetNeighborLeftID () const
 
ObjectHandle_t GetNeighborRightID () const
 
ObjectHandle_t GetNeighborTopID () const
 
CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false)
 
const CGUIObjectGetObjectByID (const ObjectHandle_t &eID, const eC_Bool &bOnlyVisible=false) const
 
CGUIRect GetOriginRect () const
 
CGUICompositeObjectGetParent ()
 
const CGUICompositeObjectGetParent () const
 
CGUIRect GetRelRect () const
 
eC_Value GetRelXPos () const
 
eC_Value GetRelXPosCenter () const
 
eC_Value GetRelXPosREdge () const
 
eC_Value GetRelYPos () const
 
eC_Value GetRelYPosBEdge () const
 
eC_Value GetRelYPosCenter () const
 
eC_Value GetWidth () const
 
void InvalidateArea ()
 
eC_Bool IsClickable () const
 
eC_Bool IsClickThrough () const
 
eC_Bool IsDescendantOf (const CGUIObject *const pAncestor) const
 
eC_Bool IsDisabled () const
 
eC_Bool IsDragable () const
 
eC_Bool IsDragged () const
 
eC_Bool IsDrawingSnapshot () const
 
eC_Bool IsFocussable () const
 
eC_Bool IsFocussed () const
 
eC_Bool IsGrayedOut () const
 
virtual eC_Bool IsHighlightable () const
 
eC_Bool IsHighlighted () const
 
eC_Bool IsInvisible () const
 
eC_Bool IsPressed () const
 
eC_Bool IsStopFocus () const
 
void NotifyValueObservers (const CGUIValue &kValue, const eC_UInt uiX=0, const eC_UInt uiY=0)
 
CGUIObjectoperator= (const CGUIObject &kSource)
 
void RemoveValueObserver (CGUIObserver *pObserver)
 
void RenderToBitmap (eC_UInt uiBitmapID, eC_Value vXOffset=eC_FromInt(0), eC_Value vYOffset=eC_FromInt(0))
 
eC_Bool RequestFocus ()
 
void SetAlpha (eC_UByte ubAlpha)
 
void SetBehaviour (CGUIBehaviourDecorator *pBehaviour)
 
void SetClickThrough (const eC_Bool &bClickThrough)
 
void SetID (const ObjectHandle_t &eID)
 
void SetLayouter (CGUILayouter *pLayouter)
 
void SetNeighborBottomID (const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborIDs (const ObjectHandle_t eNewNeighborLeftID, const ObjectHandle_t eNewNeighborRightID, const ObjectHandle_t eNewNeighborTopID, const ObjectHandle_t eNewNeighborBottomID)
 
void SetNeighborLeftID (const ObjectHandle_t eNewNeighborLeftID)
 
void SetNeighborRightID (const ObjectHandle_t eNewNeighborRightID)
 
void SetNeighborTopID (const ObjectHandle_t eNewNeighborTopID)
 
virtual void SetParent (CGUICompositeObject *const pParent)
 
void SetRelRect (const CGUIRect &kNewRect)
 
virtual void SetRelXPos (const eC_Value &vX)
 
void SetRelXPosCenter (const eC_Value &vXCenter)
 
void SetRelXPosREdge (const eC_Value &vX)
 
virtual void SetRelYPos (const eC_Value &vY)
 
void SetRelYPosBEdge (const eC_Value &vY)
 
void SetRelYPosCenter (const eC_Value &vYCenter)
 
void SetStopFocus (const eC_Bool &bDontFocusToParent)
 
virtual eC_Bool SetValue (const CGUIValue &rkValue)
 
virtual eC_Bool SetValue (CDataPoolEntry &rkValue)
 
- Public Member Functions inherited from CGUIBehaviour
virtual void OnCreate ()
 
virtual void OnDelete ()
 
virtual void OnHide ()
 
virtual void OnShow ()
 
virtual eC_Bool DoClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoLongClick (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoButtonUp (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoDragEnd (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseEnter (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseLeave (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool DoMouseMove (const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
 
virtual eC_Bool Decrease ()
 
virtual eC_Bool Increase ()
 
virtual eC_Bool DoKeyDown (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoKeyUp (const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
virtual eC_Bool DoChar (const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
 
- Public Member Functions inherited from CGUIStreamableObject
const eC_String & GetXMLTag () const
 
void SetXMLTag (const eC_String &kXMLTag)
 
- Public Member Functions inherited from CGUIAnimatable
virtual ~CGUIAnimatable ()
 Destructor. Removes all existing animation callbacks.
 
virtual eC_Bool IsAnimating () const
 
virtual void StartAnimation ()
 
virtual void StopAnimation ()
 

Additional Inherited Members

- Public Types inherited from CGUIScrollView
enum  ScrollBarPolicy { AUTOMATIC, ALWAYS_VISIBLE, NEVER_VISIBLE }
 Scrollbar policies. These specify under which circumstances a scrollbar is visible. More...
 
- Public Types inherited from CGUIObject
enum  FourWayFocus_t { FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUS_DOWN }
 
- Static Public Attributes inherited from CGUICompositeObject
static const eC_Char XMLTAG_CHILDREN [] = "Children"
 XML comment tag to be used before writing children to a stream.
 
static const eC_Char XMLTAG_ENDCHILDREN [] = "/Children"
 XML comment tag to be used after writing children to a stream.
 
- Static Public Attributes inherited from CGUIObject
static const eC_Char XMLTAG_ALPHA [] = "Alpha"
 XML tag to be used writing alpha-value into a stream.
 
static const eC_Char XMLTAG_CLICKTHROUGH [] = "ClickThrough"
 XML tag to be used writing clickthrough-state into a stream.
 
static const eC_Char XMLTAG_CONTROLCLASSID [] = "ControlClassID"
 XML tag to be used when writing a control class ID into a stream.
 
static const eC_Char XMLTAG_DISABLED [] = "Disabled"
 XML tag to be used writing disabled-state into a stream.
 
static const eC_Char XMLTAG_FOCUSSABLE [] = "Focussable"
 XML tag to be used writing focussable-state into a stream.
 
static const eC_Char XMLTAG_GRAYEDOUT [] = "GrayedOut"
 XML tag to be used writing grayedout-state into a stream.
 
static const eC_Char XMLTAG_HEIGHT [] = "Height"
 XML tag to be used writing height into a stream.
 
static const eC_Char XMLTAG_INVISIBLE [] = "Invisible"
 XML tag to be used writing invisible-state into a stream.
 
static const eC_Char XMLTAG_OBJECTID [] = "ObjectID"
 XML tag to be used writing object id into a stream.
 
static const eC_Char XMLTAG_OVERRIDDENNEIGHBORS [] = "OverriddenNeighbors"
 XML tag to be used writing overridden neighbors into a stream.
 
static const eC_Char XMLTAG_WIDTH [] = "Width"
 XML tag to be used writing width into a stream.
 
static const eC_Char XMLTAG_XPOS [] = "XPos"
 XML tag to be used writing x-position into a stream.
 
static const eC_Char XMLTAG_YPOS [] = "YPos"
 XML tag to be used writing y-position into a stream.
 
- Static Public Attributes inherited from CGUIBehaviour
static const eC_Char XMLTAG_BEHAVIOURCLASSID [] = "BehaviourClassID"
 XML tag to be used when writing a behaviour class ID into a stream.
 
- Static Public Attributes inherited from CGUIStreamableObject
static const eC_Char XMLTAG_CLASSVERSION [] = "ClassVersion"
 
- Protected Member Functions inherited from CGUIScrollView
virtual void AdjustClipperSize ()
 
virtual void AdjustContainerSize ()
 
void Init ()
 General initialization.
 
- Protected Member Functions inherited from CGUICompositeObject
virtual eC_Bool FourWayNext (FourWayFocus_t eFocusDirection)
 
ObjectPtrListGetChildObjectsList ()
 
virtual void HandleDraw (const CGUIRect &ClipRect)
 
- Protected Member Functions inherited from CGUIObject
virtual eC_Bool CreateBitmapPlane ()
 
- Protected Member Functions inherited from CGUIStreamableObject
eC_UInt ReadStreamingHeader (const eC_UInt &uiClassVersion, const eC_UInt &uiClassMinVersion=0) const
 
void WriteStreamingFooter (const eC_Bool &bWriteClassID) const
 
void WriteStreamingHeader (const eC_Bool &bWriteClassID, const eC_Char *const pkClassIDTag, const eC_Int &iClassID, const eC_UInt &uiClassVersion) const
 
- Protected Attributes inherited from CGUIScrollView
eC_Bool m_bAutoAdjustContainerSize
 
eC_Bool m_bAutoAdjustScrollViewLayout
 
eC_Bool m_bIsHorizontalScrollBarAtBottom
 Position of horizontal scrollbar (true=bottom, false=top)
 
eC_Bool m_bIsVerticalScrollBarAtRight
 Position of vertical scrollbar (true=right, false=left)
 
ScrollBarPolicy m_eHorizontalScrollBarPolicy
 Scrollbar policy defining whether a horizontal scrollbar is visible or not.
 
ScrollBarPolicy m_eVerticalScrollBarPolicy
 Scrollbar policy defining whether a vertical scrollbar is visible or not.
 
eC_Int m_iHorScrollPos
 Stored position of the horizontal scroll bar.
 
eC_Int m_iVerScrollPos
 Stored position of the vertical scroll bar.
 
CGUICompositeObjectm_pkClipper
 
CGUIScrollBarm_pkHorScrollBar
 
CGUIScrollBarm_pkVerScrollBar
 
eC_Value m_vScrollingInertia
 Inertia value for soft scrolling. Legal values are positive and greater than 1.
 
eC_Value m_vViewportXBorder
 Horizontal (in X direction) gap between visible area and the area outside of which scrolling will occur.
 
eC_Value m_vViewportYBorder
 Vertical (in Y direction) gap between visible area and the area outside of which scrolling will occur.
 

Detailed Description

A multiple line edit control.

A multiple line edit contains an editable area in which the user can enter text. It supports word wrapping. If word wrapping is enabled, the width of the text area is fixed. Manual line breaks can be inserted by pressing ENTER. If word wrapping is disabled, a horizontal scrollbar is shown if the text is longer than the text area.

The user can navigate through the text by using the mouse and keyboard. Clicking the mouse in the text area sets the editing cursor to a position as close as possible to the mouse cursor position. The cursor keys can be used to move the cursor left and right by one character or up and down by one line. The page up/down keys can be used to scroll the text by one page.

Text can be selected by dragging the mouse over the text or by using the movement keys in conjunction with the SHIFT modifier. Whenever text is selected, the next movement or character input influences the selection. If the cursor is moved while text is selected, the text is deselected. If a character key is pressed while text is selected, the selected text is replaced by the entered character. Selected text can be deleted by pressing DELETE or BACKSPACE.

Basic cut, copy and paste functionality is implemented here. The selected text can be copied by pressing CTRL+C and cut by pressing CTRL+X. These functions transfer the text into a clip board. The content of this clip board can be pasted (inserted at the current cursor position) by pressing CTRL+V. If any text is selected at this point, the selected text is replaced by the clip board content.

When constructing an instance of this class, initial text can be passed directly to the constructor. Later, the text can be changed with SetText(). The edit can be emptied by calling Empty(). You can obtain the entire text with GetEntireText().

Remarks
The following issues with this control are known:
  • No interfaces for getting or setting the cursor position.
  • Noticeably slow when editing long lines without line breaks.

Constructor & Destructor Documentation

◆ CGUIMultiLineEdit() [1/4]

CGUIMultiLineEdit::CGUIMultiLineEdit ( CGUICompositeObject *const  pkParent,
const eC_Value &  vX,
const eC_Value &  vY,
const eC_Value &  vWidth,
const eC_Value &  vHeight,
const eC_String &  kInitStr = "",
eC_Bool  bWordWrap = false,
eC_Bool  bEditable = true,
const ObjectHandle_t eID = NO_HANDLE 
)

CGUIMultiLineEdit constructor.

Parameters
pkParentPointer to the designated parent object.
vXX-position relative to its parent object.
vYX-position relative to its parent object.
vWidthWidth of the input field.
vHeightHeight of the input field.
kInitStrThe initial string to be set to the string.
bWordWrapIndicate whether the word wrap is enabled or not.
bEditableCreate editable or read-only edit field.
eIDObject Identifier of this input field (use NO_HANDLE if none is required).

◆ CGUIMultiLineEdit() [2/4]

CGUIMultiLineEdit::CGUIMultiLineEdit ( CGUICompositeObject *const  pkParent,
const CGUIRect kRect,
const eC_String &  kInitStr = "",
eC_Bool  bWordWrap = false,
eC_Bool  bEditable = true,
const ObjectHandle_t eID = NO_HANDLE 
)

CGUIMultiLineEdit constructor.

Parameters
pkParentPointer to the designated parent object.
kRectClient rectangle of the new CGUIMultiLineEdit relative to the parent.
kInitStrThe initial string to be set to the string.
bWordWrapIndicate whether the word wrap is enabled or not.
bEditableCreate editable or read-only edit field.
eIDObject Identifier of this input field (use NO_HANDLE if none is required).

◆ CGUIMultiLineEdit() [3/4]

CGUIMultiLineEdit::CGUIMultiLineEdit ( const CGUIMultiLineEdit rkSource)

Copy constructor.

Parameters
rkSourceOriginal instance which is copied.

◆ ~CGUIMultiLineEdit()

CGUIMultiLineEdit::~CGUIMultiLineEdit ( void  )
virtual

CGUIMultiLineEdit destructor

◆ CGUIMultiLineEdit() [4/4]

CGUIMultiLineEdit::CGUIMultiLineEdit ( )

Standard constructor

See also
CGUICompositeObject().

Member Function Documentation

◆ AdjustYPositionOfText()

void CGUIMultiLineEdit::AdjustYPositionOfText ( CGUIEditableText pCurEditableText)

Adjust the Y position of the text in the scroll view.

Parameters
pCurEditableTextCurrent EditableText

◆ Append()

void CGUIMultiLineEdit::Append ( const eC_String &  rkText)

Positions the cursor at the very end of the currently existing text and calls InsertString().

Parameters
rkTextThe text to be appended.

◆ DoAnimate()

void CGUIMultiLineEdit::DoAnimate ( const eC_Value &  vTimes = eC_FromInt(1))
virtual

Toggles the cursor visibility to make it blink.

Parameters
vTimesThe correction factor

Reimplemented from CGUIScrollView.

◆ DoButtonDown()

eC_Bool CGUIMultiLineEdit::DoButtonDown ( const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

If mouse is clicked over the editing area, the following happens:

  1. If the SHIFT key is not held down, the cursor is set to the position at which the mouse was clicked. The selection is released.
  2. If the SHIFT key is held down, the selection is extended to the position of the text where the mouse was clicked.
    Parameters
    vAbsXX-position in screen coordinates where the click occurred
    vAbsYY-position in screen coordinates where the click occurred
    Returns
    True The event has been handled.
    False The event has not been handled.

Reimplemented from CGUIBehaviour.

◆ DoDoubleClick()

eC_Bool CGUIMultiLineEdit::DoDoubleClick ( const eC_Value &  vAbsX = eC_FromInt(-1),
const eC_Value &  vAbsY = eC_FromInt(-1) 
)
virtual

The previous selection is released and the line in which the mouse was clicked is selected.

Parameters
vAbsXX-position in screen coordinates where the click occurred
vAbsYY-position in screen coordinates where the click occurred
Returns
True The event has been handled.
False The event has not been handled.

Reimplemented from CGUIBehaviour.

◆ DoDrag()

eC_Bool CGUIMultiLineEdit::DoDrag ( const eC_Value &  vDeltaX,
const eC_Value &  vDeltaY,
const eC_Value &  vAbsX,
const eC_Value &  vAbsY 
)
virtual

Selects the text over which the mouse is dragged.

Parameters
vDeltaXMouse movement in X since last frame
vDeltaYMouse movement in X since last frame
vAbsXMouse position in X where event occurred
vAbsYMouse position in Y where event occurred
Returns
True If the event has been handled.
False Else.

Reimplemented from CGUIBehaviour.

◆ DoUserEvent()

eC_Bool CGUIMultiLineEdit::DoUserEvent ( CGUIEvent *const  pEvent)
virtual

Handles the keyboard events. The following KEYDOWN events are handled:

  1. ESCAPE: Release the selection.
  2. DOWN: Move cursor to next line if current line is not the last line. If SHIFT key is pressed, it extends the selection to next line. If SHIFT key is not pressed, the selection is released.
  3. UP: Move cursor to previous line if current line is not the first line. If SHIFT is pressed, it extends the selection to next line. If SHIFT key is not pressed, the selection is released.
  4. LEFT: Move cursor one character left. If current cursor is at the beginning of the line, it moves to the end of the previous line, if current line is not the first line. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  5. RIGHT: Move cursor one character right. If current cursor is at the end of the line, it moves to the beginning of the next line, if current line is not the last line. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  6. HOME: Move cursor to the beginning of the current line. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  7. END: Move cursor to the end of the current line. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  8. PAGEDOWN: Move cursor one page down and scroll to show the cursor. If it can not be scrolled, it does nothing. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  9. PAGEUP: Move cursor one page up and scroll to show the cursor. If it can not be scrolled, it does nothing. If SHIFT key is pressed, it extends the selection correspondingly. If SHIFT key is not pressed, the selection is released.
  10. ENTER: Delete the selected text if available and cut current line into two lines. The cursor stays in next line.
  11. BACK: Delete the selected text if available. If there is no selection, it deletes one character before cursor. If the cursor is at beginning of a line, the line is merged with the previous line, if current line is not the first line.
  12. DELETE: Delete the selected text if available. If there is no selection, it deletes one character after the cursor. If the cursor is at end of a line, the line is merged with the next line, if current line is not the last line.
  13. Valid-Char: Delete the selected text if available. Insert typed character.
  14. SELECT_ALL: Select all text.
  15. COPY: Copy the selected text to clipboard.
  16. CUT: Cut the selected text to clipboard.
  17. PASTE: Delete selected text if available and paste recently copied string to cursor position.
    Parameters
    pEventThe event to be handled
    Returns
    True if processed, False otherwise

Reimplemented from CGUIBehaviour.

◆ Empty()

void CGUIMultiLineEdit::Empty ( )

Remove all text from the input area.

◆ GetCurrentCursorIndex()

eC_UInt CGUIMultiLineEdit::GetCurrentCursorIndex ( ) const

Get current index of cursor

Returns
cursor-index

◆ GetEditable()

eC_Bool CGUIMultiLineEdit::GetEditable ( ) const

Return if the multiline is editable

Returns
true if editable

◆ GetEntireText()

eC_String CGUIMultiLineEdit::GetEntireText ( ) const

Get the entire text of this edit. If the user had entered manual line breaks in the text, the returned string contains line break characters at the respective positions.

Returns
The result string.

◆ GetFocus()

void CGUIMultiLineEdit::GetFocus ( )
virtual

Start the cursor blinking after the control gets the focus.

Reimplemented from CGUIScrollView.

◆ GetFont()

FontResource_t CGUIMultiLineEdit::GetFont ( ) const

Get the font for the entire text.

Returns
font-id

◆ GetFontSpacing()

eC_Float CGUIMultiLineEdit::GetFontSpacing ( ) const

Get the font spacing for the entire text.(space between letters).

Returns
Font spacing in subpixels (1.0 subpixels equals 1 pixel).

◆ GetSelectionColor()

eC_UInt CGUIMultiLineEdit::GetSelectionColor ( ) const

Get the background color of the selected text.

Returns
Background color in ARGB format.

◆ GetSelectionEndIndex()

eC_UInt CGUIMultiLineEdit::GetSelectionEndIndex ( ) const

Get index of end of selection

Returns
end of selection

◆ GetSelectionStartIndex()

eC_UInt CGUIMultiLineEdit::GetSelectionStartIndex ( ) const

Get index of start of selection

Returns
start of selection

◆ GetTextColor()

void CGUIMultiLineEdit::GetTextColor ( eC_UInt &  uiTextColorStandard,
eC_UInt &  uiTextColorHighlighted,
eC_UInt &  uiTextColorGrayedOut,
eC_UInt &  uiTextColorPressed 
)

Get the color for the entire text. All colors are in ARGB format.

Parameters
uiTextColorStandardStandard text color.
uiTextColorHighlightedText color used if the parent object is highlighted.
uiTextColorGrayedOutText color used if the parent object is grayed out.
uiTextColorPressedText color used if the parent object is pressed.

◆ InsertString()

void CGUIMultiLineEdit::InsertString ( const eC_String &  kInsertStr)

Insert a given string at the current cursor position. After inserting, the cursor is positioned behind the inserted text.

Parameters
kInsertStrThe string to be inserted.

◆ IsWordWrap()

eC_Bool CGUIMultiLineEdit::IsWordWrap ( ) const

Determine whether word wrap is currently enabled.

Returns
True if word wrap is enabled.

◆ LoseFocus()

void CGUIMultiLineEdit::LoseFocus ( )
virtual

Stop the cursor blinking after the control loses the focus.

Reimplemented from CGUIBehaviour.

◆ operator=()

CGUIMultiLineEdit & CGUIMultiLineEdit::operator= ( const CGUIMultiLineEdit rkSource)

Assignment operator

Parameters
rkSourceSource object to be copied.
Returns
Copied object.

◆ ReadFromStream()

void CGUIMultiLineEdit::ReadFromStream ( )
virtual

Reads composite object attributes and children from stream. Reads attributes from the streaming file. Only for use with GUIFactoryManager.

See also
CGUIObject::ReadFromStream()
Exceptions
CGUIStreamingControlExceptionWhen catching a CGUIStreamingControlException from a child, this method adds the object from the exception, resets the object pointer to 'this', then re-throws.

Reimplemented from CGUIScrollView.

◆ RemoveObject()

void CGUIMultiLineEdit::RemoveObject ( CGUIObject pObject)
virtual

Removes an object from the scrolled container.

Objects are removed from the internal container of scrolled objects.

Parameters
pObjectObject to be removed.
See also
AddObject

Reimplemented from CGUIScrollView.

◆ ScrollToFocussedObject()

void CGUIMultiLineEdit::ScrollToFocussedObject ( )
virtual

Deliberately does nothing. Re-implemented to prevent jumping scroll bars. This needs to be done because the base implementation relies on various focusable child objects in the container. The CGUIMultiLineEdit only has one child, the text container, which is also focusable, but the scroll bar position depends on the cursor position within that container, not on the container itself.

Reimplemented from CGUIScrollView.

◆ SetEditable()

void CGUIMultiLineEdit::SetEditable ( eC_Bool  bEditable)

Sets the multiline edit read only or writeable.

Parameters
bEditableTrue to activate write mode, false for a read only edit field.

◆ SetFont()

void CGUIMultiLineEdit::SetFont ( const FontResource_t eFontID)

Sets the font for the entire text.

Parameters
eFontIDThe identifier of the font to be used.

◆ SetFontSpacing()

void CGUIMultiLineEdit::SetFontSpacing ( const eC_Float &  fFontSpacing)

Sets the font spacing for the entire text.(space between letters).

Parameters
fFontSpacingFont spacing in subpixels (1.0 subpixels equals 1 pixel).

◆ SetSelectionColor()

void CGUIMultiLineEdit::SetSelectionColor ( eC_UInt  uiSelectionColor)

Sets the background color of the selected text.

Parameters
uiSelectionColorBackground color in ARGB format.

◆ SetText()

void CGUIMultiLineEdit::SetText ( const eC_String &  kWholeStr)

Set the text string to the object. The old string is deleted and the new string is separated to multiple line if there are line breaks inside the string.

Parameters
kWholeStrThe string to be assigned to this object.

◆ SetTextColor()

void CGUIMultiLineEdit::SetTextColor ( const eC_UInt &  uiTextColorStandard,
const eC_UInt &  uiTextColorHighlighted,
const eC_UInt &  uiTextColorGrayedOut,
const eC_UInt &  uiTextColorPressed 
)

Sets the color for the entire text. All colors are in ARGB format.

Parameters
uiTextColorStandardStandard text color.
uiTextColorHighlightedText color used if the parent object is highlighted.
uiTextColorGrayedOutText color used if the parent object is grayed out.
uiTextColorPressedText color used if the parent object is pressed.

◆ SetWordWrap()

void CGUIMultiLineEdit::SetWordWrap ( eC_Bool  bWordWrap)

Enable or disable word wrap.

Parameters
bWordWrapIndicate whether the word wrap is enabled or disabled.

◆ WriteToStream()

void CGUIMultiLineEdit::WriteToStream ( const eC_Bool  bWriteClassID = false)
virtual

Writes all object attributes to the streaming file. StreamWriter has to be initialized. Only for use with GUIStreamWriter.

Parameters
bWriteClassIDThis flag is used to select if writing of ControlID, leading and trailing tags is performed. Only GUIStreamWriter and GUICompositeObject have to set this flag true.
See also
CGUIStreamWriter

Reimplemented from CGUIScrollView.


The documentation for this class was generated from the following files: