home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
dbase
/
tclitebr
/
lbdemo.prg
< prev
next >
Wrap
Text File
|
1987-06-15
|
3KB
|
114 lines
public clipper
SET BELL OFF
SET SCOR OFF
SET TALK OFF
if .not. clipper
LOAD litebar
endi
CLEA
funk_return=CHR(4)
esca=CHR(27)
cr_option=.f.
verb_option=.f.
remb_option=.f.
funk_option=.f.
time_option=.f.
help_option=.f.
@1,0 SAY "Force returns to select an option (Y/N)?" GET cr_option PICT "Y"
@2,0 SAY "Return whole string selected (Y/N)?" GET verb_option PICT "Y"
@3,0 SAY '"Remember" last selected option (Y/N)?' GET remb_option PICT "Y"
@4,0 SAY 'Display time (Y/N)?' GET time_option PICT "Y"
@5,0 SAY 'Trap function keys (Y/N)' GET funk_option PICT "Y"
@6,0 SAY 'Display Help Prompts (Y/N)' GET help_option PICT "Y"
READ
IF verb_option
verb_char="V"
ELSE
verb_char=''
ENDI
IF cr_option
cr_char="E"
ELSE
cr_char=''
ENDI
IF funk_option
funk_char="K"
ELSE
funk_char=''
ENDI
low_high="112,111,"
IF time_option
time_str="T0,6," && display time at 0,6
ELSE
time_str=''
ENDI
mchoice1="22,0, T)his is a demo \T"
mchoice2="22,31, O)f litebar version \O"
mchoice3="22,70, 4).0 \4"
IF help_option
mhelp1="\24,30, Help for menu option 1\"
mhelp2="\24,30, Help for menu option 2\"
mhelp3="\24,30, Help for menu option 3\"
help_str="H31"
mchoice1=mchoice1+mhelp1
mchoice2=mchoice2+mhelp2
mchoice3=mchoice3+mhelp3
ELSE
help_str=''
ENDI
mchoice=' '+cr_char+verb_char+funk_char+help_str+time_str+"/"+low_high+mchoice1+mchoice2+mchoice3
IF verb_option
padding=SPAC(LEN(mchoice))
ELSE
padding=''
ENDI
DO WHIL .T.
CLEAR
IF time_option
@0,0 SAY 'Time:'
ENDI
@22,1 CLEA
CALL litebar WITH "0"
CALL litebar WITH mchoice
in_front=''
DO CASE
CASE mchoice=esca
in_front="escape + "
mchoice=RIGH(mchoice,LEN(mchoice)-1)
CASE mchoice=funk_return
in_front="F"+LTRI(STR(ASC(SUBS(mchoice,2,1))))+" + "
mchoice = RIGH(mchoice,LEN(mchoice)-2)
CASE mchoice=CHR(1)
@23,1 CLEA
@23,1 SAY "invalid parameter for litebar.bin...press any key"
?mchoice
WAIT ''
CANC
ENDC
IF .NOT. verb_option
mchoice=LEFT(mchoice,1)
ENDI
@23,0 CLEA
xoption = ' '
CALL LITEBAR WITH "1"
@23,1 SAY "Litebar returns: "+in_front+mchoice
@24,1 SAY "...press any key to continue (X to exit)" GET xoption PICT "!"
READ
IF xoption = "X"
EXIT
ENDI
CALL LITEBAR WITH "0"
IF remb_option
mchoice="M"+padding
ELSE
mchoice=cr_char+verb_char+funk_char+help_str+time_str+'/'+low_high+mchoice1+mchoice2+mchoice3
ENDI
ENDDO
IF .NOT. clipper
RELE MODU litebar
ENDI
RETU