class
AChip
- Module
- Arc
- Header
#include "Arc/Widgets/AChip.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
ArcDelegate<void(bool)> | OnToggled | Fires when a click toggles the chip. |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | Construct | |
void | SetLabel | |
const std::string& | GetLabel | |
void | SetIcon | A Lucide glyph for the toggle chip's icon slot. |
void | SetSwatch | |
void | ClearSwatch | |
void | SetVariant | |
EArcChipVariant | GetVariant | |
void | SetSelected | |
bool | IsSelected | |
void | SetHasError | |
EVisualState | GetVisualState | The state the paint resolves this frame (error wins, then disabled). |
float | GetHeight | The spec height of the variant: 22 for a filter chip, 28 for a toggle chip. |
float | GetFocusRadius | |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
void | OnMouseEnter | |
void | OnMouseLeave | |
bool | IsFocusable | |
bool | OnActivate | |
bool | CanCacheDesiredSize | |
bool | CanRetainPaint | |
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_tConstruct
C++
void Construct(const CArguments& args)SetLabel
C++
void SetLabel(const std::string& label)GetLabel
C++
const std::string& GetLabel() constSetIcon
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() constSetSelected
C++
void SetSelected(bool selected)IsSelected
C++
bool IsSelected() constSetHasError
C++
void SetHasError(bool hasError)GetVisualState
C++
EVisualState GetVisualState() constThe state the paint resolves this frame (error wins, then disabled).
GetHeight
C++
float GetHeight() constThe spec height of the variant: 22 for a filter chip, 28 for a toggle chip.
GetFocusRadius
C++
float GetFocusRadius() const overrideComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseEnter
C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseLeave
C++
void OnMouseLeave(const CPointerEvent& event) overrideIsFocusable
C++
bool IsFocusable() const overrideOnActivate
C++
bool OnActivate() overrideCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideCanRetainPaint
C++
bool CanRetainPaint() const overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Arc/Widgets/AChip.h via arc.json · Nov 5, 2026Version 1.0.0