class

AButton

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

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGSicon, 8 px sides and a 4 px gap.
boolCanCacheDesiredSize
boolCanSkipArrange
boolCanRetainPaintThe hover fade is a clock: while it runs, every frame's background is a different colour with nothing to invalidate on.
ArcVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
voidOnMouseEnter
voidOnMouseLeave
const char*GetTypeName
EAccessibleRoleGetAccessibleRole
boolIsFocusable
floatGetFocusRadius
boolOnActivate
voidSetOnClicked
EArcButtonVariantGetVariant
voidSetLabel
const std::string&GetLabel
voidSetIconA Lucide glyph (ARC_ICON_* or CArcLucideIcons::Find).
voidSetSelectedThe latched state of an icon button (a snap toggle that is on).
boolIsSelected
floatGetHoverAmount0..1 progress of the hover and press transitions, timed by the MowoMotion Hover and Press tokens.
floatGetPressAmount
FVariantMetricsGetVariantMetrics

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AButton) ARC_EVENT(COnClicked, OnClicked) ARC_ATTR(ArcColor, ButtonColor) ARC_ATTR(ArcColor, HoverColor) ARC_ATTR(ArcColor, PressColor) ARC_ATTR(float, CornerRadius) ARC_ATTR(ArcMargin, ContentPadding) ARC_ARG(EArcButtonVariant, Variant) ARC_ARG(std::string, Label) ARC_ARG(std::string, Icon) ARC_ARG(bool, IsSelected) ARC_ARG(float, Height) ARC_ARG(bool, Dense) ARC_CONTENT(AButton, Content) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

icon, 8 px sides and a 4 px gap.

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

CanSkipArrange

C++
bool CanSkipArrange() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

The hover fade is a clock: while it runs, every frame's background is a different colour with nothing to invalidate on. Settled, the tint is a pure function of the press flag and the style set, both of which announce themselves. The enter/leave handlers drop the slice so the pre-hover picture cannot come back once the fade lands.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& geo) 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

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

GetTypeName

C++
const char* GetTypeName() const override

GetAccessibleRole

C++
EAccessibleRole GetAccessibleRole() const override

IsFocusable

C++
bool IsFocusable() const override

GetFocusRadius

C++
float GetFocusRadius() const override

OnActivate

C++
bool OnActivate() override

SetOnClicked

C++
void SetOnClicked(std::function<void()> func)

GetVariant

C++
EArcButtonVariant GetVariant() const

SetLabel

C++
void SetLabel(const std::string& label)

GetLabel

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

SetIcon

C++
void SetIcon(const std::string& glyph)

A Lucide glyph (ARC_ICON_* or CArcLucideIcons::Find).

SetSelected

C++
void SetSelected(bool selected)

The latched state of an icon button (a snap toggle that is on).

IsSelected

C++
bool IsSelected() const

GetHoverAmount

C++
float GetHoverAmount() const

0..1 progress of the hover and press transitions, timed by the MowoMotion Hover and Press tokens.

GetPressAmount

C++
float GetPressAmount() const

GetVariantMetrics

C++
static FVariantMetrics GetVariantMetrics(EArcButtonVariant variant)
Generated from Arc/Widgets/AButton.h via arc.json · Nov 5, 2026Version 1.0.0