xref: /freebsd/contrib/bsddialog/README.md (revision b197d4b893974c9eb4d7b38704c6d5c486235d6f)
1# BSDDialog 0.3
2
3This project provides **bsddialog** and **libbsddialog**, an utility
4and a library to build scripts and tools with TUI dialogs and widgets.
5
6
7## Intro
8
9Briefly:
10<https://www.freebsd.org/status/report-2021-04-2021-06/bsddialog/>
11
12Utility:
13<https://alfonsosiciliano.gitlab.io/posts/2021-12-07-bsddialog.html>
14
15Library:
16<https://alfonsosiciliano.gitlab.io/posts/2022-01-16-libbsddialog.html>
17
18Screenshots:
19<https://www.flickr.com/photos/alfonsosiciliano/albums/72157720215006074>
20
21
22## Getting Started
23
24FreeBSD:
25
26```
27% git clone https://gitlab.com/alfix/bsddialog.git
28% cd bsddialog
29% make
30% ./bsddialog --msgbox "Hello World!" 8 20
31```
32
33Linux:
34
35```
36% git clone https://gitlab.com/alfix/bsddialog.git
37% cd bsddialog
38% make -f GNUMakefile
39% ./bsddialog --msgbox "Hello World!" 8 20
40```
41
42Output:
43
44![screenshot](screenshot.png)
45
46
47## Utility
48
49**Dialogs:**
50
51--checklist, --datebox, --form, --gauge, --inputbox, --menu, --mixedform,
52--mixedgauge, --msgbox, --passwordbox, --passwordform, --pause, --radiolist,
53--rangebox, --textbox, --timebox, --treeview, --yesno.
54
55**Manual**
56
57 - [bsddialog(1)](https://alfonsosiciliano.gitlab.io/posts/2022-01-26-manual-bsddialog.html)
58
59
60**Examples**:
61
62```
63% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30
64% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30
65% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30
66% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10
67% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on
68% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25
69% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0
70```
71
72and [Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_utility)
73in the _Public Domain_ to build new projects:
74```
75% sh ./examples_utility/checklist.sh
76% sh ./examples_utility/form.sh
77% sh ./examples_utility/gauge.sh
78% sh ./examples_utility/infobox.sh
79% sh ./examples_utility/inputbox.sh
80% sh ./examples_utility/menu.sh
81% sh ./examples_utility/mixedform.sh
82% sh ./examples_utility/mixedgauge.sh
83% sh ./examples_utility/msgbox.sh
84% sh ./examples_utility/passwordbox.sh
85% sh ./examples_utility/passwordform.sh
86% sh ./examples_utility/pause.sh
87% sh ./examples_utility/radiolist.sh
88% sh ./examples_utility/timebox.sh
89% sh ./examples_utility/yesno.sh
90```
91
92## Library
93
94**API**
95
96 - [bsddialog.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog.h)
97 - [bsddialog\_theme.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog_theme.h)
98
99
100**Manual**
101
102 - [bsddialog(3)](https://alfonsosiciliano.gitlab.io/posts/2022-01-15-manual-libbsddialog.html)
103
104
105**Examples**:
106
107[Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_library)
108in the _Public Domain_ to build new projects:
109```
110% cd examples_library
111% sh compile
112% ./checklist
113% ./datebox
114% ./form
115% ./infobox
116% ./menu
117% ./mixedlist
118% ./msgbox
119% ./pause
120% ./radiolist
121% ./rangebox
122% ./theme
123% ./timebox
124% ./yesno
125```
126
127
128## TODO and Ideas
129
130 - menubar feature
131 - key callback
132 - Right-To-Left text
133