class

AChip

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

Properties

TypeNameDescription
ArcDelegate<void(bool)>OnToggledFires when a click toggles the chip.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidConstruct
voidSetLabel
const std::string&GetLabel
voidSetIconA Lucide glyph for the toggle chip's icon slot.
voidSetSwatch
voidClearSwatch
voidSetVariant
EArcChipVariantGetVariant
voidSetSelected
boolIsSelected
voidSetHasError
EVisualStateGetVisualStateThe state the paint resolves this frame (error wins, then disabled).
floatGetHeightThe spec height of the variant: 22 for a filter chip, 28 for a toggle chip.
floatGetFocusRadius
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
voidOnMouseEnter
voidOnMouseLeave
boolIsFocusable
boolOnActivate
boolCanCacheDesiredSize
boolCanRetainPaint
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AChip) ARC_ARG(EArcChipVariant, Variant) ARC_ARG(std::string, Label) ARC_ARG(std::string, Icon) ARC_WIDGET_ARGS_END() enum class EVisualState : uint8_t

Construct

C++
void Construct(const CArguments& args)

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 for the toggle chip's icon slot.

SetSwatch

C++
void SetSwatch(const ArcColor& color)

ClearSwatch

C++
void ClearSwatch()

SetVariant

C++
void SetVariant(EArcChipVariant variant)

GetVariant

C++
EArcChipVariant GetVariant() const

SetSelected

C++
void SetSelected(bool selected)

IsSelected

C++
bool IsSelected() const

SetHasError

C++
void SetHasError(bool hasError)

GetVisualState

C++
EVisualState GetVisualState() const

The state the paint resolves this frame (error wins, then disabled).

GetHeight

C++
float GetHeight() const

The spec height of the variant: 22 for a filter chip, 28 for a toggle chip.

GetFocusRadius

C++
float GetFocusRadius() const 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

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

IsFocusable

C++
bool IsFocusable() const override

OnActivate

C++
bool OnActivate() override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AChip.h via arc.json · Nov 5, 2026Version 1.0.0