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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
26
27#ifndef GBR_LAYOUT_H
28#define GBR_LAYOUT_H
29
30
31#include <gerbview.h> // GERBER_DRAWLAYERS_COUNT
32#include <title_block.h>
33#include <gerber_draw_item.h>
34#include <math/box2.h>
35
37
41class GBR_LAYOUT : public EDA_ITEM
42{
43public:
44 GBR_LAYOUT();
46
47 wxString GetClass() const override
48 {
49 return wxT( "GBR_LAYOUT" );
50 }
51
52 // Accessor to the GERBER_FILE_IMAGE_LIST,
53 // which handles the list of gerber files (and drill files) images loaded
55
56 const VECTOR2I& GetAuxOrigin() const { return m_originAxisPosition; }
57 void SetAuxOrigin( const VECTOR2I& aPosition ) { m_originAxisPosition = aPosition; }
58
60 void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
61
68
69 const BOX2I GetBoundingBox() const override
70 {
71 return ComputeBoundingBox();
72 }
73
74 void SetBoundingBox( const BOX2I& aBox ) { m_BoundingBox = aBox; }
75
77 INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
78 const std::vector<KICAD_T>& aScanTypes ) override;
79
80#if defined(DEBUG)
81 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
82#endif
83
84private:
88};
89
90#endif // #ifndef GBR_LAYOUT_H
BOX2< VECTOR2I > BOX2I
Definition box2.h:918
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:37
void SetAuxOrigin(const VECTOR2I &aPosition)
Definition gbr_layout.h:57
BOX2I ComputeBoundingBox() const
Calculate the bounding box containing all Gerber items.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition gbr_layout.h:60
GERBER_FILE_IMAGE_LIST * GetImagesList() const
BOX2I m_BoundingBox
Definition gbr_layout.h:85
TITLE_BLOCK m_titles
Definition gbr_layout.h:86
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...
VECTOR2I m_originAxisPosition
Definition gbr_layout.h:87
wxString GetClass() const override
Return the class name.
Definition gbr_layout.h:47
TITLE_BLOCK & GetTitleBlock()
Definition gbr_layout.h:59
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:74
const VECTOR2I & GetAuxOrigin() const
Definition gbr_layout.h:56
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition gbr_layout.h:69
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:37
INSPECT_RESULT
Definition eda_item.h:42
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
Definition eda_item.h:89
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683