KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sheet_synchronization_item.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2023 Ethan Chien <[email protected]>
5 * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef SHEET_SYNCHRONIZATION_ITEM_H
26#define SHEET_SYNCHRONIZATION_ITEM_H
27
28#include <wx/bitmap.h>
29#include <wx/string.h>
30#include <functional>
31
32class EDA_ITEM;
33class SCH_HIERLABEL;
34class SCH_SHEET_PIN;
35class SCH_SHEET;
36class SCH_COMMIT;
37class SCH_ITEM;
38
40{
44};
45
46using SCREEN_UPDATER = std::function<void( EDA_ITEM* )>;
47
49{
50public:
51 virtual ~SHEET_SYNCHRONIZATION_ITEM() = default;
52
53 virtual wxString GetName() const = 0;
54
55 virtual int GetShape() const = 0;
56
57 virtual wxBitmap& GetBitmap() const = 0;
58
59 virtual SCH_ITEM* GetItem() const = 0;
60
62};
63
64
66{
67public:
69
70 SCH_HIERLABEL* GetLabel() const { return m_label; }
71
72 wxString GetName() const override;
73
74 int GetShape() const override;
75
76 wxBitmap& GetBitmap() const override;
77
78 SCH_ITEM* GetItem() const override;
79
81
82private:
85};
86
87
89{
90public:
92
93 SCH_SHEET_PIN* GetPin() const { return m_pin; }
94
95 wxString GetName() const override;
96
97 int GetShape() const override;
98
99 wxBitmap& GetBitmap() const override;
100
101 SCH_ITEM* GetItem() const override;
102
104
105private:
108};
109
110
112{
113public:
115
118
119 SCH_HIERLABEL* GetLabel() const { return m_label; }
120
121 SCH_SHEET_PIN* GetPin() const { return m_pin; }
122
123 wxString GetName() const override;
124
125 int GetShape() const override;
126
127 wxBitmap& GetBitmap() const override;
128
129 SCH_ITEM* GetItem() const override;
130
132
133private:
136};
137
138
139#endif
wxString GetName() const override
SCH_HIERLABEL * GetLabel() const
SCH_ITEM * GetItem() const override
SHEET_SYNCHRONIZATION_ITEM_KIND GetKind() const override
wxBitmap & GetBitmap() const override
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:88
SHEET_SYNCHRONIZATION_ITEM_KIND GetKind() const override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:174
SHEET_SYNCHRONIZATION_ITEM_KIND GetKind() const override
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:66
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
virtual int GetShape() const =0
virtual SCH_ITEM * GetItem() const =0
virtual wxBitmap & GetBitmap() const =0
virtual SHEET_SYNCHRONIZATION_ITEM_KIND GetKind() const =0
virtual wxString GetName() const =0
virtual ~SHEET_SYNCHRONIZATION_ITEM()=default
std::function< void(EDA_ITEM *)> SCREEN_UPDATER
SHEET_SYNCHRONIZATION_ITEM_KIND