Navigation
API > API/Editor > API/Editor/PinnedCommandList
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- IPinnedCommandList
References
| Module | PinnedCommandList |
| Header | /Engine/Source/Editor/PinnedCommandList/Public/IPinnedCommandList.h |
| Include | #include "IPinnedCommandList.h" |
Syntax
class IPinnedCommandList : public SCompoundWidget
Remarks
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::OnCustomWidgetInteractiondoes need to be called when widgets are interacted with to automatically add the custom widget to the pinned commands list.
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCommand
(
const TSharedRef< const FUICommandInfo >& InUICommandInfo, |
Add a command to the pinned list. | |
| void | AddCustomWidget
(
FName InCustomWidgetIdentifier |
Add a previously registered custom widget to the pinned list. | |
| void | BindCommandList
(
const TSharedRef< const FUICommandList >& InUICommandList |
Bind a command list to this widget. | |
| void | BindCommandList
(
const TSharedRef< FUICommandList_Pinnable >& InUICommandList |
Bind a pinnable command list to this widget. | |
| bool | |||
| void | RegisterCustomWidget
(
FOnGenerateCustomWidget InOnGenerateCustomWidget, |
Register a custom widget. | |
| void | Removes all commands in the list | ||
| void | RemoveCommand
(
const TSharedRef< const FUICommandInfo >& InUICommandInfo |
Remove a command from the pinned list. | |
| void | RemoveCustomWidget
(
FName InCustomWidgetIdentifier |
Remove a custom widget from the pinned list | |
| void | SetStyle
(
const ISlateStyle* InStyleSet, |
Set a menu style to use when building command widgets. |
Typedefs
| Name | Description |
|---|---|
| FOnGenerateCustomWidget | Delegate used to generate custom widgets |