#pragma once #include #include namespace fgc { // Operator command reference, modelled as data so the headless console and the // TUI render from one source of truth (avoids the two drifting apart). The // console prints renderHelp(); the TUI walks helpCatalog() to draw its inline // help pane. struct HelpEntry { std::string syntax; // e.g. "goto " std::string summary; // one-line description std::vector detail; // expanded lines: examples, units, notes }; struct HelpSection { std::string title; // e.g. "Positioning" std::string blurb; // one line under the title std::vector entries; }; // The full catalog (static, built once). const std::vector& helpCatalog(); // Flatten the catalog to printable lines for the console. // topic == "" -> every section's title/blurb + one summary line per entry. // topic == "" -> the matching section(s)/entry(ies) with their detail lines. // Matching is case-insensitive against section titles and the first token of // each entry's syntax (the command verb). std::vector renderHelp(const std::string& topic = ""); } // namespace fgc