5#include "Containers/Array.h"
27#include "TypedElementSelectionSet.generated.h"
52 UPROPERTY(BlueprintReadWrite, Category=
"TypedElementInterfaces|Selection|NormalizationOptions", meta=(AllowPrivateAccess=
true))
56 bool bFollowAttachment =
false;
58 FName TEDSIntegrationSelectionSetName =
FName();
102 inline explicit operator bool()
const
109 return ElementSelectionHandle.
IsSet()
111 && SelectionCustomization;
143 : CreatedFromSelectionSet(
InOther.CreatedFromSelectionSet)
145 TransactedElements.Reserve(
InOther.TransactedElements.Num());
156 CreatedFromSelectionSet =
InOther.CreatedFromSelectionSet;
158 TransactedElements.
Reset(
InOther.TransactedElements.Num());
242 UFUNCTION(BlueprintCallable, Category=
"TypedElementFramework|Selection")
286 UFUNCTION(BlueprintPure, Category=
"TypedElementFramework|Selection")
287 int32 GetNumSelectedElements()
const
289 return ElementList->Num();
295 UFUNCTION(BlueprintCallable, BlueprintPure=
false, Category=
"TypedElementFramework|Selection")
304 UFUNCTION(BlueprintCallable, BlueprintPure=
false, Category=
"TypedElementFramework|Selection")
321 template <
typename ArrayAllocator>
340 template <
typename BaseInterfaceType>
349 template <
typename BaseInterfaceType>
359 template <
typename BaseInterfaceType>
368 template <
typename BaseInterfaceType>
378 template <
typename BaseInterfaceType>
387 UFUNCTION(BlueprintCallable, BlueprintPure=
false, Category=
"TypedElementFramework|Selection")
396 template <
typename RequiredClassType>
399 return TypedElementListObjectUtil::HasObjects<RequiredClassType>(ElementList.ToSharedRef());
405 UFUNCTION(BlueprintCallable, BlueprintPure=
false, Category=
"TypedElementFramework|Selection")
414 template <
typename RequiredClassType>
417 return TypedElementListObjectUtil::CountObjects<RequiredClassType>(ElementList.ToSharedRef());
423 UFUNCTION(BlueprintCallable, BlueprintPure=
false, Category=
"TypedElementFramework|Selection")
432 template <
typename RequiredClassType>
435 return TypedElementListObjectUtil::GetObjects<RequiredClassType>(ElementList.ToSharedRef());
451 template <
typename RequiredClassType>
454 TypedElementListObjectUtil::ForEachObject<RequiredClassType>(ElementList.ToSharedRef(),
InCallback);
460 UFUNCTION(BlueprintPure, Category=
"TypedElementFramework|Selection")
469 template <
typename RequiredClassType>
472 return TypedElementListObjectUtil::GetTopObject<RequiredClassType>(ElementList.ToSharedRef());
478 UFUNCTION(BlueprintPure, Category=
"TypedElementFramework|Selection")
487 template <
typename RequiredClassType>
490 return TypedElementListObjectUtil::GetBottomObject<RequiredClassType>(ElementList.ToSharedRef());
500 return OnPreChangeDelegate;
510 return OnChangedDelegate;
518 ElementList->NotifyPendingChanges();
526 return ElementList->GetScopedClearNewPendingChange();
535 return ElementList->Legacy_GetSync();
544 return ElementList->Legacy_GetSyncPtr();
552 return ElementList.ToSharedRef();
561 UFUNCTION(BlueprintPure, Category =
"TypedElementFramework|Selection")
652 UPROPERTY(BlueprintAssignable, Category =
"TypedElementFramework|Selection")
697 bool bIsRestoringState =
false;
706 FName ListNameForTedsIntegration;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type, Param1Name)
Definition DelegateCombinations.h:53
return true
Definition ExternalRpcRegistry.cpp:601
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
ETypedElementSelectionMethod
Definition TypedElementSelectionInterface.h:25
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition Archive.h:1208
Definition NameTypes.h:617
Definition TypedElementSelectionSet.h:66
virtual bool IsElementSelected(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListConstRef InSelectionSet, const FTypedElementIsSelectedOptions &InSelectionOptions)
Definition TypedElementSelectionSet.h:71
virtual bool AllowSelectionModifiers(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListConstRef InSelectionSet)
Definition TypedElementSelectionSet.h:76
virtual FTypedElementHandle GetSelectionElement(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListConstRef InCurrentSelection, const ETypedElementSelectionMethod InSelectionMethod)
Definition TypedElementSelectionSet.h:77
virtual ~FTypedElementSelectionCustomization()=default
virtual TYPEDELEMENTRUNTIME_API void GetNormalizedElements(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListConstRef InSelectionSet, const FTypedElementSelectionNormalizationOptions &InNormalizationOptions, FTypedElementListRef OutNormalizedElements)
Definition TypedElementSelectionSet.cpp:20
virtual bool CanDeselectElement(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, const FTypedElementSelectionOptions &InSelectionOptions)
Definition TypedElementSelectionSet.h:73
virtual bool DeselectElement(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListRef InSelectionSet, const FTypedElementSelectionOptions &InSelectionOptions)
Definition TypedElementSelectionSet.h:75
virtual bool CanSelectElement(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, const FTypedElementSelectionOptions &InSelectionOptions)
Definition TypedElementSelectionSet.h:72
virtual bool SelectElement(const TTypedElement< ITypedElementSelectionInterface > &InElementSelectionHandle, FTypedElementListRef InSelectionSet, const FTypedElementSelectionOptions &InSelectionOptions)
Definition TypedElementSelectionSet.h:74
Definition TypedElementSelectionInterface.h:115
Definition ArrayView.h:139
Definition AssetRegistryState.h:50
TSharedRef< ObjectType, Mode > ToSharedRef() const &
Definition SharedPointer.h:1028
Definition SharedPointer.h:153
Definition SubclassOf.h:30
Definition TypedElementInterfaceCustomization.h:40
Definition TypedElementList.h:589
Definition TypedElementList.h:62
Definition UniquePtr.h:107
Definition TypedElementFramework.Build.cs:8
Definition Interface.h:19
Definition TypedElementSelectionSet.h:180
RequiredClassType * GetBottomSelectedObject() const
Definition TypedElementSelectionSet.h:488
FTypedElementList::FScopedClearNewPendingChange GetScopedClearNewPendingChange()
Definition TypedElementSelectionSet.h:524
void ForEachSelectedObject(TFunctionRef< bool(UObject *)> InCallback, const UClass *InRequiredClass=nullptr) const
Definition TypedElementSelectionSet.h:442
FOnPreChange & OnPreChange()
Definition TypedElementSelectionSet.h:498
DECLARE_EVENT_OneParam(UTypedElementSelectionSet, FOnPreChange, const UTypedElementSelectionSet *)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnPreChangeDynamic, const UTypedElementSelectionSet *, SelectionSet)
TTypedElement< BaseInterfaceType > GetTopSelectedElement() const
Definition TypedElementSelectionSet.h:350
TArray< RequiredClassType * > GetSelectedObjects() const
Definition TypedElementSelectionSet.h:433
FTypedElementList::FLegacySync * Legacy_GetElementListSyncPtr()
Definition TypedElementSelectionSet.h:542
DECLARE_EVENT_OneParam(UTypedElementSelectionSet, FOnChanged, const UTypedElementSelectionSet *)
TArray< FTypedElementHandle > GetSelectedElementHandles(const TSubclassOf< UInterface > InBaseInterfaceType={}) const
Definition TypedElementSelectionSet.h:313
bool HasSelectedObjects() const
Definition TypedElementSelectionSet.h:397
void NotifyPendingChanges()
Definition TypedElementSelectionSet.h:516
TTypedElement< BaseInterfaceType > GetBottomSelectedElement() const
Definition TypedElementSelectionSet.h:369
FTypedElementList::FLegacySync & Legacy_GetElementListSync()
Definition TypedElementSelectionSet.h:533
int32 CountSelectedObjects() const
Definition TypedElementSelectionSet.h:415
FOnChanged & OnChanged()
Definition TypedElementSelectionSet.h:508
TTypedElement< BaseInterfaceType > GetTopSelectedElement(TFunctionRef< bool(const TTypedElement< BaseInterfaceType > &)> Predicate) const
Definition TypedElementSelectionSet.h:360
RequiredClassType * GetTopSelectedObject() const
Definition TypedElementSelectionSet.h:470
void GetSelectedElementHandles(TArray< FTypedElementHandle, ArrayAllocator > &OutArray, const TSubclassOf< UInterface > &InBaseInterfaceType={}) const
Definition TypedElementSelectionSet.h:322
FTypedElementListConstRef GetElementList() const
Definition TypedElementSelectionSet.h:550
void ForEachSelectedObject(TFunctionRef< bool(RequiredClassType *)> InCallback) const
Definition TypedElementSelectionSet.h:452
void ForEachSelectedElementHandle(TFunctionRef< bool(const FTypedElementHandle &)> InCallback, const TSubclassOf< UInterface > &InBaseInterfaceType={}) const
Definition TypedElementSelectionSet.h:331
void ForEachSelectedElement(TFunctionRef< bool(const TTypedElement< BaseInterfaceType > &)> InCallback) const
Definition TypedElementSelectionSet.h:341
TTypedElement< BaseInterfaceType > GetBottomSelectedElement(TFunctionRef< bool(const TTypedElement< BaseInterfaceType > &)> Predicate) const
Definition TypedElementSelectionSet.h:379
UObject * GetBottomObject(FTypedElementListConstRef InElementList, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:85
int32 CountObjects(FTypedElementListConstRef InElementList, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:30
void ForEachObject(FTypedElementListConstRef InElementList, TFunctionRef< bool(UObject *)> InCallback, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:43
TArray< UObject * > GetObjects(FTypedElementListConstRef InElementList, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:55
bool HasObjects(FTypedElementListConstRef InElementList, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:17
UObject * GetTopObject(FTypedElementListConstRef InElementList, const UClass *InRequiredClass)
Definition TypedElementListObjectUtil.cpp:69
@ false
Definition radaudio_common.h:23
Definition TypedElementHandle.h:625
Definition TypedElementHandle.h:18
Definition TypedElementSelectionInterface.h:47
Definition TypedElementSelectionSet.h:37
FName GetNameForTEDSIntegration() const
Definition TypedElementSelectionSet.h:49
FTypedElementSelectionNormalizationOptions & SetFollowAttachment(const bool InFollowAttachment)
Definition TypedElementSelectionSet.h:44
FTypedElementSelectionNormalizationOptions & SetNameForTEDSIntegration(const FName &InTEDSIntegrationSelectionSetName)
Definition TypedElementSelectionSet.h:48
bool ExpandGroups() const
Definition TypedElementSelectionSet.h:42
bool FollowAttachment() const
Definition TypedElementSelectionSet.h:45
FTypedElementSelectionNormalizationOptions & SetExpandGroups(const bool InExpandGroups)
Definition TypedElementSelectionSet.h:41
Definition TypedElementSelectionInterface.h:67
Definition TypedElementSelectionSet.h:85
FTypedElementHandle GetSelectionElement(const ETypedElementSelectionMethod InSelectionMethod) const
Definition TypedElementSelectionSet.h:121
FTypedElementSelectionSetElement(FTypedElementSelectionSetElement &&)=default
bool CanSelectElement(const FTypedElementSelectionOptions &InSelectionOptions) const
Definition TypedElementSelectionSet.h:116
FTypedElementSelectionSetElement()=default
bool AllowSelectionModifiers() const
Definition TypedElementSelectionSet.h:120
bool DeselectElement(const FTypedElementSelectionOptions &InSelectionOptions) const
Definition TypedElementSelectionSet.h:119
bool CanDeselectElement(const FTypedElementSelectionOptions &InSelectionOptions) const
Definition TypedElementSelectionSet.h:117
bool IsSet() const
Definition TypedElementSelectionSet.h:107
FTypedElementSelectionSetElement & operator=(const FTypedElementSelectionSetElement &)=default
FTypedElementSelectionSetElement(const FTypedElementSelectionSetElement &)=default
bool IsElementSelected(const FTypedElementIsSelectedOptions &InSelectionOptions) const
Definition TypedElementSelectionSet.h:115
FTypedElementSelectionSetElement & operator=(FTypedElementSelectionSetElement &&)=default
void GetNormalizedElements(const FTypedElementSelectionNormalizationOptions &InNormalizationOptions, FTypedElementListRef OutNormalizedElements) const
Definition TypedElementSelectionSet.h:122
bool SelectElement(const FTypedElementSelectionOptions &InSelectionOptions) const
Definition TypedElementSelectionSet.h:118
FTypedElementSelectionSetElement(TTypedElement< ITypedElementSelectionInterface > InElementSelectionHandle, FTypedElementListPtr InElementList, FTypedElementSelectionCustomization *InSelectionCustomization)
Definition TypedElementSelectionSet.h:89
Definition TypedElementSelectionSet.h:132
FTypedElementSelectionSetState & operator=(const FTypedElementSelectionSetState &InOther)
Definition TypedElementSelectionSet.h:152
bool IsSet() const
Definition TypedElementHandle.h:312
Definition TypedElementList.h:568
Definition TypedElementHandle.h:396
Definition WeakObjectPtrTemplates.h:25
FORCEINLINE void Reset()
Definition WeakObjectPtrTemplates.h:92