class
AToolbarButton
- Module
- Arc
- Header
#include "Arc/Widgets/AToolbar.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
std::function<void()> | OnClicked | The body of the button (or of a split one) was clicked. |
std::function<void(const ArcRect&)> | OnMenu | The chevron of a split (or chevron-only) button asks for its menu; the rect is the button's, for anchoring the menu under it. |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | SetSelected | |
bool | IsSelected | |
void | SetLabel | |
const std::string& | GetLabel | |
void | SetIcon | |
float | GetHeight | Height of the button: 28, or 24 for the viewport-overlay variant. |
float | GetIconSize | Icon size: 16, or 14 for the viewport-overlay variant. |
void | SetMinWidth | A floor under the measured width (the viewport options button is as wide as its labelled neighbours' padding makes it in the design). |
FArcToolbarButtonPaint | PaintFrame | Frames rect as a toolbar button in the given state and answers the colours its content takes — the paint the editor's own custom toolbar shares, so both look the same. |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
void | OnMouseEnter | |
void | OnMouseLeave | |
bool | IsFocusable | |
bool | OnActivate | |
float | GetFocusRadius | |
bool | CanCacheDesiredSize | |
EAccessibleRole | GetAccessibleRole | |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
C++
ARC_WIDGET_ARGS(AToolbarButton) ARC_ARG(std::string, Icon) ARC_ARG(std::string, Label) ARC_ARG(bool, NumericLabel) ARC_ARG(bool, Chevron) ARC_ARG(bool, Split) ARC_ARG(bool, IsSelected) ARC_ARG(bool, Overlay) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)SetSelected
C++
void SetSelected(bool selected)IsSelected
C++
bool IsSelected() constSetLabel
C++
void SetLabel(const std::string& label)GetLabel
C++
const std::string& GetLabel() constSetIcon
C++
void SetIcon(const std::string& glyph)GetHeight
C++
float GetHeight() constHeight of the button: 28, or 24 for the viewport-overlay variant.
GetIconSize
C++
float GetIconSize() constIcon size: 16, or 14 for the viewport-overlay variant.
SetMinWidth
C++
void SetMinWidth(float width)A floor under the measured width (the viewport options button is as wide as its labelled neighbours' padding makes it in the design).
PaintFrame
C++
static FArcToolbarButtonPaint PaintFrame(CArcUIRenderer& renderer, const ArcRect& rect, bool enabled, bool hovered, bool pressed, bool selected, float opacity)Frames rect as a toolbar button in the given state and answers the colours its content takes — the paint the editor's own custom toolbar shares, so both look the same.
ComputeDesiredSize
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) overrideOnMouseMove
C++
CReply OnMouseMove(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() overrideGetFocusRadius
C++
float GetFocusRadius() const overrideCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideGetAccessibleRole
C++
EAccessibleRole GetAccessibleRole() const overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Arc/Widgets/AToolbar.h via arc.json · Nov 5, 2026Version 1.0.0