Newt (programming library)
Encyclopedia
Newt is a programming library for color text mode
Text mode
Text mode is a kind of computer display mode in which the content of the screen is internally represented in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of character cells, each of which contains one of the characters of a...

, widget-based
Widget (computing)
In computer programming, a widget is an element of a graphical user interface that displays an information arrangement changeable by the user, such as a window or a text box. The defining characteristic of a widget is to provide a single interaction point for the direct manipulation of a given...

 user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

s. Newt can be used to add stacked windows, entry widgets
Widget (computing)
In computer programming, a widget is an element of a graphical user interface that displays an information arrangement changeable by the user, such as a window or a text box. The defining characteristic of a widget is to provide a single interaction point for the direct manipulation of a given...

, checkboxes, radio button
Radio button
A radio button or option button is a type of graphical user interface element that allows the user to choose only one of a predefined set of options....

s, labels, plain text fields, scrollbar
Scrollbar
A scrollbar is an object in a graphical user interface with which continuous text, pictures or anything else can be scrolled including time in video applications, i.e., viewed even if it does not fit into the space in a computer display, window, or viewport...

s, etc., to text user interface
Text user interface
TUI short for: Text User Interface or Textual User Interface , is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from text-based user interfaces...

s. This package also contains the shared library needed by programs built with newt, as well as an application whiptail, which provides the most commonly used features of dialog
Dialog (software)
Dialog is an application used in shell scripts which displays text user interface widgets. It uses the curses or ncurses library. The latter provides users with the ability to use a mouse, e.g., in an xterm....

. Newt is based on the slang library. It abbreviates from Not Erik's Windowing Toolkit.

Features

Newt was originally designed for use in the install code of the Red Hat Linux
Red Hat Linux
Red Hat Linux, assembled by the company Red Hat, was a popular Linux based operating system until its discontinuation in 2004.Red Hat Linux 1.0 was released on November 3, 1994...

 and is written mostly focusing in very clear interface, simplicity and small footprint. Because of that, unlike the most of recent GUI engines, it does not use the event-driven architecture. The windows must be created and destroyed as a stack (the order of discarding is exactly opposite order to the order of creation). The top level window is always modal. Many behaviours, such as widget traversal order, are difficult or impossible to change.

These restrictions simplify the design of the library as well as the code of programs using it, though they impose limitations on user interface design.

Usage

The capabilities are fully adequate for the installation process, and Newt was used for the user friendly OS installers. It is also used in some system tools (like Partimage
Partimage
Partimage is a disk cloning utility for Linux/UNIX environments. Partimage can save partitions in many formats to a disk image. Utilities such as Partimage are useful in a number of situations which are commonly encountered by network administrators as well as advanced computer users who maintain...

) that focus more on functionality than on looking attractive to the end user.

Interoperability

Newt is written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

. However there are bindings to other languages.

Variants

gNewt project (no longer active) provides an alternative implementation that uses GTK instead of the text based interface. It is fully compatible with the official Newt implementation and can be replaced at run time, without recompilation. Like any other GTK components, gNewt controls can also use mouse input when the original Newt only supports the keyboard.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK