class

AMultiLineEditableTextBox

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

Properties

TypeNameDescription
int32_t_MinDesiredLinesDefault 3.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGSreport field at 10 px sides); all zero keeps the style.
WidgetArgsType&WrapText
WidgetArgsType&MinDesiredLines
ARC_ARGcontrol, instead of trapping the keyboard in the box.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnMouseWheel
EArcCursorTypeOnCursorQuery
CReplyOnKeyChar
CReplyOnKeyDown
CReplyOnTextComposition
voidOnFocusReceived
voidOnFocusLost
voidSetText
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.
voidSetSelectionRangeSelection as a BYTE range into the text — what a host needs to drive a find (select the match, scroll it into view) without owning the caret machinery.
boolGetSelectionRange
voidSelectWordAtWhat a double-click selects: the UAX #29 word, punctuation run or whitespace run under the byte, as the single-line box picks it.
floatGetScrollOffsetVertical scroll in content pixels, the same units the scrollbar and the caret-reveal work in.
const std::string&GetDisplayedTextThe text the widget is actually showing — the edit buffer while focused, the bound attribute otherwise.
boolCanRetainPaintRefused: caret, selection highlight and a scroll offset the body clamps against the content — all of them move with no write behind them.
const char*GetTypeName
EAccessibleRoleGetAccessibleRole
std::stringGetAccessibleValue
boolIsFocusable
boolIsTextInput
boolConsumesTabAn editable body types Tab; a read-only view has nothing to indent and must let Tab move on like any other control.
boolWantsTextInput
ArcMarginGetTextPaddingThe inset the text sits at: TextPadding when given, else the style's.

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AMultiLineEditableTextBox) 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) bool _WrapText = true

report field at 10 px sides); all zero keeps the style.

WrapText

C++
WidgetArgsType& WrapText(bool value)

MinDesiredLines

C++
WidgetArgsType& MinDesiredLines(int32_t value)

ARC_ARG

C++
ARC_ARG(bool, RevertOnEscape) ARC_ARG(bool, TabNavigates) ARC_EVENT(COnTextChanged, OnTextChanged) ARC_EVENT(CSimpleDelegate, OnTextCommitted) ARC_EVENT(COnTextCommittedWithReason, OnTextCommittedWithReason) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

control, instead of trapping the keyboard in the box.

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

OnMouseWheel

C++
CReply OnMouseWheel(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

OnFocusLost

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

SetText

C++
void SetText(const CText& text)

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.

SetSelectionRange

C++
void SetSelectionRange(int32_t startByte, int32_t endByte, bool reveal = true)

Selection as a BYTE range into the text — what a host needs to drive a find (select the match, scroll it into view) without owning the caret machinery. The range is clamped to the text and snapped to UTF-8 boundaries, so a byte offset from a raw std::string::find is safe to pass in. Revealing happens at the next paint: the scroll needs the widget's rect, which only the paint knows.

GetSelectionRange

C++
bool GetSelectionRange(int32_t& outStart, int32_t& outEnd) const

SelectWordAt

C++
void SelectWordAt(int32_t byte)

What a double-click selects: the UAX #29 word, punctuation run or whitespace run under the byte, as the single-line box picks it.

GetScrollOffset

C++
float GetScrollOffset() const

Vertical scroll in content pixels, the same units the scrollbar and the caret-reveal work in.

GetDisplayedText

C++
const std::string& GetDisplayedText() const

The text the widget is actually showing — the edit buffer while focused, the bound attribute otherwise. A host searching the content must look at the same bytes the selection indexes.

CanRetainPaint

C++
bool CanRetainPaint() const override

Refused: caret, selection highlight and a scroll offset the body clamps against the content — all of them move with no write behind them.

GetTypeName

C++
const char* GetTypeName() const override

GetAccessibleRole

C++
EAccessibleRole GetAccessibleRole() const override

GetAccessibleValue

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

IsFocusable

C++
bool IsFocusable() const override

IsTextInput

C++
bool IsTextInput() const override

ConsumesTab

C++
bool ConsumesTab() const override

An editable body types Tab; a read-only view has nothing to indent and must let Tab move on like any other control.

WantsTextInput

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

GetTextPadding

C++
ArcMargin GetTextPadding() const

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

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