.\" @(#)PEXCopyElements.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXCopyElements 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXCopyElements \- Copy Elements .SH SYNTAX .LP .IP void .4i PEXCopyElements\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIsrc_structure\fP\^, int \fIsrc_whence1\fP\^, long \fIsrc_offset1\fP\^, int \fIsrc_whence2\fP\^, long \fIsrc_offset2\fP\^, PEXStructure \fIdst_structure\fP\^, int \fIdst_whence\fP\^, long \fIdst_offset\fP\^) .SH PARAMETERS .TP 1i \fIdisplay\fP A pointer to a display structure returned by a successful .B XOpenDisplay call. .TP \fIsrc_structure\fP The resource identifier of the source structure. .TP \fIsrc_whence1\fP A value specifying, with \fIsrc_offset1\fP, the first limit of the range of elements to be copied ( .B PEXBeginning, .B PEXCurrent, .B PEXEnd ). .TP \fIsrc_offset1\fP The offset from \fIsrc_whence1\fP denoting the first limit of the range of elements to be copied. .TP \fIsrc_whence2\fP A value specifying, with \fIsrc_offset2\fP, the second limit of the range of elements to be copied ( .B PEXBeginning, .B PEXCurrent, .B PEXEnd ). .TP \fIsrc_offset2\fP The offset from \fIsrc_whence2\fP denoting the second limit of the range of elements to be copied. .TP \fIdst_structure\fP The resource identifier of the destination structure. .TP \fIdst_whence\fP A value specifying, with \fIdst_offset\fP, the position at which the elements are inserted into the destination structure ( .B PEXBeginning, .B PEXCurrent, .B PEXEnd ). .TP \fIdst_offset\fP The offset from \fIdst_whence\fP denoting the position at which the elements are inserted into the destination structure. .SH RETURNS None .SH DESCRIPTION .\" indexing .IX PEXCopyElements .IX "Copy" "PEXCopyElements" .IX "Structure Elements" PEXCopyElements .LP This function copies a range of elements from the specified source structure to the specified destination structure. .LP If a computed offset is less than zero, it is set to zero before obtaining the element information. If a computed offset is greater than the number of elements in the structure, the offset is set to the offset of the last element in the structure. .LP The source structure and destination structure can be the same. In this case, the copy operation proceeds as though the indicated range were copied to a temporary location and then inserted relative to the destination position. .LP After the copy operation, the element pointer of the destination structure is updated to point at the last element copied into the destination structure. The editing mode attribute of the destination structure is ignored during this request. The copied elements are always inserted into the destination structure and are never used to replace existing structure elements. .SH DATA STRUCTURES .LP .nf typedef XID PEXStructure; .sp .fi .SH ERRORS .TP .SB BadPEXStructure The specified structure resource identifier is invalid. .TP .SB BadValue The specified value for whence parameter is invalid. .SH SEE ALSO .LP .nf .BR PEXCreateStructure (3) .fi