Donner 0.5.1
Embeddable browser-grade SVG2 engine
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 the sandbox/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 the sandbox/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 inspect — dump the frame's decoded command stream record <out.rnr> — save the current frame as a .rnr recording watch on|off — toggle filesystem mtime polling for auto-reload quit / exit — leave the loop