UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TSlateDecl< WidgetType, RequiredArgsPayloadType > Struct Template Reference

#include <DeclarativeSyntaxSupport.h>

Public Member Functions

 TSlateDecl (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, RequiredArgsPayloadType &&InRequiredArgs)
 
template<class ExposeAsWidgetType >
TSlateDecl && Expose (TSharedPtr< ExposeAsWidgetType > &OutVarToInit) &&
 
template<class ExposeAsWidgetType >
TSlateDecl && Expose (TSharedRef< ExposeAsWidgetType > &OutVarToInit) &&
 
template<class ExposeAsWidgetType >
TSlateDecl && Expose (TWeakPtr< ExposeAsWidgetType > &OutVarToInit) &&
 
TSharedRef< WidgetType > operator<<= (const typename WidgetType::FArguments &InArgs) &&
 

Public Attributes

TSharedPtr< WidgetType > _Widget
 
RequiredArgsPayloadType_RequiredArgs
 

Detailed Description

template<class WidgetType, typename RequiredArgsPayloadType>
struct TSlateDecl< WidgetType, RequiredArgsPayloadType >

Utility class used during widget instantiation. Performs widget allocation and construction. Ensures that debug info is set correctly. Returns TSharedRef to widget.

See also
SNew
SAssignNew

Constructor & Destructor Documentation

◆ TSlateDecl()

template<class WidgetType , typename RequiredArgsPayloadType >
TSlateDecl< WidgetType, RequiredArgsPayloadType >::TSlateDecl ( const ANSICHAR InType,
const ANSICHAR InFile,
int32  OnLine,
RequiredArgsPayloadType &&  InRequiredArgs 
)
inline

SUserWidgets are allocated in the corresponding CPP file, so that the implementer can return an implementation that differs from the public interface.

See also
SUserWidgetExample

Normal widgets are allocated directly by the TSlateDecl.

Member Function Documentation

◆ Expose() [1/3]

template<class WidgetType , typename RequiredArgsPayloadType >
template<class ExposeAsWidgetType >
TSlateDecl && TSlateDecl< WidgetType, RequiredArgsPayloadType >::Expose ( TSharedPtr< ExposeAsWidgetType > &  OutVarToInit) &&
inline

Initialize OutVarToInit with the widget that is being constructed.

See also
SAssignNew

◆ Expose() [2/3]

template<class WidgetType , typename RequiredArgsPayloadType >
template<class ExposeAsWidgetType >
TSlateDecl && TSlateDecl< WidgetType, RequiredArgsPayloadType >::Expose ( TSharedRef< ExposeAsWidgetType > &  OutVarToInit) &&
inline

Initialize OutVarToInit with the widget that is being constructed.

See also
SAssignNew

◆ Expose() [3/3]

template<class WidgetType , typename RequiredArgsPayloadType >
template<class ExposeAsWidgetType >
TSlateDecl && TSlateDecl< WidgetType, RequiredArgsPayloadType >::Expose ( TWeakPtr< ExposeAsWidgetType > &  OutVarToInit) &&
inline

Initialize a WEAK OutVarToInit with the widget that is being constructed.

See also
SAssignNew

◆ operator<<=()

template<class WidgetType , typename RequiredArgsPayloadType >
TSharedRef< WidgetType > TSlateDecl< WidgetType, RequiredArgsPayloadType >::operator<<= ( const typename WidgetType::FArguments &  InArgs) &&
inline

Complete widget construction from InArgs.

Parameters
InArgsNamedArguments from which to construct the widget.
Returns
A reference to the widget that we constructed.

Member Data Documentation

◆ _RequiredArgs

template<class WidgetType , typename RequiredArgsPayloadType >
RequiredArgsPayloadType& TSlateDecl< WidgetType, RequiredArgsPayloadType >::_RequiredArgs

◆ _Widget

template<class WidgetType , typename RequiredArgsPayloadType >
TSharedPtr<WidgetType> TSlateDecl< WidgetType, RequiredArgsPayloadType >::_Widget

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