How the API docs are organized
The API reference is the per-type half of this
site: every public struct, trait, enum, and method, generated by rustdoc
straight from the source. The Guide you are reading now explains the ideas;
the API reference is where you look up the exact signature. Use the Guide ⇄
API toggle in the top bar to move between them. Type names in the Guide link
to their rustdoc page.
The module map
The crate is laid out as one module per concern. The reference for a type lives
in the module that owns it, so once you know the layout you can navigate by
guessing. Everything below is also re-exported at the crate root (so use tv::Button works); the documentation lives in the owning module:
| Module | What lives there |
|---|---|
app | Program, Application, the run loop |
view | the View trait, ViewState, Context, Deferred |
widgets | the controls: Button, check boxes, radio buttons, input lines, labels, list boxes, tables, scroll bars, editors |
window | Window and its scroll-bar options |
dialog | dialogs, message boxes, gather/scatter |
desktop | the Desktop and its background |
menu | menu bar and pull-down menus |
status | the status line and its help-context ranges |
event | the Event enum and Key |
command | Command and CommandSet |
theme | Theme and Role |
keymap | configurable key mapping |
validate | input-line validators |
data | the FieldValue value protocol |
screen | DrawBuffer, Cell, the cell buffer |
backend | the Backend trait, CrosstermBackend, HeadlessBackend |
The remaining modules (capture, color, frame, help, text, timer)
hold the supporting machinery the chapters in How It
Works walk through.
Finding a type
- Follow a Guide link. Every type the Guide names is a link into the reference.
- Use the rustdoc search box (press
S, or click the search field). Type a name, for exampleButtonorset_value, and rustdoc jumps to it. - Start at the crate root and drill down by module if you want to browse what a concern offers.
Coming from C++ Turbo Vision?
If you are translating a known TXxx class or cmXxx/sfXxx constant, go via
the symbol map, a lookup table from the C++ name to the tv::
type, which then links into the reference. The reasoning behind each
rename lives in The Idiomatic Port.