1# BSDDialog 2 3**Work In Progress!** 4 5This project provides **bsddialog** and **libbsddialog**, an utility and a 6library to build scripts and tools with *TUI Widgets*. 7 8Description: 9<https://www.freebsd.org/status/report-2021-04-2021-06/#_bsddialog_tui_widgets> 10 11 12## Getting Started 13 14FreeBSD: 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 23If you are using XFCE install 24[devel/ncurses](https://www.freshports.org/devel/ncurses/) 25 26``` 27% sudo pkg install ncurses 28% git clone https://gitlab.com/alfix/bsddialog.git 29% cd bsddialog 30% make -DPORTNCURSES 31% ./bsddialog --msgbox "Hello World!" 8 20 32``` 33 34Linux: 35 36``` 37% git clone https://gitlab.com/alfix/bsddialog.git 38% cd bsddialog 39% make -GNUMakefile 40% ./bsddialog --msgbox "Hello World!" 8 20 41``` 42 43Output: 44 45![screenshot](screenshot.png) 46 47 48Examples utility: 49``` 50% ./bsddialog --title msgbox --msgbox "Hello World!" 5 30 51% ./bsddialog --theme default --title msgbox --msgbox "Hello World!" 5 30 52% ./bsddialog --begin-y 2 --title yesno --yesno "Hello World!" 5 30 53% ./bsddialog --ascii-lines --pause "Hello World!" 8 50 5 54% ./bsddialog --checklist "Space to select" 0 0 0 Name1 Desc1 off Name2 Desc2 on Name3 Desc3 off 55% ./bsddialog --backtitle "TITLE" --title yesno --hline "bsddialog" --yesno "Hello World!" 5 25 56% ./bsddialog --extra-button --help-button --defaultno --yesno "Hello World!" 0 0 57``` 58 59Examples library: 60``` 61% cd library_examples 62% sh compile 63% ./buildlist 64% ./infobox 65% ./menu 66% ./mixedlist 67% ./msgbox 68% ./ports 69% ./radiolist 70% ./theme 71% ./treeview 72% ./yesno 73``` 74 75Use Cases: 76 77 - [portconfig](https://gitlab.com/alfix/portconfig) 78 79 80## Features 81 82**Common Options:** 83 84--ascii-lines, --aspect *ratio* (for infobox, msgbox and yesno), 85--backtitle *backtitle*, --begin-x *x* (--begin *y y*), 86(--begin *y x*), --cancel-label *string*, -clear (test with multiple widgets), 87--colors, --date-format *format*, --default-button *string*, --defaultno, 88--default-item *string*, 89--exit-label *string*, --extra-button, --extra-label *string*, 90--hfile *filename* (for completed widgets), n--help-button, 91--help-label *string*, --help-status, --help-tags, --hline *string*, --ignore, 92--item-help, --no-cancel, --nocancel, --no-label *string*, --no-items, 93--no-lines, --no-ok, 94--nook, --no-shadow, --no-tags, --ok-label *string*, --output-fd *fd*, 95--output-separator *string*, --print-version, 96--print-size (todo move lib -> utility), --quoted (quotes all != dialog), 97--print-maxsize, --shadow, --single-quoted (add --quote-with *ch*?), 98--separator *string* (alias --output-separator *string*), 99--separate-output (rename --separate-output-withnl?), --sleep *secs*, --stderr, 100--stdout, --theme *string* ("bsddialog", "dialog", "blackwhite" and "magenta"), 101--time-format *format*, --title *title*, --version, --yes-label *string*. 102 103**Widgets:** 104 105 infobox (do not clear the screen), msgbox, 106 yesno (dialog renames "yes/no" -> "ok/cancel" with --extra-button --help-button). 107 checklist, radiolist, menu, mixedlist, treeview and textbox. 108 109## TODO 110 111**Common Options:** 112 113| Option | Status | Note | 114| ---------------------------- | ----------- | ------------------------------- | 115| --cr-wrap | Coding | | 116| --help | In progress | | 117| --input-fd *fd* | | | 118| --insecure | | | 119| --keep-tite | | | 120| --keep-window | | | 121| --last-key | | | 122| --max-input *size* | | | 123| --no-collapse | Coding | | 124| --no-kill | | | 125| --no-nl-expand | Coding | | 126| --tab-correct | | | 127| --tab-len *n* | | | 128| --trim | Coding | | 129 130 131To evaluate / Not planned in the short term: --column-separator *string*, 132--create-rc *file*, --iso-week, --no-mouse, --print-text-only *str h w*, 133--print-text-size *str h w*, --reorder, -scrollbar, --separate-widget *string*, 134--size-err, --timeout *secs*,--trace *filename*, --visit-items, 135--week-start *day*. 136 137 138**Widgets:** 139 140| Widget | Status | Note | 141|--------------- | ----------- | ----------------------------------------------| 142| --buildlist | In progress | todo autosize, resize, F1 | 143| --calendar | In progress | todo autosize, resize, F1, leap year, year <=0, month days | 144| --editbox | | | 145| --form | In progress | implemented via --mixedform | 146| --gauge | In progress | | 147| --inputbox | In progress | implemented via --mixedform, todo \<init\> | 148| --mixedform | In progress | todo autosize, resize, F1 | 149| --mixedgauge | In progress | todo autosize, resize, F1 | 150| --passwordbox | In progress | implemented via --mixedform, todo \<init\> | 151| --passwordform | In progress | implemented via --mixedform | 152| --pause | In progress | todo autosize, resize, F1 | 153| --prgbox | In progress | add command opts | 154| --programbox | Coding | | 155| --progressbox | | | 156| --rangebox | In progress | todo autosize, resize, F1, PAGE-UP/PAGE-DOWN/HOME/END keys | 157| --timebox | In progress | todo autosize, resize, F1 | 158 159To evaluate / Not planned in the short term: tailbox (textbox/fseek), tailboxbg, 160dselect, fselect, inputmenu. 161