docs: README + DESIGN for the wx frontend and essim_add_frontend
Document the wxWidgets GUI frontend (wx dependency + -DESSIM_FRONTEND=wx in README; layout tree + architecture note in DESIGN) and the factored essim_add_frontend() per-frontend CMake helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
17
DESIGN.md
17
DESIGN.md
@@ -78,6 +78,12 @@ src/
|
||||
commands_export.cpp thin wrapper over app::export_connections
|
||||
screen_*.cpp dashboard, connect, settype, explore, analyze, help, main
|
||||
(console), palette, file dialog, error/confirm, sigtype modal
|
||||
wx/ -- wxWidgets GUI (builds libessim_wx + the `essim` binary)
|
||||
CMakeLists.txt find_package(wxWidgets) + essim_add_frontend(wx ...)
|
||||
main.cpp entry point: construct WxFrontend, call frontend_main
|
||||
wx_frontend.{hpp,cpp} WxFrontend : Frontend (owns System; boots wx in Run())
|
||||
wx_frame.{hpp,cpp} EssimFrame: menu/tree/overview/log over core + app::*
|
||||
cmake/EssimFrontend.cmake -- essim_add_frontend(name LIBS ...) per-frontend wiring
|
||||
tests/ -- core tests (link essim_core)
|
||||
tui/ -- frontend tests (link essim_tui)
|
||||
doc/ , test/ -- docs; sample netlists + system.essim bring-up script
|
||||
@@ -104,10 +110,13 @@ The hard rule: **`src/core/` never depends on a frontend** — no `#include
|
||||
`frontend_main(argc, argv, Frontend&)` (`frontends/frontend_main.cpp`, built
|
||||
into the toolkit-free `essim_frontend` lib) parses the CLI flags and drives the
|
||||
boot → batch/run flow through the interface; a frontend's `main()` is just
|
||||
*construct the concrete Frontend, call `frontend_main`*. Add one by creating
|
||||
`src/frontends/<name>/CMakeLists.txt` (build `essim_<name>` linking `essim_core`,
|
||||
produce the `essim` binary linking `essim_frontend`) and configuring
|
||||
`-DESSIM_FRONTEND=<name>`.
|
||||
*construct the concrete Frontend, call `frontend_main`*. Two frontends ship
|
||||
today: **tui** (FTXUI, default) and **wx** (a wxWidgets GUI, menu-driven over
|
||||
`app::*`). Add another by creating `src/frontends/<name>/CMakeLists.txt` — its
|
||||
toolkit setup (FetchContent / find_package) plus one call to
|
||||
`essim_add_frontend(<name> LIBS …)` (the shared helper in
|
||||
`cmake/EssimFrontend.cmake` that builds `essim_<name>` + the `essim` binary) —
|
||||
and configuring `-DESSIM_FRONTEND=<name>`.
|
||||
|
||||
Because the core links no toolkit, the suite links `essim_core` directly and
|
||||
`-DESSIM_FRONTEND=none` builds + tests the whole core with FTXUI never fetched.
|
||||
|
||||
Reference in New Issue
Block a user