Files
essim/doc/api/classes/Tui.md
François 043fef0a31 User-facing docs: --commands-md flag, doc/user/ tree, anonymised script.
- `essim --commands-md [file]` instantiates the Tui, calls
  `Tui::DumpCommandsMd(ostream&)` which iterates the live registry and
  emits Markdown grouped by interactive/other, then exits. Single
  source of truth: a new `CommandSpec` field surfaces automatically.
- CMake `doc` target now `DEPENDS essim` and chains:
    doxygen → gen_api_md.py → doc/api/
    essim --commands-md      → doc/user/commands.md
- `doc/user/` adds:
    - index.md (hand-written) — first session, interactive-screen
      conventions, save/restore/replay overview.
    - scripting.md (hand-written) — `set`/`$var` expansion semantics,
      `source` event-paced execution, script-save denylist, worked
      example pointing at test/system.essim.
    - commands.md (auto-generated, regenerated by the `doc` target).
- Top-level README refocused on quick start; pointers to the new
  doc tree (user/, api/, DESIGN.md) instead of an inline command table.
- doc/README.md and DESIGN.md document the two-pipeline doc workflow.
- `test/system.essim` and user docs anonymised: bkp → backplane,
  vdn1/2/3 → payload1/2/3, cb3p → payload4, bpb/cob/ssu →
  peripheral1/2/3; netlist file names + variable names + paths all
  replaced with generic equivalents.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 08:29:45 +02:00

8.8 KiB

Tui

class Tui

Defined in tui.hpp:18

Private type

enum Completion

📍 tui.hpp:19

Private Attributes

std::vector< std::string > history

📍 tui.hpp:41

std::vector< std::string > recorded

📍 tui.hpp:42

std::vector< std::string > output

📍 tui.hpp:43

std::string input

📍 tui.hpp:44

int cursor_pos

📍 tui.hpp:45

int history_idx

📍 tui.hpp:46

int scroll_offset

📍 tui.hpp:47

Lines scrolled up from the tail; 0 = follow newest output.

bool quit

📍 tui.hpp:48

bool in_source

📍 tui.hpp:49

std::unique_ptr< System > sys

📍 tui.hpp:51

std::deque< Prompt > pending

📍 tui.hpp:52

std::map< std::string, CommandSpec > commands

📍 tui.hpp:53

std::map< std::string, std::string > vars

📍 tui.hpp:54

$var-style substitution table.

int screen_idx

📍 tui.hpp:57

std::vector< std::string > search_modules

📍 tui.hpp:60

std::vector< std::string > search_types

📍 tui.hpp:61

int search_module_idx

📍 tui.hpp:62

int search_type_idx

📍 tui.hpp:63

int search_focus_idx

📍 tui.hpp:64

std::string search_query

📍 tui.hpp:65

std::vector< std::string > connect_modules

📍 tui.hpp:68

int connect_m1_idx

📍 tui.hpp:69

int connect_m2_idx

📍 tui.hpp:70

std::string connect_p1_filter

📍 tui.hpp:71

std::string connect_p2_filter

📍 tui.hpp:72

std::vector< std::string > connect_p1_list

📍 tui.hpp:73

std::vector< std::string > connect_p2_list

📍 tui.hpp:74

int connect_p1_idx

📍 tui.hpp:75

int connect_p2_idx

📍 tui.hpp:76

int connect_focus_idx

📍 tui.hpp:77

std::vector< std::string > explore_modules

📍 tui.hpp:80

int explore_module_idx

📍 tui.hpp:81

std::vector< std::string > explore_types

📍 tui.hpp:82

int explore_type_idx

📍 tui.hpp:83

std::vector< std::string > explore_children

📍 tui.hpp:84

int explore_child_idx

📍 tui.hpp:85

std::string explore_child_filter

📍 tui.hpp:86

std::string explore_detail_filter

📍 tui.hpp:87

std::vector< std::string > explore_detail

📍 tui.hpp:88

int explore_detail_idx

📍 tui.hpp:89

std::string explore_header

📍 tui.hpp:90

int explore_focus_idx

📍 tui.hpp:91

std::atomic< bool > loading

📍 tui.hpp:94

true while a script is being processed; read by tick thread.

std::atomic< bool > tick_in_flight

📍 tui.hpp:95

main thread acks each tick by clearing this; ticker waits.

std::string loading_filename

📍 tui.hpp:96

std::vector< std::string > loading_lines

📍 tui.hpp:97

size_t loading_idx

📍 tui.hpp:98

int loading_executed

📍 tui.hpp:99

int loading_lineno

📍 tui.hpp:100

bool loading_prev_in_source

📍 tui.hpp:101

ftxui::ScreenInteractive * screen_ptr

📍 tui.hpp:102

set in Run() so Source() can post events. so Source() can post events.

std::vector< std::string > net_modules

📍 tui.hpp:105

int net_module_idx

📍 tui.hpp:106

std::string net_sig_filter

📍 tui.hpp:107

std::vector< std::string > net_sigs

📍 tui.hpp:108

rebuilt every frame from filter

int net_sig_idx

📍 tui.hpp:109

int net_focus_idx

📍 tui.hpp:110

std::vector< std::string > settype_modules

📍 tui.hpp:113

int settype_m_idx

📍 tui.hpp:114

std::string settype_p_filter

📍 tui.hpp:115

std::vector< std::string > settype_p_list

📍 tui.hpp:116

int settype_p_idx

📍 tui.hpp:117

std::string settype_type

📍 tui.hpp:118

std::string settype_status

📍 tui.hpp:119

int settype_focus_idx

📍 tui.hpp:120

Public Functions

Tui()

📍 tui.hpp:123

~Tui()

📍 tui.hpp:124

void Run()

📍 tui.hpp:125

void DumpCommandsMd(std::ostream &out) const

📍 tui.hpp:126

Private Functions

void RegisterCommands()

📍 tui.hpp:130

void Print(const std::string &line)

📍 tui.hpp:133

void Submit()

📍 tui.hpp:134

void Dispatch(const std::string &raw)

📍 tui.hpp:135

void Finalize(const std::string &name, const CommandSpec &spec, const std::vector< std::string > &args)

📍 tui.hpp:136

void HistoryUp()

📍 tui.hpp:139

void HistoryDown()

📍 tui.hpp:140

void CancelPending()

📍 tui.hpp:141

void LoadHistory()

📍 tui.hpp:142

void AppendHistory(const std::string &cmd)

📍 tui.hpp:143

void Source(const std::string &filename)

📍 tui.hpp:144

void ProcessNextSourceLine()

📍 tui.hpp:145

std::string ExpandVars(const std::string &s) const

📍 tui.hpp:146

void CompleteCommand(size_t start=0)

📍 tui.hpp:149

void CompletePath(size_t start=0)

📍 tui.hpp:150

void CompleteInline()

📍 tui.hpp:151

void RefreshFilteredPartList(const std::vector< std::string > &modules, int m_idx, const std::string &filter, std::vector< std::string > &out, int &sel_idx)

📍 tui.hpp:154

ftxui::Component BuildMainScreen(ftxui::ScreenInteractive &screen)

📍 tui.hpp:161

ftxui::Component BuildSearchScreen()

📍 tui.hpp:162

ftxui::Component BuildConnectScreen()

📍 tui.hpp:163

ftxui::Component BuildSettypeScreen()

📍 tui.hpp:164

ftxui::Component BuildExploreScreen()

📍 tui.hpp:165

ftxui::Component BuildNetScreen()

📍 tui.hpp:166


Back to classes · Top