Navigation
API > API/Runtime > API/Runtime/Slate
Represents a stack of open menus. The last item in the stack is the top most menu Menus are described as IMenus. Implementations of IMenu can control how the menus are created and presented (e.g. in their own window)
| Name | FMenuStack |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Framework/Application/MenuStack.h |
| Include Path | #include "Framework/Application/MenuStack.h" |
Syntax
class FMenuStack
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMenuStack() |
Constructor | Framework/Application/MenuStack.h |
Structs
| Name | Remarks |
|---|---|
| FPrePushArgs | Contains all the options passed to the pre-push stage of the menu creation process |
| FPrePushResults | Contains all the options returned from the pre-push stage of the menu creation process |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveMethod | FPopupMethodReply | The popup method currently used by the whole stack. It can only use one at a time | Framework/Application/MenuStack.h | |
| bHostWindowGuard | bool | Guard to prevent the HostWindow and HostWindowPopupPanel being set reentrantly | Framework/Application/MenuStack.h | |
| CachedContentMap | TMap< TSharedPtr< const SWidget >, TSharedPtr< class FMenuBase > > | Maps top-level content widgets (should always be SMenuContentWrappers) to menus in the stack | Framework/Application/MenuStack.h | |
| HostPopupLayer | TSharedPtr< FPopupLayer > | The popup layer that contains our HostWindowPopupPanel. | Framework/Application/MenuStack.h | |
| HostWidget | TWeakPtr< SWidget > | The parent widget of the root menu in the stack | Framework/Application/MenuStack.h | |
| HostWindow | TSharedPtr< SWindow > | The parent window of the root menu in the stack. | Framework/Application/MenuStack.h | |
| HostWindowPopupPanel | TSharedPtr< SMenuPanel > | The parent window of the root menu in the stack. | Framework/Application/MenuStack.h | |
| MenuDestroyedEvent | FOnMenuDestroyed | Called when a menu is destroyed | Framework/Application/MenuStack.h | |
| PendingNewMenu | TSharedPtr< class FMenuBase > | Temporary ptr to a new menu created during the menu creation process. | Framework/Application/MenuStack.h | |
| PendingNewWindow | TSharedPtr< SWindow > | Temporary ptr to a new window created during the menu creation process. | Framework/Application/MenuStack.h | |
| Stack | TArray< TSharedPtr< class FMenuBase > > | The array of menus in the stack | Framework/Application/MenuStack.h | |
| ThrottleHandle | FThrottleRequest | Handle to a throttle request made to ensure the menu is responsive in low FPS situations | Framework/Application/MenuStack.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DismissAll() |
Dismisses the entire menu stack | Framework/Application/MenuStack.h | |
void DismissFrom
(
const TSharedPtr< IMenu >& InFromMenu |
Dismisses the menu stack including InFromMenu and all its child menus Dismisses in reverse order (children first) | Framework/Application/MenuStack.h | |
TSharedPtr< IMenu > FindMenuFromWindow
(
TSharedRef< SWindow > InWindow |
Finds a menu in the stack that owns InWindow. | Framework/Application/MenuStack.h | |
TSharedPtr< IMenu > FindMenuInWidgetPath
(
const FWidgetPath& PathToQuery |
Searches from bottom to top of the widget path for a menu in the stack. | Framework/Application/MenuStack.h | |
TSharedPtr< SWidget > GetHostWidget() |
Framework/Application/MenuStack.h | ||
TSharedPtr< SWindow > GetHostWindow() |
Framework/Application/MenuStack.h | ||
bool GetToolTipForceFieldRect
(
const TSharedRef< IMenu >& InMenu, |
Called by the application when showing tooltips. | Framework/Application/MenuStack.h | |
bool HasMenus() |
Framework/Application/MenuStack.h | ||
bool HasOpenSubMenus
(
TSharedPtr< IMenu > InMenu |
Framework/Application/MenuStack.h | ||
FOnMenuDestroyed & OnMenuDestroyedEvent() |
Delegate called when a menu is dismissed and destroyed | Framework/Application/MenuStack.h | |
void OnWindowActivated
(
TSharedRef< SWindow > ActivatedWindow |
Notifies the stack that a new window was activated. | Framework/Application/MenuStack.h | |
void OnWindowDestroyed
(
TSharedRef< SWindow > InWindow |
Called by the application when any window is destroyed. | Framework/Application/MenuStack.h | |
TSharedRef< IMenu > Push
(
const TSharedPtr< IMenu >& InParentMenu, |
Pushes a new child menu onto the stack. | Framework/Application/MenuStack.h | |
TSharedRef< IMenu > Push
(
const FWidgetPath& InOwnerPath, |
Pushes a new menu onto the stack. | Framework/Application/MenuStack.h | |
TSharedRef< IMenu > PushHosted
(
const FWidgetPath& InOwnerPath, |
Pushes a new menu onto the stack that is drawn by an external host widget. | Framework/Application/MenuStack.h | |
TSharedRef< IMenu > PushHosted
(
const TSharedPtr< IMenu >& InParentMenu, |
Pushes a new child menu onto the stack that is drawn by an external host widget. | Framework/Application/MenuStack.h |