UTypedElementSelectionSet

A wrapper around an element list that ensures mutation goes via the selection interfaces, as well as providing some utilities for batching operations.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UTypedElementSelectionSet

References

Module

TypedElementRuntime

Header

/Engine/Source/Runtime/TypedElementRuntime/Public/Elements/Framework/TypedElementSelectionSet.h

Include

#include "Elements/Framework/TypedElementSelectionSet.h"

Syntax

class UTypedElementSelectionSet :
    public UObject,
    public TTypedElementInterfaceCustomizationRegistry< FTypedElementSelectionCustomization >

Remarks

A wrapper around an element list that ensures mutation goes via the selection interfaces, as well as providing some utilities for batching operations.

Variables

Name Description

Public variable

FOnPreChangeDyn...

 

OnPreSelectionChange

Delegate that is invoked whenever the underlying element list is potentially about to change.

Public variable

FOnChangeDynami...

 

OnSelectionChange

Delegate that is invoked whenever the underlying element list has been changed.

Constructors

Name Description

Public function

UTypedElementSelectionSet()

Functions

Name Description

Public function Const

bool

 

AllowSelectionModifiers

(
    const FTypedElementHandle& InEleme...
)

Test to see whether selection modifiers (Ctrl or Shift) are allowed while selecting this element.

Public function Const

bool

 

CanDeselectElement

(
    const FTypedElementHandle& InEleme...,
    const FTypedElementSelectionOptions...
)

Test to see whether the given element can be deselected.

Public function Const

bool

 

CanSelectElement

(
    const FTypedElementHandle& InEleme...,
    const FTypedElementSelectionOptions...
)

Test to see whether the given element can be selected.

Public function

bool

 

ClearSelection

(
    const FTypedElementSelectionOptions...
)

Clear the current selection.

Public function Const

int32

 

CountSelectedElements

(
    const TSubclassOf< UInterface > InB...
)

Count the number of selected elements, optionally filtering to elements that implement the given interface.

Public function Const

int32

 

CountSelectedObjects()

Count the number of selected objects.

Public function Const

int32

 

CountSelectedObjects

(
    const UClass* InRequiredClass
)

Count the number of selected objects.

Public function

bool

 

DeselectElement

(
    const FTypedElementHandle& InEleme...,
    const FTypedElementSelectionOptions...
)

Attempt to deselect the given element.

Public function

bool

 

DeselectElements

(
    FTypedElementListConstRef InElement...,
    const FTypedElementSelectionOptions...
)

Attempt to deselect the given elements.

Public function

bool

 

DeselectElements

(
    TArrayView< const FTypedElementHand...,
    const FTypedElementSelectionOptions...
)

Attempt to deselect the given elements.

Public function

bool

 

DeselectElements

(
    const TArray< FTypedElementHandle >...,
    const FTypedElementSelectionOptions...
)

Attempt to deselect the given elements.

Public function Const

void

 

ForEachSelectedElement

(
    TFunctionRef< bool...
)

Enumerate the selected elements that implement the given interface.

Public function Const

void

 

ForEachSelectedElementHandle

(
    TFunctionRef< bool...,
    const TSubclassOf< UInterface >& I...
)

Enumerate the handle of every selected element, optionally filtering to elements that implement the given interface.

Public function Const

void

 

ForEachSelectedObject

(
    TFunctionRef< bool*)> ...,
    const UClass* InRequiredClass
)

Enumerate the selected objects from the currently selected elements.

Public function Const

void

 

ForEachSelectedObject

(
    TFunctionRef< bool(RequiredClassTyp...
)

Enumerate the selected objects from the currently selected elements.

Public function Const

TTypedElemen...

 

GetBottomSelectedElement

(
    TFunctionRef< bool...
)

Get the last element that implement the given interface and pass the predicate.

Public function Const

TTypedElemen...

 

GetBottomSelectedElement()

Get the last selected element implementing the given interface.

Public function Const

RequiredClas...

 

GetBottomSelectedObject()

Get the last selected object of the given type.

Public function Const

UObject *...

 

GetBottomSelectedObject

(
    const UClass* InRequiredClass
)

Get the last selected object of the given type.

Public function Const

FTypedElemen...

 

GetCurrentSelectionState()

Serializes the current selection set.

Public function Const

FTypedElemen...

 

GetElementList()

Get the underlying element list holding the selection state.

Public function Const

FTypedElemen...

 

GetNormalizedElementList

(
    FTypedElementListConstRef InElement...,
    const FTypedElementSelectionNormali...
)

Get a normalized version of the given element list that can be used to perform operations like gizmo manipulation, deletion, copying, etc.

Public function Const

void

 

GetNormalizedElementList

(
    FTypedElementListConstRef InElement...,
    const FTypedElementSelectionNormali...,
    FTypedElementListRef OutNormalizedE...
)

Get a normalized version of the given element list that can be used to perform operations like gizmo manipulation, deletion, copying, etc.

Public function Const

void

 

GetNormalizedSelection

(
    const FTypedElementSelectionNormali...,
    FTypedElementListRef OutNormalizedE...
)

Get a normalized version of this selection set that can be used to perform operations like gizmo manipulation, deletion, copying, etc.

Public function Const

FTypedElemen...

 

GetNormalizedSelection

(
    const FTypedElementSelectionNormali...
)

Get a normalized version of this selection set that can be used to perform operations like gizmo manipulation, deletion, copying, etc.

Public function Const

int32

 

GetNumSelectedElements()

Get the number of selected elements.

Public function

FTypedElemen...

 

GetScopedClearNewPendingChange()

Get a scoped object that when destroyed it clear a pending change notification without emitting the notification if it happened during its lifecycle.

Public function Const

void

 

GetSelectedElementHandles

(
    TArray< FTypedElementHandle, ArrayA...,
    const TSubclassOf< UInterface >& I...
)

Get the handle of every selected element, optionally filtering to elements that implement the given interface.

Public function Const

TArray< FTyp...

 

GetSelectedElementHandles

(
    const TSubclassOf< UInterface > InB...
)

Get the handle of every selected element, optionally filtering to elements that implement the given interface.

Public function Const

TArray< UObj...

 

GetSelectedObjects

(
    const UClass* InRequiredClass
)

Get the array of selected objects from the currently selected elements.

Public function Const

TArray< Requ...

 

GetSelectedObjects()

Get the array of selected objects from the currently selected elements.

Public function Const

FTypedElemen...

 

GetSelectionElement

(
    const FTypedElementHandle& InEleme...,
    const ETypedElementSelectionMethod ...
)

Given an element, return the element that should actually perform a selection operation.

Public function Const

TTypedElemen...

 

GetTopSelectedElement()

Get the first selected element implementing the given interface.

Public function Const

TTypedElemen...

 

GetTopSelectedElement

(
    TFunctionRef< bool...
)

Get the first element that implement the given interface and pass the predicate A function that should return true when the element is desirable

Public function Const

RequiredClas...

 

GetTopSelectedObject()

Get the first selected object of the given type.

Public function Const

UObject *...

 

GetTopSelectedObject

(
    const UClass* InRequiredClass
)

Get the first selected object of the given type.

Public function Const

bool

 

HasSelectedElements

(
    const TSubclassOf< UInterface > InB...
)

Test whether there selected elements, optionally filtering to elements that implement the given interface.

Public function Const

bool

 

HasSelectedObjects()

Test whether there are any selected objects.

Public function Const

bool

 

HasSelectedObjects

(
    const UClass* InRequiredClass
)

Test whether there are any selected objects.

Public function Const

bool

 

IsElementSelected

(
    const FTypedElementHandle& InEleme...,
    const FTypedElementIsSelectedOption...
)

Test to see whether the given element is currently considered selected.

Public function

FTypedElemen...

 

Legacy_GetElementListSync()

Access the interface to allow external systems (such as USelection) to receive immediate sync notifications as the underlying element list is changed.

Public function

FTypedElemen...

 

Legacy_GetElementListSyncPtr()

Access the interface to allow external systems (such as USelection) to receive immediate sync notifications as the underlying element list is changed.

Public function

void

 

NotifyPendingChanges()

Invoke the delegate called whenever the underlying element list has been changed.

Public function

FOnChanged &

 

OnChanged()

Public function

FOnPreChange...

 

OnPreChange()

Public function

void

 

RestoreSelectionState

(
    const FTypedElementSelectionSetStat...
)

Restores the selection set from the given state.

Public function

bool

 

SelectElement

(
    const FTypedElementHandle& InEleme...,
    const FTypedElementSelectionOptions...
)

Attempt to select the given element.

Public function

bool

 

SelectElements

(
    const TArray< FTypedElementHandle >...,
    const FTypedElementSelectionOptions...
)

Attempt to select the given elements.

Public function

bool

 

SelectElements

(
    TArrayView< const FTypedElementHand...,
    const FTypedElementSelectionOptions...
)

Attempt to select the given elements.

Public function

bool

 

SelectElements

(
    FTypedElementListConstRef InElement...,
    const FTypedElementSelectionOptions...
)

Attempt to select the given elements.

Public function

bool

 

SetSelection

(
    const TArray< FTypedElementHandle >...,
    const FTypedElementSelectionOptions...
)

Attempt to make the selection the given elements.

Public function

bool

 

SetSelection

(
    FTypedElementListConstRef InElement...,
    const FTypedElementSelectionOptions...
)

Attempt to make the selection the given elements.

Public function

bool

 

SetSelection

(
    TArrayView< const FTypedElementHand...,
    const FTypedElementSelectionOptions...
)

Attempt to make the selection the given elements.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

That the object will be modified.

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PreEditUndo()

Called before applying a transaction to the object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Name

Description

Public class

FOnChanged

Access the delegate that is invoked whenever the underlying element list has been changed.

Public class

FOnChangeDynamic

Public class

FOnPreChange

Access the delegate that is invoked whenever the underlying element list is potentially about to change.

Public class

FOnPreChangeDynamic