KiCad PCB EDA Suite
PL_EDITOR_LAYOUT Class Reference

#include <pl_editor_layout.h>

Public Member Functions

 PL_EDITOR_LAYOUT ()
 
 ~PL_EDITOR_LAYOUT ()
 
PAGE_INFOGetPageSettings ()
 
const PAGE_INFOGetPageSettings () const
 
void SetPageSettings (const PAGE_INFO &aPageSettings)
 
const wxPoint & GetAuxOrigin () const
 
TITLE_BLOCKGetTitleBlock ()
 
const TITLE_BLOCKGetTitleBlock () const
 
void SetTitleBlock (const TITLE_BLOCK &aTitleBlock)
 
DS_DRAW_ITEM_LISTGetDrawItems ()
 
EDA_RECT ComputeBoundingBox ()
 Calculate the bounding box containing all Gerber items. More...
 
const EDA_RECT GetBoundingBox () const
 Called soon after ComputeBoundingBox() to return the same EDA_RECT, as long as the CLASS_PL_EDITOR_LAYOUT has not changed. More...
 
void SetBoundingBox (const EDA_RECT &aBox)
 
void GetMsgPanelInfo (EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
 

Private Attributes

EDA_RECT m_boundingBox
 
PAGE_INFO m_paper
 
TITLE_BLOCK m_titles
 
DS_DRAW_ITEM_LIST m_drawItemList
 

Detailed Description

Definition at line 37 of file pl_editor_layout.h.

Constructor & Destructor Documentation

◆ PL_EDITOR_LAYOUT()

PL_EDITOR_LAYOUT::PL_EDITOR_LAYOUT ( )

Definition at line 37 of file pl_editor_layout.cpp.

38 {
39  PAGE_INFO pageInfo( wxT( "A4" ) );
40  SetPageSettings( pageInfo );
41 }
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
void SetPageSettings(const PAGE_INFO &aPageSettings)

References SetPageSettings().

◆ ~PL_EDITOR_LAYOUT()

PL_EDITOR_LAYOUT::~PL_EDITOR_LAYOUT ( )

Definition at line 44 of file pl_editor_layout.cpp.

45 {
46 }

Member Function Documentation

◆ ComputeBoundingBox()

EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox ( )

Calculate the bounding box containing all Gerber items.

Returns
the full item list bounding box.

Definition at line 49 of file pl_editor_layout.cpp.

50 {
51  EDA_RECT bbox;
52 
53  SetBoundingBox( bbox );
54  return bbox;
55 }
void SetBoundingBox(const EDA_RECT &aBox)
Handle the component boundary box.
Definition: eda_rect.h:42

References SetBoundingBox().

◆ GetAuxOrigin()

const wxPoint& PL_EDITOR_LAYOUT::GetAuxOrigin ( ) const
inline

Definition at line 47 of file pl_editor_layout.h.

48  {
49  static wxPoint zero( 0, 0 );
50  return zero;
51  }

◆ GetBoundingBox()

const EDA_RECT PL_EDITOR_LAYOUT::GetBoundingBox ( ) const
inline

Called soon after ComputeBoundingBox() to return the same EDA_RECT, as long as the CLASS_PL_EDITOR_LAYOUT has not changed.

Definition at line 73 of file pl_editor_layout.h.

73 { return m_boundingBox; }

References m_boundingBox.

◆ GetDrawItems()

DS_DRAW_ITEM_LIST& PL_EDITOR_LAYOUT::GetDrawItems ( )
inline

Definition at line 57 of file pl_editor_layout.h.

58  {
59  return m_drawItemList;
60  }
DS_DRAW_ITEM_LIST m_drawItemList

References m_drawItemList.

◆ GetMsgPanelInfo()

void PL_EDITOR_LAYOUT::GetMsgPanelInfo ( EDA_DRAW_FRAME aFrame,
std::vector< MSG_PANEL_ITEM > &  aList 
)

Definition at line 58 of file pl_editor_layout.cpp.

59 {
60  DSIZE size = GetPageSettings().GetSizeIU();
61 
62  aList.emplace_back( _( "Page Width" ), MessageTextFromValue( aFrame->GetUserUnits(), size.x ) );
63 
64  aList.emplace_back(
65  _( "Page Height" ), MessageTextFromValue( aFrame->GetUserUnits(), size.y ) );
66 }
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:104
PAGE_INFO & GetPageSettings()
#define _(s)
EDA_UNITS GetUserUnits() const
Return the user units currently in use.

References _, GetPageSettings(), EDA_BASE_FRAME::GetUserUnits(), MessageTextFromValue(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PL_EDITOR_CONTROL::UpdateMessagePanel().

◆ GetPageSettings() [1/2]

PAGE_INFO& PL_EDITOR_LAYOUT::GetPageSettings ( )
inline

◆ GetPageSettings() [2/2]

const PAGE_INFO& PL_EDITOR_LAYOUT::GetPageSettings ( ) const
inline

Definition at line 44 of file pl_editor_layout.h.

44 { return m_paper; }

References m_paper.

◆ GetTitleBlock() [1/2]

TITLE_BLOCK& PL_EDITOR_LAYOUT::GetTitleBlock ( )
inline

Definition at line 53 of file pl_editor_layout.h.

53 { return m_titles; }
TITLE_BLOCK m_titles

References m_titles.

Referenced by PL_EDITOR_FRAME::GetTitleBlock().

◆ GetTitleBlock() [2/2]

const TITLE_BLOCK& PL_EDITOR_LAYOUT::GetTitleBlock ( ) const
inline

Definition at line 54 of file pl_editor_layout.h.

54 { return m_titles; }
TITLE_BLOCK m_titles

References m_titles.

◆ SetBoundingBox()

void PL_EDITOR_LAYOUT::SetBoundingBox ( const EDA_RECT aBox)
inline

Definition at line 75 of file pl_editor_layout.h.

75 { m_boundingBox = aBox; }

References m_boundingBox.

Referenced by ComputeBoundingBox().

◆ SetPageSettings()

void PL_EDITOR_LAYOUT::SetPageSettings ( const PAGE_INFO aPageSettings)
inline

Definition at line 45 of file pl_editor_layout.h.

45 { m_paper = aPageSettings; }

References m_paper.

Referenced by PL_EDITOR_LAYOUT(), and PL_EDITOR_FRAME::SetPageSettings().

◆ SetTitleBlock()

void PL_EDITOR_LAYOUT::SetTitleBlock ( const TITLE_BLOCK aTitleBlock)
inline

Definition at line 55 of file pl_editor_layout.h.

55 { m_titles = aTitleBlock; }
TITLE_BLOCK m_titles

References m_titles.

Referenced by PL_EDITOR_FRAME::SetTitleBlock().

Member Data Documentation

◆ m_boundingBox

EDA_RECT PL_EDITOR_LAYOUT::m_boundingBox
private

Definition at line 84 of file pl_editor_layout.h.

Referenced by GetBoundingBox(), and SetBoundingBox().

◆ m_drawItemList

DS_DRAW_ITEM_LIST PL_EDITOR_LAYOUT::m_drawItemList
private

Definition at line 88 of file pl_editor_layout.h.

Referenced by GetDrawItems().

◆ m_paper

PAGE_INFO PL_EDITOR_LAYOUT::m_paper
private

Definition at line 85 of file pl_editor_layout.h.

Referenced by GetPageSettings(), and SetPageSettings().

◆ m_titles

TITLE_BLOCK PL_EDITOR_LAYOUT::m_titles
private

Definition at line 86 of file pl_editor_layout.h.

Referenced by GetTitleBlock(), and SetTitleBlock().


The documentation for this class was generated from the following files: