KiCad PCB EDA Suite
PL_EDITOR_LAYOUT Class Reference

Class PL_EDITOR_LAYOUT. More...

#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)
 
WS_DRAW_ITEM_LISTGetDrawItems ()
 
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
 
WS_DRAW_ITEM_LIST m_drawItemList
 

Detailed Description

Class PL_EDITOR_LAYOUT.

Definition at line 40 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 }
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
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 ( )

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 pl_editor_layout.cpp.

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.
Definition: eda_rect.h:44

References SetBoundingBox().

◆ GetAuxOrigin()

const wxPoint& PL_EDITOR_LAYOUT::GetAuxOrigin ( ) const
inline

Definition at line 57 of file pl_editor_layout.h.

58  {
59  static wxPoint zero( 0, 0 );
60  return zero;
61  }

◆ GetBoundingBox()

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 84 of file pl_editor_layout.h.

84 { return m_BoundingBox; }

References m_BoundingBox.

◆ GetDrawItems()

WS_DRAW_ITEM_LIST& PL_EDITOR_LAYOUT::GetDrawItems ( )
inline

Definition at line 67 of file pl_editor_layout.h.

68  {
69  return m_drawItemList;
70  }
WS_DRAW_ITEM_LIST m_drawItemList

References m_drawItemList.

◆ 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 54 of file pl_editor_layout.h.

54 { return m_paper; }

References m_paper.

◆ GetTitleBlock() [1/2]

TITLE_BLOCK& PL_EDITOR_LAYOUT::GetTitleBlock ( )
inline

Definition at line 63 of file pl_editor_layout.h.

63 { 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 64 of file pl_editor_layout.h.

64 { return m_titles; }
TITLE_BLOCK m_titles

References m_titles.

◆ SetBoundingBox()

void PL_EDITOR_LAYOUT::SetBoundingBox ( const EDA_RECT aBox)
inline

Definition at line 86 of file pl_editor_layout.h.

86 { m_BoundingBox = aBox; }

References m_BoundingBox.

Referenced by ComputeBoundingBox().

◆ SetPageSettings()

void PL_EDITOR_LAYOUT::SetPageSettings ( const PAGE_INFO aPageSettings)
inline

Definition at line 55 of file pl_editor_layout.h.

55 { 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 65 of file pl_editor_layout.h.

65 { 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 43 of file pl_editor_layout.h.

Referenced by GetBoundingBox(), and SetBoundingBox().

◆ m_drawItemList

WS_DRAW_ITEM_LIST PL_EDITOR_LAYOUT::m_drawItemList
private

Definition at line 47 of file pl_editor_layout.h.

Referenced by GetDrawItems().

◆ m_paper

PAGE_INFO PL_EDITOR_LAYOUT::m_paper
private

Definition at line 44 of file pl_editor_layout.h.

Referenced by GetPageSettings(), and SetPageSettings().

◆ m_titles

TITLE_BLOCK PL_EDITOR_LAYOUT::m_titles
private

Definition at line 45 of file pl_editor_layout.h.

Referenced by GetTitleBlock(), and SetTitleBlock().


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