KiCad PCB EDA Suite
PL_EDITOR_LAYOUT Class Reference

Class PL_EDITOR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded. More...

#include <class_pl_editor_layout.h>

Public Member Functions

 PL_EDITOR_LAYOUT ()
 
 ~PL_EDITOR_LAYOUT ()
 
const PAGE_INFOGetPageSettings () const
 
void SetPageSettings (const PAGE_INFO &aPageSettings)
 
const wxPointGetAuxOrigin () const
 
const TITLE_BLOCKGetTitleBlock () const
 
void SetTitleBlock (const TITLE_BLOCK &aTitleBlock)
 
EDA_RECT ComputeBoundingBox ()
 Function ComputeBoundingBox calculates the bounding box containing all Gerber items. More...
 
const EDA_RECT GetBoundingBox () const
 Function GetBoundingBox may be 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)
 

Private Attributes

EDA_RECT m_BoundingBox
 
PAGE_INFO m_paper
 
TITLE_BLOCK m_titles
 

Detailed Description

Class PL_EDITOR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded.

Definition at line 42 of file class_pl_editor_layout.h.

Constructor & Destructor Documentation

PL_EDITOR_LAYOUT::PL_EDITOR_LAYOUT ( )

Definition at line 37 of file class_pl_editor_layout.cpp.

References SetPageSettings().

38 {
39  PAGE_INFO pageInfo( wxT( "A4" ) );
40  SetPageSettings( pageInfo );
41 }
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
void SetPageSettings(const PAGE_INFO &aPageSettings)
PL_EDITOR_LAYOUT::~PL_EDITOR_LAYOUT ( )

Definition at line 44 of file class_pl_editor_layout.cpp.

45 {
46 }

Member Function Documentation

EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox ( )

Function ComputeBoundingBox calculates the bounding box containing all Gerber items.

Returns
EDA_RECT - the full item list bounding box

Definition at line 48 of file class_pl_editor_layout.cpp.

References SetBoundingBox().

49 {
50  EDA_RECT bbox;
51 
52  SetBoundingBox( bbox );
53  return bbox;
54 }
void SetBoundingBox(const EDA_RECT &aBox)
Class EDA_RECT handles the component boundary box.
const wxPoint& PL_EDITOR_LAYOUT::GetAuxOrigin ( ) const
inline

Definition at line 59 of file class_pl_editor_layout.h.

60  {
61  static wxPoint zero( 0, 0 );
62  return zero;
63  }
const EDA_RECT PL_EDITOR_LAYOUT::GetBoundingBox ( ) const
inline

Function GetBoundingBox may be called soon after ComputeBoundingBox() to return the same EDA_RECT, as long as the CLASS_PL_EDITOR_LAYOUT has not changed.

Definition at line 87 of file class_pl_editor_layout.h.

References m_BoundingBox.

87 { return m_BoundingBox; }
const PAGE_INFO& PL_EDITOR_LAYOUT::GetPageSettings ( ) const
inline
const TITLE_BLOCK& PL_EDITOR_LAYOUT::GetTitleBlock ( ) const
inline

Definition at line 65 of file class_pl_editor_layout.h.

References m_titles.

Referenced by PL_EDITOR_FRAME::GetTitleBlock().

66  {
67  return m_titles;
68  }
void PL_EDITOR_LAYOUT::SetBoundingBox ( const EDA_RECT aBox)
inline

Definition at line 89 of file class_pl_editor_layout.h.

Referenced by ComputeBoundingBox().

89 { m_BoundingBox = aBox; }
void PL_EDITOR_LAYOUT::SetPageSettings ( const PAGE_INFO aPageSettings)
inline

Definition at line 54 of file class_pl_editor_layout.h.

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

55  {
56  m_paper = aPageSettings;
57  }
void PL_EDITOR_LAYOUT::SetTitleBlock ( const TITLE_BLOCK aTitleBlock)
inline

Definition at line 70 of file class_pl_editor_layout.h.

Referenced by PL_EDITOR_FRAME::SetTitleBlock().

71  {
72  m_titles = aTitleBlock;
73  }

Member Data Documentation

EDA_RECT PL_EDITOR_LAYOUT::m_BoundingBox
private

Definition at line 45 of file class_pl_editor_layout.h.

Referenced by GetBoundingBox().

PAGE_INFO PL_EDITOR_LAYOUT::m_paper
private

Definition at line 46 of file class_pl_editor_layout.h.

Referenced by GetPageSettings().

TITLE_BLOCK PL_EDITOR_LAYOUT::m_titles
private

Definition at line 47 of file class_pl_editor_layout.h.

Referenced by GetTitleBlock().


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