xref: /freebsd/contrib/dialog/samples/checklist-8bit (revision a96ef4501919d7ac08e94e98dc34b0bdd744802b)
14c8945a0SNathan Whitehorn#! /bin/sh
2*a96ef450SBaptiste Daroussin# $Id: checklist-8bit,v 1.10 2020/11/26 00:03:58 tom Exp $
34c8945a0SNathan Whitehorn
44c8945a0SNathan Whitehorn. ./setup-vars
54c8945a0SNathan Whitehorn
64c8945a0SNathan Whitehorn. ./setup-tempfile
74c8945a0SNathan Whitehorn
84c8945a0SNathan Whitehorn. ./testdata-8bit
94c8945a0SNathan Whitehorn
104c8945a0SNathan Whitehorn$DIALOG --backtitle "No Such Organization" \
114c8945a0SNathan Whitehorn	--title "CHECKLIST BOX" "$@" \
124c8945a0SNathan Whitehorn        --checklist "Hi, this is a checklist box. You can use this to \n\
134c8945a0SNathan Whitehornpresent a list of choices which can be turned on or \n\
144c8945a0SNathan Whitehornoff. If there are more items than can fit on the \n\
154c8945a0SNathan Whitehornscreen, the list will be scrolled. You can use the \n\
164c8945a0SNathan WhitehornUP/DOWN arrow keys, the first letter of the choice as a \n\
174c8945a0SNathan Whitehornhot key, or the number keys 1-9 to choose an option. \n\
184c8945a0SNathan WhitehornPress SPACE to toggle an option on/off. \n\n\
194c8945a0SNathan Whitehorn  Which of the following are fruits?" 20 61 5 \
20*a96ef450SBaptiste Daroussin        "`./rotated-data 0 "$SAMPLE"`"  "It's an `./rotated-data 0 "$SAMPLE"`." off \
21*a96ef450SBaptiste Daroussin        "`./rotated-data 1 "$SAMPLE"`"  "No, that's not my `./rotated-data 1 "$SAMPLE"`." ON \
22*a96ef450SBaptiste Daroussin        "`./rotated-data 2 "$SAMPLE"`" "Yeah, that's `./rotated-data 2 "$SAMPLE"`." off \
23*a96ef450SBaptiste Daroussin        "`./rotated-data 3 "$SAMPLE"`"  "Normally not a `./rotated-data 3 "$SAMPLE"`." off \
24*a96ef450SBaptiste Daroussin        "`./rotated-data 4 "$SAMPLE"`"  "No, never put a `./rotated-data 4 "$SAMPLE"` there!" oN \
25*a96ef450SBaptiste Daroussin        "`./rotated-data 5 "$SAMPLE"`"  "Cats like `./rotated-data 5 "$SAMPLE"`." On \
26*a96ef450SBaptiste Daroussin        "`./rotated-data 6 "$SAMPLE"`"  "You `./rotated-data 6 "$SAMPLE"` how it is." on 2> $tempfile
274c8945a0SNathan Whitehorn
28*a96ef450SBaptiste Daroussinreturncode=$?
294c8945a0SNathan Whitehorn
304c8945a0SNathan Whitehorn. ./report-tempfile
31