macOS menu bar built from EditorMenuModel. More...
#include "donner/editor/NativeMenuMac.h"
Classes | |
| struct | DrainResult |
| Actions collected while draining the native menu command queue. More... | |
Public Member Functions | |
| NativeMenuMac (const NativeMenuMac &)=delete | |
| NativeMenuMac & | operator= (const NativeMenuMac &)=delete |
| bool | install () |
| Install the app's main menu. Call on the macOS UI thread after GLFW startup. | |
| void | update (const MenuBarState &state) |
| Refresh enabled/checkmark state from the latest shell snapshot. | |
| DrainResult | drain (const MenuBarState &state) |
| Drain queued native activations and map them through ApplyMenuBarCommand. | |
| void | enqueueFromNative (MenuBarCommand command, bool keyEquivalent) |
| AppKit target callback; enqueues without touching EditorShell or the DOM. | |
| void | refreshCurrentState () |
| Called by NSMenuDelegate while a menu is open. | |
macOS menu bar built from EditorMenuModel.
AppKit callbacks only enqueue semantic commands and wake GLFW. The shell drains them on its UI frame before applying actions to the editor.
| struct donner::editor::NativeMenuMac::DrainResult |
Actions collected while draining the native menu command queue.
| Class Members | ||
|---|---|---|
| MenuBarActions | actions | |
| bool | hadKeyEquivalent = false | An AppKit key equivalent fired. The shell should skip its matching GLFW shortcut path for this frame to prevent a duplicate command. |