UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateAttributePrivate::TSlateAttributeBase< ContainerType, InObjectType, InInvalidationReasonPredicate, InComparePredicateType, InAttributeType > Struct Template Reference
+ Inheritance diagram for SlateAttributePrivate::TSlateAttributeBase< ContainerType, InObjectType, InInvalidationReasonPredicate, InComparePredicateType, InAttributeType >:

Public Types

using ObjectType = InObjectType
 
using FInvalidationReasonPredicate = InInvalidationReasonPredicate
 
using FGetter = typename TAttribute< ObjectType >::FGetter
 
using FComparePredicate = InComparePredicateType
 

Public Member Functions

 TSlateAttributeBase ()
 
 TSlateAttributeBase (const ObjectType &InValue)
 
 TSlateAttributeBase (ObjectType &&InValue)
 
 TSlateAttributeBase (SWidget &Widget)
 
 TSlateAttributeBase (SWidget &Widget, const ObjectType &InValue)
 
 TSlateAttributeBase (SWidget &Widget, ObjectType &&InValue)
 
 TSlateAttributeBase (SWidget &Widget, const FGetter &Getter, const ObjectType &InitialValue)
 
 TSlateAttributeBase (SWidget &Widget, const FGetter &Getter, ObjectType &&InitialValue)
 
 TSlateAttributeBase (SWidget &Widget, FGetter &&Getter, const ObjectType &InitialValue)
 
 TSlateAttributeBase (SWidget &Widget, FGetter &&Getter, ObjectType &&InitialValue)
 
 TSlateAttributeBase (SWidget &Widget, const TAttribute< ObjectType > &Attribute, const ObjectType &InitialValue)
 
 TSlateAttributeBase (SWidget &Widget, TAttribute< ObjectType > &&Attribute, ObjectType &&InitialValue)
 
const ObjectTypeGet () const
 
void UpdateNow (ContainerType &Widget)
 
bool Set (ContainerType &Widget, const ObjectType &NewValue)
 
bool Set (ContainerType &Widget, ObjectType &&NewValue)
 
void Bind (ContainerType &Widget, const FGetter &Getter)
 
void Bind (ContainerType &Widget, FGetter &&Getter)
 
template<typename WidgetType , typename U = typename std::enable_if<std::is_base_of<SWidget, WidgetType>::value && std::is_same<ContainerType, SWidget>::value>::type>
void Bind (WidgetType &Widget, typename FGetter::template TConstMethodPtr< WidgetType > MethodPtr)
 
bool Assign (ContainerType &Widget, const TAttribute< ObjectType > &OtherAttribute, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
bool Assign (ContainerType &Widget, TAttribute< ObjectType > &&OtherAttribute, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
bool Assign (ContainerType &Widget, const TAttribute< ObjectType > &OtherAttribute, const ObjectType &DefaultValue, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
bool Assign (ContainerType &Widget, TAttribute< ObjectType > &&OtherAttribute, const ObjectType &DefaultValue, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
bool Assign (ContainerType &Widget, const TAttribute< ObjectType > &OtherAttribute, ObjectType &&DefaultValue, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
bool Assign (ContainerType &Widget, TAttribute< ObjectType > &&OtherAttribute, ObjectType &&DefaultValue, ESlateAttributeBindAction Actions=UE_SLATE_WITH_ATTRIBUTE_DEFAULT_INITIALIZATION_ACTION)
 
void Unbind (ContainerType &Widget)
 
TAttribute< ObjectTypeToAttribute (const ContainerType &Widget) const
 
bool IsBound (const ContainerType &Widget) const
 
bool IdenticalTo (const ContainerType &Widget, const TSlateAttributeBase &Other) const
 
bool IdenticalTo (const ContainerType &Widget, const TAttribute< ObjectType > &Other) const
 

Static Public Member Functions

static EInvalidateWidgetReason GetInvalidationReason (const SWidget &Widget)
 
static EInvalidateWidgetReason GetInvalidationReason (const ISlateAttributeContainer &Container)
 
static bool IdenticalTo (const SWidget &Widget, const ObjectType &Lhs, const ObjectType &Rhs)
 
static bool IdenticalTo (const ISlateAttributeContainer &Container, const ObjectType &Lhs, const ObjectType &Rhs)
 
- Static Public Member Functions inherited from FSlateAttributeBase
template<typename T >
static constexpr bool IsInvalidateWidgetReasonSupported (T Reason)
 
static constexpr bool IsInvalidateWidgetReasonSupported (EInvalidateWidgetReason Reason)
 

Static Public Attributes

static const ESlateAttributeType AttributeType = InAttributeType
 
static constexpr bool HasDefinedInvalidationReason = !std::is_same<InInvalidationReasonPredicate, FSlateAttributeNoInvalidationReason>::value
 

Friends

template<typename AttributeMemberType >
struct TSlateMemberAttributeRef
 

Additional Inherited Members

- Protected Member Functions inherited from SlateAttributePrivate::FSlateAttributeImpl
SLATECORE_API void ProtectedUnregisterAttribute (SWidget &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API void ProtectedRegisterAttribute (SWidget &Widget, ESlateAttributeType AttributeType, TUniquePtr< ISlateAttributeGetter > &&Wrapper)
 
SLATECORE_API void ProtectedInvalidateWidget (SWidget &Widget, ESlateAttributeType AttributeType, EInvalidateWidgetReason InvalidationReason) const
 
SLATECORE_API bool ProtectedIsBound (const SWidget &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API ISlateAttributeGetterProtectedFindGetter (const SWidget &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API FDelegateHandle ProtectedFindGetterHandle (const SWidget &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API void ProtectedUpdateNow (SWidget &Widget, ESlateAttributeType AttributeType)
 
SLATECORE_API bool ProtectedIsWidgetInDestructionPath (SWidget *Widget) const
 
SLATECORE_API bool ProtectedIsImplemented (const SWidget &Widget) const
 
SLATECORE_API void ProtectedMoveAttribute (SWidget &Widget, ESlateAttributeType AttributeType, const FSlateAttributeBase *Other)
 
SLATECORE_API void ProtectedUnregisterAttribute (ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API void ProtectedRegisterAttribute (ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType, TUniquePtr< ISlateAttributeGetter > &&Wrapper)
 
SLATECORE_API void ProtectedInvalidateWidget (ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType, EInvalidateWidgetReason InvalidationReason) const
 
SLATECORE_API bool ProtectedIsBound (const ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API ISlateAttributeGetterProtectedFindGetter (const ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API FDelegateHandle ProtectedFindGetterHandle (const ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType) const
 
SLATECORE_API void ProtectedUpdateNow (ISlateAttributeContainer &Widget, ESlateAttributeType AttributeType)
 

Detailed Description

template<typename ContainerType, typename InObjectType, typename InInvalidationReasonPredicate, typename InComparePredicateType, ESlateAttributeType InAttributeType>
struct SlateAttributePrivate::TSlateAttributeBase< ContainerType, InObjectType, InInvalidationReasonPredicate, InComparePredicateType, InAttributeType >

Attribute object InObjectType - Type of the value to store InInvalidationReasonPredicate - Predicate that returns the type of invalidation to do when the value changes (e.g layout or paint) The invalidation can be overridden per widget. (This use memory allocation. See FSlateAttributeMetadata.) InComparePredicateType - Predicate to compare the cached value with the Getter. bInIsExternal - The attribute life is not controlled by the SWidget.

Member Typedef Documentation

◆ FComparePredicate

◆ FGetter

◆ FInvalidationReasonPredicate

◆ ObjectType

Constructor & Destructor Documentation

◆ TSlateAttributeBase() [1/12]

◆ TSlateAttributeBase() [2/12]

◆ TSlateAttributeBase() [3/12]

◆ TSlateAttributeBase() [4/12]

◆ TSlateAttributeBase() [5/12]

◆ TSlateAttributeBase() [6/12]

◆ TSlateAttributeBase() [7/12]

SlateAttributePrivate::TSlateAttributeBase< ContainerType, InObjectType, InInvalidationReasonPredicate, InComparePredicateType, InAttributeType >::TSlateAttributeBase ( SWidget Widget,
const FGetter Getter,
const ObjectType InitialValue 
)
inline

◆ TSlateAttributeBase() [8/12]

◆ TSlateAttributeBase() [9/12]

◆ TSlateAttributeBase() [10/12]

◆ TSlateAttributeBase() [11/12]

◆ TSlateAttributeBase() [12/12]

Member Function Documentation

◆ Assign() [1/6]

◆ Assign() [2/6]

Bind the SlateAttribute to the Attribute Getter function (if it exist). (If enabled) Update the value from the getter. If the value is different, then invalidate the widget. The SlateAttribute will now be updated every frame from the Getter. Or Set the SlateAttribute's value if the Attribute is not bound but is set. This will Unbind any previously bound getter. If the value is different, then invalidate the widget. Or Unbind the SlateAttribute if the Attribute is not bound and not set.

See also
Set
Returns
true if the getter was assigned or if the value is considered different and an invalidation occurred.

◆ Assign() [3/6]

◆ Assign() [4/6]

◆ Assign() [5/6]

◆ Assign() [6/6]

◆ Bind() [1/3]

Bind the SlateAttribute to the Getter function. (If enabled) Update the value from the Getter. If the value is different, then invalidate the widget. The SlateAttribute will now be updated every frame from the Getter.

◆ Bind() [2/3]

Bind the SlateAttribute to the Getter function. (If enabled) Update the value from the Getter. If the value is different, then invalidate the widget. The SlateAttribute will now be updated every frame from the Getter.

◆ Bind() [3/3]

template<typename WidgetType , typename U = typename std::enable_if<std::is_base_of<SWidget, WidgetType>::value && std::is_same<ContainerType, SWidget>::value>::type>
void SlateAttributePrivate::TSlateAttributeBase< ContainerType, InObjectType, InInvalidationReasonPredicate, InComparePredicateType, InAttributeType >::Bind ( WidgetType &  Widget,
typename FGetter::template TConstMethodPtr< WidgetType >  MethodPtr 
)
inline

Bind the SlateAttribute to the newly create getter function. (If enabled) Update the value from the getter. If the value is different, then invalidate the widget. The SlateAttribute will now be updated every frame from the Getter.

◆ Get()

Returns
the SlateAttribute cached value. If the SlateAttribute is bound, the value will be cached at the end of the every frame.

◆ GetInvalidationReason() [1/2]

◆ GetInvalidationReason() [2/2]

◆ IdenticalTo() [1/4]

Returns
True if they have the same Getter or, if the Attribute is set, the same value.

◆ IdenticalTo() [2/4]

Returns
True if they have the same Getter or the same value.

◆ IdenticalTo() [3/4]

◆ IdenticalTo() [4/4]

◆ IsBound()

Returns
True if the SlateAttribute is bound to a getter function.

◆ Set() [1/2]

Unbind the SlateAttribute and set its value. It may invalidate the Widget if the value is different.

Returns
true if the value is considered different and an invalidation occurred.

◆ Set() [2/2]

Unbind the SlateAttribute and set its value. It may invalidate the Widget if the value is different.

Returns
true if the value is considered different and an invalidation occurred.

◆ ToAttribute()

Build a Attribute from this SlateAttribute.

◆ Unbind()

Remove the Getter function. The Slate Attribute will not be updated anymore and will keep its current cached value.

◆ UpdateNow()

Update the cached value and invalidate the widget if needed.

Friends And Related Symbol Documentation

◆ TSlateMemberAttributeRef

Member Data Documentation

◆ AttributeType

◆ HasDefinedInvalidationReason


The documentation for this struct was generated from the following file: