MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base > Class Template Reference

A widget template which can automatically handle changes in an input map state, with given delegates which tell this widget how children are supposed to be created, updated and removed. More...

#include <ReactiveWidget.h>

Inheritance diagram for Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >:

Public Types

using FCreateChild = Base::FCreateChild
 
using FUpdateChild = Base::FUpdateChild
 
using FRemoveChild = Base::FRemoveChild
 

Public Member Functions

 SLATE_BEGIN_ARGS (TMapReactiveWidget)
 
 SLATE_ARGUMENT (IStatePtr< Base::StateRangeType >, State)
 
 SLATE_ARGUMENT (TSharedPtr< ContainerWidget >, Container)
 
 SLATE_EVENT (FCreateChild, CreateChild)
 
 SLATE_EVENT (FUpdateChild, UpdateChild)
 
 SLATE_EVENT (FRemoveChild, RemoveChild)
 
void Construct (FArguments const &args)
 

Protected Member Functions

virtual void OnStateChange (Base::StateRangeType const &next) override
 

Detailed Description

template<typename Key, typename Item, CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
class Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >

A widget template which can automatically handle changes in an input map state, with given delegates which tell this widget how children are supposed to be created, updated and removed.

Template Parameters
KeyThe key associated with items.
ItemThe type of the items which are transformed into child widgets.
ContainerWidgetThe panel which provides the slots for the child widgets.
ChildWidgetThe storage type of child widgets, it's fine to leave it SWidget

Definition at line 216 of file ReactiveWidget.h.

Member Typedef Documentation

◆ FCreateChild

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
using Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::FCreateChild = Base::FCreateChild

Definition at line 219 of file ReactiveWidget.h.

◆ FRemoveChild

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
using Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::FRemoveChild = Base::FRemoveChild

Definition at line 221 of file ReactiveWidget.h.

◆ FUpdateChild

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
using Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::FUpdateChild = Base::FUpdateChild

Definition at line 220 of file ReactiveWidget.h.

Member Function Documentation

◆ Construct()

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
void Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::Construct ( FArguments const & args)
inline

Definition at line 234 of file ReactiveWidget.h.

◆ OnStateChange()

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
virtual void Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::OnStateChange ( Base::StateRangeType const & next)
inlineoverrideprotectedvirtual

Definition at line 237 of file ReactiveWidget.h.

◆ SLATE_ARGUMENT() [1/2]

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_ARGUMENT ( IStatePtr< Base::StateRangeType > ,
State  )

◆ SLATE_ARGUMENT() [2/2]

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_ARGUMENT ( TSharedPtr< ContainerWidget > ,
Container  )

◆ SLATE_BEGIN_ARGS()

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_BEGIN_ARGS ( TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base > )
inline

Definition at line 223 of file ReactiveWidget.h.

◆ SLATE_EVENT() [1/3]

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_EVENT ( FCreateChild ,
CreateChild  )

◆ SLATE_EVENT() [2/3]

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_EVENT ( FRemoveChild ,
RemoveChild  )

◆ SLATE_EVENT() [3/3]

template<typename Key , typename Item , CWidget ContainerWidget = SWidget, CWidget ChildWidget = SWidget, typename Base = Detail::TReactiveWidgetBase< Item, TMap<Key, Item>, ContainerWidget, ChildWidget, TMap<Key, TSharedRef<ChildWidget>>, Key >>
Mcro::Slate::TMapReactiveWidget< Key, Item, ContainerWidget, ChildWidget, Base >::SLATE_EVENT ( FUpdateChild ,
UpdateChild  )

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