Supports copy/paste for Open Inventor using the Windows clipboard. More...
#include <Inventor/Win/SoWinClipboard.h>
Public Types | |
typedef void | SoWinClipboardPasteCB(void *userData, SoPathList *pathList) |
Public Member Functions | |
SoWinClipboard (SoWidget w, Atom selectionAtom=_XA_CLIPBOARD_) | |
Constructor. | |
~SoWinClipboard () | |
Destructor. | |
void | copy (SoNode *node, Time eventTime) |
Copies the passed scene graph object (node, path, or pathlist) to the clipboard using the current clipboard format. | |
void | copy (SoPath *path, Time eventTime) |
Copies the passed path to the clipboard using the current clipboard format. | |
void | copy (SoPathList *pathList, Time eventTime) |
Copies the passed pathlist to the clipboard using the current clipboard format. | |
void | paste (Time eventTime, SoWinClipboardPasteCB *pasteDoneFunc, void *userData=NULL) |
This requests data from the clipboard in the current clipboard format. | |
Supports copy/paste for Open Inventor using the Windows clipboard.
This class manages data transfers for copy and paste to and from the Windows clipboard. Transfers may occur within the same window, from one window to another window, and from process to process.
Clipboard support is currently strictly text. The copy type cbFormat will be forced to CF_TEXT, no matter what, if anything, is specified in the second argument of the constructor.
Definition at line 90 of file SoWinClipboard.h.
typedef void SoWinClipboardPasteCB(void *userData, SoPathList *pathList) |
Definition at line 50 of file SoWinClipboard.h.
SoWinClipboard::SoWinClipboard | ( | SoWidget | w, |
Atom | selectionAtom = _XA_CLIPBOARD_ |
||
) |
Constructor.
w is the window that will be used for the clipboard operations. cbFormat specifies the Windows clipboard format to be used for the data transfer.
SoWinClipboard::~SoWinClipboard | ( | ) |
Destructor.
void SoWinClipboard::copy | ( | SoNode * | node, |
Time | eventTime | ||
) |
Copies the passed scene graph object (node, path, or pathlist) to the clipboard using the current clipboard format.
The eventTime should be the time returned by the system routine time (), and can be used to insure synchronization of copy and paste requests.
For example,
void SoWinClipboard::copy | ( | SoPath * | path, |
Time | eventTime | ||
) |
Copies the passed path to the clipboard using the current clipboard format.
See copy() for details.
void SoWinClipboard::copy | ( | SoPathList * | pathList, |
Time | eventTime | ||
) |
Copies the passed pathlist to the clipboard using the current clipboard format.
See copy() for details.
void SoWinClipboard::paste | ( | Time | eventTime, |
SoWinClipboardPasteCB * | pasteDoneFunc, | ||
void * | userData = NULL |
||
) |
This requests data from the clipboard in the current clipboard format.
When the data is retrieved, the pasteDoneFunc callback is invoked. The newly pasted data is passed as the callback function's pathList argument (an SoPathList).