xref: /freebsd/contrib/dialog/samples/checklist-8bit (revision 4c8945a06b01a5c8122cdeb402af36bb46a06acc)
1*4c8945a0SNathan Whitehorn#! /bin/sh
2*4c8945a0SNathan Whitehorn# $Id: checklist-8bit,v 1.8 2010/01/13 10:20:03 tom Exp $
3*4c8945a0SNathan Whitehorn
4*4c8945a0SNathan Whitehorn. ./setup-vars
5*4c8945a0SNathan Whitehorn
6*4c8945a0SNathan Whitehorn. ./setup-tempfile
7*4c8945a0SNathan Whitehorn
8*4c8945a0SNathan Whitehorn. ./testdata-8bit
9*4c8945a0SNathan Whitehorn
10*4c8945a0SNathan Whitehorn$DIALOG --backtitle "No Such Organization" \
11*4c8945a0SNathan Whitehorn	--title "CHECKLIST BOX" "$@" \
12*4c8945a0SNathan Whitehorn        --checklist "Hi, this is a checklist box. You can use this to \n\
13*4c8945a0SNathan Whitehornpresent a list of choices which can be turned on or \n\
14*4c8945a0SNathan Whitehornoff. If there are more items than can fit on the \n\
15*4c8945a0SNathan Whitehornscreen, the list will be scrolled. You can use the \n\
16*4c8945a0SNathan WhitehornUP/DOWN arrow keys, the first letter of the choice as a \n\
17*4c8945a0SNathan Whitehornhot key, or the number keys 1-9 to choose an option. \n\
18*4c8945a0SNathan WhitehornPress SPACE to toggle an option on/off. \n\n\
19*4c8945a0SNathan Whitehorn  Which of the following are fruits?" 20 61 5 \
20*4c8945a0SNathan Whitehorn        "`./rotated-data 0 $SAMPLE`"  "It's an `./rotated-data 0 $SAMPLE`." off \
21*4c8945a0SNathan Whitehorn        "`./rotated-data 1 $SAMPLE`"    "No, that's not my `./rotated-data 1 $SAMPLE`." ON \
22*4c8945a0SNathan Whitehorn        "`./rotated-data 2 $SAMPLE`" "Yeah, that's `./rotated-data 2 $SAMPLE`." off \
23*4c8945a0SNathan Whitehorn        "`./rotated-data 3 $SAMPLE`"    "Normally not a `./rotated-data 3 $SAMPLE`." off \
24*4c8945a0SNathan Whitehorn        "`./rotated-data 4 $SAMPLE`"    "No, never put a `./rotated-data 4 $SAMPLE` there!" oN \
25*4c8945a0SNathan Whitehorn        "`./rotated-data 5 $SAMPLE`"   "Cats like `./rotated-data 5 $SAMPLE`." On \
26*4c8945a0SNathan Whitehorn        "`./rotated-data 6 $SAMPLE`"  "You `./rotated-data 6 $SAMPLE` how it is." on 2> $tempfile
27*4c8945a0SNathan Whitehorn
28*4c8945a0SNathan Whitehornretval=$?
29*4c8945a0SNathan Whitehorn
30*4c8945a0SNathan Whitehorn. ./report-tempfile
31