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-2019 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 <common.h> // PAGE_INFO
36 #include <gerbview.h> // GERBER_DRAWLAYERS_COUNT
37 #include <title_block.h>
38 #include <gerber_draw_item.h>
39 #include <eda_rect.h>
40 
42 
47 class GBR_LAYOUT : public EDA_ITEM
48 {
49 private:
53 
54 public:
55  GBR_LAYOUT();
56  ~GBR_LAYOUT();
57 
58  wxString GetClass() const override
59  {
60  return wxT( "GBR_LAYOUT" );
61  }
62 
63  // Accessor to the GERBER_FILE_IMAGE_LIST,
64  // which handles the list of gerber files (and drill files) images loaded
66 
67  const wxPoint& GetAuxOrigin() const { return m_originAxisPosition; }
68  void SetAuxOrigin( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; }
69 
71  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
72 
79 
83  const EDA_RECT GetBoundingBox() const override
84  {
85  return ComputeBoundingBox();
86  }
87 
88  void SetBoundingBox( const EDA_RECT& aBox ) { m_BoundingBox = aBox; }
89 
91  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
92 
93 #if defined(DEBUG)
94  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
95 #endif
96 };
97 
98 #endif // #ifndef GBR_LAYOUT_H
GBR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded.
Definition: gbr_layout.h:47
wxString GetClass() const override
Function GetClass returns the class name.
Definition: gbr_layout.h:58
EDA_RECT m_BoundingBox
Definition: gbr_layout.h:50
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox.
Definition: gbr_layout.h:83
void SetAuxOrigin(const wxPoint &aPosition)
Definition: gbr_layout.h:68
void SetBoundingBox(const EDA_RECT &aBox)
Definition: gbr_layout.h:88
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout,...
Definition: title_block.h:40
wxPoint m_originAxisPosition
Definition: gbr_layout.h:52
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:105
const wxPoint & GetAuxOrigin() const
Definition: gbr_layout.h:67
TITLE_BLOCK & GetTitleBlock()
Definition: gbr_layout.h:70
EDA_RECT ComputeBoundingBox() const
Function ComputeBoundingBox calculates the bounding box containing all Gerber items.
Definition: gbr_layout.cpp:50
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Definition: gbr_layout.cpp:44
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159
The common library.
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
Definition: gbr_layout.cpp:81
SEARCH_RESULT
Definition: base_struct.h:51
TITLE_BLOCK m_titles
Definition: gbr_layout.h:51
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: gbr_layout.h:71