74 #include <nuttx/config.h> 338 nxgl_coord_t textStart = 0;
340 for (
int i = 0; i < lines; i++)
347 remove(0, textStart);
377 bool endReached =
false;
462 if (iterator->
moveTo(pos))
474 if (iterator->
getChar() ==
'\n')
481 else if ((iterator->
getChar() ==
' ') ||
482 (iterator->
getChar() ==
',') ||
483 (iterator->
getChar() ==
'.') ||
484 (iterator->
getChar() ==
'-') ||
485 (iterator->
getChar() ==
':') ||
486 (iterator->
getChar() ==
';') ||
487 (iterator->
getChar() ==
'?') ||
488 (iterator->
getChar() ==
'!') ||
489 (iterator->
getChar() ==
'+') ||
490 (iterator->
getChar() ==
'=') ||
491 (iterator->
getChar() ==
'/') ||
515 if ((!endReached) && (iterator->
getIndex() > pos))
523 breakIndex = iterator->
getIndex() - 1;
530 if (breakIterator->
moveTo(breakIndex + 1))
532 while (breakIterator->
getChar() ==
' ')
545 delete breakIterator;
549 pos = breakIndex + 1;
565 line.
width = lineWidth;
569 else if (!endReached)
631 while (bottom <= top)
635 mid = (bottom + top) >> 1;
const int getLineContainingCharIndex(const int index) const
nxgl_coord_t getCharWidth(nxwidget_char_t letter) const
const int getLineLength(const int lineNumber) const
nxgl_coord_t m_lineSpacing
void stripTopLines(const int lines)
TNxArray< int > m_linePositions
const int getLineTrimmedLength(const int lineNumber) const
bool moveToPrevious(void)
virtual void setText(const CNxString &text)
void append(const CNxString &text)
const nxgl_coord_t getLineTrimmedPixelLength(const int lineNumber) const
nxgl_coord_t getStringWidth(const CNxString &text) const
virtual void append(const CNxString &text)
void remove(const int startIndex)
int32_t m_textPixelHeight
const nxgl_coord_t getLinePixelLength(const int lineNumber) const
CText(CNxFont *font, const CNxString &text, nxgl_coord_t width)
const int getLineStartIndex(const int line) const
nxwidget_char_t getChar(void) const
void setText(const CNxString &text)
virtual void insert(const CNxString &text, const int index)
CNxFont * getFont(void) const
void push_back(const T &value)
void setFont(CNxFont *font)
const uint8_t getHeight(void) const
const unsigned int getLength(void) const
const bool isCharBlank(const nxwidget_char_t letter) const
void setWidth(nxgl_coord_t width)
CStringIterator * newStringIterator(void) const
TNxArray< LongestLine > m_longestLines
const int getLineCount(void) const
void insert(const CNxString &text, const int index)
const int size(void) const
virtual void remove(const int startIndex)
void setLineSpacing(nxgl_coord_t lineSpacing)