.\"## .\" $XConsortium: p240,v 5.2 94/04/17 20:57:13 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 "OPEN STRUCTURE" 3P "29 February 1991" .SH NAME OPEN STRUCTURE \- create a new structure or begin editing an existing structure .IX "Structures" "OPEN STRUCTURE" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void popen_struct ( struct_id ) Pint struct_id; \fIstructure identifier\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, *, STCL, *) .SH DESCRIPTION .SS Purpose If the specified structure exists, \s-2OPEN STRUCTURE\s+2 opens the structure for editing. If the specified structure does not exist, \s-2PHIGS\s+2 creates a new structure and opens it for editing. .SS C Input Parameter .IP \fIstruct_id\fP The identifier of the structure to open or create. .SS Execution If the specified structure does not exist, a new empty structure is created and opened, and the element pointer is set to 0. If the structure specified does exist, the structure is opened for editing and the element pointer is set to the last element in the structure. .LP A structure consists of a sequence of numbered structure elements. A structure element may contain: .RS .sp .3 \(bu The specification for an output primitive .sp .2 \(bu Attribute selection .sp .2 \(bu View selection .sp .2 \(bu A modelling transformation .sp .2 \(bu A reference to another structure .sp .2 \(bu A name set or label .sp .2 \(bu A generalized structure element .sp .2 \(bu Application data .RE .LP An element pointer in the open structure is used to reference specific structure elements. When a \s-2PHIGS\s+2 function creates a new element, the current edit mode determines whether the new element is inserted after or replaces the element pointed to by the current element pointer. You can perform the following operations on the open structure: .RS .sp .3 \(bu Add or delete structure elements .sp .2 \(bu Copy all elements from another structure .sp .2 \(bu Inquire about the current element type and size or the current element content .sp .2 \(bu Change the position of the element pointer .sp .2 \(bu Inquire the current position of the element pointer .sp .2 .RE .LP The \s-2PHIGS\s+2 state list stores the identifier for the currently open structure, the position of the current element pointer, the current edit mode, and a list of all structure identifiers in use. .SH ERRORS .IP 006 Ignoring function, function requires state (PHOP, *, STCL, *) .SH SEE ALSO .nf .IP .ta 0.5i .SM "OPEN PHIGS (3P)" .SM "INQUIRE OPEN STRUCTURE (3P)" .SM "CLOSE STRUCTURE (3P)" .SM "INQUIRE STRUCTURE STATE VALUE (3P)" .SM "INQUIRE STRUCTURE IDENTIFIERS (3P)" .fi