Newt
Original authorsErik Troan, Red Hat engineer
DeveloperMiroslav Lichvar
Initial release1996
Stable release
0.52.25 / 10 March 2025; 15 months ago (2025-03-10)[1]
Written inC
Operating systemLinux, Cross-platform (Live CD)
Sizeabout 850 Kb when installed on i686 platform.
TypeWidget toolkit
LicenseGNU Lesser General Public License
Websitepagure.io/newt
Repository

Newt is a programming library for color text mode, widget-based user interfaces. Newt can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text user interfaces. This package also contains the shared library needed by programs built with newt, as well as a CLI 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

edit

Newt was originally designed for use in the install code of Red Hat Linux and is written mostly focusing on clear interface, simplicity and small footprint.[2] Because of that, unlike most recent GUI engines, it does not use an event-driven architecture.

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,[3] using GPM (a mouse-driver) but many users report Newt and Whiptail not responding to mouse control.[4][5]

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

edit

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

edit

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

Variants

edit

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 whereas the original Newt only supports the keyboard.

See also

edit
  • nparted - Newt text interface for GNU Parted
  • ncurses - the text interface library for which dialog was written in 1994

References

edit
  1. ^ "Releases - newt - Pagure.io". Retrieved 2025-02-28.
  2. ^ "Newt tutorial". Archived from the original on 2017-01-24. Retrieved 2011-07-03.
  3. ^ "Official page of Newt and Whiptail, including git source code repository".
  4. ^ "Stack Exchange question about using mouse in whiptail".
  5. ^ "Debian mailing list question about dialog package with mouse support".
edit

📚 Artikel Terkait di Wikipedia

Newt (disambiguation)

characters Newt, Kentucky, an unincorporated community HMS Newt, a British Second World War shore establishment Newt (programming library), a library for text-mode

C (programming language)

programming languages, with C compilers available for practically all modern computer architectures and operating systems. The book The C Programming

Curses (programming library)

features SMG$ – a similar idea, for OpenVMS Newt - a similar text UI library based on the slang library Craddock, David L. (June 17, 2016). "Procedural

List of C software and tools

This is a list of software and programming tools for the C programming language, including libraries, debuggers, compilers, integrated development environments

Outline of the C programming language

November 10, 2021. "C Library Functions". GeeksforGeeks. July 18, 2021. "C Programming Tutorial". cprogramming.com. C programming language at Wikipedia's

The C Programming Language

The C Programming Language (sometimes termed K&R, after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie

Newt Gingrich

March 3, 2011. "Meet Newt". Newt 2012. Archived from the original on June 22, 2011. Retrieved June 24, 2011. "2011 Speaker Bios: Newt Gingrich". Salem State

List of open-source code libraries

open-source programming languages Lists of programming software development tools List of Ajax frameworks List of WebGL frameworks Shared library List of