Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

ModuleWhat lives there
appProgram, Application, the run loop
viewthe View trait, ViewState, Context, Deferred
widgetsthe controls: Button, check boxes, radio buttons, input lines, labels, list boxes, tables, scroll bars, editors
windowWindow and its scroll-bar options
dialogdialogs, message boxes, gather/scatter
desktopthe Desktop and its background
menumenu bar and pull-down menus
statusthe status line and its help-context ranges
eventthe Event enum and Key
commandCommand and CommandSet
themeTheme and Role
keymapconfigurable key mapping
validateinput-line validators
datathe FieldValue value protocol
screenDrawBuffer, Cell, the cell buffer
backendthe 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 example Button or set_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.