How rinsdr/tvision works
Main Components
• User Application / Demo Layer: These are the “example” applications (e.g. hello.cpp, tvdemo, tvedit, mmenu, palette, etc.) that use the Turbo Vision library.
• Core UI Framework: This includes the library’s classes (the “tvision” classes such as TView, TApplication, TScreen, TDrawBuffer) found in source/tvision and the corresponding headers in include/tvision.
• Platform Abstraction Layer: Found in source/platform (files like ansidisp.cpp, terdisp.cpp, hardware.cpp, etc.), this layer isolates the OS–specific implementations—for instance using ncurses on Linux, Win32 Console API on Windows, and legacy support for Borland C++.
• Compatibility & Utility Code: Legacy support in include/tvision/compat (Borland C++ compatibility) and support modules such as palette, event handling (TKey, TEvent), and Unicode extensions.
• Build & Configuration: The CMakeLists.txt at the root (and within examples and source) along with project/makefile for Borland. Also include the GitHub workflows in .github/workflows that point to CI/CD.
• TApplication (event loop and application lifecycle)
• TView and derivative widgets (menus, dialogs, file viewers, etc.)
• TDrawBuffer & TScreen for drawing
• TKey, TEvent and related input handling modules
– Next, a “Platform Abstraction Layer” that shows the separation of OS–dependent implementations. Indicate that this layer is responsible for:
• Terminal I/O (using ncurses and Windows Console API)
• Event capturing and dispatching
• Low–level screen and input functions (as implemented in source/platform)
• Legacy Borland C++ compatibility (contents of include/tvision/compat)
• Additional modules like palette management and clipboard interaction.
– At the bottom or as a side block, include a “Build & Deployment” area that points to:
• The CMake build system (with CMakeLists.txt files in the root and subdirectories)
• The project/makefile for Borland
• CI/CD scripts from .github/workflows
Architectural Patterns and Key Design Principles
– Highlight the modular, layered design that cleanly separates UI logic from platform code (following a kind of “platform abstraction” pattern).
• Application-level code (e.g. demos, sample apps)
• Core framework components (e.g. TView, TApplication)
• Platform–specific implementations (system I/O, terminal handling)
• Build/CI components (scripts, makefiles, project directories)
Final Advice to the Principal Software Engineer
– Start by listing every main folder in a draft; map them to their runtime responsibilities. For example, note that “source/platform” implements the abstracted I/O while “source/tvision” holds the widget and UI core.
– Then, sketch the layers beginning with the demo applications at the top, linking into the core Turbo Vision library.
– Don’t forget to indicate the build channels (modern CMake builds plus legacy Borland-based makefiles).