NameDateSize

..11-Mar-202490

.gitignoreH A D06-Oct-2023475

CHANGELOGH A D06-Oct-202316.5 KiB

examples_library/H06-Oct-202319

examples_utility/H06-Oct-202320

lib/H06-Oct-202319

LICENSEH A D06-Oct-20231.3 KiB

MakefileH A D06-Oct-2023788

README.mdH A D06-Oct-20233.4 KiB

screenshot.pngH A D24-Nov-202110.8 KiB

utility/H06-Oct-202310

README.md

1# BSDDialog 1.0
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## Demo
8
9[Screenshots](https://www.flickr.com/photos/alfonsosiciliano/albums/72157720215006074).
10
11
12## Getting Started
13
14FreeBSD and Linux:
15
16```
17% git clone https://gitlab.com/alfix/bsddialog.git
18% cd bsddialog
19% make
20% ./bsddialog --msgbox "Hello World!" 8 20
21```
22
23Output:
24
25![screenshot](screenshot.png)
26
27
28## Utility
29
30**Dialogs:**
31
32--calendar, --checklist, --datebox, --form, --gauge, --infobox, --inputbox,
33--menu, --mixedform, --mixedgauge, --msgbox, --passwordbox, --passwordform,
34--pause, --radiolist, --rangebox, --textbox, --timebox, --treeview, --yesno.
35
36**Manual**
37
38 - [bsddialog(1)](https://alfonsosiciliano.gitlab.io/posts/2022-01-26-manual-bsddialog.html)
39
40
41**Examples**:
42
43```
44% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30
45% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30
46% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30
47% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10
48% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on
49% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25
50% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0
51```
52
53and [Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_utility)
54in the _Public Domain_ to build new projects:
55```
56% sh ./examples_utility/calendar.sh
57% sh ./examples_utility/checklist.sh
58% sh ./examples_utility/datebox.sh
59% sh ./examples_utility/form.sh
60% sh ./examples_utility/gauge.sh
61% sh ./examples_utility/infobox.sh
62% sh ./examples_utility/inputbox.sh
63% sh ./examples_utility/menu.sh
64% sh ./examples_utility/mixedform.sh
65% sh ./examples_utility/mixedgauge.sh
66% sh ./examples_utility/msgbox.sh
67% sh ./examples_utility/passwordbox.sh
68% sh ./examples_utility/passwordform.sh
69% sh ./examples_utility/pause.sh
70% sh ./examples_utility/radiolist.sh
71% sh ./examples_utility/rangebox.sh
72% sh ./examples_utility/timebox.sh
73% sh ./examples_utility/yesno.sh
74```
75
76## Library
77
78**API**
79
80 - [bsddialog.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog.h)
81 - [bsddialog\_theme.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog_theme.h)
82
83
84**Manual**
85
86 - [bsddialog(3)](https://alfonsosiciliano.gitlab.io/posts/2022-01-15-manual-libbsddialog.html)
87
88
89**Examples**:
90
91[Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_library)
92in the _Public Domain_ to build new projects:
93```
94% cd examples_library
95% sh compile
96% ./calendar
97% ./checklist
98% ./datebox
99% ./form
100% ./gauge
101% ./infobox
102% ./menu
103% ./mixedgauge
104% ./mixedlist
105% ./msgbox
106% ./pause
107% ./radiolist
108% ./rangebox
109% ./theme
110% ./timebox
111% ./yesno
112```
113
114
115## TODO and Ideas
116
117 - menubar feature
118 - key callback
119 - Right-To-Left text
120 - some terminal does not hide the cursor, move it bottom-right before to getch.
121 - refactor backtitle: multiline, conf.backtitle, WINDOW \*dialog.backtitle.
122 - refactor bottomdesc: WINDOW \*dialog.bottomdesc -> fix expandig screen.
123 - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base
124 - add bool conf.menu.depthlines.
125 - implement custom getopt\_long().
126 - refactor/redesign gauge().
127 - improve grey lines expanding terminal (maybe redrawwin() in hide\_dialog()).
128 - more restrictive strtol() and strtoul().
129 - implement global buttons handler.
130 - add/move external tutorial.
131 - implement menutype.min_on.
132