Jump to content

Newt (programming library): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Typo fixing per WP:HYPHEN, replaced: commonly- → commonly using AWB (7774)
m Added short description
Tags: Mobile edit Mobile app edit iOS app edit App description add
 
(44 intermediate revisions by 40 users not shown)
Line 1: Line 1:
{{Short description|Software library for user interfaces}}
{{Multiple issues|
{{refimprove|date=June 2016}}
{{notability|Products|date=June 2016}}
}}

{{Infobox software
{{Infobox software
| name = Newt
| name = Newt
| logo =
| logo =
| screenshot = [[Image:Partimage.png|300px]]
| screenshot = Partimage.png
| caption = [[Partimage]] tool that uses Newt to create its user interface
| caption = [[Partimage]] tool that uses Newt to create its user interface
| collapsible =
| collapsible =
| author = Erik Troan, [[Red Hat]] engineer
| author = Erik Troan, [[Red Hat]] engineer
| developer =
| developer = Miroslav Lichvar
| released =
| released = 1996
| latest release version = 0.52.12
| latest release version = 0.52.24
| latest release date = {{Start date and age|2010|08|6}}
| latest release date = {{Start date and age|2023|10|25}}<ref>https://pagure.io/newt/releases - accessed on 2023/12/14</ref>
| latest preview version =
| latest preview version =
| latest preview date =
| latest preview date =
| programming language = [[C (programming language)|C]]
| frequently updated =
| operating system = [[Linux]], [[Cross-platform]] ([[Live CD]])
| programming language = [[C (programming language)|C]]
| platform =
| operating system = [[Linux]], [[Cross-platform]] ([[Live CD]])
| size = about 850 Kb when installed on i686 platform.
| platform =
| language =
| size = about 850 Kb when installed on i686 platform.
| genre = [[Widget toolkit]]
| language =
| license = [[GNU Lesser General Public License]]
| status = old fashioned, but in use
| website = {{URL|https://pagure.io/newt}}
| genre = [[Widget toolkit]]
| license = [[GNU Lesser General Public License]]
| website = [https://fedorahosted.org/newt/ Newt page on Fedora]
}}
}}
'''Newt''' is a [[programming library]] for color [[text mode]], [[Widget (computing)|widget-based]] [[user interface]]s. Newt can be used to add stacked windows, entry [[Widget (computing)|widgets]], [[checkbox]]es, [[radio button]]s, labels, plain text fields, [[scrollbar]]s, etc., to [[text user interface]]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 (software)|dialog]]. Newt is based on the [[S-Lang|slang library]]. It abbreviates from ''Not Erik's Windowing Toolkit''.
'''Newt''' is a [[programming library]] for color [[text mode]], [[Widget (computing)|widget-based]] [[user interface]]s. Newt can be used to add stacked windows, entry [[Widget (computing)|widgets]], [[checkbox]]es, [[radio button]]s, labels, plain text fields, [[scrollbar]]s, etc., to [[text user interface]]s. This package also contains the [[shared library]] needed by programs built with newt, as well as a [[Command-line interface|CLI]] application '''whiptail''', which provides the most commonly used features of [[Dialog (software)|dialog]]. Newt is based on the [[S-Lang|slang library]]. It abbreviates from ''Not Erik's Windowing Toolkit''.


== Features ==
== Overview ==
Newt was originally designed for use in the install code of the [[Red Hat Linux]] and is written mostly focusing in very clear interface, simplicity and small footprint<ref>[http://gnewt.sourceforge.net/tutorial.html Newt tutorial]</ref>. 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.
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.<ref>{{cite web
|url=http://gnewt.sourceforge.net/tutorial.html
|title=Newt tutorial
|archive-url=https://web.archive.org/web/20170124075941/http://gnewt.sourceforge.net/tutorial.html
|archive-date=2017-01-24
|url-status=dead
|access-date=2011-07-03
}}</ref> 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,<ref>{{cite web
|url=https://pagure.io/newt
|title=Official page of Newt and Whiptail, including git source code repository
}}</ref> using [[GPM (software)|GPM]] (a mouse-driver) but many users report Newt and Whiptail not responding to mouse control.<ref>{{cite web
|url=https://unix.stackexchange.com/questions/317182/is-it-possible-to-use-the-mouse-in-whiptail-if-yes-then-how-can-we-do-that
|title=Stack Exchange question about using mouse in whiptail
}}</ref><ref>{{cite web
|url=https://lists.debian.org/debian-user/2006/05/msg01427.html
|title=Debian mailing list question about dialog package with mouse support
}}</ref>


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.
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.
Line 34: Line 58:


== Interoperability ==
== Interoperability ==
Newt is written in [[C (programming language)|C]]. However there are bindings to other languages.
Newt is written in [[C (programming language)|C]]. However, there are bindings to other languages like [[Python (programming language)|Python]].


== Variants ==
== Variants ==
[http://www.whoow.org/people/Jean-Marc.Lienher/gnewt/index_en.html 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.
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 ==
== See also ==
{{Portal|Free software}}
{{Portal|Free and open-source software}}
* <tt>nparted</tt> - Newt text interface for [[GNU Parted]]
* {{mono|nparted}} - Newt text interface for [[GNU Parted]]
* [[ncurses]] - the text interface library for which dialog was written in 1994


==References==
==References==
{{reflist}}
<references/>


==External links==
==External links==
* {{Official website|https://pagure.io/newt}}
* [http://linux.softpedia.com/get/Programming/Widgets/Perl-Modules/Newt-34063.shtml Perl binding]
* Wikibooks' [[wikibooks:Bash Shell Scripting/Whiptail|Bash Shell Scripting/Whiptail]] tutorial
* [http://rpmfind.net/linux/rpm2html/search.php?query=newt-python Python binding]
* [http://www.php.net/manual/en/book.newt.php PHP binding]
* [http://rpmfind.net/linux/RPM/Development_Languages_Tcl.html Tcl binding]


{{DEFAULTSORT:Newt (Programming Library)}}
{{DEFAULTSORT:Newt (Programming Library)}}
[[Category:C libraries]]
[[Category:Application programming interfaces]]
[[Category:S-Lang (programming library)]]
[[Category:C (programming language) libraries]]
[[Category:Unix programming tools]]
[[Category:S-Lang]]
[[Category:Text user interface libraries]]
[[Category:Text user interface libraries]]
[[Category:Unix programming tools]]
[[Category:Widget toolkits]]

Latest revision as of 09:29, 1 October 2024

Newt
Original author(s)Erik Troan, Red Hat engineer
Developer(s)Miroslav Lichvar
Initial release1996
Stable release
0.52.24 / October 25, 2023; 11 months ago (2023-10-25)[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

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. ^ https://pagure.io/newt/releases - accessed on 2023/12/14
  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]