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

Stateful advanced editor frontend shell. Owns all long-lived GUI/editor orchestration state. More...

#include "donner/editor/EditorShell.h"

Public Member Functions

 EditorShell (gui::EditorWindow &window, EditorShellOptions options)
 Create the editor UI and application state over an existing host window.
bool valid () const
 Return whether editor-shell initialization succeeded.
void prepareFrame ()
 Perform bounded work that may yield and must run before ImGui::NewFrame().
void setNextFrameKind (EditorFrameKind frameKind)
 Set the cause consumed by the next runFrame call; subsequent frames default to Scheduled.
void runFrame ()
 Process one editor UI frame using the host's active ImGui frame.
svg::FontCatalog & fontCatalog ()
 Font catalog (embedded Google Fonts + macOS system fonts) backing document font resolution and the font picker (Design 0013 W2 consumes this).
std::optional< float > nextIdleWakeSeconds ()
 Return the next idle-loop wake interval needed for throttled UI work. Registers worker-completion wakes for deferred viewport work before the host parks.
const ViewportState & viewportForReadback () const
 Current render-pane viewport. Exposed for replay/readback harnesses that need to crop the presented framebuffer to the canvas region.
void overrideViewportForReplay (const ViewportState &viewport)
 Override the viewport from a recorded replay frame before rendering.
void queueDocumentSpaceReplayInputForTesting (EditorShellDocumentReplayInput input)
 Queue document-space pointer input for the next replay frame.
void queueScrollEventForReplayForTesting (RenderPaneScrollEvent event)
 Queue one scroll event for the next replay frame.
void applyReplayActionForTesting (const repro::ReproAction &action)
 Apply one semantic .rnr replay action before the next frame.
void setSourcePaneVisibleForReplay (bool visible)
 Set the source-pane target visibility before deterministic replay frames.
void setTextChromeMeasurementBlockedForReplay (bool blocked)
 Model a frame where document contention prevents measuring text-editing chrome.
repro::ReplaySemanticActionCost estimateReplayActionCostForTesting (const repro::ReproAction &action) const
 Estimate source and selection work before applying one semantic replay action.
repro::ReplayInputFrameCost estimateReplayInputCostForTesting (const repro::ReproFrame &frame, std::size_t heldRepeatSourceRewriteUnits=0) const
 Estimate source-mutation work reachable through raw replay input for one frame.
std::optional< std::string > selectedElementLabelForReadback () const
 Current selection label for replay/readback harnesses.
std::optional< std::string > documentSourceForReadback () const
 Current document source text, for replay/readback harness assertions about gesture writebacks (nullopt without a document/source store).
LayerInspectorStatusReadback layerInspectorStatusForReadback () const
 Current layer-inspector freshness status for replay/readback harnesses.
AsyncRenderer & asyncRendererForReplay ()
 Async renderer access for replay harnesses.
void setSchedulingClockForReplay (std::function< std::chrono::steady_clock::time_point()> clock)
 Drive the render coordinator's scheduling windows from a replay clock instead of the steady clock, so a deterministic replay crosses them on the same frame on every run.
void setContentOnlyCaptureForNextFrameForReplay (bool enabled)
 Suppress non-document render-pane presentation on the next frame.

Friends

class EditorShellTestAccess

Detailed Description

Stateful advanced editor frontend shell. Owns all long-lived GUI/editor orchestration state.

Constructor & Destructor Documentation

◆ EditorShell()

donner::editor::EditorShell::EditorShell ( gui::EditorWindow & window,
EditorShellOptions options )

Create the editor UI and application state over an existing host window.

Parameters
windowHost window, which must outlive the shell.
optionsInitial document and host-capability settings.

Member Function Documentation

◆ applyReplayActionForTesting()

void donner::editor::EditorShell::applyReplayActionForTesting ( const repro::ReproAction & action)

Apply one semantic .rnr replay action before the next frame.

Parameters
actionTool or paint action decoded from a replay frame.

◆ overrideViewportForReplay()

void donner::editor::EditorShell::overrideViewportForReplay ( const ViewportState & viewport)

Override the viewport from a recorded replay frame before rendering.

Parameters
viewportRecorded viewport snapshot to install for the next frame.

◆ queueDocumentSpaceReplayInputForTesting()

void donner::editor::EditorShell::queueDocumentSpaceReplayInputForTesting ( EditorShellDocumentReplayInput input)

Queue document-space pointer input for the next replay frame.

This bypasses GUI-coordinate hit testing while keeping the frame rendered through the real editor shell and presentation stack.

Parameters
inputReplay pointer input for the next frame.

◆ queueScrollEventForReplayForTesting()

void donner::editor::EditorShell::queueScrollEventForReplayForTesting ( RenderPaneScrollEvent event)

Queue one scroll event for the next replay frame.

Parameters
eventRecorded scroll event to feed through the render-pane gesture bridge.

◆ setContentOnlyCaptureForNextFrameForReplay()

void donner::editor::EditorShell::setContentOnlyCaptureForNextFrameForReplay ( bool enabled)
inline

Suppress non-document render-pane presentation on the next frame.

Parameters
enabledTrue to make the next frame's readback content-only.

◆ setNextFrameKind()

void donner::editor::EditorShell::setNextFrameKind ( EditorFrameKind frameKind)
inline

Set the cause consumed by the next runFrame call; subsequent frames default to Scheduled.

Parameters
frameKindEvent frames service input/reset and presentation without ordinary ticks.

◆ setSchedulingClockForReplay()

void donner::editor::EditorShell::setSchedulingClockForReplay ( std::function< std::chrono::steady_clock::time_point()> clock)
inline

Drive the render coordinator's scheduling windows from a replay clock instead of the steady clock, so a deterministic replay crosses them on the same frame on every run.

Parameters
clockReplay clock to read, or an empty function to restore the steady clock.

◆ setSourcePaneVisibleForReplay()

void donner::editor::EditorShell::setSourcePaneVisibleForReplay ( bool visible)
inline

Set the source-pane target visibility before deterministic replay frames.

Parameters
visibleTrue to open the source pane.

◆ setTextChromeMeasurementBlockedForReplay()

void donner::editor::EditorShell::setTextChromeMeasurementBlockedForReplay ( bool blocked)
inline

Model a frame where document contention prevents measuring text-editing chrome.

Parameters
blockedTrue to retain the last measurement until a later replay frame.

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