Navigation
API > API/Editor > API/Editor/PinnedCommandList
A list of commands that were 'pinned' by the user, for easy re-use To use the a command list:
Construct it using CreatePinnedCommandList (using a valid context if you want to persist settings). Optionally call SetStyle after construction to style your widget for its context. Styles are the same concatenated named styles given to menu button items.
Bind one or more command lists to the widget via BindCommandList. This should be done after commands are registered to the FUICommandlist to allow commands to be correctly re-created from persistent settings.
Register one or more custom widgets via RegisterCustomWidget.
If using the FUICommandList_Pinnable, commands should be automatically forwarded to the pinned commands list widget when executed. If not, then the user needs to manually add commands via AddCommand.
If using FUICommandList_Pinnable custom widget interactions will be automatically forwarded to the pinned commands list, but FUICommandList_Pinnable::OnCustomWidgetInteraction_does_ need to be called when widgets are interacted with to automatically add the custom widget to the pinned commands list.
| Name | IPinnedCommandList |
| Type | class |
| Header File | /Engine/Source/Editor/PinnedCommandList/Public/IPinnedCommandList.h |
| Include Path | #include "IPinnedCommandList.h" |
Syntax
class IPinnedCommandList : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → IPinnedCommandList
- FSlateControlledConstruction → SWidget → SCompoundWidget → IPinnedCommandList
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnGenerateCustomWidget | TBaseDelegate_NoParams< TSharedRef< SWidget > > | Delegate used to generate custom widgets | IPinnedCommandList.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCommand
(
const TSharedRef< const FUICommandInfo >& InUICommandInfo, |
Add a command to the pinned list. | IPinnedCommandList.h | |
void AddCustomWidget
(
FName InCustomWidgetIdentifier |
Add a previously registered custom widget to the pinned list. | IPinnedCommandList.h | |
void BindCommandList
(
const TSharedRef< const FUICommandList >& InUICommandList |
Bind a command list to this widget. | IPinnedCommandList.h | |
void BindCommandList
(
const TSharedRef< FUICommandList_Pinnable >& InUICommandList |
Bind a pinnable command list to this widget. | IPinnedCommandList.h | |
bool HasAnyCommands() |
IPinnedCommandList.h | ||
void RegisterCustomWidget
(
FOnGenerateCustomWidget InOnGenerateCustomWidget, |
Register a custom widget. | IPinnedCommandList.h | |
void RemoveAllCommands() |
Removes all commands in the list | IPinnedCommandList.h | |
void RemoveCommand
(
const TSharedRef< const FUICommandInfo >& InUICommandInfo |
Remove a command from the pinned list. | IPinnedCommandList.h | |
void RemoveCustomWidget
(
FName InCustomWidgetIdentifier |
Remove a custom widget from the pinned list | IPinnedCommandList.h | |
void SetStyle
(
const ISlateStyle* InStyleSet, |
Set a menu style to use when building command widgets. | IPinnedCommandList.h |