class

AEditableTextBox

Module
Arc
Header
#include "Arc/Widgets/AEditableTextBox.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGSin the placeholder colour; it is not part of the value.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
EArcCursorTypeOnCursorQuery
CReplyOnKeyChar
CReplyOnKeyDown
CReplyOnTextComposition
voidOnFocusReceived
boolWantsTextInput
voidOnFocusLost
voidSetText
voidSetIsPassword
boolIsPassword
CTextGetTextThe edit buffer while focused: a bound Text keeps reporting the model until the owner applies the edit, so it cannot say what is typed.
int32_tGetCursorPositionCaret and selection in bytes.
std::stringGetSelectedText
ETextCommitGetLastCommitReasonThe reason the last commit carried.
floatGetScrollOffsetHow far the text is scrolled left to keep the caret inside the frame, in layout units.
std::stringGetDisplayTextThe string actually painted: the edit text, or one mask glyph per grapheme for a password.
boolCanCacheDesiredSizeThe box is a fixed frame sized off the font — the text it holds scrolls inside it rather than growing it, so typing cannot change the measure.
boolCanRetainPaintRefused: the caret blinks off a clock and the selection highlight follows a drag, neither of which has a write to invalidate on.
const char*GetTypeName
EAccessibleRoleGetAccessibleRoleA password's value is never handed to an assistive client.
std::stringGetAccessibleValue
boolIsFocusable
boolIsTextInput
EFocusVisualGetFocusVisualtext-field.json's focused state has the FocusRing border on any focus and the outer ring as well when the focus came from the keyboard, like every other control.
voidSetHasErrorThe design's error state: ErrorTint fill, Error border, and the error text as a Dense helper line 4 px under the field.
boolHasError
voidSetErrorText
floatGetFieldHeight26 px, or the 24 px dense field of property rows.
ArcMarginGetTextPaddingThe inset the text sits at: TextPadding when given, else the style's.

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AEditableTextBox) ARC_ARG(ArcMargin, TextPadding) ARC_ATTR(CText, Text) ARC_ATTR(CText, HintText) ARC_ATTR(ArcColor, ForegroundColor) ARC_ATTR(ArcColor, BackgroundColor) ARC_ATTR(CArcFontInfo, Font) ARC_ARG(bool, IsReadOnly) ARC_ARG(bool, IsPassword) ARC_ARG(bool, ClearFocusOnCommit) ARC_EVENT(COnTextChanged, OnTextChanged) ARC_EVENT(CSimpleDelegate, OnTextCommitted) ARC_EVENT(COnTextCommittedWithReason, OnTextCommittedWithReason) ARC_ATTR(CText, ErrorText) ARC_ARG(bool, Dense) ARC_ARG(bool, AlignRight) ARC_ARG(std::string, Suffix) ARC_ARG(bool, Frameless) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

in the placeholder colour; it is not part of the value.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnCursorQuery

C++
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const override

OnKeyChar

C++
CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnTextComposition

C++
CReply OnTextComposition(const CGeometry& geo, const CCompositionEvent& event) override

OnFocusReceived

C++
void OnFocusReceived(const CFocusEvent& event) override

WantsTextInput

C++
bool WantsTextInput(bool& outPassword) const override

OnFocusLost

C++
void OnFocusLost(const CFocusEvent& event) override

SetText

C++
void SetText(const CText& text)

SetIsPassword

C++
void SetIsPassword(bool password)

IsPassword

C++
bool IsPassword() const

GetText

C++
CText GetText() const

The edit buffer while focused: a bound Text keeps reporting the model until the owner applies the edit, so it cannot say what is typed.

GetCursorPosition

C++
int32_t GetCursorPosition() const

Caret and selection in bytes. The Text attribute cannot show either, so anything reasoning about the edit — a validator, a test — has no other way to see where the user is.

GetSelectedText

C++
std::string GetSelectedText() const

GetLastCommitReason

C++
ETextCommit GetLastCommitReason() const

The reason the last commit carried. A focus session commits at most once per distinct text: Enter then the blur it causes is one commit, not two.

GetScrollOffset

C++
float GetScrollOffset() const

How far the text is scrolled left to keep the caret inside the frame, in layout units. Zero while unfocused.

GetDisplayText

C++
std::string GetDisplayText() const

The string actually painted: the edit text, or one mask glyph per grapheme for a password.

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

The box is a fixed frame sized off the font — the text it holds scrolls inside it rather than growing it, so typing cannot change the measure.

CanRetainPaint

C++
bool CanRetainPaint() const override

Refused: the caret blinks off a clock and the selection highlight follows a drag, neither of which has a write to invalidate on.

GetTypeName

C++
const char* GetTypeName() const override

GetAccessibleRole

C++
EAccessibleRole GetAccessibleRole() const override

A password's value is never handed to an assistive client.

GetAccessibleValue

C++
std::string GetAccessibleValue() const override

IsFocusable

C++
bool IsFocusable() const override

IsTextInput

C++
bool IsTextInput() const override

GetFocusVisual

C++
EFocusVisual GetFocusVisual() const override

text-field.json's focused state has the FocusRing border on any focus and the outer ring as well when the focus came from the keyboard, like every other control.

SetHasError

C++
void SetHasError(bool hasError)

The design's error state: ErrorTint fill, Error border, and the error text as a Dense helper line 4 px under the field.

HasError

C++
bool HasError() const

SetErrorText

C++
void SetErrorText(const CText& text)

GetFieldHeight

C++
float GetFieldHeight() const

26 px, or the 24 px dense field of property rows.

GetTextPadding

C++
ArcMargin GetTextPadding() const

The inset the text sits at: TextPadding when given, else the style's.

Generated from Arc/Widgets/AEditableTextBox.h via arc.json · Nov 5, 2026Version 1.0.0