Navigation
API > API/Editor > API/Editor/SequencerCore
Typed selection set for keeping track of an externally provided key type KeyType is what is stored within the selection set (ie, an FObjectKey, TWeakPtr or int32) MixinType is the type of the derived class. This allows for compile-time injection of OnSelect/OnDeselect behavior without needing virtual function calls: bool OnSelectItem(const KeyType&){ return true; } void OnDeselectItem(const KeyType&){}
Example implementation: class FMySelection : TSelectionSetBase
Iteration is supported for all types (weak ptrs are skipped and iterated as shared pointers): class FMySelection : TSelectionSetBase
// Filtered iteration is also supported for TWeakViewModelPtr<> types:
for (TViewModelPtr
| Name | TSelectionSetBase |
| Type | class |
| Header File | /Engine/Source/Editor/SequencerCore/Public/MVVM/Selection/SequencerCoreSelectionIterators.h |
| Include Path | #include "MVVM/Selection/SequencerCoreSelectionIterators.h" |
| Source | /Engine/Source/Editor/SequencerCore/Public/MVVM/Selection/SequencerCoreSelectionTypes.h |
Syntax
template<typename MixinType, typename KeyType>
class TSelectionSetBase : public UE::Sequencer::FSelectionBase
Inheritance Hierarchy
- FSelectionBase → TSelectionSetBase
Derived Classes
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSelectionSetIteratorState< KeyType > begin() |
Ranged-for iteration support. Do not use directly | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void Deselect
(
KeyType InKey |
Deselect an item | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void Empty() |
Empty this selection | MVVM/Selection/SequencerCoreSelectionTypes.h | |
TSelectionSetIteratorState< KeyType > end() |
MVVM/Selection/SequencerCoreSelectionTypes.h | ||
const TSet< KeyType > & GetSelected() |
Returns the underlying selection set (including potentially invalid items) | MVVM/Selection/SequencerCoreSelectionTypes.h | |
bool IsSelected
(
KeyType InKey |
Check whether a given item is currently selected | MVVM/Selection/SequencerCoreSelectionTypes.h | |
int32 Num() |
Returns the number of selected items (including potentially invalid items) | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void RemoveByPredicate
(
Filter&& InFilter |
* Remove all selected items that pass the specified filter | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void ReplaceWith
(
TSelectionSetBase< MixinType, KeyType >&& OtherSelection |
Replace this selection set with the contents from another | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void Select
(
KeyType InKey, |
Select a key, optionally supplying a boolean to receieve a value indicating whether it was already selected or not | MVVM/Selection/SequencerCoreSelectionTypes.h | |
void SelectRange
(
RangeType Range, |
Selects a range of keys, optionally supplying a boolean to receieve a value indicating whether any were newly selected or not | MVVM/Selection/SequencerCoreSelectionTypes.h |
Protected
Overridden from FSelectionBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void EmptyImpl() |
Abstract function for emptying this selection | MVVM/Selection/SequencerCoreSelectionTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void OnDeselectItem
(
const KeyType& |
MVVM/Selection/SequencerCoreSelectionTypes.h | ||
static bool OnSelectItem
(
const KeyType& |
Fallback functions for use when derived classes do not implement them. | MVVM/Selection/SequencerCoreSelectionTypes.h |