class

ATextBlock

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

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
boolCanCacheDesiredSize
boolCanRetainPaintA leaf: no scope of its own, its glyphs live in the ancestor's slice.
boolPollAttributes
ArcVec2ComputeDesiredSize
int32_tOnPaint
voidSetText
CTextGetText
voidSetColorAndOpacity
voidSetAutoWrapText
voidSetEllipsis
voidSetFlowDirection
CArcFontInfoGetFontInfoWhat the block lays out with: its own font, or the style's.
ETextJustifyGetJustification
boolGetAutoWrapText
EArcTextEllipsisGetEllipsis
EArcTextDirectionGetFlowDirection
voidSetShadowA drop shadow drawn under the text, offset in logical pixels.
const char*GetTypeName
EAccessibleRoleGetAccessibleRole
std::stringGetAccessibleName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ATextBlock) ARC_ATTR(CText, Text) ARC_ATTR(ArcColor, ColorAndOpacity) ARC_ATTR(CArcFontInfo, Font) ARC_ARG(ETextJustify, Justification) ARC_ARG(bool, AutoWrapText) ARC_ARG(EArcTextEllipsis, Ellipsis) ARC_ATTR(ArcVec2, ShadowOffset) ARC_ATTR(ArcColor, ShadowColor) ARC_ARG(EArcTextDirection, FlowDirection) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

A leaf: no scope of its own, its glyphs live in the ancestor's slice. Wrapping and elision are allowed here where they are not allowed in the measure — the paint runs after arrange, so the width it elides against is settled, and a width that moved re-arranges and therefore re-paints.

PollAttributes

C++
bool PollAttributes() override

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

SetText

C++
void SetText(const CText& text)

GetText

C++
CText GetText() const

SetColorAndOpacity

C++
void SetColorAndOpacity(const ArcColor& color)

SetAutoWrapText

C++
void SetAutoWrapText(bool wrap)

SetEllipsis

C++
void SetEllipsis(EArcTextEllipsis mode)

SetFlowDirection

C++
void SetFlowDirection(EArcTextDirection direction)

GetFontInfo

C++
CArcFontInfo GetFontInfo() const

What the block lays out with: its own font, or the style's.

GetJustification

C++
ETextJustify GetJustification() const

GetAutoWrapText

C++
bool GetAutoWrapText() const

GetEllipsis

C++
EArcTextEllipsis GetEllipsis() const

GetFlowDirection

C++
EArcTextDirection GetFlowDirection() const

SetShadow

C++
void SetShadow(const ArcVec2& offset, const ArcColor& color)

A drop shadow drawn under the text, offset in logical pixels. Unset, the style's TextBlockStyle shadow applies (none when its offset is 0).

GetTypeName

C++
const char* GetTypeName() const override

GetAccessibleRole

C++
EAccessibleRole GetAccessibleRole() const override

GetAccessibleName

C++
std::string GetAccessibleName() const override
Generated from Arc/Widgets/ATextBlock.h via arc.json · Nov 5, 2026Version 1.0.0