UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FUICommandList Class Reference

#include <UICommandList.h>

+ Inheritance diagram for FUICommandList:

Public Member Functions

virtual ~FUICommandList ()
 
 DECLARE_DELEGATE_RetVal_OneParam (bool, FCanProduceActionForCommand, const TSharedRef< const FUICommandInfo > &)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, FCanExecuteAction CanExecuteAction, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, FCanExecuteAction CanExecuteAction, FIsActionChecked IsCheckedDelegate, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, FCanExecuteAction CanExecuteAction, FGetActionCheckState GetActionCheckState, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, FCanExecuteAction CanExecuteAction, FIsActionChecked IsCheckedDelegate, FIsActionButtonVisible IsVisibleDelegate, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, FExecuteAction ExecuteAction, FCanExecuteAction CanExecuteAction, FGetActionCheckState GetActionCheckState, FIsActionButtonVisible IsVisibleDelegate, EUIActionRepeatMode RepeatMode=EUIActionRepeatMode::RepeatDisabled)
 
virtual SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, const FUIAction &InUIAction)
 
virtual SLATE_API void MapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo, const FUIAction &InUIAction, const FUIActionContext &InUIActionContext)
 
SLATE_API void Append (const TSharedRef< FUICommandList > &InCommandsToAppend)
 
SLATE_API void UnmapAction (const TSharedPtr< const FUICommandInfo > InUICommandInfo)
 
SLATE_API bool IsActionMapped (const TSharedPtr< const FUICommandInfo > InUICommandInfo) const
 
virtual SLATE_API bool ExecuteAction (const TSharedRef< const FUICommandInfo > InUICommandInfo) const
 
SLATE_API bool CanExecuteAction (const TSharedRef< const FUICommandInfo > InUICommandInfo) const
 
SLATE_API bool TryExecuteAction (const TSharedRef< const FUICommandInfo > InUICommandInfo) const
 
SLATE_API EVisibility GetVisibility (const TSharedRef< const FUICommandInfo > InUICommandInfo) const
 
SLATE_API ECheckBoxState GetCheckState (const TSharedRef< const FUICommandInfo > InUICommandInfo) const
 
SLATE_API bool ProcessCommandBindings (const FKeyEvent &InKeyEvent) const
 
SLATE_API bool ProcessCommandBindings (const FPointerEvent &InMouseEvent) const
 
SLATE_API bool ProcessCommandBindings (const FKey Key, const FModifierKeysState &ModifierKeysState, const bool bRepeat) const
 
void SetCanProduceActionForCommand (const FCanProduceActionForCommand &NewCanProduceActionForCommand)
 
SLATE_API const FUIActionGetActionForCommand (TSharedPtr< const FUICommandInfo > Command) const
 
SLATE_API const FUIActionContextGetContextForCommand (TSharedPtr< const FUICommandInfo > Command) const
 
- Public Member Functions inherited from TSharedFromThis< FUICommandList >
TSharedRef< FUICommandList, Mode > AsShared ()
 
TSharedRef< FUICommandList const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FUICommandList, Mode > AsWeak ()
 
TWeakPtr< FUICommandList const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

SLATE_API bool ConditionalProcessCommandBindings (const FKey Key, bool bCtrl, bool bAlt, bool bShift, bool bCmd, bool bRepeat) const
 
SLATE_API const FUIActionGetActionForCommandRecursively (const TSharedRef< const FUICommandInfo > &Command, bool bIncludeChildren, bool bIncludeParents, TSet< TSharedRef< const FUICommandList > > &InOutVisitedLists) const
 
SLATE_API const FUIActionContextGetContextForCommandRecursively (const TSharedRef< const FUICommandInfo > &Command, bool bIncludeChildren, bool bIncludeParents, TSet< TSharedRef< const FUICommandList > > &InOutVisitedLists) const
 
SLATE_API void GatherContextsForList (TSet< FName > &OutAllContexts) const
 
SLATE_API void GatherContextsForListRecursively (TSet< FName > &OutAllContexts, TSet< TSharedRef< const FUICommandList > > &InOutVisitedLists) const
 
- Protected Member Functions inherited from TSharedFromThis< FUICommandList >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Friends

struct RecursiveCommandDataGetter
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FUICommandList >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Constructor & Destructor Documentation

◆ ~FUICommandList()

virtual FUICommandList::~FUICommandList ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ Append()

void FUICommandList::Append ( const TSharedRef< FUICommandList > &  InCommandsToAppend)

Append commands in InCommandsToAppend to this command list.

◆ CanExecuteAction()

bool FUICommandList::CanExecuteAction ( const TSharedRef< const FUICommandInfo InUICommandInfo) const

Calls the CanExecuteAction associated with the provided command info to see if ExecuteAction can be called

Parameters
InUICommandInfoThe command info execute

◆ ConditionalProcessCommandBindings()

bool FUICommandList::ConditionalProcessCommandBindings ( const FKey  Key,
bool  bCtrl,
bool  bAlt,
bool  bShift,
bool  bCmd,
bool  bRepeat 
) const
protected

Helper function to execute delegate or exec command associated with a command (if valid)

Parameters
KeyThe current key that is pressed
bCtrlTrue if control is pressed
bAltTrue if alt is pressed
bShiftTrue if shift is pressed
bRepeatTrue if command is repeating (held)
Returns
True if a command was executed, False otherwise

◆ DECLARE_DELEGATE_RetVal_OneParam()

FUICommandList::DECLARE_DELEGATE_RetVal_OneParam ( bool  ,
FCanProduceActionForCommand  ,
const TSharedRef< const FUICommandInfo > &   
)

Determines if this UICommandList is capable of producing an action for the supplied command

◆ ExecuteAction()

bool FUICommandList::ExecuteAction ( const TSharedRef< const FUICommandInfo InUICommandInfo) const
virtual

Executes the action associated with the provided command info Note: It is assumed at this point that CanExecuteAction was already checked

Parameters
InUICommandInfoThe command info execute

◆ GatherContextsForList()

void FUICommandList::GatherContextsForList ( TSet< FName > &  OutAllContexts) const
protected

Returns all contexts associated with this list. This is a wrapper for GatherContextsForListRecursively

◆ GatherContextsForListRecursively()

void FUICommandList::GatherContextsForListRecursively ( TSet< FName > &  OutAllContexts,
TSet< TSharedRef< const FUICommandList > > &  InOutVisitedLists 
) const
protected

Returns all contexts associated with this list.

◆ GetActionForCommand()

const FUIAction * FUICommandList::GetActionForCommand ( TSharedPtr< const FUICommandInfo Command) const

Attempts to find an action for the specified command in the current UICommandList. This is a wrapper for GetActionForCommandRecursively.

Parameters
CommandThe UI command for which you are discovering an action

◆ GetActionForCommandRecursively()

const FUIAction * FUICommandList::GetActionForCommandRecursively ( const TSharedRef< const FUICommandInfo > &  Command,
bool  bIncludeChildren,
bool  bIncludeParents,
TSet< TSharedRef< const FUICommandList > > &  InOutVisitedLists 
) const
protected

Attempts to find an action for the specified command in the current UICommandList. If it is not found, the action for the specified command is discovered in the children recursively then the parents recursively.

Parameters
CommandThe UI command for which you are discovering an action
bIncludeChildrenIf true, children of this command list will be searched in the event that the action is not found
bIncludeParentsIf true, parents of this command list will be searched in the event that the action is not found
OutVisitedListsThe set of visited lists during recursion. This is used to prevent cycles.

◆ GetCheckState()

ECheckBoxState FUICommandList::GetCheckState ( const TSharedRef< const FUICommandInfo InUICommandInfo) const

Calls the GetCheckState delegate to see if the visualization of this command in a multibox should appear checked

Parameters
InUICommandInfoThe command info execute

◆ GetContextForCommand()

const FUIActionContext * FUICommandList::GetContextForCommand ( TSharedPtr< const FUICommandInfo Command) const

Attempts to find an context for the specified command in the current UICommandList. This is a wrapper for GetContextForCommandRecursively.

Parameters
CommandThe UI command for which you are discovering an action

◆ GetContextForCommandRecursively()

const FUIActionContext * FUICommandList::GetContextForCommandRecursively ( const TSharedRef< const FUICommandInfo > &  Command,
bool  bIncludeChildren,
bool  bIncludeParents,
TSet< TSharedRef< const FUICommandList > > &  InOutVisitedLists 
) const
protected

Attempts to find an context for the specified command in the current UICommandList. If it is not found, the context for the specified command is discovered in the children recursively then the parents recursively.

Parameters
CommandThe UI command for which you are discovering an action
bIncludeChildrenIf true, children of this command list will be searched in the event that the action is not found
bIncludeParentsIf true, parents of this command list will be searched in the event that the action is not found
OutVisitedListsThe set of visited lists during recursion. This is used to prevent cycles.

◆ GetVisibility()

EVisibility FUICommandList::GetVisibility ( const TSharedRef< const FUICommandInfo InUICommandInfo) const

Calls the IsVisible delegate associated with the provided command info to see if the command should be visible in a toolbar

Parameters
InUICommandInfoThe command info execute

◆ IsActionMapped()

bool FUICommandList::IsActionMapped ( const TSharedPtr< const FUICommandInfo InUICommandInfo) const

Checks if an action is already mapped

Returns
True if an action is already mapped or false otherwise

◆ MapAction() [1/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
const FUIAction InUIAction 
)
virtual

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
InUIActionAction to map to this command

◆ MapAction() [2/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
const FUIAction InUIAction,
const FUIActionContext InUIActionContext 
)
virtual

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input Additionally, add a container of context objects to also associate with this command

Parameters
InUICommandInfoThe command info to map
InUIActionAction to map to this command
InUIActionContextAction context to map to this command

◆ MapAction() [3/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ MapAction() [4/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
FCanExecuteAction  CanExecuteAction,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
CanExecuteActionThe delegate to call to see if the command can be executed
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ MapAction() [5/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
FCanExecuteAction  CanExecuteAction,
FGetActionCheckState  GetActionCheckState,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
CanExecuteActionThe delegate to call to see if the command can be executed
GetActionCheckStateThe delegate to call to see what the check state of the action should be when visualized in a multibox
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ MapAction() [6/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
FCanExecuteAction  CanExecuteAction,
FGetActionCheckState  GetActionCheckState,
FIsActionButtonVisible  IsVisibleDelegate,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
CanExecuteActionThe delegate to call to see if the command can be executed
GetActionCheckStateThe delegate to call to see what the check state of the action should be when visualized in a multibox
IsVisibleDelegateThe delegate to call to see if the command should appear or be hidden when visualized in a multibox
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ MapAction() [7/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
FCanExecuteAction  CanExecuteAction,
FIsActionChecked  IsCheckedDelegate,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
CanExecuteActionThe delegate to call to see if the command can be executed
IsCheckedDelegateThe delegate to call to see if the command should appear checked when visualized in a multibox
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ MapAction() [8/8]

void FUICommandList::MapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo,
FExecuteAction  ExecuteAction,
FCanExecuteAction  CanExecuteAction,
FIsActionChecked  IsCheckedDelegate,
FIsActionButtonVisible  IsVisibleDelegate,
EUIActionRepeatMode  RepeatMode = EUIActionRepeatMode::RepeatDisabled 
)

Maps a command info to a series of delegates that are executed by a multibox or mouse/keyboard input

Parameters
InUICommandInfoThe command info to map
ExecuteActionThe delegate to call when the command should be executed
CanExecuteActionThe delegate to call to see if the command can be executed
IsCheckedDelegateThe delegate to call to see if the command should appear checked when visualized in a multibox
IsVisibleDelegateThe delegate to call to see if the command should appear or be hidden when visualized in a multibox
RepeatModeCan this action can be repeated if the chord used to call it is held down?

◆ ProcessCommandBindings() [1/3]

bool FUICommandList::ProcessCommandBindings ( const FKey  Key,
const FModifierKeysState ModifierKeysState,
const bool  bRepeat 
) const

Processes any UI commands which are activated by the specified key, modifier keys state and input event

Parameters
KeyThe current key that is pressed
ModifierKeysStatePressed state of keys that are commonly used as modifiers
bRepeatTrue if input is repeating (held)
Returns
true if an action was processed

◆ ProcessCommandBindings() [2/3]

bool FUICommandList::ProcessCommandBindings ( const FKeyEvent InKeyEvent) const

Processes any UI commands which are activated by the specified key event

Parameters
InKeyEventThe key event to check
Returns
true if an action was processed

◆ ProcessCommandBindings() [3/3]

bool FUICommandList::ProcessCommandBindings ( const FPointerEvent InMouseEvent) const

Processes any UI commands which are activated by the specified mouse event

Parameters
InKeyEventThe mouse event to check
Returns
true if an action was processed

◆ SetCanProduceActionForCommand()

void FUICommandList::SetCanProduceActionForCommand ( const FCanProduceActionForCommand NewCanProduceActionForCommand)
inline

Sets the delegate that determines if this UICommandList is capable of producing an action for the supplied command

◆ TryExecuteAction()

bool FUICommandList::TryExecuteAction ( const TSharedRef< const FUICommandInfo InUICommandInfo) const

Attempts to execute the action associated with the provided command info Note: This will check if the action can be executed before finally executing the action

Parameters
InUICommandInfoThe command info execute

◆ UnmapAction()

void FUICommandList::UnmapAction ( const TSharedPtr< const FUICommandInfo InUICommandInfo)

Unmaps a command info that was previously mapped

Parameters
InUICommandInfoThe command info to unmap

Friends And Related Symbol Documentation

◆ RecursiveCommandDataGetter

friend struct RecursiveCommandDataGetter
friend

Helper struct for list recursion


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