2013-07-19 18:27:22 +00:00
|
|
|
/**
|
2018-01-29 08:39:13 +00:00
|
|
|
* @file pl_editor_layout.h
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2013-08-13 17:51:22 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 CERN
|
2021-06-08 19:39:47 +00:00
|
|
|
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
2013-08-13 17:51:22 +00:00
|
|
|
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
#ifndef CLASS_PL_EDITOR_LAYOUT_H
|
|
|
|
#define CLASS_PL_EDITOR_LAYOUT_H
|
|
|
|
|
2018-01-29 10:37:29 +00:00
|
|
|
#include <page_info.h>
|
|
|
|
#include <title_block.h>
|
2021-02-22 23:47:17 +00:00
|
|
|
#include <drawing_sheet/ds_draw_item.h>
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PL_EDITOR_LAYOUT
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PL_EDITOR_LAYOUT();
|
|
|
|
~PL_EDITOR_LAYOUT();
|
|
|
|
|
2019-05-26 15:36:40 +00:00
|
|
|
PAGE_INFO& GetPageSettings() { return m_paper; }
|
|
|
|
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
|
|
|
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2019-05-20 10:23:32 +00:00
|
|
|
const wxPoint& GetAuxOrigin() const
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
static wxPoint zero( 0, 0 );
|
|
|
|
return zero;
|
|
|
|
}
|
|
|
|
|
2019-05-26 15:36:40 +00:00
|
|
|
TITLE_BLOCK& GetTitleBlock() { return m_titles; }
|
|
|
|
const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
|
|
|
|
void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DRAW_ITEM_LIST& GetDrawItems()
|
2019-05-20 10:23:32 +00:00
|
|
|
{
|
|
|
|
return m_drawItemList;
|
|
|
|
}
|
|
|
|
|
2013-07-19 18:27:22 +00:00
|
|
|
/**
|
2021-06-08 19:39:47 +00:00
|
|
|
* Calculate the bounding box containing all Gerber items.
|
|
|
|
*
|
|
|
|
* @return the full item list bounding box.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
|
|
|
EDA_RECT ComputeBoundingBox();
|
|
|
|
|
|
|
|
/**
|
2021-06-08 19:39:47 +00:00
|
|
|
* Called soon after ComputeBoundingBox() to return the same EDA_RECT,
|
2013-07-19 18:27:22 +00:00
|
|
|
* as long as the CLASS_PL_EDITOR_LAYOUT has not changed.
|
|
|
|
*/
|
2020-11-14 18:11:28 +00:00
|
|
|
const EDA_RECT GetBoundingBox() const { return m_boundingBox; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2020-11-14 18:11:28 +00:00
|
|
|
void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-03-18 17:58:48 +00:00
|
|
|
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList );
|
2020-12-09 00:47:14 +00:00
|
|
|
|
2013-07-19 18:27:22 +00:00
|
|
|
#if defined(DEBUG)
|
2017-02-23 19:57:20 +00:00
|
|
|
void Show( int nestLevel, std::ostream& os ) const;
|
2013-07-19 18:27:22 +00:00
|
|
|
#endif
|
2021-06-08 19:39:47 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
EDA_RECT m_boundingBox;
|
|
|
|
PAGE_INFO m_paper;
|
|
|
|
TITLE_BLOCK m_titles;
|
|
|
|
|
|
|
|
DS_DRAW_ITEM_LIST m_drawItemList;
|
2013-07-19 18:27:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // #ifndef CLASS_PL_EDITOR_LAYOUT_H
|