SOXTCLIPBOARD(3iv)
π SoXtClipboard π
okay bestie, buckle up, we're reading the SoXtClipboard(3IV) manual together and honestly? it's giving clipboard royalty π
β¨ NAME β¨
SoXtClipboard β Provides Inventor copy/paste support π«Ά
π¦ INHERITS FROM π¦
SoXtClipboard
(i mean. it inherits from itself. iconic behavior honestly, no notes π )
πΈ SYNOPSIS πΈ
#include <Inventor/Xt/SoXtClipboard.h>
typedef void SoXtClipboardPasteCB(void *userData, SoPathList
*pathList)
typedef void SoXtClipboardImportCB(void *userData, Atom dataType,
void *data, uint32_t numBytes)
#define _XA_CLIPBOARD_ ((Atom) 0)
Methods from class SoXtClipboard:
SoXtClipboard(Widget w, Atom selectionAtom =
_XA_CLIPBOARD_)
~SoXtClipboard()
void copy(SoNode *node, Time eventTime)
void copy(SoPath *path, Time eventTime)
void copy(SoPathList *pathList, Time eventTime)
void copy(Atom dataType, void *data, uint32_t numBytes,
Time eventTime)
void paste(Time eventTime, SoXtClipboardPasteCB
*pasteDoneFunc, void *userData = NULL)
void addPasteInterest(Atom dataType, SoXtClipboardImportCB
*pasteImportFunc, void *userData = NULL)
π« DESCRIPTION π«
So this class is the manager of data transfers for copy and paste, bestie. Transfers can happen within the same process, or between different processes β it truly does not care, it's versatile like that β¨. It uses the Xt selection mechanism to implement the ICCCM protocol for the transfer of data. very demure, very standards-compliant π
π METHODS π
π§ SoXtClipboard / ~SoXtClipboard
SoXtClipboard(Widget w, Atom selectionAtom =
_XA_CLIPBOARD_)
~SoXtClipboard()
Constructor and destructor, periodt.
wis the Xt widget for which this clipboard acts as an agent π΅οΈββοΈselectionAtomis the X selection through which data should be transferred. For quick data transfers, this should beXA_PRIMARYβ‘ The default is_XA_CLIPBOARD_, which uses the X clipboard selection.
π copy
void copy(SoNode *node, Time eventTime)
void copy(SoPath *path, Time eventTime)
void copy(SoPathList *pathList, Time eventTime)
This copies the passed scene graph object, and tells the X server that the clipboard now owns the selection which was specified by selectionAtom 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 eventTime should be the time found in the X event structure which triggered the copy operation, and it's used to ensure synchronization of copy and paste requests. don't skip it, fr fr β°
Data targets supported for export are:
INVENTOR_2_1INVENTOR_2_1_FILEINVENTOR_2_0INVENTOR_2_0_FILEVRML_1_0VRML_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. legacy support ate, ngl π«Ά
π copy (the dataType one)
void copy(Atom dataType, void *data, uint32_t numBytes,
Time eventTime)
This behaves like the copy routines above, but the data can be in any format as specified by dataType. choose your own adventure, bestie π
π₯ paste
void paste(Time eventTime, SoXtClipboardPasteCB
*pasteDoneFunc, void *userData = NULL)
This makes a request to the X server for data to paste from the selection atom specified in the constructor (selectionAtom), then returns. so it doesn't block, it just goes and does its thing π
When the data is retrieved from the selection owner, the pasteDoneFunc callback is invoked. The newly pasted data is passed as the callback function's pathList argument (an SoPathList). π¬
Data targets supported for import are:
INVENTOR_2_1INVENTOR_2_1_FILEINVENTOR_2_0INVENTOR_2_0_FILEVRML_1_0VRML_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. same energy as above, we love consistency π
π addPasteInterest
void addPasteInterest(Atom dataType, SoXtClipboardImportCB
*pasteImportFunc, void *userData = NULL)
This extends the paste interest to recognize an additional target as specified by dataType. You can call it multiple times to register interest in more than one extension β go off, register everything π
The pasteImportFunc will be called when data of the registered type is pasted.
β οΈ PassingNULLas thepasteImportFuncwill remove paste interest for that data type β even if the data type is one of the defaults. yes bestie, even the defaults. it's cold like that π
This should be called before paste() so that paste() will accept pastes of data types that have been registered here. order matters, always π₯
A dataType atom can be created with XmInternAtom, e.g.:
XmInternAtom(XtDisplay(widget),"INVENTOR",False);
π SEE ALSO π
SoSelectionSoByteStreamSoXt- X Selections
and that's the whole page, bestie, we read every single line and we understood it π
so this was SoXtClipboard from the SoXtClipboard(3IV) manual page β the footer didn't give us a date or version string, it just said SoXtClipboard(3IV)() with an empty lil slot where the date would go π, so consider this your cute sign-off: manual name SoXtClipboard, section 3IV, date left blank by whoever wrote it. slay, go copy and paste something β¨π¦π
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms