1SoXtClipboard(3IV)()                                      SoXtClipboard(3IV)()
2
3
4

NAME

6       SoXtClipboard — Provides Inventor copy/paste support
7

INHERITS FROM

9       SoXtClipboard
10

SYNOPSIS

12       #include <Inventor/Xt/SoXtClipboard.h>
13
14     typedef   void        SoXtClipboardPasteCB(void   *userData,   SoPathList
15                              *pathList)
16     typedef void        SoXtClipboardImportCB(void *userData, Atom  dataType,
17                              void *data, uint32_t numBytes)
18
19                              #define _XA_CLIPBOARD_ ((Atom) 0)
20
21          Methods from class SoXtClipboard:
22
23                         SoXtClipboard(Widget    w,   Atom   selectionAtom   =
24                              _XA_CLIPBOARD_)
25                         ~SoXtClipboard()
26     void                copy(SoNode *node, Time eventTime)
27     void                copy(SoPath *path, Time eventTime)
28     void                copy(SoPathList *pathList, Time eventTime)
29     void                copy(Atom dataType, void  *data,  uint32_t  numBytes,
30                              Time eventTime)
31     void                paste(Time  eventTime,  SoXtClipboardPasteCB  *paste‐
32                              DoneFunc, void *userData = NULL)
33     void                addPasteInterest(Atom dataType, SoXtClipboardImportCB
34                              *pasteImportFunc, void *userData = NULL)
35
36

DESCRIPTION

38       This  class  manages  data  transfers for copy and paste. Transfers may
39       occur within the same process, or  between  different  processes.  This
40       uses the Xt selection mechanism to implement the ICCCM protocol for the
41       transfer of data.
42

METHODS

44                         SoXtClipboard(Widget   w,   Atom   selectionAtom    =
45                              _XA_CLIPBOARD_)
46                         ~SoXtClipboard()
47          Constructor  and destructor. w is the Xt widget for which this clip‐
48          board acts as an agent. selectionAtom is  the  X  selection  through
49          which  data  should  be  transferred. For quick data transfers, this
50          should be XA_PRIMARY.  The default is _XA_CLIPBOARD_ which uses  the
51          X clipboard selection.
52
53     void                copy(SoNode *node, Time eventTime)
54     void                copy(SoPath *path, Time eventTime)
55     void                copy(SoPathList *pathList, Time eventTime)
56          This  copies  the  passed scene graph object, and tells the X server
57          that the clipboard now owns the selection  which  was  specified  by
58          selectionAtom in the constructor. When a paste happens (in this win‐
59          dow, another window, or another process), the X server will ask this
60          clipboard  for  the data it copied here. The eventTime should be the
61          time found in the X event structure which triggered the copy  opera‐
62          tion,  and  is  used  to  ensure  synchronization  of copy and paste
63          requests. Data targets supported for export are INVENTOR_2_1, INVEN‐
64          TOR_2_1_FILE,     INVENTOR_2_0,     INVENTOR_2_0_FILE,     VRML_1_0,
65          VRML_1_0_FILE. Also exported for backwards compatibility are  INVEN‐
66          TOR  and  INVENTOR_FILE,  which  are  equivalent to INVENTOR_2_0 and
67          INVENTOR_2_0_FILE.
68
69     void                copy(Atom dataType, void  *data,  uint32_t  numBytes,
70                              Time eventTime)
71          This  behaves  like  the above copy routines, but the data can be in
72          any format as specified by dataType.
73
74     void                paste(Time  eventTime,  SoXtClipboardPasteCB  *paste‐
75                              DoneFunc, void *userData = NULL)
76          This  makes  a  request  to  the X server for data to paste from the
77          selection atom specified in the  constructor  (selectionAtom),  then
78          returns.  When  the  data is retrieved from the selection owner, the
79          pasteDoneFunc callback is invoked.  The newly pasted data is  passed
80          as  the  callback function's pathList argument (an SoPathList). Data
81          targets supported for import  are  INVENTOR_2_1,  INVENTOR_2_1_FILE,
82          INVENTOR_2_0,   INVENTOR_2_0_FILE,  VRML_1_0,  VRML_1_0_FILE.   Also
83          imported for backwards compatibility are INVENTOR and INVENTOR_FILE,
84          which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE.
85
86     void                addPasteInterest(Atom dataType, SoXtClipboardImportCB
87                              *pasteImportFunc, void *userData = NULL)
88          This extends the paste interest to recognize an additional target as
89          specified  by  dataType. It can be called multiple times to register
90          interest in more than one extension.  The  pasteImportFunc  will  be
91          called  when  data of the registered type is pasted. Passing NULL as
92          the pasteImportFunc will remove paste interest for  that  data  type
93          (even  if  the  data  type  is  one of the defaults). This should be
94          called before paste() so that paste() will  accept  pastes  of  data
95          types that have been registered here. A dataType atom can be created
96          with  XmInternAtom,   e.g.:   XmInternAtom(XtDisplay(widget),"INVEN‐
97          TOR",False);
98
99

SEE ALSO

101       SoSelection, SoByteStream, SoXt, X Selections
102
103
104
105
106                                                          SoXtClipboard(3IV)()
Impressum