pinit_choice3(3g) — Subroutines
Name
pinit_choice3 − Sets the choice device to application-required values.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinit_choice3 (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint dev_num, /∗ (I) Choice device number ∗/
Pin_status status, /∗ (I) Initial choice status ∗/
Pint init, /∗ (I) Initial choice ∗/
Pint pet, /∗ (I) Prompt and echo type ∗/
const Plimit3 ∗echo_vol, /∗ (I) Echo volume, in device
coordinates ∗/
const Pchoice_data3 ∗record /∗ (I) Choice data record ∗/
)
Data Structures
typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK, /∗ Use this value if you are supplying an initial
choice ∗/
PIN_STATUS_NO_IN /∗ Use this value if you are not supplying an
initial choice ∗/
} Pin_status;
typedef struct {
Pfloat x_min; /∗ x minimum ∗/
Pfloat x_max; /∗ x maximum ∗/
Pfloat y_min; /∗ y minimum ∗/
Pfloat y_max; /∗ y maximum ∗/
Pfloat z_min; /∗ z minimum ∗/
Pfloat z_max; /∗ z maximum ∗/
} Plimit3;
typedef struct { /∗ choice data record 3 ∗/
union Pchoice3_pets {
struct Pchoice3_pet_u1 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_u1;
struct Pchoice3_pet_r1 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r1;
struct Pchoice3_pet_r2 {
Pint num_prompts; /∗ number of alternatives ∗/
Ppr_switch ∗prompts; /∗ array of prompts ∗/
} pet_r2;
struct Pchoice3_pet_r3 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r3;
struct Pchoice3_pet_r4 {
Pint num_strings; /∗ number of choice strings ∗/
char ∗∗strings; /∗ array of choice strings ∗/
char ∗title_string; /∗ title string for the device ∗/
} pet_r4;
struct Pchoice3_pet_r5 {
Pint struct_id; /∗ structure identifier ∗/
Pint num_pick_ids; /∗ number of alternatives ∗/
Pint ∗pick_ids; /∗ array of pick identifiers ∗/
} pet_r5;
} pets;
} Pchoice_data3;
typedef enum {
PPR_OFF, /∗ prompt off ∗/
PPR_ON /∗ prompt on ∗/
} Ppr_switch;
Description
pinit_choice3 sets the choice device to application-required values. This function accepts the initial choice status, initial choice value, and the echo volume. The initial choice status indicates whether Digital PHIGS selects a choice item by default. The echo volume is a 6-component list of x-, y-, and z-coordinates, in device coordinates. The order of the list is XMIN < XMAX, YMIN < YMAX, ZMIN < ZMAX.
When the application calls pinit_choice3, the workstation surface cannot contain the choice device’s prompt. To remove an existing prompt from the surface, call the pset_choice_mode function and place the device in request mode.
The size and contents of the data record depend on the prompt and echo type you specify. If the size or contents of the data record does not match the requirements of your chosen prompt and echo type, Digital PHIGS generates an error.
See Choice-Class PETs for information on choice-class prompt and echo types.
See Also
pget_choice
pinit_choice
pinq_choice_st3
pinq_def_choice_data3
preq_choice
psample_choice
pset_choice_mode