KiCad PCB EDA Suite
pl_editor_layout.h
Go to the documentation of this file.
1 
4 /*
5  * This program source code file is part of KiCad, a free EDA CAD application.
6  *
7  * Copyright (C) 2013 CERN
8  * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
9  * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, you may find one here:
23  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24  * or you may search the http://www.gnu.org website for the version 2 license,
25  * or you may write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27  */
28 
29 #ifndef CLASS_PL_EDITOR_LAYOUT_H
30 #define CLASS_PL_EDITOR_LAYOUT_H
31 
32 #include <page_info.h>
33 #include <title_block.h>
35 
36 
38 {
39 public:
42 
44  const PAGE_INFO& GetPageSettings() const { return m_paper; }
45  void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
46 
47  const wxPoint& GetAuxOrigin() const
48  {
49  static wxPoint zero( 0, 0 );
50  return zero;
51  }
52 
54  const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
55  void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
56 
58  {
59  return m_drawItemList;
60  }
61 
68 
73  const EDA_RECT GetBoundingBox() const { return m_boundingBox; }
74 
75  void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; }
76 
77  void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList );
78 
79 #if defined(DEBUG)
80  void Show( int nestLevel, std::ostream& os ) const;
81 #endif
82 
83 private:
87 
89 };
90 
91 #endif // #ifndef CLASS_PL_EDITOR_LAYOUT_H
const wxPoint & GetAuxOrigin() const
EDA_RECT ComputeBoundingBox()
Calculate the bounding box containing all Gerber items.
TITLE_BLOCK m_titles
DS_DRAW_ITEM_LIST m_drawItemList
The base class for create windows for drawing purpose.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:40
PAGE_INFO & GetPageSettings()
TITLE_BLOCK & GetTitleBlock()
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
const PAGE_INFO & GetPageSettings() const
void SetBoundingBox(const EDA_RECT &aBox)
DS_DRAW_ITEM_LIST & GetDrawItems()
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
void SetPageSettings(const PAGE_INFO &aPageSettings)
const TITLE_BLOCK & GetTitleBlock() const
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Handle the component boundary box.
Definition: eda_rect.h:42
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
Definition: ds_draw_item.h:376
const EDA_RECT GetBoundingBox() const
Called soon after ComputeBoundingBox() to return the same EDA_RECT, as long as the CLASS_PL_EDITOR_LA...