.\"##
.\" $XConsortium: p357,v 5.2 94/04/17 20:58:36 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "SET PICK MODE" 3P "29 February 1991"
.SH NAME
SET PICK MODE \- set pick device operating mode and echoing state
.IX "Input Modes" "SET PICK MODE"
.IX "Pick Input Devices" "SET PICK MODE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_pick_mode ( ws, dev, mode, echo )
Pint	ws;	\fIworkstation identifier\fP
Pint	dev;	\fIpick device number\fP
Pop_mode	mode;	\fIoperating mode\fP
Pecho_switch	echo;	\fIecho switch\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET PICK MODE\s+2 sets the operating mode and echo switch for a
specified pick device on a specified workstation.
.SS C Input Parameters
.IP \fIws\fP
The workstation identifier of the workstation associated with the device.
.IP \fIdev\fP
The device number of the pick device to be set.
See the \fIAvailable Devices\fP section in \s-2INITIALIZE PICK 3\s+2
for a description of the available devices.
.IP \fImode\fP
Specifies the operating mode for the specified pick device.
Pop_mode is an enumeration defined in phigs.h as follows:
.nf
.sp .4
.ta .5i
typedef enum {
.sp .2
	POP_REQ,
	POP_SAMPLE,
	POP_EVENT
.sp .2
} Pop_mode;
.fi
.IP \fIecho\fP
The echo switch value for the specified pick device.
Pecho_switch is an enumeration defined in phigs.h as follows:
.nf
.sp .4
typedef enum {
.sp .2
	PSWITCH_NO_ECHO,
	PSWITCH_ECHO
.sp .2
} Pecho_switch;
.fi
.SS Execution
.LP
\s-2SET PICK MODE\s+2 sets the operating mode and echo flag of the specified
device.
The default operating mode is \s-2POP_REQ\s+2.
The default echo switch is \s-2PSWITCH_ECHO\s+2.
.LP
The operating mode controls how the input from the device is obtained:
.sp
.in .7i
.ta .5i
.ti -.2i
\(bu    If the operating mode is \s-2REQUEST\s+2,
\s-2REQUEST PICK\s+2 may be used to prompt for and receive input from
a pick input device.
\s-2REQUEST PICK\s+2 will not return until the operator enters input to
the device.
.sp
.ti -.2i
\(bu    If the operating mode is \s-2SAMPLE\s+2,
\s-2SAMPLE PICK\s+2 may be used to 
return the current input value of the device without waiting for operator
input.
.sp
.ti -.2i
\(bu    If the operating mode is \s-2EVENT\s+2,
the input values generated by the operator are added to the \s-2PHIGS\s+2
input event queue.
The functions \s-2AWAIT EVENT\s+2 and \s-2GET PICK\s+2 may then be used
to retrieve these events from the input queue.
.DT
.sp
.LP
The echo switch may be used by some devices to control whether or not values
selected by the operator are echoed to the device.
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP, WSOP, *, *\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 060
Ignoring function, specified workstation is not of category \s-2OUTIN\s+2
.IP 250
Ignoring function, the specified device is not available
on the specified workstation
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INITIALIZE PICK (3P)"
.SM "SET PICK FILTER (3P)"
.SM "SET PICK IDENTIFIER (3P)"
.SM "REQUEST PICK (3P)"
.SM "GET PICK (3P)"
.SM "SAMPLE PICK (3P)"
.SM "INQUIRE PICK DEVICE STATE (3P)"
.fi
