PINCH3 (WKID, CHDNR, ISTAT, ICHNR, PET, EVOL, LDR, DATREC)
INTEGER WKID INTEGER CHDNR INTEGER ISTAT INTEGER ICHNR INTEGER PET REAL EVOL(6) INTEGER LDR CHARACTER*80 DATREC(LDR)
The following devices are available:
1 : keyboard function keys. Returns the PFkey selected.
2 : mouse button number. Numbered from left to right.
40 to 49 : simulates a choice box on the screen. Selection is performed by clicking on items using the mouse
The following echo types are available for devices 40 to 49:
1 or -1: Display of a radio box widget with a title for each button.
2 or -2: Display of a radio box widget without button titles.
3 or -3: Display of a popup menu widget.
4 or -4: Display of a toggle box widget with a title for each button.
5 or -5: Display of a toggle box widget without button titles.
Echo volume is defined in Device Coordinates (DC) if echo type is positive or as a percentage of RootWindow size if echo type is negative.
Choice data record contains additional information depending on the echo type.
For echoes 1,-1,2,-2,4,-4,5 and -5 the PPREC function is called as follows:
Initialize IA array, LSTR and STR strings array:
IA: array of 32 integers indicating whether each button is visible (PON), invisible (POFF) or active (PACT for echo 4,-4,5 and -5).
LSTR: array of 33 integers describing the length of each character string.
STR: text of each field of the choice device. 33rd field must contain the title of the device and begin with a @ char.
call PPREC(32,IA,0,0.,33,LSTR,STR,MLDR,IERR,LDR,DATREC)
For echoes 3 and -3 the PPREC function is called as follows:
Initialize LSTR and STR strings array:
LSTR: array of 33 integers describing the length of each character string.
STR: text of each field of the choice device. 33rd field must contain the title of the device and begin with a @ char.
call PPREC(0,0,0,0.,33,LSTR,STR,MLDR,IERR,LDR,DATREC) Example: C Sample program for choice initialization program choice include 'PHIGS.H' integer i,mldr,wkid,chdnr,ichnr,pet,istat,prompt(32),lstr(33) real evol(6) character*80 datrec(50) character*6 string(33) data lstr/5*6,27*0,6/ data string/'Choice1','Choice2','Choice3','Choice4','Choice5', + 28 * ' '/ C Open PHIGS session call POPPH(6,-1) C Open workstation wkid = 1 call POPWK(wkid,6,8887) C Initialize choice device 41 with pet -4 istat = PNCHOI ichnr = 0 mldr = 50 evol(1) = 0.0 evol(2) = 0.1 evol(3) = 0.5 evol(4) = 1.0 evol(5) = 0. evol(6) = 1. chdnr = 41 pet = -4 do 3 i = 1,3 prompt(i) = PON 3 continue do 4 i = 4,5 prompt(i) = PACT 4 continue do 5 i = 6,32 prompt(i) = POFF 5 continue string(33) = '@Echo4' call PPREC(32,prompt,0,0.,33,lstr,string,mldr,ierr,ldr,datrec) call PINCH3(wkid,chdnr,istat,ichnr,pet,evol,ldr,datrec) C Close Workstation call PCLWK(wkid) C Close PHIGS call PCLPH end