1# BSDDialog 1.1 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 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, --slider, --textbox, --timebox, --treeview, 35--yesno. 36 37**Manual** 38 39 - [bsddialog(1)](https://alfonsosiciliano.gitlab.io/posts/2022-01-26-manual-bsddialog.html) 40 41 42**Examples**: 43 44``` 45% ./bsddialog --backtitle "TITLE" --title msgbox --msgbox "Hello World!" 5 30 46% ./bsddialog --theme blackwhite --title msgbox --msgbox "Hello World!" 5 30 47% ./bsddialog --begin-y 2 --default-no --title yesno --yesno "Hello World!" 5 30 48% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 10 49% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on 50% ./bsddialog --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25 51% ./bsddialog --extra-button --help-button --yesno "Hello World!" 0 0 52``` 53 54and [Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_utility) 55in the _Public Domain_ to build new projects: 56``` 57% sh ./examples_utility/calendar.sh 58% sh ./examples_utility/checklist.sh 59% sh ./examples_utility/datebox.sh 60% sh ./examples_utility/form.sh 61% sh ./examples_utility/gauge.sh 62% sh ./examples_utility/infobox.sh 63% sh ./examples_utility/inputbox.sh 64% sh ./examples_utility/menu.sh 65% sh ./examples_utility/mixedform.sh 66% sh ./examples_utility/mixedgauge.sh 67% sh ./examples_utility/msgbox.sh 68% sh ./examples_utility/passwordbox.sh 69% sh ./examples_utility/passwordform.sh 70% sh ./examples_utility/pause.sh 71% sh ./examples_utility/radiolist.sh 72% sh ./examples_utility/rangebox.sh 73% sh ./examples_utility/slider.sh 74% sh ./examples_utility/timebox.sh 75% sh ./examples_utility/yesno.sh 76``` 77 78## Library 79 80**API** 81 82 - [bsddialog.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog.h) 83 - [bsddialog\_theme.h](https://gitlab.com/alfix/bsddialog/-/blob/main/lib/bsddialog_theme.h) 84 85 86**Manual** 87 88 - [bsddialog(3)](https://alfonsosiciliano.gitlab.io/posts/2022-01-15-manual-libbsddialog.html) 89 90 91**Examples**: 92 93[Examples](https://gitlab.com/alfix/bsddialog/-/tree/main/examples_library) 94in the _Public Domain_ to build new projects: 95``` 96% cd examples_library 97% sh compile 98% ./calendar 99% ./checklist 100% ./datebox 101% ./form 102% ./gauge 103% ./infobox 104% ./menu 105% ./mixedgauge 106% ./mixedlist 107% ./msgbox 108% ./pause 109% ./radiolist 110% ./rangebox 111% ./slider 112% ./theme 113% ./timebox 114% ./yesno 115``` 116 117 118## TODO and Ideas 119 120 - menubar feature. 121 - key callback. 122 - Right-To-Left text. 123 - some terminal does not hide the cursor, move it bottom-right before to getch. 124 - refactor backtitle: add WINDOW \*dialog.backtitle for multiline and fix expanding screen. 125 - refactor bottomdesc: add WINDOW \*dialog.bottomdesc to fix expandig screen. 126 - accessibility https://wiki.freebsd.org/Accessibility/Wishlist/Base. 127 - add bool conf.menu.depthlines. 128 - implement custom getopt\_long(). 129 - refactor/redesign gauge(). 130 - improve grey lines expanding terminal (maybe redrawwin() in hide\_dialog()). 131 - more restrictive strtol() and strtoul(). 132 - implement global buttons handler. 133 - doc: external tutorial, theming guide. 134 - implement menutype.min\_on. 135 - add debug API: bsddialog\_debug(y,x,refresh,"fmt",...). 136 - add mouse support. 137 - use alarm(2) for bsddialog\_pause. 138 - delete form fieldlen constraint, hide or truncate long field in little screens. 139 - improve --inputbox autosizing, consider also input length. 140 - fix --form "" 0 0 0 Label 1 0 Init 1 12 0 0 (with 0 editable field). 141 - fix --mixedform "" 0 0 0 Label 1 0 Init 1 12 0 0 2 (with 0 editable field). 142 - add *text* customization to --hmsg *help-message* 143 - check --passwordform *fieldlen* like --form and --mixedform. 144 - add manuals to Makefiles installe and uninstall targets. 145