KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2022 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 <math/box2.h>
39
41
45class GBR_LAYOUT : public EDA_ITEM
46{
47public:
48 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 VECTOR2I& GetAuxOrigin() const { return m_originAxisPosition; }
61 void SetAuxOrigin( const VECTOR2I& aPosition ) { m_originAxisPosition = aPosition; }
62
64 void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
65
72
73 const BOX2I GetBoundingBox() const override
74 {
75 return ComputeBoundingBox();
76 }
77
78 void SetBoundingBox( const BOX2I& aBox ) { m_BoundingBox = aBox; }
79
81 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
82 const std::vector<KICAD_T>& aScanTypes ) override;
83
84#if defined(DEBUG)
85 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
86#endif
87
88private:
92};
93
94#endif // #ifndef GBR_LAYOUT_H
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
A list of GERBER_DRAW_ITEM objects currently loaded.
Definition: gbr_layout.h:46
void SetAuxOrigin(const VECTOR2I &aPosition)
Definition: gbr_layout.h:61
BOX2I ComputeBoundingBox() const
Calculate the bounding box containing all Gerber items.
Definition: gbr_layout.cpp:47
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: gbr_layout.h:64
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Definition: gbr_layout.cpp:41
BOX2I m_BoundingBox
Definition: gbr_layout.h:89
TITLE_BLOCK m_titles
Definition: gbr_layout.h:90
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes) 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:69
VECTOR2I m_originAxisPosition
Definition: gbr_layout.h:91
wxString GetClass() const override
Return the class name.
Definition: gbr_layout.h:51
TITLE_BLOCK & GetTitleBlock()
Definition: gbr_layout.h:63
void SetBoundingBox(const BOX2I &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
const VECTOR2I & GetAuxOrigin() const
Definition: gbr_layout.h:60
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: gbr_layout.h:73
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:41
INSPECT_RESULT
Definition: eda_item.h:43
const INSPECTOR_FUNC & INSPECTOR
Definition: eda_item.h:82