FMathStructCustomization

Base class for math struct customization (e.g, vector, rotator, color)

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

DetailCustomizations

Header

/Engine/Source/Editor/DetailCustomizations/Public/Customizations/MathStructCustomizations.h

Include

#include "Customizations/MathStructCustomizations.h"

Syntax

class FMathStructCustomization : public IPropertyTypeCustomization

Remarks

Base class for math struct customization (e.g, vector, rotator, color)

Variables

Name Description

Protected variable

bool

 

bIsUsingSlider

True if a value is being changed by dragging a slider

Protected variable

bool

 

bPreserveScaleRatio

True if the ratio is locked when scaling occurs (uniform scaling)

Protected variable

TArray< TWeakPt...

 

NumericEntryBoxWidgetList

All created numeric entry box widget for this customization

Protected variable

FOnNumericEntry...

 

OnNumericEntryBoxDynamicSliderMaxValueChanged

Protected variable

FOnNumericEntry...

 

OnNumericEntryBoxDynamicSliderMinValueChanged

Protected variable

TArray< TShared...

 

SortedChildHandles

All the sorted children of the struct that should be displayed

Constructors

Name Description

Public function

FMathStructCustomization()

Destructors

Name Description

Public function Virtual

~FMathStructCustomization()

Functions

Name Description

Public function Static

void

 

ExtractNumericMetadata

(
    TSharedRef< IPropertyHandle >& Pro...,
    FNumericMetadata< NumericType >& M...
)

Utility function that will extract common Math related numeric metadata

Public function

FOnNumericEn...

 

GetOnNumericEntryBoxDynamicSliderMaxValueChangedDelegate()

Return max/min slider value changed delegate (only apply if SupportDynamicSliderMaxValue or SupportDynamicSliderMinValue are true)

Public function

FOnNumericEn...

 

GetOnNumericEntryBoxDynamicSliderMinValueChangedDelegate()

Protected function Virtual

void

 

GetSortedChildren

(
    TSharedRef< IPropertyHandle > Struc...,
    TArray< TSharedRef< IPropertyHandle...
)

Gets the sorted children for the struct

Public function Const

bool

 

IsValueEnabled

(
    TWeakPtr< IPropertyHandle > WeakHan...
)

Called to see if the value is enabled for editing

Protected function Virtual

TSharedRef< ...

 

MakeChildWidget

(
    TSharedRef< IPropertyHandle >& Str...,
    TSharedRef< IPropertyHandle >& Pro...
)

Constructs a widget for the property handle

Protected function Virtual

void

 

MakeHeaderRow

(
    TSharedRef< IPropertyHandle >& Str...,
    FDetailWidgetRow& Row
)

Makes the header row for the customization

Public function Static

TSharedRef< ...

 

MakeInstance()

Public function

void

 

OnDynamicSliderMaxValueChanged

(
    NumericType NewMaxSliderValue,
    TWeakPtr< SWidget > InValueChangedS...,
    bool IsOriginator,
    bool UpdateOnlyIfHigher
)

Callback when the max/min spinner value are changed (only apply if SupportDynamicSliderMaxValue or SupportDynamicSliderMinValue are true)

Public function

void

 

OnDynamicSliderMinValueChanged

(
    NumericType NewMinSliderValue,
    TWeakPtr< SWidget > InValueChangedS...,
    bool IsOriginator,
    bool UpdateOnlyIfLower
)

Protected function Const

TOptional< N...

 

OnGetValue

(
    TWeakPtr< IPropertyHandle > WeakHan...
)

Gets the value as a float for the provided property handle

Protected function Const

FText

 

OnGetValueToolTip

(
    TWeakPtr< IPropertyHandle > WeakHan...
)

Gets the tooltip for the value.

Protected function

void

 

OnValueChanged

(
    NumericType NewValue,
    TWeakPtr< IPropertyHandle > WeakHan...
)

Called when the value is changed in the property editor

Protected function

void

 

OnValueCommitted

(
    NumericType NewValue,
    ETextCommit::Type CommitType,
    TWeakPtr< IPropertyHandle > WeakHan...
)

Called when the value is committed from the property editor

Protected function

void

 

SetValue

(
    NumericType NewValue,
    EPropertyValueSetFlags::Type Flags,
    TWeakPtr< IPropertyHandle > WeakHan...
)

Called to set the value of the property handle.

Overridden from IPropertyTypeCustomization

Name Description

Public function Virtual

void

 

CustomizeChildren

(
    TSharedRef< IPropertyHandle > Prope...,
    IDetailChildrenBuilder& ChildBuild...,
    IPropertyTypeCustomizationUtils& C...
)

Called when the children of the property should be customized or extra rows added

Public function Virtual

void

 

CustomizeHeader

(
    TSharedRef< IPropertyHandle > Struc...,
    FDetailWidgetRow& HeaderRow,
    IPropertyTypeCustomizationUtils& S...
)

IPropertyTypeCustomization instance

Classes

Name

Description

Public struct

FNumericMetadata

Argument struct for ExtractNumericMetadata, to make it easier to add new metadata to extract.

Typedefs

Name

Description

FOnNumericEntryBoxDynamicSliderMinMaxValueChanged

Notification when the max/min slider values are changed (only apply if SupportDynamicSliderMaxValue or SupportDynamicSliderMinValue are true)

Deprecated Functions

Name Description

Public function Static

void

 

ExtractNumericMetadata

(
    TSharedRef< IPropertyHandle >& Pro...,
    TOptional< NumericType >& MinValue,
    TOptional< NumericType >& MaxValue,
    TOptional< NumericType >& SliderMi...,
    TOptional< NumericType >& SliderMa...,
    NumericType& SliderExponent,
    NumericType& Delta,
    int32& ShiftMouseMovePixelPerDelta,
    bool& bSupportDynamicSliderMaxValu...,
    bool& bSupportDynamicSliderMinValu...
)

Use ExtractNumericMetadata overload with struct argument instead.