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
EditorRepl.h File Reference

RenderSessionRepl is the stdin/stdout-driven command loop that sits on top of RenderSession. It exists so that render-session tooling can be driven (and tested) without an ImGui window - the shell layer is a thin parser that maps line-based text commands to RenderSession methods and writes human-readable output. More...

#include <iosfwd>
#include <string>
Include dependency graph for EditorRepl.h:

Classes

struct  donner::editor::app::RenderSessionReplOptions
 Runtime options for the REPL. Defaults match the interactive binary. More...
class  donner::editor::app::RenderSessionRepl

Namespaces

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

Detailed Description

RenderSessionRepl is the stdin/stdout-driven command loop that sits on top of RenderSession. It exists so that render-session tooling can be driven (and tested) without an ImGui window - the shell layer is a thin parser that maps line-based text commands to RenderSession methods and writes human-readable output.

The REPL is parameterized by std::istream& + std::ostream& instead of hard-coding std::cin/std::cout, so headless tests can feed a scripted input stream and assert against the captured output without touching the real terminal.

Supported commands (one per line, whitespace-separated):

help - list commands load <uri> - fetch + render reload - re-fetch the current URI resize <w> <h> - re-render at a new viewport status - print the latest status line show - render the current frame to the terminal (ANSI) save <out.png> - write the current bitmap as a PNG watch on|off - toggle filesystem mtime polling for auto-reload quit / exit - leave the loop