From Wikipedia, the free encyclopedia - View original article
|This article does not cite any references or sources. (January 2009)|
Text-based user interface (TUI), also called textual user interface or terminal user interface,[clarification needed] is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from user interfaces that were text-based. 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 environment.
|This section does not cite any references or sources. (September 2012)|
From text application's point of view, there exists following three possibilities about the text screen and communications with it, ordered by decreasing of accessibility.
Under Linux and other Unix-like systems, a program easily accommodates to any of three cases because the same interface (namely, standard streams) is used to control the display and keyboard. Also, specialized programming libraries help to output the text in a way appropriate to the given display device and interface to it. See below a comparison to Windows.
American National Standards Institute (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). Escape sequences may be supported for all three cases mentioned in the above section, allowing random cursor movements and color changes. However, not all terminals follow this standard, and many non-compatible but functionally equivalent sequences exist.
On IBM Personal Computers and compatibles, the Basic Input Output System (BIOS) and DOS system calls provide a way to write 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 far faster and simpler to program, and less error-prone; see VGA-compatible text mode for details. This change in programming methods resulted in many DOS TUI programs. The win32 console environment is notorious for its emulation of certain EGA/VGA text mode features, particularly a random access to the text buffer, even if the application runs in a window. On the other hand, programs running under Windows (both native and DOS applications) have much less control of the display and keyboard than Linux and DOS programs can have, because of aforementioned win32 console layer.
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 graphical user interfaces (GUI), 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 Enhanced Graphics Adapter (EGA) and Video Graphics Array (VGA) display adapters to redefine the text character shapes by software – providing additional functions.
Some notable programs of this kind were Microsoft Word, 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 survived even during the Microsoft Windows 3.1x period in the early 1990s. For example, the Microsoft C 6.0 compiler, used to write true GUI programs under 16-bit Windows, still has its own TUI.
Since its start, Microsoft Windows includes a console to display DOS software. Later versions added the Win32 console as a native interface for command-line interface 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.
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, and older versions of pine and vi use the less-able termcap library, performing many of the functions associated with curses within the application.
In addition, the rise in popularity of Linux brought many former DOS users to a Unix-like platform, which has fostered a DOS influence in many TUIs. The program minicom, for example, is modeled after the popular 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. Tmux can also do this.