# Sandbox.UI.CurveEditor

Edits a Curve, CurveRange or named collection of curves. Keys retain the normalized coordinates used by Curve.Frame;
numeric fields and axes display actual time and value units. View navigation never edits data.

- Kind: class
- Namespace: `Sandbox.UI`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.UI.Panel](/api/Sandbox.UI.Panel)

## Constructors

- [`CurveEditor`](/api/Sandbox.UI.CurveEditor/.ctor)

## Properties

- [`ActiveCurve`](/api/Sandbox.UI.CurveEditor/ActiveCurve)
- [`CanRedo`](/api/Sandbox.UI.CurveEditor/CanRedo)
- [`CanUndo`](/api/Sandbox.UI.CurveEditor/CanUndo)
- [`Channels`](/api/Sandbox.UI.CurveEditor/Channels): Display and edit multiple independent curves. Assigning clears undo history without notifying.
- [`ChannelsChanged`](/api/Sandbox.UI.CurveEditor/ChannelsChanged): Raised once per multi-curve edit, including undo and cancellation. The collection is a snapshot.
- [`IsRange`](/api/Sandbox.UI.CurveEditor/IsRange)
- [`NavigationBounds`](/api/Sandbox.UI.CurveEditor/NavigationBounds): Navigation bounds in actual time/value units. Only the time limits constrain navigation; vertical pan and zoom remain free. Bounds rescale with edits to the curve's axis ranges.
- [`RangeValue`](/api/Sandbox.UI.CurveEditor/RangeValue): The two range boundaries. Assigning enables filled range editing; curves can have different ranges and key times.
- [`RangeValueChanged`](/api/Sandbox.UI.CurveEditor/RangeValueChanged): Raised once for each change to either boundary in range mode.
- [`SavedPresets`](/api/Sandbox.UI.CurveEditor/SavedPresets): User presets shared between curve editors and retained between sessions.
- [`SelectedIndex`](/api/Sandbox.UI.CurveEditor/SelectedIndex)
- [`SelectedKeys`](/api/Sandbox.UI.CurveEditor/SelectedKeys)
- [`ShowInspector`](/api/Sandbox.UI.CurveEditor/ShowInspector): Show the advanced key inspector beside the canvas. Hidden by default.
- [`SnapIncrement`](/api/Sandbox.UI.CurveEditor/SnapIncrement): Time and value snap increments in actual units, independent of zoom and grid labels. Non-positive values disable an axis.
- [`SnapToGrid`](/api/Sandbox.UI.CurveEditor/SnapToGrid): Snap dragged keys to SnapIncrement in actual time/value units. Ctrl temporarily enables snapping.
- [`Value`](/api/Sandbox.UI.CurveEditor/Value): The active curve. Assigning switches to single-curve mode and clears undo history without a change event.
- [`ValueChanged`](/api/Sandbox.UI.CurveEditor/ValueChanged): Raised for user edits to the active curve, including undo and cancellation.
- [`ViewMax`](/api/Sandbox.UI.CurveEditor/ViewMax)
- [`ViewMin`](/api/Sandbox.UI.CurveEditor/ViewMin): Visible time/value bounds in actual curve units. Changing the view does not edit keys.

## Methods

- [`AddKey`](/api/Sandbox.UI.CurveEditor/AddKey): Add a normalized key to the active curve. Near-duplicate times select the existing key.
- [`ApplyPreset`](/api/Sandbox.UI.CurveEditor/ApplyPreset): Replace the active curve's keys, optionally applying the preset's axis ranges too.
- [`DeletePreset`](/api/Sandbox.UI.CurveEditor/DeletePreset): Remove a saved preset.
- [`FitSelection`](/api/Sandbox.UI.CurveEditor/FitSelection)
- [`FitView`](/api/Sandbox.UI.CurveEditor/FitView)
- [`InsertKey`](/api/Sandbox.UI.CurveEditor/InsertKey): Split the curve at a normalized time while retaining its shape, including stepped and linear segments.
- [`MoveKey`](/api/Sandbox.UI.CurveEditor/MoveKey): Move one key, clamping its time before either neighbour.
- [`MoveSelection`](/api/Sandbox.UI.CurveEditor/MoveSelection): Translate the selection by a delta in curve A's normalized display space, keeping group spacing intact.
- [`OnButtonTyped`](/api/Sandbox.UI.CurveEditor/OnButtonTyped)
- [`Redo`](/api/Sandbox.UI.CurveEditor/Redo)
- [`RemoveSelected`](/api/Sandbox.UI.CurveEditor/RemoveSelected): Delete selected keys while keeping at least one key per populated boundary.
- [`ReplacePreset`](/api/Sandbox.UI.CurveEditor/ReplacePreset): Replace a saved preset with the active curve.
- [`SavePreset`](/api/Sandbox.UI.CurveEditor/SavePreset): Save the active curve, including its axis ranges, as a reusable preset.
- [`SelectAll`](/api/Sandbox.UI.CurveEditor/SelectAll)
- [`SelectCurve`](/api/Sandbox.UI.CurveEditor/SelectCurve): Select a boundary without changing its data or the view.
- [`SelectKey`](/api/Sandbox.UI.CurveEditor/SelectKey)
- [`SelectKeys`](/api/Sandbox.UI.CurveEditor/SelectKeys)
- [`SetKeyMode`](/api/Sandbox.UI.CurveEditor/SetKeyMode)
- [`SetSelectedMode`](/api/Sandbox.UI.CurveEditor/SetSelectedMode): Set interpolation on all selected keys, across both boundaries, as a single edit.
- [`SetTangent`](/api/Sandbox.UI.CurveEditor/SetTangent)
- [`SetViewBounds`](/api/Sandbox.UI.CurveEditor/SetViewBounds): Set the visible time/value bounds in actual units.
- [`SmoothSelected`](/api/Sandbox.UI.CurveEditor/SmoothSelected): Calculate monotone, locally clamped slopes. This is a one-shot operation stored as ordinary mirrored tangents.
- [`Undo`](/api/Sandbox.UI.CurveEditor/Undo)
