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