'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoXtClipboard(3IV) .SH NAME SoXtClipboard \(em Provides Inventor copy/paste support .SH INHERITS FROM SoXtClipboard .SH SYNOPSIS .ps -1 \*(Cr#include .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtClipboardPasteCB\*(Cr(void *userData, SoPathList *pathList) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtClipboardImportCB\*(Cr(void *userData, Atom dataType, void *data, uint32_t numBytes) .sp \*(Cr#define _XA_CLIPBOARD_ ((Atom) 0) .sp .in 1i \f1Methods from class SoXtClipboard: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtClipboard\*(Cr(Widget w, Atom selectionAtom = _XA_CLIPBOARD_) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cb~SoXtClipboard\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoNode *node, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoPath *path, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoPathList *pathList, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(Atom dataType, void *data, uint32_t numBytes, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbpaste\*(Cr(Time eventTime, SoXtClipboardPasteCB *pasteDoneFunc, void *userData = NULL) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaddPasteInterest\*(Cr(Atom dataType, SoXtClipboardImportCB *pasteImportFunc, void *userData = NULL) .sp .SH DESCRIPTION This class manages data transfers for copy and paste. Transfers may occur within the same process, or between different processes. This uses the Xt selection mechanism to implement the ICCCM protocol for \&the transfer of data. .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtClipboard\*(Cr(Widget w, Atom selectionAtom = _XA_CLIPBOARD_) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cb~SoXtClipboard\*(Cr() .br .in 1i \f1Constructor and destructor. \*(Cbw\f1 is the Xt widget for which this clipboard acts as an agent. \*(CrselectionAtom\f1 is the X selection through which data should be transferred. For quick data transfers, this should be XA_PRIMARY. \&The default is _XA_CLIPBOARD_ which uses the X clipboard selection. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoNode *node, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoPath *path, Time eventTime) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SoPathList *pathList, Time eventTime) .br .in 1i \f1This copies the passed scene graph object, and tells the X server that the clipboard now owns the selection which was specified by \*(CrselectionAtom\f1 in the constructor. When a paste happens (in this window, another window, \&or another process), the X server will ask this clipboard for the data it copied here. The \*(CreventTime\f1 should be the time found in the X event structure which triggered the copy operation, and is used to ensure synchronization \&of copy and paste requests. Data targets supported for export are INVENTOR_2_1, INVENTOR_2_1_FILE, INVENTOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. Also exported for backwards compatibility are \&INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(Atom dataType, void *data, uint32_t numBytes, Time eventTime) .br .in 1i \f1This behaves like the above copy routines, but the data can be in any format as specified by \*(CrdataType\f1. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbpaste\*(Cr(Time eventTime, SoXtClipboardPasteCB *pasteDoneFunc, void *userData = NULL) .br .in 1i \f1This makes a request to the X server for data to paste from the selection atom specified in the constructor (\*(CrselectionAtom\f1), then returns. When the data is retrieved from the selection owner, the \*(CrpasteDoneFunc\f1 callback is invoked. \&The newly pasted data is passed as the callback function's \*(CrpathList\f1 argument (an \*(CbSoPathList\f1). Data targets supported for import are INVENTOR_2_1, INVENTOR_2_1_FILE, INVENTOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. \&Also imported for backwards compatibility are INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaddPasteInterest\*(Cr(Atom dataType, SoXtClipboardImportCB *pasteImportFunc, void *userData = NULL) .br .in 1i \f1This extends the paste interest to recognize an additional target as specified by \*(CrdataType\f1. It can be called multiple times to register interest in more than one extension. The \*(CrpasteImportFunc\f1 will be called when data of the \®istered type is pasted. Passing NULL as the pasteImportFunc will remove paste interest for that data type (even if the data type is one of the defaults). This should be called before \*(Crpaste()\f1 so that \*(Crpaste()\f1 will \&accept pastes of data types that have been registered here. A dataType atom can be created with XmInternAtom, e.g.: XmInternAtom(XtDisplay(widget),"INVENTOR",False); .sp .in 0.5i .SH SEE ALSO \*(CbSoSelection, SoByteStream, SoXt, X Selections