TCommands

A base class for a set of commands.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Commands/Commands.h

Include

#include "Framework/Commands/Commands.h"

Syntax

template<typename CommandContextType>
class TCommands : public FBindingContext

Remarks

A base class for a set of commands. Inherit from it to make a set of commands. See MainFrameActions for an example.

Constructors

Name Description

Protected function

TCommands

(
    const FName InContextName,
    const FText& InContextDesc,
    const FName InContextParent,
    const FName InStyleSetName
)

Construct a set of commands; call this from your custom commands class.

Destructors

Name Description

Protected function Virtual

~TCommands()

Functions

Name Description

Public function Static

const Comman...

 

Get()

Get the singleton instance of this set of commands.

Public function Static

const FBindi...

 

GetContext()

Get the BindingContext for this set of commands.

Public function Static

bool

 

IsRegistered()

Public function Static

void

 

Register()

Use this method to register commands. Usually done in StartupModule().

Protected function

void

 

RegisterCommands()

Pure virtual to override; describe and instantiate the commands in here by using the UI COMMAND macro.

Public function Static

void

 

Unregister()

Use this method to clean up any resources used by the command set. Usually done in ShutdownModule()

Constants

Name

Description

Instance

A static instance of the command set.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss