MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Slate::TSlots< Range, Transform, OnEmpty, SlotArguments > Struct Template Reference

#include <Slate.h>

Public Member Functions

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

Detailed Description

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

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"))
]
];
}
TSlots(const Range &range, Transform &&transform, TOptional< OnEmpty > &&onEmpty={})
Definition Slate.h:181

Definition at line 179 of file Slate.h.

Constructor & Destructor Documentation

◆ TSlots() [1/3]

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

Definition at line 181 of file Slate.h.

◆ TSlots() [2/3]

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

◆ TSlots() [3/3]

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

Definition at line 188 of file Slate.h.

Member Function Documentation

◆ Append()

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

Definition at line 207 of file Slate.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 196 of file Slate.h.


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