KiCad PCB EDA Suite
gbr_layout.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) 2012-2014 Jean-Pierre Charras jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2021 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 
31 #ifndef GBR_LAYOUT_H
32 #define GBR_LAYOUT_H
33 
34 
35 #include <gerbview.h> // GERBER_DRAWLAYERS_COUNT
36 #include <title_block.h>
37 #include <gerber_draw_item.h>
38 #include <eda_rect.h>
39 
41 
45 class GBR_LAYOUT : public EDA_ITEM
46 {
47 public:
48  GBR_LAYOUT();
49  ~GBR_LAYOUT();
50 
51  wxString GetClass() const override
52  {
53  return wxT( "GBR_LAYOUT" );
54  }
55 
56  // Accessor to the GERBER_FILE_IMAGE_LIST,
57  // which handles the list of gerber files (and drill files) images loaded
59 
60  const wxPoint& GetAuxOrigin() const { return m_originAxisPosition; }
61  void SetAuxOrigin( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; }
62 
64  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
65 
72 
73  const EDA_RECT GetBoundingBox() const override
74  {
75  return ComputeBoundingBox();
76  }
77 
78  void SetBoundingBox( const EDA_RECT& aBox ) { m_BoundingBox = aBox; }
79 
81  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
82 
83 #if defined(DEBUG)
84  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
85 #endif
86 
87 private:
91 };
92 
93 #endif // #ifndef GBR_LAYOUT_H
A list of GERBER_DRAW_ITEM objects currently loaded.
Definition: gbr_layout.h:45
wxString GetClass() const override
Return the class name.
Definition: gbr_layout.h:51
EDA_RECT m_BoundingBox
Definition: gbr_layout.h:88
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: gbr_layout.h:73
void SetAuxOrigin(const wxPoint &aPosition)
Definition: gbr_layout.h:61
void SetBoundingBox(const EDA_RECT &aBox)
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: gbr_layout.h:78
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
wxPoint m_originAxisPosition
Definition: gbr_layout.h:90
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:94
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:77
const wxPoint & GetAuxOrigin() const
Definition: gbr_layout.h:60
TITLE_BLOCK & GetTitleBlock()
Definition: gbr_layout.h:63
EDA_RECT ComputeBoundingBox() const
Calculate the bounding box containing all Gerber items.
Definition: gbr_layout.cpp:47
Handle the component boundary box.
Definition: eda_rect.h:42
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Definition: gbr_layout.cpp:41
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:100
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
Definition: gbr_layout.cpp:78
SEARCH_RESULT
Definition: eda_item.h:41
TITLE_BLOCK m_titles
Definition: gbr_layout.h:89
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: gbr_layout.h:64