Previous Next Up Title Contents Index Functions Index Top Library

INITIALIZE VALUATOR 3

PINIT_VAL3


CALL SEQUENCE

void pinit_val3(
)

TYPES

typedef struct {
	Pfloat	x_min;	/* minimum x 	*/
	Pfloat	x_max;	/* maximum x 	*/
	Pfloat	y_min;	/* minimum y 	*/
	Pfloat	y_max;	/* maximum y 	*/
	Pfloat	z_min;	/* minimum z 	*/
	Pfloat	z_max;	/* maximum z 	*/
} Plimit3;

typedef struct {
	Pfloat		low_value;	/* low value of valuator range	*/
	Pfloat		high_value;	/* high value of valuator range	*/
	union Pval3_pets {
		struct Pval3_pet_r1 {
			char	*string;
		} pet_r1;
		int	impl_dep;
	} pets;
} Pval_data3;

PHIGS STATE

(PHOP, WSOP, *, *).

EFFECT

This function initializes the VALUATOR input device (input of a real value) number val_dev for workstation ws_id.

Devices 21 to 30 are available, each assigned to a different scale widget.

The following echo types are available:


1: Displays the valuator in the echo volume inside the graphic window.

Echo volume is given in DC coordinates


-1: Displays the valuator device in a separate window

Echo volume is given in percent of the RootWindow size.

The following fields of a Pval_data structure must be initialized:

Pval_data val_data_rec;

val_data_rec.low_value = minimum value.

val_data_rec.high_value = maximum value.

val_data_rec.pets.pet_r1.string = title of the scale widget.

Example:

/* Sample program to initialize a valuator device */

#include <phigs.h>

main()
{
	Pint ws_id,val_dev,pet;
	Pfloat def_val;
	Plimit echo_area;
	Pval_data val_data_rec;

/* Open PHIGS session */
	popen_phigs(PDEF_ERR_FILE,PDEF_MEM_SIZE);

/* Open workstation */
	ws_id = 1;
	popen_ws(ws_id,"GPHIGS.OUT",8887);

/* Initialize valuator device 21 with echo type -1 */
	val_data_rec.pets.pet_r1.string = "Parameter1";
	val_data_rec.low_value  = 0.;
	val_data_rec.high_value = 100.;
	def_val = 30.;
	echo_area.x_min = 0.;
	echo_area.y_min = .95;
	echo_area.x_max = .3;
	echo_area.y_max = 1.;
	val_dev = 21;
	pet = -1;
	pinit_val(ws_id,val_dev,def_val,pet,&echo_area,
			&val_data_rec);

/* Close workstation */
	pclose_ws(ws_id);

/* Close PHIGS session */
	pclose_phigs();
}

ERRORS

3
Ignoring function, function requires state (PHOP, WSOP,*,*)
54
Ignoring function, the specified workstation is not open
61
Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN
250
Ignoring function, the specified device is not available on the specified workstation
251
Ignoring function, the function requires the input device to be in REQUEST mode
254
Ignoring function, invalid echo area volume: XMIN>>=XMAX, YMIN>>=YMAX or ZMIN>>ZMAX
255
Ignoring function, one of the echo area volume boundary points is outside the range of the device
253
Ignoring function, the specified prompt echo type is not available on the specified workstation
260
Ignoring function, one of the fields within the input device data record is in error
261
Ignoring function, initial value is invalid

SEE ALSO

initialize valuator, set valuator mode, request valuator 3, sample valuator 3, get valuator 3, inquire valuator device state 3, inquire default valuator device state 3, inquire number of available logical input devices


Previous Next Up Title Contents Index Functions Index Top Library