UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateAttributeDescriptor.h File Reference
#include "Containers/Array.h"
#include "Containers/ContainerAllocationPolicies.h"
#include "CoreMinimal.h"
#include "Delegates/Delegate.h"
#include "HAL/Platform.h"
#include "Misc/AssertionMacros.h"
#include "Misc/Attribute.h"
#include "Templates/UnrealTemplate.h"
#include "UObject/NameTypes.h"
#include "Widgets/InvalidateWidgetReason.h"
#include "Templates/Identity.h"
#include <type_traits>

Go to the source code of this file.

Classes

class  FSlateAttributeDescriptor
 
struct  FSlateAttributeDescriptor::FInvalidateWidgetReasonAttribute
 
struct  FSlateAttributeDescriptor::FContainer
 
struct  FSlateAttributeDescriptor::FAttribute
 
struct  FSlateAttributeDescriptor::FContainerInitializer
 
struct  FSlateAttributeDescriptor::FContainerInitializer::FAttributeEntry
 
struct  FSlateAttributeDescriptor::FInitializer
 
struct  FSlateAttributeDescriptor::FInitializer::FAttributeEntry
 

Namespaces

namespace  SlateAttributePrivate
 

Macros

#define SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME(_Initializer, _Name, _Property, _Reason)
 
#define SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION(_Initializer, _Property, _Reason)    SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME(_Initializer, GET_MEMBER_NAME_CHECKED(PrivateThisType, _Property), _Property, _Reason)
 
#define SLATE_ADD_PANELCHILDREN_DEFINITION_WITH_NAME(_Initializer, _Name, _Container)    _Initializer.AddContainer(_Name, STRUCT_OFFSET(PrivateThisType, _Container))
 
#define SLATE_ADD_PANELCHILDREN_DEFINITION(_Initializer, _Container)    SLATE_ADD_PANELCHILDREN_DEFINITION_WITH_NAME(_Initializer, GET_MEMBER_NAME_CHECKED(PrivateThisType, _Container), _Container)
 
#define SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION_WITH_NAME(_SlotType, _Initializer, _Name, _Property, _Reason)
 
#define SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION(_SlotType, _Initializer, _Property, _Reason)    SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION_WITH_NAME(_SlotType, _Initializer, GET_MEMBER_NAME_CHECKED(_SlotType, _Property), _Property, _Reason)
 

Typedefs

using FSlateAttributeInitializer = FSlateAttributeDescriptor::FInitializer
 
using FSlateWidgetSlotAttributeInitializer = FSlateAttributeDescriptor::FContainerInitializer
 

Macro Definition Documentation

◆ SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION

◆ SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME

#define SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME (   _Initializer,
  _Name,
  _Property,
  _Reason 
)
Value:
static_assert(decltype(_Property)::AttributeType == SlateAttributePrivate::ESlateAttributeType::Member, "The SlateProperty is not a TSlateAttribute. Do not use SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION"); \
static_assert(!decltype(_Property)::HasDefinedInvalidationReason, "When implementing the SLATE_DECLARE_WIDGET pattern, use TSlateAttribute without the invalidation reason."); \
static_assert(!std::is_same<decltype(_Reason), EInvalidateWidgetReason>::value || FSlateAttributeBase::IsInvalidateWidgetReasonSupported(_Reason), "The invalidation is not supported by the SlateAttribute system."); \
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EInvalidateWidgetReason
Definition InvalidateWidgetReason.h:14
#define STRUCT_OFFSET(struc, member)
Definition UnrealTemplate.h:218
static constexpr bool IsInvalidateWidgetReasonSupported(T Reason)
Definition SlateAttribute.h:188
Definition SlateAttributeDescriptor.h:40

Add a TSlateAttribute to the descriptor.

Parameters
_InitializerThe FSlateAttributeInitializer from the PrivateRegisterAttributes function.
_PropertyThe TSlateAttribute property
_ReasonThe EInvalidationWidgetReason or a static function/lambda that takes a const SWidget& and that returns the invalidation reason.

◆ SLATE_ADD_PANELCHILDREN_DEFINITION

#define SLATE_ADD_PANELCHILDREN_DEFINITION (   _Initializer,
  _Container 
)     SLATE_ADD_PANELCHILDREN_DEFINITION_WITH_NAME(_Initializer, GET_MEMBER_NAME_CHECKED(PrivateThisType, _Container), _Container)

◆ SLATE_ADD_PANELCHILDREN_DEFINITION_WITH_NAME

#define SLATE_ADD_PANELCHILDREN_DEFINITION_WITH_NAME (   _Initializer,
  _Name,
  _Container 
)     _Initializer.AddContainer(_Name, STRUCT_OFFSET(PrivateThisType, _Container))

◆ SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION

◆ SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION_WITH_NAME

#define SLATE_ADD_SLOT_ATTRIBUTE_DEFINITION_WITH_NAME (   _SlotType,
  _Initializer,
  _Name,
  _Property,
  _Reason 
)
Value:
static_assert(decltype(_Property)::AttributeType == SlateAttributePrivate::ESlateAttributeType::Contained, "The SlateProperty is not a TSlateAttribute. Do not use SLATE_ADD_CONTAINED_ATTRIBUTE_DEFINITION"); \
static_assert(!decltype(_Property)::HasDefinedInvalidationReason, "When implementing the SLATE_DECLARE_WIDGET pattern, use TSlateSlotAttribute without the invalidation reason."); \
static_assert(!std::is_same<decltype(_Reason), EInvalidateWidgetReason>::value || FSlateAttributeBase::IsInvalidateWidgetReasonSupported(_Reason), "The invalidation is not supported by the SlateAttribute system."); \
\
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
Definition SlateAttributeDefinition.inl:43

Typedef Documentation

◆ FSlateAttributeInitializer

◆ FSlateWidgetSlotAttributeInitializer