10#if !defined(GUIEDITABLETEXT__H_)
11#define GUIEDITABLETEXT__H_
17#include "eC_TList_doubleLinked.h"
71 eC_UInt uiCharIndex = 0,
72 eC_UInt uiLineIndex = 0) :
115 const eC_String &kText,
116 const eC_Value& vXPos = eC_FromInt(0),
117 const eC_Value& vYPos = eC_FromInt(0),
118 const eC_Value& vTextWidth = eC_FromInt(0),
119 eC_Bool bWordWrap =
false);
135 const eC_String*
const pkText,
136 const eC_Value& vXPos = eC_FromInt(0),
137 const eC_Value& vYPos = eC_FromInt(0),
138 const eC_Value& vTextWidth = eC_FromInt(0),
139 eC_Bool bWordWrap =
false);
156 const eC_Value& vXPos = eC_FromInt(0),
157 const eC_Value& vYPos = eC_FromInt(0),
158 const eC_Value& vTextWidth = eC_FromInt(0),
159 eC_Bool bWordWrap =
false);
191 eC_UInt uiCursorPosAtStartLine,
192 eC_UInt uiCursorPosAtEndLine,
193 eC_UInt uiStartLine = 0,
194 eC_UInt uiEndLine = 0);
259 eC_UInt uiCursorPosAtLine,
260 eC_UInt uiCurrentLine = 0);
332 void SetWordWrap(eC_Bool bWordWrap,
const eC_Value& vWidth = eC_FromInt(0));
443#ifdef GUILIANI_STREAM_GUI
447#ifdef GUILIANI_WRITE_GUI
456 eC_Bool m_bRtLEmbedding;
470 eC_UInt uiCursorIndex,
473 m_uiCursorIndex(uiCursorIndex),
474 m_kCursorIter(kCursorIter),
491 CursorIndex_t& operator++()
493 if ((m_pList != NULL) && (m_uiCursorIndex + 1 < m_pList->GetQuantity()))
505 CursorIndex_t operator++(
int)
507 CursorIndex_t kResult = *
this;
516 CursorIndex_t& operator--()
518 if (m_uiCursorIndex > 0)
530 CursorIndex_t operator--(
int)
532 CursorIndex_t kResult = *
this;
542 if (m_kCursorIter.IsValid())
544 return *m_kCursorIter;
546 return eC_FromInt(0);
552 eC_Bool
operator==(CursorIndex_t kCursorIndex)
554 return m_uiCursorIndex == kCursorIndex.m_uiCursorIndex &&
555 m_kCursorIter == kCursorIndex.m_kCursorIter;
563 return m_uiCursorIndex == uiCursorIndex;
569 eC_Bool
operator!=(CursorIndex_t kCursorIndex)
579 return m_uiCursorIndex != uiCursorIndex;
586 eC_Bool operator>(eC_UInt uiCursorIndex)
588 return m_uiCursorIndex > uiCursorIndex;
595 eC_Bool operator<(eC_UInt uiCursorIndex)
597 return m_uiCursorIndex < uiCursorIndex;
606 void SetCursorIndex(eC_UInt uiCursorIndex,
const WidthListIterator& kCursorIter, WidthList* pList)
608 m_uiCursorIndex = uiCursorIndex;
609 m_kCursorIter = kCursorIter;
616 eC_UInt GetCursorIndex()
const
618 return m_uiCursorIndex;
625 WidthListIterator GetCursorIter()
const
627 return m_kCursorIter;
632 eC_UInt m_uiCursorIndex;
636 WidthListIterator m_kCursorIter;
649 void Init(
const eC_Value& vTextWidth);
657 virtual void SetTextSingleLine(
const eC_Bool &bSingleLine);
659 virtual void CollectHyphenationMarks(eC_String& rkStr, eC_UInt uiOffset);
663 void DrawSelection();
673 void SetIndexOfWidthList(eC_UInt uiIndexOfWidthList);
683 void SetSelection(eC_UInt uiStartIndexOfWidthList, eC_UInt uiEndIndexOfWidthList);
693 void RemoveString(eC_UInt uiStartIndexOfWidthList, eC_UInt uiEndIndexOfWidthList);
699 eC_UInt LinePosToIndexOfWidthList(
const CursorPos_t &tCursorLinePos);
705 CursorPos_t GetCursorPositionFromIndex(eC_UInt uiIndexOfWidthList);
719 void ComputeWidths(
const eC_String &kAdjustedStr, eC_UInt uiStartIndexOfWidthList);
722 void ComputeBidiWidths(
const eC_String &kAdjustedStr, eC_UInt uiStartIndexOfWidthList);
735 WidthListIterator &StartWidthIter,
736 WidthListIterator &EndWidthIter);
750 eC_UInt MoveCurrentWidthIndexToSafePos(
751 eC_UInt uiCurrentWidthIndex,
752 eC_UInt uiCursorPosAtCurrentLine,
766 eC_String* pkResultStr,
767 eC_String* pkStrToAnalyse,
768 eC_String* pkRestStr,
769 WidthListIterator &StartWidthIter);
773 void EnsureMinimumTextWidth();
786 WidthList m_kAccumulatedWidth;
788 static const eC_UInt INDEX_COLOR_SELECTION;
791 CursorIndex_t m_kIndexOfWidthList;
794 CursorIndex_t m_kSelStartIndexOfWidthList;
797 CursorIndex_t m_kSelEndIndexOfWidthList;
800 eC_Value m_vCursorWidth;
803 eC_Bool m_bCursorVisible;
806 eC_Bool m_bPasswordMode;
809 eC_String* m_pkPassword;
812 eC_String m_kPwdChar;
814 static const eC_UInt ms_uiInvalidPivot;
FontResource_t
List of font resource ids.
Definition: GUIFontResource.h:54
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
TextResource_t
List of text resource ids.
Definition: GUITextResource.h:40
Specialization of CGUIText that allows for modification and selection of text.
Definition: GUIEditableText.h:61
virtual void WriteToStream(const eC_Bool bWriteTextType=false)
eC_UInt GetRtlTurnPnt(eC_UInt currentIndex)
CursorPos_t GetBestCursorPosition(const eC_Value &vRelXPos, const eC_Value &vRelYPos)
void Delete(eC_UInt uiCursorPosAtStartLine, eC_UInt uiCursorPosAtEndLine, eC_UInt uiStartLine=0, eC_UInt uiEndLine=0)
CGUIEditableText(const CGUIObject *const pkParentObject, const eC_String &kText, const eC_Value &vXPos=eC_FromInt(0), const eC_Value &vYPos=eC_FromInt(0), const eC_Value &vTextWidth=eC_FromInt(0), eC_Bool bWordWrap=false)
CGUIEditableText(const CGUIEditableText &rkSource)
eC_Bool GetRectOfIndex(eC_UInt uiIndex, CGUIRect &rect)
void SetWordWrap(eC_Bool bWordWrap, const eC_Value &vWidth=eC_FromInt(0))
virtual CGUIEditableText * Clone() const
BidiTurningPoint_t m_kBidiTurnPoints
turning-points
Definition: GUIEditableText.h:99
eC_Value GetLineHeight()
Definition: GUIEditableText.h:434
CursorPos_t GetLastCursorPos()
CursorPos_t GetCursorPosition()
virtual void SetFont(const FontResource_t &eFontID)
void SetEmbeddingDirection(const eC_Bool bRightToLeft)
virtual void SetTextString(const eC_String &rkTextString)
eC_UInt GetSelectionColor() const
CursorPos_t GetCursorPosByCharIndex(eC_UInt uiCharIndex)
CursorPos_t GetSelectionStart()
void Insert(const eC_String &kInsChars)
void SetSelectionColor(const eC_UInt &uiSelectionColor)
CursorPos_t GetSelectionEnd()
eC_Bool IsInLtRField(eC_UInt currentIndex)
CGUIEditableText(const CGUIObject *const pkParentObject, const TextResource_t &eTextID, const eC_Value &vXPos=eC_FromInt(0), const eC_Value &vYPos=eC_FromInt(0), const eC_Value &vTextWidth=eC_FromInt(0), eC_Bool bWordWrap=false)
void SetSelectionColor(const GlobalProperty_t &uiSelectionColor)
CGUIEditableText & operator=(const CGUIEditableText &rkSource)
eC_String GetStrOfLine(eC_UInt uiCurrentLine) const
void ResetTurningPoints()
eC_String GetSelectedText()
eC_Bool IsLeftToRightEmbedding()
CGUIRect GetCursorAbsRect()
void SetCursorVisible(eC_Bool bVisible)
virtual const eC_String *const GetPassword()
void ExtendSelection(eC_UInt uiCharIndex, eC_UInt uiLineIndex=0)
void SetCursorPosition(eC_UInt uiCursorPosAtLine, eC_UInt uiCurrentLine=0)
eC_Value GetCursorWidth() const
eC_UInt GetLtrTurnPnt(eC_UInt currentIndex)
void SetPasswordCharacter(eC_String &kPwdStr)
eC_Bool GetLTRpivotField(eC_UInt currentIndex, LeftEmbedding <rPivotPair)
void SetCursorWidth(eC_Value vWidth)
eC_Bool IsCursorVisible() const
void SetPasswordMode(eC_Bool bPasswordMode)
CGUIEditableText(const CGUIObject *const pkParentObject, const eC_String *const pkText, const eC_Value &vXPos=eC_FromInt(0), const eC_Value &vYPos=eC_FromInt(0), const eC_Value &vTextWidth=eC_FromInt(0), eC_Bool bWordWrap=false)
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
Class for handling a text.
Definition: GUIText.h:103
eC_Value m_vLineHeight
The height of one text line with this text's font.
Definition: GUIText.h:980
eC_TIterator< ExtendedString_t > Iterator
Iterator is typedef'd as eC_TIterator ot type T.
Definition: eC_TList_doubleLinked.h:74
bool operator==(const NSmartPtr::SharedPtr< C1 > &a, const NSmartPtr::SharedPtr< C2 > &b)
Definition: SharedPtr.h:240
bool operator!=(const NSmartPtr::SharedPtr< C1 > &a, const NSmartPtr::SharedPtr< C2 > &b)
Definition: SharedPtr.h:226
Definition: GUIEditableText.h:85
eC_TList< eC_UInt > fromRtLIndex
List of Turning points which indicate the indexes of changes from writing RTL chars to LTR ones.
Definition: GUIEditableText.h:87
eC_TList< LeftEmbedding > leftEmbeddingLevels
Definition: GUIEditableText.h:93
eC_TList< RightEmbedding > rightEmbeddingLevels
Definition: GUIEditableText.h:97
eC_TList< eC_UInt > fromLtRIndex
List of Turning points which indicate the indexes of changes from writing LTR chars to RTL ones.
Definition: GUIEditableText.h:89
Holds a cursor position.
Definition: GUIEditableText.h:65
CursorPos_t(eC_UInt uiCharIndex=0, eC_UInt uiLineIndex=0)
Definition: GUIEditableText.h:70
eC_UInt m_uiCharIndex
Cursor position of current line starting from index 0.
Definition: GUIEditableText.h:77
eC_UInt m_uiLineIndex
The line where the cursor is located.
Definition: GUIEditableText.h:78