Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Input
Inheritance Hierarchy
- SPanel
- IMenuHost
- SMenuAnchor
- SComboButton
- SEnumComboBox
- SPopupErrorText
- SRigVMGraphPinEditableNameValueWidget
- SRigVMGraphPinNameListValueWidget
- SSearchableComboBox
- SSimpleComboButton
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SMenuAnchor.h |
| Include | #include "Widgets/Input/SMenuAnchor.h" |
Syntax
class SMenuAnchor :
public SPanel,
public IMenuHost
Remarks
A PopupAnchor summons a Popup relative to its content. Summoning a popup relative to the cursor is accomplished via the application.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bApplyWidgetStyleToMenu | Should we paint the popup using the received InWidgetStyle? | |
| bool | bDismissedThisTick | Was the menu just dismissed this tick? | |
| bool | bFitInWindow | Should the menu anchor fit inside the window? | |
| bool | bIsCollapsedByParent | Whether this menu should be collapsed when its parent gets focus | |
| bool | bShouldDeferPaintingAfterWindowContent | Should the menu content painting be deferred? If not, the menu content will layer over the menu anchor, rather than above all window contents. | |
| bool | bUseApplicationMenuStack | Should the menu by created by the application stack code making it behave like and have the lifetime of a normal menu? | |
| TPanelChildren< FBasicLayoutWidgetSlot > | Children | The currently arranged children in the menu anchor. | |
| FVector2D | LocalPopupPosition | ||
| TSharedPtr< SWidget > | MenuContent | Static menu content to use when the delegate used when OnGetMenuContent is not defined. | |
| TOptional< EPopupMethod > | Method | Should we summon a new window for this popup or | |
| FPopupMethodReply | MethodInUse | Method currently being used to show the popup. No value if popup is closed. | |
| FOnGetContent | OnGetMenuContent | Callback invoked when the popup is being summoned | |
| FOnIsOpenChanged | OnMenuOpenChanged | Callback invoked when the popup is being opened/closed | |
| TSharedPtr< IMenu > | OwnedMenuPtr | An interface pointer to the menu object presenting this popup. | |
| TAttribute< EMenuPlacement > | Placement | How should the popup be placed relative to the anchor. | |
| TWeakPtr< IMenu > | PopupMenuPtr | An interface pointer to the menu object presenting this popup. | |
| TWeakPtr< SWindow > | PopupWindowPtr | A pointer to the window presenting this popup. | |
| FVector2D | ScreenPopupPosition | Screen-space version of LocalPopupPosition, also cached in Tick. | |
| TSharedPtr< SWidget > | WrappedContent | MenuContent plus any extra wrapping widgets needed by the menu infrastructure. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SMenuAnchor () |
Destructors
| Type | Name | Description | |
|---|---|---|---|
~SMenuAnchor () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FGeometry | ComputeNewWindowMenuPlacement
(
const FGeometry& AllottedGeometry, |
Computes the placement geometry for menus displayed in a separately created window | |
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| void | |||
| FVector2D | |||
| bool | |||
| bool | IsOpen () |
||
| bool | |||
| bool | |||
| void | OnMenuClosed
(
TSharedRef< IMenu > InMenu |
Handler/callback called by menus created by this anchor, when they are dismissed | |
| void | Reset the popup state to prepopup. | ||
| void | SetContent
(
TSharedRef< SWidget > InContent |
See Content Slot attribute | |
| void | SetFitInWindow
(
bool bFit |
||
| void | SetIsOpen
(
bool InIsOpen, |
Open or close the popup | |
| void | SetMenuContent
(
TSharedRef< SWidget > InMenuContent |
See MenuContent attribute | |
| void | SetMenuPlacement
(
TAttribute< EMenuPlacement > InMenuPlacement |
||
| bool |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FVector2D | ComputeDesiredSize
(
float |
A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user. | |
| bool | Recomputes the volatility of the widget. | ||
| FChildren * | GetChildren () |
All widgets must provide a way to access their children in a layout-agnostic way. | |
| void | OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Panels arrange their children in a space described by the AllottedGeometry parameter. | |
| int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. | |
| void | Ticks this widget with Geometry. |
Overridden from IMenuHost
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< SWindow > | |||
| void | |||
| bool |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments | |||
| FPopupPlacement |
Constants
| Name | Description |
|---|---|
| OpenApplicationMenus |