pinit_string(3g) — Subroutines
Name
pinit_string − Sets the string device to application-specific values.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinit_string (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint dev_num, /∗ (I) String device number ∗/
const char ∗init, /∗ (I) Initial string ∗/
Pint pet, /∗ (I) Prompt and echo type ∗/
const Plimit ∗echo_area, /∗ (I) Echo area, in device
coordinates ∗/
const Pstring_data ∗record /∗ (I) Data record ∗/
)
Data Structures
typedef struct {
Pfloat x_min; /∗ x minimum ∗/
Pfloat x_max; /∗ x maximum ∗/
Pfloat y_min; /∗ y minimum ∗/
Pfloat y_max; /∗ y maximum ∗/
} Plimit;
typedef struct { /∗ string data record ∗/
Pint in_buf_size; /∗ input buffer size ∗/
Pint init_pos; /∗ initial editing position ∗/
union Pstring_pets {
struct Pstring_pet_r1 {
char ∗title_string; /∗ title string for the device ∗/
} pet_r1;
} pets;
} Pstring_data;
Description
pinit_string sets the string device to application-specific values. The function accepts the initial (default) string and echo area. The echo area is a 4-component list of x- and y-coordinates, in device coordinates. The order of the list components is XMIN < XMAX, YMIN < YMAX. The z-components of a previously specified echo volume remain unchanged.
When an application calls pinit_string, the workstation surface cannot contain the string device’s prompt. To remove an existing prompt from the surface, call the pset_string_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 String-Class PET for information on string-class prompt and echo types.
See Also
pget_string
pinit_string3
pinq_def_string_data
pinq_string_st
preq_string
psample_string
pset_string_mode