Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::NativeMenuMac Class Reference

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.

Detailed Description

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.


Class Documentation

◆ donner::editor::NativeMenuMac::DrainResult

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.

The documentation for this class was generated from the following file: