20#include "AViewContainer.h"
21#include "AAbstractTextField.h"
22#include "AScrollbar.h"
48class API_AUI_VIEWS ATextArea:
public AAbstractTypeableView<ATextBase<AWordWrappingEngine<std::list<_unique<aui::detail::TextBaseEntry>>>>>,
public IStringable {
50 friend class UITextArea;
52 using Iterator = Entries::iterator;
56 ~ATextArea()
override;
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;
81 void fillStringCanvas(const
_<
IRenderer::IMultiStringCanvas>& canvas) override;
85 glm::ivec2 mCursorPosition{0, 0};
88 struct EntityQueryResult {
96 return mEngine.entries();
99 auto& entities()
const {
100 return mEngine.entries();
103 void onCursorIndexChanged()
override;
105 EntityQueryResult getLeftEntity(
size_t indexRelativeToFrom, EntityQueryResult from);
106 EntityQueryResult getLeftEntity(
size_t index);
107 Iterator splitIfNecessary(EntityQueryResult at);
109 AScrollArea* findScrollArea();
auto text() const
Definition AAbstractTypeableView.h:48
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition AOptional.h:33
Represents a Unicode character string.
Definition AString.h:38
Multiline text input area.
Definition ATextArea.h:48
glm::ivec2 getCursorPosition() override
ATextInputType textInputType() const noexcept override
unsigned int cursorIndexByPos(glm::ivec2 pos) override
bool isPasswordField() const noexcept override
const AString & getText() const override
bool typeableInsert(size_t at, const AString &toInsert) override
AString toString() const override
size_t length() const override
Base class for rendering.
Definition IRenderer.h:149
Object that can be converted to string.
Definition IStringable.h:29
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
ATextInputType
Controls IME text input type of the text field.
Definition ATextInputType.h:24
Connection owner which destroys the connection in destructor.
Definition AAbstractSignal.h:396
Defines how View handles properties of FieldType type.
Definition ADataBinding.h:37
static void setup(const _< View > &view)
Called then view linked with field.
Definition ADataBinding.h:43
static auto property(const _< View > &view)
Returns property definition for FieldType.
Definition ADataBinding.h:49
Render context passed to AView::render.
Definition ARenderContext.h:43