KiCad PCB EDA Suite
ratsnest_viewitem.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) 2013 CERN
5  * @author Maciej Suminski <maciej.suminski@cern.ch>
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 
30 #ifndef RATSNEST_VIEWITEM_H
31 #define RATSNEST_VIEWITEM_H
32 
33 #include <memory>
34 #include <base_struct.h>
35 #include <math/vector2d.h>
36 
37 class GAL;
38 class CONNECTIVITY_DATA;
39 
40 namespace KIGFX
41 {
43 {
44 public:
45  RATSNEST_VIEWITEM( std::shared_ptr<CONNECTIVITY_DATA> aData );
46 
48  const BOX2I ViewBBox() const override;
49 
51  void ViewDraw( int aLayer, KIGFX::VIEW* aView ) const override;
52 
54  void ViewGetLayers( int aLayers[], int& aCount ) const override;
55 
56 #if defined(DEBUG)
57  void Show( int x, std::ostream& st ) const override
59  {
60  }
61 #endif
62 
66  virtual wxString GetClass() const override
67  {
68  return wxT( "RATSNEST_VIEWITEM" );
69  }
70 
71 protected:
73  std::shared_ptr<CONNECTIVITY_DATA> m_data;
74 };
75 
76 } // namespace KIGFX
77 
78 #endif /* RATSNEST_VIEWITEM_H */
const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers. ...
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
RATSNEST_VIEWITEM(std::shared_ptr< CONNECTIVITY_DATA > aData)
std::shared_ptr< CONNECTIVITY_DATA > m_data
Object containing ratsnest data.
virtual wxString GetClass() const override
Get class name.
void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers() Returns the all the layers within the VIEW the object is painted on...
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Function ViewDraw() Draws the parts of the object belonging to layer aLayer.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:151
Basic classes for most KiCad items.
Class VIEW.
Definition: view.h:58