14#include <AUI/View/AAbstractTypeableView.h>
15#include "AUI/Enum/ATextInputType.h"
17#include "AUI/Common/ATimer.h"
18#include <AUI/Common/IStringable.h>
19#include <AUI/Render/IRenderer.h>
32 int getContentMinimumHeight()
override;
34 void setText(
const AString& t)
override;
36 void setSuffix(
const AString& s);
48 return mTextInputType;
51 void setPasswordMode(
bool isPasswordField) {
53 setCopyable(!isPasswordField);
58 return mIsPasswordTextField;
61 bool handlesNonMouseNavigation()
override;
65 void onCharEntered(char16_t c)
override;
67 void setSize(glm::ivec2 size)
override;
78 void prerenderStringIfNeeded(
IRenderer& render);
80 void typeableErase(
size_t begin,
size_t end)
override;
84 size_t typeableFind(char16_t c,
size_t startPos)
override;
86 size_t typeableReverseFind(char16_t c,
size_t startPos)
override;
88 size_t length()
const override;
92 AString getDisplayText()
override;
94 void cursorSelectableRedraw()
override;
97 glm::ivec2 getPosByIndex(
size_t index)
override;
101 void onCursorIndexChanged()
override;
102 void commitStyle()
override;
106 bool mIsPasswordTextField =
false;
107 int mTextAlignOffset = 0;
108 int mHorizontalScroll = 0;
109 unsigned mAbsoluteCursorPos = 0;
112 void invalidateFont()
override;
114 void updateTextAlignOffset();
116 int getPosByIndexAbsolute(
size_t index);
Text field implementation.
Definition: AAbstractTextField.h:26
bool isPasswordField() const noexcept override
Definition: AAbstractTextField.h:57
ATextInputType textInputType() const noexcept override
Definition: AAbstractTextField.h:47
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
Represents a Unicode character string.
Definition: AString.h:37
Helps mapping prerendered string with positions.
Definition: ATextLayoutHelper.h:25
Base class for rendering.
Definition: IRenderer.h:149
Object that can be converted to string.
Definition: IStringable.h:29
virtual AString toString() const =0
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
@ DEFAULT
Optimize for textual information.
Render context passed to AView::render.
Definition: ARenderContext.h:43