Navigation
API > API/Runtime > API/Runtime/Slate
A PopupAnchor summons a Popup relative to its content. Summoning a popup relative to the cursor is accomplished via the application.
| Name | SMenuAnchor |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SMenuAnchor.h |
| Include Path | #include "Widgets/Input/SMenuAnchor.h" |
Syntax
class SMenuAnchor :
public SPanel ,
public IMenuHost
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SMenuAnchor
- FSlateControlledConstruction → SWidget → SPanel → SMenuAnchor
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SMenuAnchor() |
Widgets/Input/SMenuAnchor.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SMenuAnchor() |
Widgets/Input/SMenuAnchor.h |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FPopupPlacement |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| OpenApplicationMenus | TArray< TWeakPtr< IMenu > > | Widgets/Input/SMenuAnchor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Construct this widget | Widgets/Input/SMenuAnchor.h | |
FVector2D GetMenuPosition() |
Widgets/Input/SMenuAnchor.h | ||
bool HasOpenSubMenus() |
Widgets/Input/SMenuAnchor.h | ||
bool IsOpen() |
Widgets/Input/SMenuAnchor.h | ||
void SetContent
(
TSharedRef< SWidget > InContent |
See Content Slot attribute | Widgets/Input/SMenuAnchor.h | |
void SetFitInWindow
(
bool bFit |
Widgets/Input/SMenuAnchor.h | ||
virtual void SetIsOpen
(
bool InIsOpen, |
Open or close the popup | Widgets/Input/SMenuAnchor.h | |
virtual void SetMenuContent
(
TSharedRef< SWidget > InMenuContent |
See MenuContent attribute | Widgets/Input/SMenuAnchor.h | |
void SetMenuPlacement
(
TAttribute< EMenuPlacement > InMenuPlacement |
Widgets/Input/SMenuAnchor.h | ||
bool ShouldOpenDueToClick() |
Widgets/Input/SMenuAnchor.h |
Overridden from IMenuHost
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWindow > GetMenuWindow() |
Widgets/Input/SMenuAnchor.h | ||
virtual void OnMenuDismissed() |
Widgets/Input/SMenuAnchor.h | ||
virtual bool UsingApplicationMenuStack() |
Widgets/Input/SMenuAnchor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGeometry ComputeNewWindowMenuPlacement
(
const FGeometry& AllottedGeometry, |
Computes the placement geometry for menus displayed in a separately created window | Widgets/Input/SMenuAnchor.h | |
bool IsOpenAndReusingWindow() |
Widgets/Input/SMenuAnchor.h | ||
bool IsOpenViaCreatedWindow() |
Widgets/Input/SMenuAnchor.h | ||
void OnMenuClosed
(
TSharedRef< IMenu > InMenu |
Handler/callback called by menus created by this anchor, when they are dismissed | Widgets/Input/SMenuAnchor.h | |
void ResetPopupMenuContent() |
Reset the popup state to prepopup. | Widgets/Input/SMenuAnchor.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Widgets/Input/SMenuAnchor.h | ||
virtual bool ComputeVolatility() |
Widgets/Input/SMenuAnchor.h | ||
virtual FChildren * GetChildren() |
Widgets/Input/SMenuAnchor.h | ||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Input/SMenuAnchor.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Input/SMenuAnchor.h | ||
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Widgets/Input/SMenuAnchor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DismissAllApplicationMenus() |
Widgets/Input/SMenuAnchor.h |