HOME

TheInfoList



OR:

Newt is a
programming library In computing, a library is a collection of System resource, resources that can be leveraged during software development to implement a computer program. Commonly, a library consists of executable code such as compiled function (computer scienc ...
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'', ea ...
, 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 fro ...
s. Newt can be used to add stacked windows, entry widgets,
checkbox A checkbox (check box, tickbox, tick box) is a graphical widget that allows 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 (GUI), widget in which continuous text, pictures, or any other content can be Scrolling, scrolled in a predetermined direction (up, down, left, or right) on a computer display, window (computing) ...
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 computing, a library is a collection of System resource, resources that can be leveraged during software development to implement a computer program. Commonly, a library consists of executable code such as compiled function (computer scienc ...
needed by programs built with newt, as well as a
CLI CLI may refer to: Computing * Call Level Interface, an SQL database management API * Command-line interface, of a computer program * Command-line interpreter or command language interpreter; see List of command-line interpreters * CLI (x86 instruc ...
application whiptail, which provides the most commonly used features of dialog. Newt is based on the slang library. It abbreviates from ''Not Erik's Windowing Toolkit''.


Overview

Newt was originally designed for use in the install code of
Red Hat Linux Red Hat Linux was a widely used commercial 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. Red Hat published the first non-beta release ...
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 concerning the production and detection of Event (computing), events. Event-driven architectures are Continuous design, evolutionary in nature and provide a high degree of fault to ...
. 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) 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 like Python.


Variants

gNewt project (no longer active) provides an alternative implementation that uses
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software 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 software, free and ...
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 (from '' GNU partition 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, copying data between hard disks, and ...
* ncurses - 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