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