Clipboard payload for ControlEditor copy/paste (control elements + connection lines).
More...
#include <ControlElementDataObject.h>
Clipboard payload for ControlEditor copy/paste (control elements + connection lines).
- Author
- Thales Lima Oliveira thale.nosp@m.s.ol.nosp@m.iveir.nosp@m.a@uf.nosp@m.tm.ed.nosp@m.u.br
- Date
- 08/07/2026
Uses the same pointer-passing pattern as ElementDataObject, but with explicit ownership control to avoid double-free when reading clipboard data.
Definition at line 43 of file ControlElementDataObject.h.
◆ ControlElementDataObject() [1/2]
| ControlElementDataObject::ControlElementDataObject |
( |
| ) |
|
Definition at line 20 of file ControlElementDataObject.cpp.
21 : wxDataObjectSimple(wxDataFormat(wxT("PSPControlCopy")))
22{
23
24 m_elementsLists = nullptr;
25 m_ownsLists = false;
26}
◆ ControlElementDataObject() [2/2]
| ControlElementDataObject::ControlElementDataObject |
( |
const std::vector< std::shared_ptr< ControlElement > > & |
elementList, |
|
|
const std::vector< std::shared_ptr< ConnectionLine > > & |
connectionList |
|
) |
| |
Definition at line 28 of file ControlElementDataObject.cpp.
31 : wxDataObjectSimple(wxDataFormat(wxT("PSPControlCopy")))
32{
34 m_elementsLists->elementList = elementList;
35 m_elementsLists->connectionList = connectionList;
36 m_ownsLists = true;
37}
◆ ~ControlElementDataObject()
| ControlElementDataObject::~ControlElementDataObject |
( |
| ) |
|
|
override |
Definition at line 39 of file ControlElementDataObject.cpp.
40{
41 if (m_ownsLists && m_elementsLists) {
42 delete m_elementsLists;
43 m_elementsLists = nullptr;
44 }
45}
◆ GetDataHere()
| bool ControlElementDataObject::GetDataHere |
( |
void * |
buf | ) |
const |
|
override |
◆ GetDataSize()
| size_t ControlElementDataObject::GetDataSize |
( |
| ) |
const |
|
override |
◆ GetElementsLists()
◆ SetData()
| bool ControlElementDataObject::SetData |
( |
size_t |
len, |
|
|
const void * |
buf |
|
) |
| |
|
override |
◆ m_elementsLists
◆ m_ownsLists
| bool ControlElementDataObject::m_ownsLists = false |
|
private |
The documentation for this class was generated from the following files: