20#include "AViewContainer.h"
21#include "AAbstractTextField.h"
22#include "AScrollbar.h"
52 using Iterator = Entries::iterator;
58 bool capturesFocus()
override;
63 glm::ivec2 getPosByIndex(
size_t index)
override;
64 void setText(
const AString& t)
override;
66 void onCharEntered(char16_t c)
override;
68 void setSize(glm::ivec2 size)
override;
75 void typeableErase(
size_t begin,
size_t end)
override;
78 size_t typeableFind(char16_t c,
size_t startPos)
override;
79 size_t typeableReverseFind(char16_t c,
size_t startPos)
override;
80 size_t length()
const override;
85 glm::ivec2 mCursorPosition{0, 0};
87 struct EntityQueryResult {
95 return mEngine.entries();
98 auto& entities()
const {
99 return mEngine.entries();
102 void onCursorIndexChanged()
override;
104 EntityQueryResult getLeftEntity(
size_t indexRelativeToFrom, EntityQueryResult from);
105 EntityQueryResult getLeftEntity(
size_t index);
106 Iterator splitIfNecessary(EntityQueryResult at);
Basic implementation of type shortcuts and selection for editable text fields.
Definition: AAbstractTypeableView.h:31
virtual ATextInputType textInputType() const noexcept=0
virtual bool typeableInsert(size_t at, const AString &toInsert)=0
virtual bool isPasswordField() const noexcept=0
virtual const AString & text() const =0
virtual size_t length() const =0
virtual unsigned cursorIndexByPos(glm::ivec2 pos)=0
virtual glm::ivec2 getCursorPosition()=0
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition: AOptional.h:32
Represents a Unicode character string.
Definition: AString.h:37
Multiline text input area.
Definition: ATextArea.h:48
Object that can be converted to string.
Definition: IStringable.h:29
virtual AString toString() const =0
Definition: UITextAreaTest.cpp:39
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
ATextInputType
Controls IME text input type of the text field.
Definition: ATextInputType.h:24
Render context passed to AView::render.
Definition: ARenderContext.h:43