[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

INITIALIZE CHOICE (PHOP,WSOP,*,*)

Purpose

Use Initialize Choice to specify initial values for the specified choice device.

The Initialize Choice subroutine stores the initial choice number, prompt/echo type, echo area, and data record in the workstation state list for the specified device. The z coordinates of the echo volume remain unchanged. For a keyboard choice device, an initial choice number less than 256 is interpreted using the workstation's input device character set. For details on the specific devices available on different workstation types, see The graPHIGS Programming Interface: Technical Reference, or use the appropriate inquiry subroutines.

This function supports the following prompt/echo types:

  • Type One designates the current choice number using a workstation-dependent technique.

  • Type Two lets you indicate choice numbers by invoking the prompting capability. The physical input devices that are most commonly used normally have a built-in prompting capability, such as lighted program function keys (LPFKs). If the value of the ith element of the "prompt array" in the choice data record is OFF, then the graPHIGS API turns off prompting of the ith alternative of the specified choice input device. If the value of the ith element of the "prompt array" in the choice data record is ON, then the graPHIGS API turns on prompting of the ith alternative of the specified choice input device. The first entry in the choice data record is the list of choice prompts.

    Note:

    The choice device must be in Request mode.

    Language Bindings

  • C

    pinit_choice (ws_id, choice_num, init_status, init_choice, pet, echo_area, choice_data)

    Input Parameters

    Pint ws_id
    Workstation identifier.

    Pint choice_num
    Choice device number(>=1).

    Pin_status init_status
    Initial choice status (1=PIN_STATUS_OK, 2=PIN_STATUS_NO_IN).

    Pint init_choice
    Initial choice device number (>=1).

    Pint pet
    Prompt and echo type.

    const Plimit *echo_area
    Echo area.

    const Pchoice_data *choice_data
    Data record.

    FORTRAN

    PINCH (wkid, chdnr, istat, ichnr, pet, xmin, xmax, ymin, ymax, ldr, datrec)

    Input Parameters

    integer wkid
    Workstation identifier.

    integer chdnr
    Choice device number (>=1).

    integer istat
    Initial choice status (1=POK, 2=PNCHOI).

    integer ichnr
    Initial choice device number (>=1).

    integer pet
    Prompt and echo type.

    real xmin
    Minimum x coordinate determining echo area in DC.

    real xmax
    Maximum x coordinate determining echo area in DC.

    real ymin
    Minimum y coordinate determining echo area in DC.

    real ymax
    Maximum y coordinate determining echo area in DC.

    integer ldr
    Dimension of the data record array.

    character*80 datrec(ldr)
    Data record.

    The PPREC parameters to build a choice input data record for PET=2 are as follows: (IL=number of choice alternatives, IA=list of prompts(0=POFF, 1=PON), RL=0, RA=(), SL=0, LSTR=(), STR=()).

    Errors

    3
    Function Requires State (PHOP,WSOP,*,*)
    54
    Specified Workstation Is Not Open
    61
    Specified Workstation Is Not Of Category Input Or Outin
    250
    Specified Device Not Available On Workstation
    251
    Function Requires Input Device To Be In Request Mode
    254
    Invalid Echo Area/Volume: XMIN>=XMAX, YMIN>=YMAX OR ZMIN>ZMAX
    255
    Echo Area/Volume Boundary Point(s) Outside Device Range
    253
    Prompt/Echo Type Not Available On Specified Workstation
    260
    Input Device Data Record Field Is In Error
    261
    Initial Value Is Invalid

    Related Subroutines

  • Inquire Choice Device State

  • Inquire Default Choice Device Data

  • Inquire Display Space Size

  • Inquire Number Of Available Logical Input Devices

  • Pack Data Record

  • Set Choice Mode


  • [ Previous | Next | Contents | Glossary | Home | Search ]