1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00
freebsd/contrib/bsddialog
Alfonso S. Siciliano 079f60541f
contrib/bsddialog: Import version 1.0.3
Change --mixedform output to adapt to bsdinstall restoring dialog(1)
behavior.

Avoid to print the field value to output if <fieldlen> is read-only
(less than or equal to zero). This fixes passwords in wlanconfig,
avoiding to print also SSID.

To note --mixedform continues to print field value if <flag> is
read-only. This avoids breaking netconfig and netconfig_ipv6.

See /usr/src/contrib/bsddialog/CHANGELOG '2024-05-27 Version 1.0.3'
for more detailed information.

Reported by:	garga

(redo branch main moved forward)
Merge commit '813f3dc7b302324a361326c2583f37b002100968' into redo-bsddialog-1.0.3
2024-05-27 21:32:01 +02:00
..
examples_library contrib/bsddialog: Import version 1.0.2 2024-05-16 15:32:56 +02:00
examples_utility bsddialog: import version 1.0 2023-10-04 18:12:03 +02:00
lib contrib/bsddialog: Import version 1.0.3 2024-05-27 21:32:01 +02:00
utility contrib/bsddialog: Import version 1.0.3 2024-05-27 21:32:01 +02:00
.gitignore bsddialog: import version 1.0 2023-10-04 18:12:03 +02:00
CHANGELOG contrib/bsddialog: Import version 1.0.3 2024-05-27 21:32:01 +02:00
LICENSE contrib/bsddialog: Import version 1.0.2 2024-05-16 15:32:56 +02:00
Makefile contrib/bsddialog: Import version 1.0.3 2024-05-27 21:32:01 +02:00
README.md contrib/bsddialog: Import version 1.0.3 2024-05-27 21:32:01 +02:00
screenshot.png

BSDDialog 1.0.3

This project provides bsddialog and libbsddialog, an utility and a library to build scripts and tools with TUI dialogs and widgets.

Demo

Screenshots.

Getting Started

FreeBSD and Linux:

% git clone https://gitlab.com/alfix/bsddialog.git
% cd bsddialog
% make
% ./bsddialog --msgbox "Hello World!" 8 20

Output:

screenshot

Utility

Dialogs:

--calendar, --checklist, --datebox, --form, --gauge, --infobox, --inputbox, --menu, --mixedform, --mixedgauge, --msgbox, --passwordbox, --passwordform, --pause, --radiolist, --rangebox, --textbox, --timebox, --treeview, --yesno.

Manual

Examples:

% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30
% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30
% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30
% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10
% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on
% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25
% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0

and Examples in the Public Domain to build new projects:

% sh ./examples_utility/calendar.sh
% sh ./examples_utility/checklist.sh
% sh ./examples_utility/datebox.sh
% sh ./examples_utility/form.sh
% sh ./examples_utility/gauge.sh
% sh ./examples_utility/infobox.sh
% sh ./examples_utility/inputbox.sh
% sh ./examples_utility/menu.sh
% sh ./examples_utility/mixedform.sh
% sh ./examples_utility/mixedgauge.sh
% sh ./examples_utility/msgbox.sh
% sh ./examples_utility/passwordbox.sh
% sh ./examples_utility/passwordform.sh
% sh ./examples_utility/pause.sh
% sh ./examples_utility/radiolist.sh
% sh ./examples_utility/rangebox.sh
% sh ./examples_utility/timebox.sh
% sh ./examples_utility/yesno.sh

Library

API

Manual

Examples:

Examples in the Public Domain to build new projects:

% cd examples_library
% sh compile
% ./calendar
% ./checklist
% ./datebox
% ./form
% ./gauge
% ./infobox
% ./menu
% ./mixedgauge
% ./mixedlist
% ./msgbox
% ./pause
% ./radiolist
% ./rangebox
% ./theme
% ./timebox
% ./yesno

TODO and Ideas

  • menubar feature.
  • key callback.
  • Right-To-Left text.
  • some terminal does not hide the cursor, move it bottom-right before to getch.
  • refactor backtitle: add WINDOW *dialog.backtitle for multiline and fix expanding screen.
  • refactor bottomdesc: add WINDOW *dialog.bottomdesc to fix expandig screen.
  • accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base.
  • add bool conf.menu.depthlines.
  • implement custom getopt_long().
  • refactor/redesign gauge().
  • improve grey lines expanding terminal (maybe redrawwin() in hide_dialog()).
  • more restrictive strtol() and strtoul().
  • implement global buttons handler.
  • doc: external tutorial, theming guide.
  • implement menutype.min_on.
  • improve refresh at startup, avoid dialog refresh before drawing text.
  • add debug API: bsddialog_debug(y,x,refresh,"fmt",...).
  • add mouse support.
  • use alarm(2) for bsddialog_pause.
  • delete form fieldlen constraint, hide or truncate long field in little screens.
  • improve --inputbox autosizing, consider also input length.
  • fix --form "" 0 0 0 Label 1 0 Init 1 12 0 0 (with 0 editable field).
  • fix --mixedform "" 0 0 0 Label 1 0 Init 1 12 0 0 2 (with 0 editable field).
  • add text customization to --hmsg help-message
  • check --passwordform fieldlen like --form and --mixedform.