HOME

TheInfoList



OR:

Newt is a
programming library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and su ...
for color
text mode Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', each ...
, widget-based
user interface In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine f ...
s. Newt can be used to add stacked windows, entry widgets,
checkbox A checkbox (check box, tickbox, tick box) is a graphical widget that permits the user to make a binary choice, i.e. a choice between one of two possible mutually exclusive options. For example, the user may have to answer 'yes' (checked) or 'n ...
es,
radio button A radio button or option button is a graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options. The singular property of a radio button makes it distinct from checkboxes, where the user ...
s, labels, plain text fields,
scrollbar A scrollbar is an interaction technique or widget in which continuous text, pictures, or any other content can be scrolled in a predetermined direction (up, down, left, or right) on a computer display, window, or viewport so that all of the con ...
s, etc., to
text user interface In computing, text-based user interfaces (TUI) (alternately terminal user interfaces, to reflect a dependence upon the properties of computer terminals and not just text), is a retronym describing a type of user interface (UI) common as an ear ...
s. This package also contains the
shared library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subro ...
needed by programs built with newt, as well as an application whiptail, which provides the most commonly used features of
dialog Dialog is an online information service owned by ProQuest, who acquired it from Thomson Reuters in mid-2008. Dialog was one of the predecessors of the World Wide Web as a provider of information, though not in form. The earliest form of the Dial ...
. 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
Red Hat Linux Red Hat Linux was a widely used Commercial software, commercial Open-source software, open-source Linux distribution created by Red Hat until its discontinuation in 2004. Early releases of Red Hat Linux were called Red Hat Commercial Linux. R ...
and is written mostly focusing on clear interface, simplicity and small footprint. Because of that, unlike most recent GUI engines, it does not use an
event-driven architecture Event-driven architecture (EDA) is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. Overview An ''event'' can be defined as "a significant change in state". For example, when a consumer p ...
. Windows must be created and destroyed as a stack (the order of discarding is the exact opposite to that of creation). The top level window is always modal. Many behaviours, such as widget traversal order, are difficult or impossible to change. Mouse control appears to be supported in the source code, using GPM (a mouse-driver) but many users report Newt and Whiptail not responding to mouse control. 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 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 administrato ...
) that focus more on functionality than on looking attractive to the end user.


Interoperability

Newt is written in C. However, there are bindings to other languages.


Variants

gNewt project (no longer active) provides an alternative implementation that uses
GTK GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
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 whereas the original Newt only supports the keyboard.


See also

* - Newt text interface for
GNU Parted GNU Parted (the name being the conjunction of the two words PARTition and EDitor) is a free partition editor, used for creating and deleting partitions. This is useful for creating space for new operating systems, reorganising hard disk usage, co ...
*
ncurses ncurses (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces (TUI) in a terminal-independent manner. It is a toolkit for developing "GUI-like" ...
- the text interface library for which dialog was written in 1994


References


External links

* * Wikibooks' Bash Shell Scripting/Whiptail tutorial {{DEFAULTSORT:Newt (Programming Library) Application programming interfaces C (programming language) libraries S-Lang Text user interface libraries Unix programming tools Widget toolkits