class

ACurveEditor

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

Properties

TypeNameDescription
ArcDelegate<void(const CArcCurve&)>OnCurveChanged
ArcDelegate<void(int32_t)>OnKeySelectionChanged

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnMouseWheel
CReplyOnKeyDown
boolIsFocusable
EFocusVisualGetFocusVisualThe canvas shows focus as its BorderNormal frame and the focused key carries the ring; a second ring round the whole plot would be noise.
voidPaintKeyThe design's curve-key: a 9 px square turned 45 degrees, filled by state (TextBright, AccentHover hovered, AccentColor pressed or selected, TextDisabled, Error), with the FocusRing around it when focused.
voidPaintTangentA selected key's tangent: the 1 px line and the 6 px round handle.
voidPaintCanvasThe canvas: TimelineBg, PanelBorder (BorderNormal while focused).
boolTangentModeForDigitInterpolation by the curve-key shortcut: 1 auto, 2 user, 3 linear, 4 constant.
boolSetKeyInterpolationSets a key's interpolation the way the 1-4 shortcuts do.
voidApplyTangentDragWhat a handle drag does to the key: the dragged side takes the slope, the other side follows unless the tangents are broken or Alt is held (which breaks them).
voidSetCurve
const CArcCurve&GetCurve
int32_tGetSelectedKey
voidSelectKey
boolUpdateKey
voidSetViewRange
voidFrameViewToKeys
voidSetPopupTitle
voidSetPopupEnabled
voidOpenPresetPopup
EArcCursorTypeOnCursorQuery
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ACurveEditor) ARC_ARG(float, MinTime) ARC_ARG(float, MaxTime) ARC_ARG(float, MinValue) ARC_ARG(float, MaxValue) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

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

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

IsFocusable

C++
bool IsFocusable() const override

GetFocusVisual

C++
EFocusVisual GetFocusVisual() const override

The canvas shows focus as its BorderNormal frame and the focused key carries the ring; a second ring round the whole plot would be noise.

PaintKey

C++
static void PaintKey(CArcUIRenderer& renderer, const ArcVec2& center, Mowo::EArcSpecState state, float opacity = 1.0f)

The design's curve-key: a 9 px square turned 45 degrees, filled by state (TextBright, AccentHover hovered, AccentColor pressed or selected, TextDisabled, Error), with the FocusRing around it when focused. Every curve canvas paints its keys with this.

PaintTangent

C++
static void PaintTangent(CArcUIRenderer& renderer, const ArcVec2& key, const ArcVec2& handle, float opacity = 1.0f)

A selected key's tangent: the 1 px line and the 6 px round handle.

PaintCanvas

C++
static void PaintCanvas(CArcUIRenderer& renderer, const ArcRect& rect, bool focused, float opacity = 1.0f)

The canvas: TimelineBg, PanelBorder (BorderNormal while focused).

TangentModeForDigit

C++
static bool TangentModeForDigit(int32_t digit, ECurveTangentMode& outMode)

Interpolation by the curve-key shortcut: 1 auto, 2 user, 3 linear, 4 constant. Returns false for any other digit.

SetKeyInterpolation

C++
bool SetKeyInterpolation(int32_t index, ECurveTangentMode mode)

Sets a key's interpolation the way the 1-4 shortcuts do.

ApplyTangentDrag

C++
static void ApplyTangentDrag(CArcCurveKey& key, bool arrive, float slope, bool breakTangents)

What a handle drag does to the key: the dragged side takes the slope, the other side follows unless the tangents are broken or Alt is held (which breaks them).

SetCurve

C++
void SetCurve(const CArcCurve& curve)

GetCurve

C++
const CArcCurve& GetCurve() const

GetSelectedKey

C++
int32_t GetSelectedKey() const

SelectKey

C++
void SelectKey(int32_t index)

UpdateKey

C++
bool UpdateKey(int32_t index, const CArcCurveKey& key)

SetViewRange

C++
void SetViewRange(float minTime, float maxTime, float minValue, float maxValue)

FrameViewToKeys

C++
void FrameViewToKeys(float padRatio = 0.15f)

SetPopupTitle

C++
void SetPopupTitle(const std::string& title)

SetPopupEnabled

C++
void SetPopupEnabled(bool enabled)

OpenPresetPopup

C++
void OpenPresetPopup()

OnCursorQuery

C++
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const override

GetTypeName

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