# The tvision-rs Developer Guide

**tvision-rs** is a TUI framework for Rust: a
faithful, idiomatic port of
[magiblot/tvision](https://github.com/magiblot/tvision), the modern C++
incarnation of Borland's **Turbo Vision**. If you have ever driven a DOS-era
dialog with overlapping windows, a top menu bar, and a bottom status line, you
already know what an app built with this crate looks and feels like.

The goal is a framework a Turbo Vision veteran recognises on sight, but that is
*native Rust* — no inheritance, no raw pointers, no preprocessor. The class
hierarchy became a `View` trait plus composition; `TView*` pointers became
`ViewId` handles; the `cmXxx`/`sfXxx` constant families became namespaced
consts and named boolean fields. None of that changes the *behaviour*: the
event loop, the modal dialogs, the draw model, and the widget set all work the
way Turbo Vision always has.

## The `tv::` house style

By convention the crate is imported under the short alias `tv`, and the historic
`T` prefix is dropped. `TButton` is `tv::Button`, `TDialog` is `tv::Dialog`,
`TProgram` is `tv::Program`. So a Turbo Vision class maps to a `tv::` type by a
mechanical rule you can apply in your head:

| C++ Turbo Vision | tvision-rs (Rust)   |
| ---------------- | ---------------- |
| `TButton`        | `tv::Button`     |
| `TWindow`        | `tv::Window`     |
| `TDeskTop`       | `tv::Desktop`    |
| `TMenuBar`       | `tv::MenuBar`    |
| `TStatusLine`    | `tv::StatusLine` |

## How to read these docs

This documentation comes in **two layers that read as one site**:

- **The Guide** (these pages) is the narrative you read to *learn*. It is
  organised by task and by concept, carries colored screenshots of real running
  programs, and pulls all its code from compiled examples so the snippets never
  drift.
- **The [API reference](api/tvision_rs/index.html)** is the per-type reference —
  every struct, trait, and method, generated by `rustdoc` from the source. When
  the Guide names a type it links straight into the API, and the API links back
  into the Guide. Use the **Guide ⇄ API** toggle in the top bar to move between
  them.

A suggested path:

1. **[Getting Started](getting-started/installation.md)** — add the crate, build
   and run your first app.
2. If you are coming from C++ Turbo Vision, read **[The Idiomatic
   Port](port/faithful.md)** next: it explains the *ideas* behind each
   deviation.
3. Otherwise jump to **[Building Apps](apps/windows.md)** for task recipes.
   [The data-movement model](apps/data-movement.md) is a good early read —
   it explains in one place how values travel between dialogs, controls, siblings,
   and modals. Dip into **[How It Works](internals/view-tree.md)** when you want
   to write your own `View`.
