![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton clipboard manager for AI Editor. More...
#include <AIEditorClipboard.h>
Public Member Functions | |
| void | Copy (const std::vector< NodeGraph::NodeId > &nodeIds, NodeGraph::GraphDocument *doc) |
| Copy selected nodes to clipboard. | |
| void | Cut (const std::vector< NodeGraph::NodeId > &nodeIds, NodeGraph::GraphDocument *doc) |
| Cut selected nodes (copy + delete) | |
| std::vector< NodeGraph::NodeId > | Paste (NodeGraph::GraphDocument *doc, Vector pasteOffset) |
| Paste clipboard nodes into active graph. | |
| bool | IsEmpty () const |
| Check if clipboard has data. | |
| void | Clear () |
| Clear clipboard. | |
| size_t | GetNodeCount () const |
| Get number of nodes in clipboard. | |
Static Public Member Functions | |
| static AIEditorClipboard & | Get () |
| Get singleton instance. | |
Private Member Functions | |
| AIEditorClipboard ()=default | |
| ~AIEditorClipboard ()=default | |
| AIEditorClipboard (const AIEditorClipboard &)=delete | |
| AIEditorClipboard & | operator= (const AIEditorClipboard &)=delete |
Private Attributes | |
| std::vector< ClipboardNode > | m_nodes |
| Copied nodes. | |
| std::vector< ClipboardLink > | m_links |
| Copied links. | |
Singleton clipboard manager for AI Editor.
Provides Cut/Copy/Paste functionality for nodes in the AI Editor. Preserves node connections and maintains relative positions when pasting.
Definition at line 60 of file AIEditorClipboard.h.
|
privatedefault |
|
privatedefault |
|
privatedelete |
| void Olympe::AI::AIEditorClipboard::Clear | ( | ) |
Clear clipboard.
Definition at line 206 of file AIEditorClipboard.cpp.
References m_links, and m_nodes.
Referenced by Copy().
Here is the caller graph for this function:| void Olympe::AI::AIEditorClipboard::Copy | ( | const std::vector< NodeGraph::NodeId > & | nodeIds, |
| NodeGraph::GraphDocument * | doc | ||
| ) |
Copy selected nodes to clipboard.
| nodeIds | List of selected node IDs |
| doc | Source graph document |
Definition at line 30 of file AIEditorClipboard.cpp.
References Clear(), Olympe::NodeGraph::LinkData::fromPin, GetComponentTypeID_Static(), m_links, m_nodes, Olympe::NodeGraph::NodeData::name, Olympe::NodeGraph::NodeData::parameters, Olympe::AI::ClipboardLink::parentOriginalId, Olympe::AI::PIN_ID_MULTIPLIER, Olympe::NodeGraph::NodeData::position, SYSTEM_LOG, Olympe::AI::ClipboardNode::type, Olympe::NodeGraph::NodeData::type, Olympe::NodeGraph::NodeId::value, Olympe::NodeGraph::PinId::value, and Olympe::Vector.
Referenced by Cut(), Olympe::AI::AIEditorGUI::MenuAction_Copy(), Test11_ClipboardCopyPaste(), and Test13_ClipboardLinkPreservation().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::AI::AIEditorClipboard::Cut | ( | const std::vector< NodeGraph::NodeId > & | nodeIds, |
| NodeGraph::GraphDocument * | doc | ||
| ) |
Cut selected nodes (copy + delete)
| nodeIds | List of selected node IDs |
| doc | Source graph document |
Definition at line 116 of file AIEditorClipboard.cpp.
References Copy(), GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by Olympe::AI::AIEditorGUI::MenuAction_Cut(), and Test12_ClipboardCut().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get singleton instance.
Definition at line 20 of file AIEditorClipboard.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::AI::AIEditorGUI::MenuAction_Copy(), Olympe::AI::AIEditorGUI::MenuAction_Cut(), Olympe::AI::AIEditorGUI::MenuAction_Paste(), Test11_ClipboardCopyPaste(), Test12_ClipboardCut(), and Test13_ClipboardLinkPreservation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get number of nodes in clipboard.
Definition at line 105 of file AIEditorClipboard.h.
References m_nodes.
Referenced by Test11_ClipboardCopyPaste().
Here is the caller graph for this function:| bool Olympe::AI::AIEditorClipboard::IsEmpty | ( | ) | const |
Check if clipboard has data.
Definition at line 201 of file AIEditorClipboard.cpp.
References m_nodes.
Referenced by Paste(), Test11_ClipboardCopyPaste(), and Test12_ClipboardCut().
Here is the caller graph for this function:
|
privatedelete |
| std::vector< NodeGraph::NodeId > Olympe::AI::AIEditorClipboard::Paste | ( | NodeGraph::GraphDocument * | doc, |
| Vector | pasteOffset | ||
| ) |
Paste clipboard nodes into active graph.
| doc | Target graph document |
| pasteOffset | Offset from original position |
Definition at line 139 of file AIEditorClipboard.cpp.
References GetComponentTypeID_Static(), IsEmpty(), m_links, m_nodes, Olympe::NodeGraph::NodeData::name, Olympe::AI::PIN_ID_INPUT_OFFSET, Olympe::AI::PIN_ID_MULTIPLIER, Olympe::AI::PIN_ID_OUTPUT_OFFSET, SYSTEM_LOG, and Olympe::NodeGraph::PinId::value.
Referenced by Olympe::AI::AIEditorGUI::MenuAction_Paste(), Test11_ClipboardCopyPaste(), Test12_ClipboardCut(), and Test13_ClipboardLinkPreservation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Copied links.
Definition at line 116 of file AIEditorClipboard.h.
|
private |
Copied nodes.
Definition at line 115 of file AIEditorClipboard.h.
Referenced by Clear(), Copy(), GetNodeCount(), IsEmpty(), and Paste().