TSlateDecl

Utility class used during widget instantiation.

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Widgets/DeclarativeSyntaxSupport.h

Include

#include "Widgets/DeclarativeSyntaxSupport.h"

Syntax

template<class WidgetType, typename RequiredArgsPayloadType>
struct TSlateDecl

Remarks

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

Variables

Name Description

Public variable

RequiredArgsPay...

 

_RequiredArgs

Public variable

const TSharedRe...

 

_Widget

Constructors

Name Description

Public function

TSlateDecl

(
    const ANSICHAR* InType,
    const ANSICHAR* InFile,
    int32 OnLine,
    RequiredArgsPayloadType&& InRequir...
)

Functions

Name Description

Public function

TSlateDecl &

 

Expose

(
    TSharedPtr< ExposeAsWidgetType >& ...
)

Initialize OutVarToInit with the widget that is being constructed.

Public function

TSlateDecl &

 

Expose

(
    TSharedRef< ExposeAsWidgetType >& ...
)

Initialize OutVarToInit with the widget that is being constructed.

Public function

TSlateDecl &

 

Expose

(
    TWeakPtr< ExposeAsWidgetType >& Ou...
)

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

Operators

Name Description

Public function Const

TSharedRef< ...

 

operator<<=

(
    const typename WidgetType::FArgumen...
)

Complete widget construction from InArgs.

See Also

SNew

SAssignNew

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss