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 <base_struct.h>
34 #include <math/vector2d.h>
35 
36 class GAL;
37 class RN_DATA;
38 
39 namespace KIGFX
40 {
42 {
43 public:
44  RATSNEST_VIEWITEM( RN_DATA* aData );
45 
47  const BOX2I ViewBBox() const override;
48 
50  void ViewDraw( int aLayer, KIGFX::VIEW* aView ) const override;
51 
53  void ViewGetLayers( int aLayers[], int& aCount ) const override;
54 
55 #if defined(DEBUG)
56  void Show( int x, std::ostream& st ) const override
58  {
59  }
60 #endif
61 
65  virtual wxString GetClass() const override
66  {
67  return wxT( "RATSNEST_VIEWITEM" );
68  }
69 
70 protected:
73 };
74 
75 } // namespace KIGFX
76 
77 #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:56
RATSNEST_VIEWITEM(RN_DATA *aData)
Class RN_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
RN_DATA * m_data
Object containing ratsnest data.