Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
MenuBarPresenter.h File Reference
#include <cstdint>
Include dependency graph for MenuBarPresenter.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::MenuBarState
struct  donner::editor::MenuBarActions
class  donner::editor::MenuBarPresenter
 Renders the app's top menu bar and reports semantic actions back to the shell. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::editor::PerfOverlayMode : std::uint8_t {
  Off ,
  FpsPill ,
  FullGraph
}
 Display mode for the render-pane performance overlay, selected via the View menu's "Performance Overlay" submenu. More...
enum class  donner::editor::MenuBarCommand {
  OpenAbout ,
  OpenFile ,
  OpenSamples ,
  SaveFile ,
  SaveFileAs ,
  ExportViewportSvg ,
  ExportViewportSvgWithOverlay ,
  RevertFile ,
  Quit ,
  Undo ,
  Redo ,
  Cut ,
  Copy ,
  Paste ,
  PasteInFront ,
  ConvertTextToOutlines ,
  Group ,
  Ungroup ,
  SelectAll ,
  DeselectAll ,
  ZoomIn ,
  ZoomOut ,
  ActualSize ,
  ToggleSourceFocusMode ,
  ToggleCompositorDebugPanel ,
  ToggleCompositorTileOverlay ,
  ToggleGeometryDebugOverlay ,
  SetPerfOverlayOff ,
  SetPerfOverlayFpsPill ,
  SetPerfOverlayFullGraph ,
  ToggleLayoutLock ,
  ResetLayout
}
 Semantic command emitted by a top-level menu item.

Functions

void donner::editor::ApplyMenuBarCommand (bool activated, MenuBarCommand command, const MenuBarState &state, MenuBarActions *actions)
 Apply an activated semantic menu command to an action accumulator.
void donner::editor::ApplyViewMenuToggleActions (const MenuBarActions &actions, bool *showCompositorDebugPanel, PerfOverlayMode *perfOverlayMode, bool *geometryDebugOverlay=nullptr, bool *compositorTileOverlay=nullptr)
 Apply View-menu visibility toggle actions to persistent UI state.

Enumeration Type Documentation

◆ PerfOverlayMode

enum class donner::editor::PerfOverlayMode : std::uint8_t
strong

Display mode for the render-pane performance overlay, selected via the View menu's "Performance Overlay" submenu.

Enumerator
Off 

No performance UI is drawn over the render pane.

FpsPill 

Compact rounded chip showing only smoothed FPS and frame ms.

FullGraph 

Full stacked frame-cost graph plus the presentation-memory graph.

Function Documentation

◆ ApplyMenuBarCommand()

void donner::editor::ApplyMenuBarCommand ( bool activated,
MenuBarCommand command,
const MenuBarState & state,
MenuBarActions * actions )

Apply an activated semantic menu command to an action accumulator.

Parameters
activatedTrue when the menu item was clicked.
commandSemantic command represented by the menu item.
stateMenu state used by focus-dependent commands.
actionsAction accumulator to update.

◆ ApplyViewMenuToggleActions()

void donner::editor::ApplyViewMenuToggleActions ( const MenuBarActions & actions,
bool * showCompositorDebugPanel,
PerfOverlayMode * perfOverlayMode,
bool * geometryDebugOverlay = nullptr,
bool * compositorTileOverlay = nullptr )

Apply View-menu visibility toggle actions to persistent UI state.

Parameters
actionsEdge-triggered menu actions from MenuBarPresenter::render.
showCompositorDebugPanelCurrent Compositor Debug panel visibility.
perfOverlayModeCurrent performance overlay mode.
geometryDebugOverlayCurrent Geode geometry debug overlay state. Optional (may be null) so callers without a document renderer skip it.