added nodes.
This commit is contained in:
47
nodes/services/ntxclipboard.h
Normal file
47
nodes/services/ntxclipboard.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef NTX_CLIPBOARD_H
|
||||
#define NTX_CLIPBOARD_H
|
||||
|
||||
#include <ntxicommand.h>
|
||||
#include <vector>
|
||||
|
||||
namespace ntx
|
||||
{
|
||||
/**
|
||||
* @brief Einfaches Clipboard für Copy/Cut/Paste-Operationen.
|
||||
*
|
||||
* Speichert elternlose Deep-Clones mit Original-Position für Undo.
|
||||
* Kein Singleton - wird als Member von NtxHeadNode verwendet.
|
||||
*/
|
||||
class NtxClipboard
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
NtxClipboard() = default;
|
||||
~NtxClipboard() = default;
|
||||
|
||||
// Copy/Cut Operations
|
||||
void copyNodes(const NtxNodeList& nodes);
|
||||
void cutNodes(const NtxNodeList& nodes);
|
||||
|
||||
// Paste Operations
|
||||
NtxNodeList pasteNodes() const;
|
||||
|
||||
// State
|
||||
bool isEmpty() const;
|
||||
size_t getCount() const;
|
||||
void clear();
|
||||
|
||||
// Access
|
||||
const NtxNodeEntryList& getEntries() const;
|
||||
|
||||
private:
|
||||
|
||||
NtxNodeEntryList m_nodeEntryList;
|
||||
|
||||
NtxNodePtr createOrphanClone(NtxNodePtr node) const;
|
||||
};
|
||||
|
||||
} // namespace ntx
|
||||
|
||||
#endif // NTX_CLIPBOARD_H
|
||||
Reference in New Issue
Block a user