SCurveEditorView

This is the base widget type for all views that exist on a curve editor panel.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CurveEditor

Header

/Engine/Source/Editor/CurveEditor/Public/SCurveEditorView.h

Include

#include "SCurveEditorView.h"

Syntax

class SCurveEditorView : public SCompoundWidget

Remarks

This is the base widget type for all views that exist on a curve editor panel. A view may contain 0 or more curves (stored in CurveInfoByID). SCurveEditorViews are directly housed within a single SCurveEditorViewContainer which arranges each view vertically in order.

View types: A view may have a centrally registered ID (See FCurveEditorViewRegistry and FCurveModel::GetSupportedViews) which allows any external curve model type to express support for any other view type. 3 built-in views are provided: Absolute: Shows 1 or more curves on a single 2D-scrollable grid using a single zoomable view-space. Normalized: Shows 1 or more curves on a single grid scrollable horizontally with all curves normalized to the extents of the view Stacked: Shows 1 or more curves on separate fixed-height grids scrollable horizontally each curve normalized to the extents of its own grid Unregistered curve views may still be added to the view by calling SCurveEditorPanel::AddView

Space Transformations: Views must define a valid 2-dimensional space (ViewSpace) that is used to convert from a pixel position to the virtual view space. Views may additionally implement per-curve transformations from view space to curve space, to allow for specific layouts/scales of curves within them. Per-curve transforms are stored inside [FCurveInfo::ViewToCurveTransform](API\Editor\CurveEditor\SCurveEditorView\FCurveInfo\ViewToCurveTransform)

Sizing: Views may be size in one of 2 ways:

  • Auto sized (bAutoSize=true): views derive their height from the widget's desired size;

  • Stretched (bAutoSize=false): views will be stretched to the size of the parent panel with a sensible minimum height.

Variables

Name Description

Public variable

uint8: 1

 

bAllowEmpty

(Default: false) Defines whether this view should remain on the panel UI even if it does not represent any curves.

Public variable

uint8: 1

 

bAutoSize

(Default: true) See class notes - defines whether this view should size to its desired size (true) or stretch to the height of the panel (false).

Public variable

uint8: 1

 

bFixedOutputBounds

(Default: false) When true, this view has fixed vertical bounds that should never be changed by zooming or panning

Public variable

uint8: 1

 

bInteractive

(Default: true) When true, this view should accept interactive operations such as drags and tool interaction

Public variable

uint8: 1

 

bPinned

(Default: false) When true, this view has been pinned to the top of the view container.

Protected variable

TSortedMap< FCu...

 

CurveInfoByID

Map from curve identifier to specific info pertaining to that curve for this view.

Public variable

TAttribute< flo...

 

FixedHeight

(Optional) Attribute that defines a fixed height for this view.

Public variable

int32

 

MaximumCapacity

The maximum number of curves allowed on this view, or 0 for no limit

Protected variable

double

 

OutputMax

This view's maximum visible output value

Protected variable

double

 

OutputMin

This view's minimum visible output value

Public variable

int32

 

RelativeOrder

Transient integer that is assigned each time the view container order is changed, to guarantee relative ordering of views when the list changes

Public variable

int8

 

SortBias

(Default: 0) Should be assigned on Construction of derived types.

Public variable

ECurveEditorVie...

 

ViewTypeID

This view's type identifier. Assigned by the curve editor panel after construction.

Protected variable

TWeakPtr< FCurv...

 

WeakCurveEditor

The curve editor associated with this view.

Constructors

Name Description

Public function

SCurveEditorView()

Default constructor

Functions

Name Description

Public function Virtual

void

 

BindCommands()

Bind UI commands for this view

Protected function Const

void

 

GetCurveDrawParams

(
    TArray< FCurveDrawParams >& OutDra...
)

Gets info about the curves being drawn.

Public function Const

FCurveEditor...

 

GetCurveSpace

(
    FCurveModelID CurveID
)

Get the screen space ultility that defines the specified curves's input, output and pixel metrics.

Public function Virtual Const

void

 

GetGridLinesX

(
    TSharedRef< const FCurveEditor > Cu...,
    TArray< float >& MajorGridLines,
    TArray< float >& MinorGridLines,
    TArray< FText >* MajorGridLabe...
)

Public function Virtual Const

void

 

GetGridLinesY

(
    TSharedRef< const FCurveEditor > Cu...,
    TArray< float >& MajorGridLines,
    TArray< float >& MinorGridLines,
    TArray< FText >* MajorGridLabe...
)

Public function Const

void

 

GetInputBounds

(
    double& OutInputMin,
    double& OutInputMax
)

Retrieve this view's input bounds, accounting for any offsets or padding from the outer container

Public function Const

double

 

GetOutputMax()

Retrieve this view's maximum output bound in view space

Public function Const

double

 

GetOutputMin()

Retrieve this view's minimum output bound in view space

Public function Virtual Const

void

 

GetPointsWithinWidgetRange

(
    const FSlateRect& WidgetRectangle,
    TArray< FCurvePointHandle >* O...
)

Retrieve all the curve points that overlap the specified rectangle in widget space

Public function Const

FCurveEditor...

 

GetViewSpace()

Get the screen space ultility that defines this view's input, output and pixel metrics

Public function Const

bool

 

HasCapacity()

Check whether this view has space for any more curves

Public function Const

bool

 

IsInteractive()

Check whether this view can be interacted with.

Public function Virtual Const

bool

 

IsTimeSnapEnabled()

Should the tools respect the global snapping rules for Time (X axis) input when manipulating a curve in this view.

Public function Virtual Const

bool

 

IsValueSnapEnabled()

Should the tools respect the global snapping rules for Value (Y axis) input when manipulating a curve in this view.

Public function Const

int32

 

NumCurves()

Retrieve the number of curves that exist on this view

Public function Virtual

void

 

OnCurveListChanged()

Invoked when a curve has been added or removed from this list.

Public function

void

 

SetOutputBounds

(
    double InOutputMin,
    double InOutputMax
)

Set this view's output bounds

Public function Const

bool

 

ShouldAutoSize()

Check whether this view should auto size to fit its FixedHeight or child slot content

Public function

void

 

Zoom

(
    const FVector2D& Amount
)

Zoom this view in or out around its center point

Public function

void

 

ZoomAround

(
    const FVector2D& Amount,
    double InputOrigin,
    double OutputOrigin
)

Zoom this view in or out around the specified point

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float LayoutScaleMultiplier
)

Compute the ideal size necessary to display this widget.

Classes

Name

Description

Protected struct

FCurveInfo

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss