Base class for AAbstractTypeableView which is template class.
More...
#include <AUI/View/AAbstractTypeable.h>
|
emits< AString > | textChanged |
| The user changed text and focused another view or AAbstractTextField::updateText is called.
|
|
emits< AString > | textChanging |
| When the user changed one or more symbols.
|
|
emits< Selection > | selectionChanged |
| Selection is changed due to user's action or code operation.
|
|
emits | actionButtonPressed |
| When action button of touchscreen keyboard or AInput::RETURN is pressed.
|
|
|
bool | isCursorBlinkVisible () const |
|
void | updateCursorBlinking () |
|
virtual void | typeableErase (size_t begin, size_t end)=0 |
|
virtual bool | typeableInsert (size_t at, const AString &toInsert)=0 |
|
virtual bool | typeableInsert (size_t at, char16_t toInsert)=0 |
|
virtual size_t | typeableFind (char16_t c, size_t startPos=-1)=0 |
|
virtual size_t | typeableReverseFind (char16_t c, size_t startPos=-1)=0 |
|
virtual void | updateSelectionOnTextSet (const AString &t) |
|
virtual void | onCursorIndexChanged ()=0 |
|
void | enterChar (char16_t c) |
|
AString | getDisplayText () override |
|
AMenuModel | composeContextMenuImpl () |
|
void | handleKey (AInput::Key key) |
|
virtual bool | isLButtonPressed ()=0 |
|
virtual void | cursorSelectableRedraw ()=0 |
|
virtual void | onSelectionChanged ()=0 |
|
void | handleMouseDoubleClicked (const APointerPressedEvent &event) |
|
void | handleMousePressed (const APointerPressedEvent &event) |
|
void | handleMouseReleased (const APointerReleasedEvent &event) |
|
void | handleMouseMove (const glm::ivec2 &pos) |
|
template<aui::invocable Callback> |
void | drawSelectionBeforeAndAfter (IRenderer &render, std::span< ARect< int > > rects, Callback &&drawText) |
|
|
size_t | mMaxTextLength = 0x200 |
|
bool | mIsMultiline = false |
|
unsigned | mCursorIndex = 0 |
|
AOptional< unsigned > | mCursorSelection |
|
Base class for AAbstractTypeableView which is template class.
◆ enterChar()
void AAbstractTypeable::enterChar |
( |
char16_t | c | ) |
|
|
protected |
Char enter implementation. Should be called in onCharEntered.
- Parameters
-
◆ getDisplayText()
AString AAbstractTypeable::getDisplayText |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ isPasswordField()
virtual bool AAbstractTypeable::isPasswordField |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
◆ paste()
void AAbstractTypeable::paste |
( |
AString | content | ) |
|
Performs paste operation (CTRL+V).
- Parameters
-
Performs paste operation at cursor's position. If the view has selection, the selected contents are removed before insertion.
After operation, selection is reset and cursor is set to the end of inserted contents.
◆ pasteFromClipboard()
void AAbstractTypeable::pasteFromClipboard |
( |
| ) |
|
Performs paste operation (CTRL+V) from system clipboard.
Effectively:
paste(AClipboard::pasteFromClipboard());
void paste(AString content)
Performs paste operation (CTRL+V).
Definition AAbstractTypeable.cpp:159
◆ setTextInputActionIcon()
◆ textInputActionIcon()
◆ textInputType()
|
nodiscardpure virtualnoexcept |
◆ typeableInsert() [1/2]
virtual bool AAbstractTypeable::typeableInsert |
( |
size_t | at, |
|
|
char16_t | toInsert ) |
|
nodiscardprotectedpure virtual |
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.
Implemented in AAbstractTextField, and ATextArea.
◆ typeableInsert() [2/2]
virtual bool AAbstractTypeable::typeableInsert |
( |
size_t | at, |
|
|
const AString & | toInsert ) |
|
nodiscardprotectedpure virtual |
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.
Implemented in AAbstractTextField, and ATextArea.
The documentation for this class was generated from the following files: