class

AMenu

Module
Arc
Header
#include "Arc/Widgets/AMenu.h"
Namespace
Arcf

Properties

TypeNameDescription
static constexpr floatkSubMenuHoverDelayDefault 0.3f.
static constexpr floatkContextMenuMinWidthDefault 240.0f.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
floatGetAppearAmount0..1 progress of the appear transition.
voidSetEntries
const std::vector<CMenuEntry>&GetEntries
voidSetSquareTopLeft
voidSetMinWidthA floor over menu.json's 200 px minimum, for flyouts that are menus in all but width (the notification history is 360).
voidPlayAppearAnimation
boolContainsPoint
voidHighlightFirstItem
voidSetPopupHostedHosted = painted into its own popup OS window: the background fills the whole window square-cornered, the slide/shadow that assumed an in-window overlay is skipped, and the open submenu is NOT painted inline (it has a popup window of its own).
boolIsPopupHosted
TSharedPtr<AMenu>GetSubMenu
boolOpenSubMenuByLabelOpens the submenu entry with this label and leaves it hovered, as a pointer resting on it would (automation stages a menu this way).
boolHoverEntryByLabelLeaves the enabled action row with this label hovered, as a pointer resting on it would.
boolInvokeEntryByLabelRuns the enabled action row with this label the way a click does — every menu closes first.
voidInvokeAndDismissCloses every menu, then runs the action.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseMove
CReplyOnMouseButtonDown
CReplyOnKeyDown
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AMenu) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

GetAppearAmount

C++
float GetAppearAmount() const

0..1 progress of the appear transition. A menu hosted in its own OS window fades that window with it (the window manager reads this). A menu opened without PlayAppearAnimation reads as fully shown.

SetEntries

C++
void SetEntries(std::vector<CMenuEntry> entries)

GetEntries

C++
const std::vector<CMenuEntry>& GetEntries() const

SetSquareTopLeft

C++
void SetSquareTopLeft(bool squareTopLeft)

SetMinWidth

C++
void SetMinWidth(float width)

A floor over menu.json's 200 px minimum, for flyouts that are menus in all but width (the notification history is 360).

PlayAppearAnimation

C++
void PlayAppearAnimation()

ContainsPoint

C++
bool ContainsPoint(const ArcVec2& absolutePosition) const

HighlightFirstItem

C++
void HighlightFirstItem()

SetPopupHosted

C++
void SetPopupHosted(bool hosted)

Hosted = painted into its own popup OS window: the background fills the whole window square-cornered, the slide/shadow that assumed an in-window overlay is skipped, and the open submenu is NOT painted inline (it has a popup window of its own).

IsPopupHosted

C++
bool IsPopupHosted() const

GetSubMenu

C++
TSharedPtr<AMenu> GetSubMenu() const

OpenSubMenuByLabel

C++
bool OpenSubMenuByLabel(const std::string& label)

Opens the submenu entry with this label and leaves it hovered, as a pointer resting on it would (automation stages a menu this way).

HoverEntryByLabel

C++
bool HoverEntryByLabel(const std::string& label)

Leaves the enabled action row with this label hovered, as a pointer resting on it would. False when there is no such row.

InvokeEntryByLabel

C++
bool InvokeEntryByLabel(const std::string& label)

Runs the enabled action row with this label the way a click does — every menu closes first. False when no such row can run.

InvokeAndDismiss

C++
static void InvokeAndDismiss(const std::function<void()>& action)

Closes every menu, then runs the action.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AMenu.h via arc.json · Nov 5, 2026Version 1.0.0