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.
|
||||
|
||||
11
README.md
11
README.md
@@ -51,10 +51,17 @@ Step-by-step walkthroughs for both the batch and TUI workflows are in
|
||||
- Fetched automatically via `FetchContent` (nothing to install): **FTXUI**
|
||||
v6.1.9 — only when building the **tui** frontend — and **doctest** v2.4.11
|
||||
for the tests.
|
||||
- **wxWidgets** (≥ 3.2) — only for the **wx** GUI frontend
|
||||
(`-DESSIM_FRONTEND=wx`). Install the development package:
|
||||
- Debian/Ubuntu — `sudo apt install libwxgtk3.2-dev`
|
||||
- Arch — `sudo pacman -S wxwidgets-gtk3`
|
||||
- Fedora — `sudo dnf install wxGTK-devel`
|
||||
- Optional, only for the `doc` target: **doxygen** and **python3**.
|
||||
|
||||
libzip, pugixml and libbsdl are the **core** dependencies; FTXUI belongs to the
|
||||
tui frontend, so a `-DESSIM_FRONTEND=none` build needs none of it.
|
||||
libzip, pugixml and libbsdl are the **core** dependencies; each frontend pulls
|
||||
its own toolkit (FTXUI for tui, wxWidgets for wx), so a `-DESSIM_FRONTEND=none`
|
||||
build needs neither. Pick a GUI/TUI with `-DESSIM_FRONTEND=tui|wx` (default
|
||||
`tui`).
|
||||
|
||||
## Tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user