class
ATextBlock
- Module
- Arc
- Header
#include "Arc/Widgets/ATextBlock.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
bool | CanCacheDesiredSize | |
bool | CanRetainPaint | A leaf: no scope of its own, its glyphs live in the ancestor's slice. |
bool | PollAttributes | |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
void | SetText | |
CText | GetText | |
void | SetColorAndOpacity | |
void | SetAutoWrapText | |
void | SetEllipsis | |
void | SetFlowDirection | |
CArcFontInfo | GetFontInfo | What the block lays out with: its own font, or the style's. |
ETextJustify | GetJustification | |
bool | GetAutoWrapText | |
EArcTextEllipsis | GetEllipsis | |
EArcTextDirection | GetFlowDirection | |
void | SetShadow | A drop shadow drawn under the text, offset in logical pixels. |
const char* | GetTypeName | |
EAccessibleRole | GetAccessibleRole | |
std::string | GetAccessibleName |
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 overrideCanRetainPaint
C++
bool CanRetainPaint() const overrideA 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() overrideComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideSetText
C++
void SetText(const CText& text)GetText
C++
CText GetText() constSetColorAndOpacity
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() constWhat the block lays out with: its own font, or the style's.
GetJustification
C++
ETextJustify GetJustification() constGetAutoWrapText
C++
bool GetAutoWrapText() constGetEllipsis
C++
EArcTextEllipsis GetEllipsis() constGetFlowDirection
C++
EArcTextDirection GetFlowDirection() constSetShadow
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 overrideGetAccessibleRole
C++
EAccessibleRole GetAccessibleRole() const overrideGetAccessibleName
C++
std::string GetAccessibleName() const overrideGenerated from Arc/Widgets/ATextBlock.h via arc.json · Nov 5, 2026Version 1.0.0