MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments > Struct Template Reference

Add multiple slots at the same time with the declarative syntax derived from an input data array. More...

#include <Slate.h>

Public Member Functions

 TSlots (Range const &range, Transform &&transform, TOptional< OnEmpty > &&onEmpty={})
 
 TSlots (Range &range, Transform &&transform, TOptional< OnEmpty > &&onEmpty={})
 
 TSlots (TSlots const &)=delete
 
 TSlots (TSlots &&o) noexcept
 
TSlotsoperator= (TSlots const &)=delete
 
TSlotsoperator= (TSlots &&o) noexcept
 
template<CWidgetArguments Arguments>
void Append (Arguments &args)
 

Friends

template<CWidgetArguments Arguments>
Arguments & operator+ (Arguments &args, TSlots &&slots)
 

Detailed Description

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
requires (TFunction_ArgCount<Transform> == 1)
struct Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >

Add multiple slots at the same time with the declarative syntax derived from an input data array.

void SMyWidget::Construct(const FArguments& args)
{
using namespace Mcro::Slate;
ChildSlot
[
SNew(SVerticalBox)
+ TSlots(args._DataArray, [](const FMyData& data)
{
FText dataText = FText::FromString(data.ToString());
return SVerticalBox::Slot()
. HAlign(HAlign_Fill)
. AutoHeight()
[
SNew(STextBlock)
. Text(dataText)
];
})
+ SVerticalBox::Slot()
. HAlign(HAlign_Fill)
. AutoHeight()
[
SNew(STextBlock)
. Text(INVTEXT_"Footer after the list of data")
]
];
}
#define INVTEXT_
A convenience alternative to Unreal's own INVTEXT macro but this one doesn't require parenthesis arou...
Definition TextMacros.h:190
Extra functionalities for general Slate programming chores, including enhancements of the Slate decla...
Definition Slate.h:23
TSlots(Range const &range, Transform &&transform, TOptional< OnEmpty > &&onEmpty={})
Definition Slate.h:196

Definition at line 194 of file Slate.h.

Constructor & Destructor Documentation

◆ TSlots() [1/4]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::TSlots ( Range const & range,
Transform && transform,
TOptional< OnEmpty > && onEmpty = {} )
inline

Definition at line 196 of file Slate.h.

◆ TSlots() [2/4]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::TSlots ( Range & range,
Transform && transform,
TOptional< OnEmpty > && onEmpty = {} )
inline

Definition at line 201 of file Slate.h.

◆ TSlots() [3/4]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::TSlots ( TSlots< Range, Transform, OnEmpty, CSlotArguments > const & )
delete

◆ TSlots() [4/4]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::TSlots ( TSlots< Range, Transform, OnEmpty, CSlotArguments > && o)
inlinenoexcept

Definition at line 208 of file Slate.h.

Member Function Documentation

◆ Append()

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
template<CWidgetArguments Arguments>
void Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::Append ( Arguments & args)
inline

Definition at line 227 of file Slate.h.

◆ operator=() [1/2]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
TSlots & Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::operator= ( TSlots< Range, Transform, OnEmpty, CSlotArguments > && o)
inlinenoexcept

Definition at line 216 of file Slate.h.

◆ operator=() [2/2]

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
TSlots & Mcro::Slate::TSlots< Range, Transform, OnEmpty, CSlotArguments >::operator= ( TSlots< Range, Transform, OnEmpty, CSlotArguments > const & )
delete

Friends And Related Symbol Documentation

◆ operator+

template<CRangeMember Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments = TFunction_Return<Transform>>
template<CWidgetArguments Arguments>
Arguments & operator+ ( Arguments & args,
TSlots< Range, Transform, OnEmpty, CSlotArguments > && slots )
friend

Definition at line 242 of file Slate.h.


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