Previous Next Up Title Contents Index Functions Index Top Library

INITIALIZE PICK 3

pinit_pick3


CALL SEQUENCE

void pinit_pick3 (ws_id, pick_dev, init_status, init_pick, pet, echo_volume, pick_data_rec, order)

INPUT PARAMETERS

Pint	ws_id,
Pint	pick_dev,
Pin_status	init_status,
const Ppick_path	*init_pick,
Pint 	pet,
const Plimit3	*echo_volume,
const Ppick_data3	*pick_data_rec,
Ppath_order	order

ARGUMENTS

ws_id,
Workstation identifier
pick_dev,
Pick device number
init_status,
Initial pick status
init_pick,
Initial pick path
pet,
Prompt and echo type
echo_volume,
Echo volume
pick_data_rec,
Data record
order
Pick path order

TYPES

typedef enum {
	PIN_STATUS_NONE, 
	PIN_STATUS_OK, 
	PIN_STATUS_NO_IN
} Pin_status;

typedef struct {
	Pint	depth;		/* pick path depth */
	Ppick_path_elem	*path_list;	/* pick path list */
} Ppick_path;

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 {
	union Ppick3_pets {
		struct Ppick3_pet_r1 {
			int	impl_dep;
		} pet_r1;
		int	impl_dep;
	} pets;
} Ppick_data3;

typedef enum {
	PORDER_TOP_FIRST, 
	PORDER_BOTTOM_FIRST
} Ppath_order;

typedef struct {
	Pint	struct_id;	/* structure identifier	*/
	Pint	pick_id;	/* pick identifier	*/
	Pint	elem_pos;	/* element position	*/
} Ppick_path_elem;

typedef enum {
	PPR_OFF, 
	PPR_ON
} Ppr_switch;

PHIGS STATE

(PHOP, WSOP, *, *).

EFFECT

This function initializes the PICK input device (designation of graphic elements on the screen) number pick_dev for workstation ws_id.

The pick aperture is centred on the graphics cursor and follows its movement. When the pick input device (the mouse for example) is validated, the primitive (or part of it) contained in the pick aperture is selected.

Device number 1 is available and is associated with the mouse.

Echo type number 1 displays an X cursor.

Initial pick path and data record parameters are unused.

Example:

/* Sample program for initialization of a pick device */

#include <phigs.h>

main()
{
	Pint ws_id,pick_dev,pet,error,update_state;
	Pin_status status;
	Ppick_path init_path;
	Ppick_data pick_data_rec;
	Ppath_order order;
	Plimit3 echo_volume,req_view,cur_win,req_win;

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

/* Open workstation */
	ws_id = 1;
	popen_ws  (ws_id,"GPHIGS.OUT",8887);
/* Get back the DC of the workstation */
	pinq_ws_tran3(ws_id,&error,&update_state,&req_win,
			&cur_win,&req_view,&echo_volume);

/* Initialize pick device number 1 with echo type number 1 */
	pick_dev = 1;
	pet=1;
	init_path.depth = 0;
	order = PORDER_TOP_FIRST;
	status = PIN_STATUS_NONE;
	pinit_pick3(ws_id,pick_dev,status,&init_path,
			pet,&echo_volume,&pick_data_rec,order);

/* 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 pick, set pick mode, request pick 3, sample pick 3, get pick 3, inquire pick device state 3, inquire default pick device state 3, inquire number of available logical input devices


Previous Next Up Title Contents Index Functions Index Top Library