simvx.core.clipboard¶
Clipboard support for the SimVX editor.
Provides node copy/paste (serialized via scene helpers) and text clipboard
with optional platform integration (e.g., GLFW glfwGetClipboardString).
Module Contents¶
Classes¶
Singleton-style clipboard accessed entirely through class methods. |
API¶
- class simvx.core.clipboard.Clipboard¶
Singleton-style clipboard accessed entirely through class methods.
- classmethod copy_node(node: Any) None¶
Serialize node (and its subtree) onto the clipboard.
- classmethod paste_node(parent: Any | None = None) Any | None¶
Deserialize the stored node tree.
If parent is given the new node is added as a child. Returns the new node, or
Nonewhen the clipboard is empty.
- classmethod has_node() bool¶
Return whether serialized node data is available.
- classmethod copy_text(text: str) None¶
Store text and push to the platform clipboard if available.
- classmethod paste_text() str¶
Return text from the platform clipboard, falling back to internal storage.
- classmethod set_platform_clipboard(get_fn: collections.abc.Callable[[], str], set_fn: collections.abc.Callable[[str], None]) None¶
Register platform clipboard accessors (called by graphics backend at init).
- classmethod clear() None¶
Clear both node and text clipboard data.