MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Mcro::Slate::TAttributeBlockFunctor< T > Struct Template Reference

An attribute block functor which takes in reference of FArguments or FSlotArguments and returns the same reference but presumably setting some Slate attributes before that. This is useful for modularizing the Slate declarative syntax. More...

#include <Slate.h>

Public Types

using Function = TFunction<T&(T&)>
 

Public Member Functions

template<CConvertibleToDecayed< Function > Arg>
 TAttributeBlockFunctor (Arg &&function)
 
T & operator() (T &args) const
 

Data Fields

Function Storage
 

Friends

T & operator/ (TIdentity_T< T > &&args, TAttributeBlockFunctor const &attributes)
 The "append attribute block" operator which allows pre-defined "blocks of slate attributes" naturally fit inside the Slate declarative syntax. Traditionally repeated structures in Slate were expressed as either explicit mutations on widgets after they were created or as entirely separate compound widgets. Either way breaks the flow of the declarative syntax and makes using Slate sometimes pretty clunky. This operator aims to make widget composition more comfortable.
 
T & operator/ (T &args, TAttributeBlockFunctor const &attributes)
 The "append attribute block" operator which allows pre-defined "blocks of slate attributes" naturally fit inside the Slate declarative syntax. Traditionally repeated structures in Slate were expressed as either explicit mutations on widgets after they were created or as entirely separate compound widgets. Either way breaks the flow of the declarative syntax and makes using Slate sometimes pretty clunky. This operator aims to make widget composition more comfortable.
 

Detailed Description

template<CWidgetOrSlotArguments T>
struct Mcro::Slate::TAttributeBlockFunctor< T >

An attribute block functor which takes in reference of FArguments or FSlotArguments and returns the same reference but presumably setting some Slate attributes before that. This is useful for modularizing the Slate declarative syntax.

Use TAttributeBlock alias for your functions for better convenience

Definition at line 90 of file Slate.h.

Member Typedef Documentation

◆ Function

template<CWidgetOrSlotArguments T>
using Mcro::Slate::TAttributeBlockFunctor< T >::Function = TFunction<T&(T&)>

Definition at line 92 of file Slate.h.

Constructor & Destructor Documentation

◆ TAttributeBlockFunctor()

template<CWidgetOrSlotArguments T>
template<CConvertibleToDecayed< Function > Arg>
Mcro::Slate::TAttributeBlockFunctor< T >::TAttributeBlockFunctor ( Arg && function)
inline

Definition at line 95 of file Slate.h.

Member Function Documentation

◆ operator()()

template<CWidgetOrSlotArguments T>
T & Mcro::Slate::TAttributeBlockFunctor< T >::operator() ( T & args) const
inline

Definition at line 99 of file Slate.h.

Friends And Related Symbol Documentation

◆ operator/ [1/2]

template<CWidgetOrSlotArguments T>
T & operator/ ( T & args,
TAttributeBlockFunctor< T > const & attributes )
friend

The "append attribute block" operator which allows pre-defined "blocks of slate attributes" naturally fit inside the Slate declarative syntax. Traditionally repeated structures in Slate were expressed as either explicit mutations on widgets after they were created or as entirely separate compound widgets. Either way breaks the flow of the declarative syntax and makes using Slate sometimes pretty clunky. This operator aims to make widget composition more comfortable.

Template Parameters
ArgumentsRight hand side FArguments or FSlotArguments
Parameters
argsl-value reference right hand side FArguments or FSlotArguments
attributesAn attribute block function
Returns
The same reference as args or a new slot if that has been added inside the attribute block

Definition at line 135 of file Slate.h.

◆ operator/ [2/2]

template<CWidgetOrSlotArguments T>
T & operator/ ( TIdentity_T< T > && args,
TAttributeBlockFunctor< T > const & attributes )
friend

The "append attribute block" operator which allows pre-defined "blocks of slate attributes" naturally fit inside the Slate declarative syntax. Traditionally repeated structures in Slate were expressed as either explicit mutations on widgets after they were created or as entirely separate compound widgets. Either way breaks the flow of the declarative syntax and makes using Slate sometimes pretty clunky. This operator aims to make widget composition more comfortable.

Template Parameters
ArgumentsRight hand side FArguments or FSlotArguments
Parameters
argsr-value reference right hand side FArguments or FSlotArguments
attributesAn attribute block function
Returns
The same reference as args or a new slot if that has been added inside the attribute block

Definition at line 117 of file Slate.h.

Field Documentation

◆ Storage

template<CWidgetOrSlotArguments T>
Function Mcro::Slate::TAttributeBlockFunctor< T >::Storage

Definition at line 97 of file Slate.h.


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