Basic implementation of type shortcuts and selection for editable text fields.
More...
template<aui::derived_from<
AView > Super>
class AAbstractTypeableView< Super >
Basic implementation of type shortcuts and selection for editable text fields.
Used as base in ATextArea and ATextField, both of them using own way of text handling and rendering.
|
void | onKeyDown (AInput::Key key) override |
|
void | onKeyRepeat (AInput::Key key) override |
|
void | onFocusLost () override |
|
void | onPointerPressed (const APointerPressedEvent &event) override |
|
void | onPointerDoubleClicked (const APointerPressedEvent &event) override |
|
void | onPointerMove (glm::vec2 pos, const APointerMoveEvent &event) override |
|
void | onPointerReleased (const APointerReleasedEvent &event) override |
|
bool | wantsTouchscreenKeyboard () override |
|
bool | handlesNonMouseNavigation () override |
|
void | onFocusAcquired () override |
|
void | invalidateAllStyles () override |
|
bool | isLButtonPressed () override |
|
void | drawCursor (IRenderer &renderer, glm::ivec2 position) |
|
void | clear () |
|
void | setMaxTextLength (size_t newTextLength) |
|
void | trimText () |
|
void | setCopyable (bool isCopyable) |
|
virtual void | setText (const AString &t) |
|
virtual bool | isPasswordField () const noexcept=0 |
|
virtual ATextInputType | textInputType () const noexcept=0 |
|
void | setTextInputActionIcon (ATextInputActionIcon textInputActionIcon) noexcept |
|
ATextInputActionIcon | textInputActionIcon () const noexcept |
|
void | copyToClipboard () const |
| Performs copy operation (CTRL+C) to system clipboard.
|
|
void | cutToClipboard () |
| Performs cut operation (CTRL+X) to system clipboard.
|
|
void | pasteFromClipboard () |
| Performs paste operation (CTRL+V) from system clipboard. More...
|
|
void | paste (AString content) |
| Performs paste operation (CTRL+V). More...
|
|
void | moveCursorLeft () |
| Performs move left operation (like AInput::LEFT)
|
|
void | moveCursorRight () |
| Performs move right operation (like AInput::RIGHT)
|
|
virtual const AString & | text () const =0 |
|
virtual size_t | length () const =0 |
|
AString | selectedText () const |
|
Selection | selection () const |
|
bool | hasSelection () const |
|
virtual unsigned | cursorIndexByPos (glm::ivec2 pos)=0 |
|
virtual glm::ivec2 | getPosByIndex (size_t index)=0 |
|
virtual glm::ivec2 | getCursorPosition ()=0 |
|
void | selectAll () |
| Select whole text in the text field.
|
|
void | clearSelection () |
| Remove selection from the text field.
|
|
void | setSelection (int cursorIndex) |
|
void | setSelection (Selection selection) |
|
|
AMenuModel | composeContextMenu () override |
|
void | commitStyle () override |
|
int | getVerticalAlignmentOffset () noexcept |
|
void | cursorSelectableRedraw () override |
|
void | onSelectionChanged () override |
|
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) |
|
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) |
|