blob: 5aaab5bdf65c2ac304c68328d94551e91a099bd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*
* Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ELEMENTDATAOBJECT_H
#define ELEMENTDATAOBJECT_H
#include "Workspace.h"
#include <wx/dataobj.h>
struct ElementsLists {
std::vector<Element*> elementList;
std::vector<Bus*> parentList;
};
/**
* @class ElementDataObject
* @author Thales Lima Oliveira <thales@ufu.br>
* @date 06/10/2017
* @brief Class to store the elements in the clipboard.
* @file ElementDataObject.h
*/
class ElementDataObject : public wxDataObjectSimple
{
public:
ElementDataObject();
ElementDataObject(std::vector<Element*> elementList);
~ElementDataObject();
size_t GetDataSize() const override;
bool GetDataHere(void* buf) const override;
bool SetData(size_t len, const void* buf) override;
ElementsLists* GetElementsLists() { return m_elementsLists; }
protected:
ElementsLists* m_elementsLists = nullptr;
};
#endif // ELEMENTDATAOBJECT_H
|