Navigation
API > API/Editor > API/Editor/SequencerCore > API/Editor/SequencerCore/MVVM > API/Editor/SequencerCore/MVVM/Selection
Inheritance Hierarchy
- FSelectionBase
- TSelectionSetBase
- FMarkedFrameSelection
- FOutlinerSelection
- FTrackAreaSelection
References
| Module | SequencerCore |
| Header | /Engine/Source/Editor/SequencerCore/Public/MVVM/Selection/SequencerCoreSelectionIterators.h |
| Include | #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
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSet< KeyType > | SelectionSet |
Functions
| Type | Name | Description | |
|---|---|---|---|
| TSelectionSetIteratorState< KeyType > | begin () |
Ranged-for iteration support. Do not use directly | |
| void | Deselect
(
KeyType InKey |
Deselect an item | |
| void | Empty () |
Empty this selection | |
| TSelectionSetIteratorState< KeyType > | end () |
||
| const TSet< KeyType > & | GetSelected () |
Returns the underlying selection set (including potentially invalid items) | |
| bool | IsSelected
(
KeyType InKey |
Check whether a given item is currently selected | |
| int32 | Num () |
Returns the number of selected items (including potentially invalid items) | |
| void | OnDeselectItem
(
const KeyType& |
||
| bool | OnSelectItem
(
const KeyType& |
Fallback functions for use when derived classes do not implement them. | |
| void | RemoveByPredicate
(
Filter&& InFilter |
* Remove all selected items that pass the specified filter | |
| void | ReplaceWith
(
TSelectionSetBase< MixinType, KeyType >&& OtherSelection |
Replace this selection set with the contents from another | |
| void | Select
(
KeyType InKey, |
Select a key, optionally supplying a boolean to receieve a value indicating whether it was already selected or not | |
| 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 |
Overridden from FSelectionBase
| Type | Name | Description | |
|---|---|---|---|
| void | EmptyImpl () |
Abstract function for emptying this selection |