diff --git a/DESIGN.md b/DESIGN.md index afe33b1..0fbf11f 100644 --- a/DESIGN.md +++ b/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//CMakeLists.txt` (build `essim_` linking `essim_core`, - produce the `essim` binary linking `essim_frontend`) and configuring - `-DESSIM_FRONTEND=`. + *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//CMakeLists.txt` — its + toolkit setup (FetchContent / find_package) plus one call to + `essim_add_frontend( LIBS …)` (the shared helper in + `cmake/EssimFrontend.cmake` that builds `essim_` + the `essim` binary) — + and configuring `-DESSIM_FRONTEND=`. 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. diff --git a/README.md b/README.md index 9de2b37..45fe1e4 100644 --- a/README.md +++ b/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