Multiline text input area.
More...
#include <AUI/View/ATextArea.h>
Word breaking text area.

In contrast to ATextField, ATextArea is not scrollable. It is often preferable to use a dedicated scroll area to make the entire application pages scrollable with other content rather than using nested scrolls just for text area.
If you want to make AScrollArea scrollable, it can be placed inside a AScrollArea:
This is why it does not offer default styling - you would probably want to style AScrollArea as if it were text input.
ATextArea offers integrations and optimizations for AScrollArea specifically.
- Examples
- examples/app/notes/src/main.cpp.
> All members, including inherited
◆ cursorIndexByPos()
unsigned int ATextArea::cursorIndexByPos |
( |
glm::ivec2 | pos | ) |
|
|
overridevirtual |
◆ getCursorPosition()
glm::ivec2 ATextArea::getCursorPosition |
( |
| ) |
|
|
overridevirtual |
- Returns
- Cursor position relative to this view.
Returns position relative to top left corner of the view. That is, if implementation supports scrolling (i.e., ATextField) the returned position does not include overflowed contents.
Implements ACursorSelectable.
◆ getPosByIndex()
glm::ivec2 ATextArea::getPosByIndex |
( |
size_t | index | ) |
|
|
overridevirtual |
◆ getText()
const AString & ATextArea::getText |
( |
| ) |
const |
|
overridevirtual |
- Returns
- Text field text.
- Performance note
- If text length is needed, use textLength() function instead. On some implementations it's faster that text().
Implements ACursorSelectable.
◆ isPasswordField()
bool ATextArea::isPasswordField |
( |
| ) |
const |
|
overridevirtualnoexcept |
- Returns
- true if this typeable should be treated as password.
Implements AAbstractTypeable.
◆ length()
size_t ATextArea::length |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ setText()
void ATextArea::setText |
( |
const AString & | t | ) |
|
|
overridevirtual |
◆ textInputType()
◆ toString()
AString ATextArea::toString |
( |
| ) |
const |
|
overridevirtual |
- Returns
- string representation of the object
Implements IStringable.
◆ typeableErase()
void ATextArea::typeableErase |
( |
size_t | begin, |
|
|
size_t | end ) |
|
overrideprotectedvirtual |
◆ typeableFind()
size_t ATextArea::typeableFind |
( |
char16_t | c, |
|
|
size_t | startPos ) |
|
overrideprotectedvirtual |
◆ typeableInsert() [1/2]
bool ATextArea::typeableInsert |
( |
size_t | at, |
|
|
char16_t | toInsert ) |
|
overrideprotectedvirtual |
Inserts string.
- Returns
- true, if successfully inserted; false otherwise
- Note
- when insert could not be completed (i.e. isValidText discarded the new string contents), the state is left unchanged as like if
typeableInsert
have not been called.
Implements AAbstractTypeable.
◆ typeableInsert() [2/2]
bool ATextArea::typeableInsert |
( |
size_t | at, |
|
|
const AString & | toInsert ) |
|
overrideprotectedvirtual |
Inserts string.
- Returns
- true, if successfully inserted; false otherwise
- Note
- when insert could not be completed (i.e. isValidText discarded the new string contents), the state is left unchanged as like if
typeableInsert
have not been called.
Implements AAbstractTypeable.
◆ typeableReverseFind()
size_t ATextArea::typeableReverseFind |
( |
char16_t | c, |
|
|
size_t | startPos ) |
|
overrideprotectedvirtual |