class
MMenuBar
- Module
- Miri
- Header
#include "Miri/Widgets/MMenuBar.h"- Namespace
Miri
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | ||
void | AddMenu | |
void | AddMenu | |
void | ClearMenus | |
int32_t | GetMenuCount | |
bool | IsMenuOpen | |
int32_t | GetOpenMenuIndex | The open menu's index, or -1; a menu the stack closed meanwhile (Escape, a click elsewhere) reads as closed. |
MiriRect | GetTriggerRect | Where a title sits inside the bar's geometry. |
MiriVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseMove | |
CReply | OnMouseButtonDown | |
CReply | OnKeyDown | |
void | OnMouseLeave | |
const char* | GetTypeName | |
const std::vector<CMenuBarEntry>& | GetMenus | The raw menu model — read by hosts that mirror this bar into a native menu (the macOS application menu bar). |
Function details
MIRI_WIDGET_ARGS
C++
MIRI_WIDGET_ARGS(MMenuBar) MIRI_ATTR(float, BarHeight) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)AddMenu
C++
void AddMenu(const CText& label, std::vector<CMenuEntry> entries)AddMenu
C++
void AddMenu(const CText& label, const CMenuBuilder& builder)ClearMenus
C++
void ClearMenus()GetMenuCount
C++
int32_t GetMenuCount() constIsMenuOpen
C++
bool IsMenuOpen() constGetOpenMenuIndex
C++
int32_t GetOpenMenuIndex() constThe open menu's index, or -1; a menu the stack closed meanwhile (Escape, a click elsewhere) reads as closed.
GetTriggerRect
C++
MiriRect GetTriggerRect(const CGeometry& geo, int32_t index) constWhere a title sits inside the bar's geometry.
ComputeDesiredSize
C++
MiriVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const overrideOnMouseMove
C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyDown
C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnMouseLeave
C++
void OnMouseLeave(const CPointerEvent& event) overrideGetTypeName
C++
const char* GetTypeName() const overrideGetMenus
C++
const std::vector<CMenuBarEntry>& GetMenus() constThe raw menu model — read by hosts that mirror this bar into a native menu (the macOS application menu bar).
Generated from Miri/Widgets/MMenuBar.h via miri.json · Dec 5, 2026Version 1.1.0