Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Components
Inheritance Hierarchy
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Components/MenuAnchor.h |
| Include | #include "Components/MenuAnchor.h" |
Syntax
class UMenuAnchor : public UContentWidget
Remarks
The Menu Anchor allows you to specify an location that a popup menu should be anchored to, and should be summoned from.
- Single Child
- Popup
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSubclassOf< class UUserWidget > | MenuClass | The widget class to spawn when the menu is required. | |
| TSharedPtr< SMenuAnchor > | MyMenuAnchor | ||
| FGetUserWidget | OnGetUserMenuContentEvent | Called when the menu content is requested to allow a more customized handling over what to display | |
| FOnMenuOpenChangedEvent | OnMenuOpenChanged | Called when the opened state of the menu changes |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UMenuAnchor
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Close () |
Closes the menu if it is currently open. | |
| void | FitInWindow
(
bool bFit |
||
| FVector2D | Returns the current menu position | ||
| EMenuPlacement | GetPlacement () |
||
| TSharedRef< SWidget > | |||
| void | HandleMenuOpenChanged
(
bool bIsOpen |
||
| bool | Returns whether this menu has open submenus | ||
| void | InitShouldDeferPaintingAfterWindowContent
(
bool InShouldDeferPaintingAfterWindowContent |
Initialize ShouldDeferPaintingAfterWindowContent in the constructor before the SWidget is constructed. | |
| void | InitUseApplicationMenuStack
(
bool InUseApplicationMenuStack |
Initialize UseApplicationMenuStack in the constructor before the SWidget is constructed. | |
| bool | |||
| bool | |||
| bool | IsOpen () |
Returns true if the popup is open; false otherwise. | |
| bool | |||
| void | Open
(
bool bFocusMenu |
Opens the menu if it is not already open | |
| void | SetPlacement
(
EMenuPlacement InPlacement |
||
| bool | Returns true if we should open the menu due to a click. | ||
| void | ToggleOpen
(
bool bFocusOnOpen |
Toggles the menus open state. |
Overridden from UPanelWidget
| Type | Name | Description | |
|---|---|---|---|
| void | OnSlotAdded
(
UPanelSlot* Slot |
UPanelWidget. | |
| void | OnSlotRemoved
(
UPanelSlot* Slot |
Overridden from UWidget
| Type | Name | Description | |
|---|---|---|---|
| const FText | Gets the palette category of the widget | ||
| TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. |
Overridden from UVisual
| Type | Name | Description | |
|---|---|---|---|
| void | ReleaseSlateResources
(
bool bReleaseChildren |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FGetUserWidget |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bFitInWindow | Direct access to bFitInWindow is deprecated. Please use the getter or setter. | |
| FGetWidget | OnGetMenuContentEvent | Use OnGetUserMenuContentEvent instead, you may need to make the previous binding return an User Widget. | |
| TEnumAsByte< EMenuPlacement > | Placement | Direct access to Placement is deprecated. Please use the getter or setter. | |
| bool | ShouldDeferPaintingAfterWindowContent | Direct access to ShouldDeferPaintingAfterWindowContent is deprecated. Please use the getter. | |
| bool | UseApplicationMenuStack | Direct access to UseApplicationMenuStack is deprecated. Please use the getter. |