Text-based user interface
Text User Interface or Textual User Interface (short: TUI), or Terminal User Interface[clarification needed], is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from text-based user interfaces. The concept of TUI refers primarily to the way of output and does not coincide with command-line interfaces which is a certain user input mode. An advanced TUI may, like GUIs, use the entire screen area and does not necessarily provide line-by-line output, although TUIs only use text, symbols and colors available on a given text terminal or text mode display.
Contents |
TUI on ANSI-compatible terminals

ANSI standard ANSI X3.64 defines a standard set of escape sequences that can be used to drive terminals to create TUIs (see ANSI escape code.) However, not all terminals follow this standard, and many non-compatible but functionally equivalent sequences exist.
TUI under MS-DOS and Microsoft Windows

On IBM PCs and compatibles, the BIOS and MS-DOS system calls provide a way of writing text on the screen, and the ANSI.SYS driver could process standard ANSI escape sequences. However, programmers soon learned that writing data directly to the screen buffer was much faster, as well as being much simpler to program and less error-prone. This change in programming technique resulted in a large number of MS-DOS TUI programs.

Most often those programs used a blue background for the main screen, with white or yellow characters, although commonly they had also user color customization. Later, the interface became deeply influenced by GUIs, adding pull-down menus, overlapping windows, dialog boxes and GUI widgets operated by mnemonics or keyboard shortcuts. Soon mouse input was added — either at text resolution as a simple colored box or at graphical resolution thanks to the ability of the EGA and VGA display adapters to redefine the text character shapes by software — providing additional functionality.
Some notable programs of this kind were Microsoft Word, MS-DOS Shell, WordPerfect, Norton Commander, Turbo Vision based Borland Turbo Pascal and Turbo C (the latter included the conio library), Lotus 1-2-3 and many others. Some of these interfaces survive even during the Microsoft Windows 3.x age in the first 1990s; for example, the Microsoft C 6.0 compiler, employed to write true GUI programs under 16-bit MS Windows, still features its own TUI.
Since the beginning, Microsoft Windows includes a console for displaying MS-DOS software. Later versions added the Win32 console as a native interface for command line and TUI programs. The console usually opens in window mode, but it can be switched to full true text mode screen and vice versa by pressing the Alt and Enter keys together. Full-screen mode is not available in Windows Vista and later, but may be used with some workarounds. [1]
TUI under Unix-like systems

In Unix-like operating systems, TUIs are often constructed using the terminal control library curses, or ncurses, a mostly compatible library.
The advent of the curses library with Berkeley Unix created a portable and stable API for which to write TUIs. The ability to talk to various text terminal types using the same interfaces led to more widespread use of "visual" Unix programs, which occupied the entire terminal screen instead of using a simple line interface. This can be seen in text editors such as vi, mail clients such as pine or mutt, system management tools such as SMIT, SAM, FreeBSD's Sysinstall and web browsers such as lynx. Some applications, such as w3m, as well as older versions of pine and vi use the less-capable termcap library, performing many of the functions associated with curses within the application.
In addition, the rise in popularity of Linux brought many former MS-DOS users to a Unix-like platform, which has fostered an MS-DOS influence in many TUIs. The program minicom, for example, is modeled after the popular MS-DOS program Telix. Some other TUI programs, such as the Twin desktop, were ported over.
The free software program GNU Screen provides for managing multiple sessions inside a single TUI, and so can be thought of as being like a window manager for text-mode interfaces.
The proprietary Mac OS X text editor BBEdit includes a 'shell worksheet' function that works as a full-screen shell window.
TUI in embedded systems
Modern embedded systems are capable of displaying TUI on a monitor like personal computers. This functionality is usually implemented using specialized integrated circuits, modules, or using FPGA.
Video circuits or modules are usually controlled using VT100-compatible command set over UART,[citation needed] FPGA designs usually allow direct video memory access.[citation needed]
Other TUIs
- The full screen editor of the Commodore 64 8-bit computers was advanced in its market segment for its time. Users could move the cursor over the entire screen area, entering and editing BASIC program lines, as well as direct mode commands.
- Apple's Macintosh Programmer's Workshop programming environment included Commando, a TUI shell. It was the inspiration for BBEdit's shell worksheet.
- A TUI was the primary interface of the Oberon operating system as released in 1988.
- Later Apple II models included MouseText, a set of graphical glyphs used for making a TUI.
See also
- Text terminal for the computer interface of textual programs
- Text mode
- Text mode demos
- Command-line interface
- Console application
- Roguelike, a type of game typically using a TUI