KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DS_DRAW_ITEM_LIST Class Reference

Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and frame references, and parameters to draw/plot them. More...

#include <ds_draw_item.h>

Public Member Functions

 DS_DRAW_ITEM_LIST (const EDA_IU_SCALE &aIuScale)
 
 ~DS_DRAW_ITEM_LIST ()
 
void SetProject (const PROJECT *aProject)
 
void SetTitleBlock (const TITLE_BLOCK *aTblock)
 Set the title block (mainly for drawing sheet editor) More...
 
void SetProperties (const std::map< wxString, wxString > *aProps)
 Set properties used for text variable resolution. More...
 
void SetPaperFormat (const wxString &aFormatName)
 Set the paper format name (mainly for drawing sheet editor) More...
 
void SetFileName (const wxString &aFileName)
 Set the filename to draw/plot. More...
 
void SetSheetName (const wxString &aSheetName)
 Set the sheet name to draw/plot. More...
 
void SetSheetPath (const wxString &aSheetPath)
 Set the sheet path to draw/plot. More...
 
void SetSheetLayer (const wxString &aSheetLayer)
 Set the sheet layer to draw/plot. More...
 
void SetDefaultPenSize (int aPenSize)
 
int GetDefaultPenSize () const
 
void SetPlotterMilsToIUfactor (double aMils2Iu)
 Set the scalar to convert pages units (mils) to plot units. More...
 
double GetMilsToIUfactor ()
 Get the scalar to convert pages units (mils) to draw/plot units. More...
 
const EDA_IU_SCALEGetIuScale () const
 
void SetPageNumber (const wxString &aPageNumber)
 Set the value of the sheet number. More...
 
void SetIsFirstPage (bool aIsFirstPage)
 Set if the page is the first page. More...
 
void SetSheetCount (int aSheetCount)
 Set the value of the count of sheets, for basic inscriptions. More...
 
void Append (DS_DRAW_ITEM_BASE *aItem)
 
void Remove (DS_DRAW_ITEM_BASE *aItem)
 
DS_DRAW_ITEM_BASEGetFirst ()
 
DS_DRAW_ITEM_BASEGetNext ()
 
void Print (const RENDER_SETTINGS *aSettings)
 Draws the item list created by BuildDrawItemsList. More...
 
void BuildDrawItemsList (const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
 Drawing or plot the drawing sheet. More...
 
wxString BuildFullText (const wxString &aTextbase)
 

Static Public Member Functions

static void GetTextVars (wxArrayString *aVars)
 

Protected Attributes

std::vector< DS_DRAW_ITEM_BASE * > m_graphicList
 
const EDA_IU_SCALEm_iuScale
 
double m_plotterMilsToIu
 
unsigned m_idx
 
int m_penSize
 
bool m_isFirstPage
 Is this the first page or not. More...
 
int m_sheetCount
 The number of sheets. More...
 
const TITLE_BLOCKm_titleBlock
 
wxString m_paperFormat
 
wxString m_fileName
 
wxString m_sheetName
 
wxString m_sheetPath
 
wxString m_pageNumber
 The actual page number displayed in the title block. More...
 
wxString m_sheetLayer
 
const PROJECTm_project
 
const std::map< wxString, wxString > * m_properties
 

Detailed Description

Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and frame references, and parameters to draw/plot them.

Definition at line 400 of file ds_draw_item.h.

Constructor & Destructor Documentation

◆ DS_DRAW_ITEM_LIST()

DS_DRAW_ITEM_LIST::DS_DRAW_ITEM_LIST ( const EDA_IU_SCALE aIuScale)
inline

◆ ~DS_DRAW_ITEM_LIST()

DS_DRAW_ITEM_LIST::~DS_DRAW_ITEM_LIST ( )
inline

Definition at line 417 of file ds_draw_item.h.

Member Function Documentation

◆ Append()

◆ BuildDrawItemsList()

void DS_DRAW_ITEM_LIST::BuildDrawItemsList ( const PAGE_INFO aPageInfo,
const TITLE_BLOCK aTitleBlock 
)

Drawing or plot the drawing sheet.

Before calling this function, some parameters should be initialized by calling: SetPenSize( aPenWidth ); SetSheetNumber( aSheetNumber ); SetSheetCount( aSheetCount ); SetFileName( aFileName ); SetSheetName( aSheetName ); SetSheetPath( aSheetPath );

Parameters
aPageInfoThe PAGE_INFO, for page size, margins...
aTitleBlockThe sheet title block, for basic inscriptions.
aColorThe color for drawing.
aAltColorThe color for items which need to be "highlighted".

Definition at line 536 of file ds_draw_item.cpp.

References FIRST_PAGE_ONLY, DS_DATA_MODEL::GetCount(), DS_DATA_MODEL::GetItems(), GetMilsToIUfactor(), DS_DATA_MODEL::GetTheInstance(), PAGE_INFO::GetType(), DS_DATA_MODEL::LoadDrawingSheet(), m_isFirstPage, m_paperFormat, m_titleBlock, DS_DATA_MODEL::SetupDrawEnvironment(), SUBSEQUENT_PAGES, and DS_DATA_MODEL::VoidListAllowed().

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().

◆ BuildFullText()

wxString DS_DRAW_ITEM_LIST::BuildFullText ( const wxString &  aTextbase)
Returns
the full text corresponding to the aTextbase, after replacing any text variable references.

Definition at line 115 of file ds_painter.cpp.

References ExpandTextVars(), GetSemanticVersion(), PgmOrNull(), and productName.

Referenced by DS_DATA_ITEM_TEXT::SyncDrawItems().

◆ GetDefaultPenSize()

int DS_DRAW_ITEM_LIST::GetDefaultPenSize ( ) const
inline

Definition at line 462 of file ds_draw_item.h.

References m_penSize.

Referenced by DS_DATA_ITEM::SyncDrawItems(), and DS_DATA_ITEM_TEXT::SyncDrawItems().

◆ GetFirst()

◆ GetIuScale()

const EDA_IU_SCALE & DS_DRAW_ITEM_LIST::GetIuScale ( ) const
inline

Definition at line 483 of file ds_draw_item.h.

References m_iuScale.

Referenced by DS_DATA_ITEM_TEXT::SyncDrawItems().

◆ GetMilsToIUfactor()

double DS_DRAW_ITEM_LIST::GetMilsToIUfactor ( )
inline

Get the scalar to convert pages units (mils) to draw/plot units.

This will be controlled by EITHER the parent frame's EDA_IU_SCALE or the plotter's mils-to-iu factor.

Definition at line 475 of file ds_draw_item.h.

References EDA_IU_SCALE::IU_PER_MILS, m_iuScale, and m_plotterMilsToIu.

Referenced by BuildDrawItemsList(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().

◆ GetNext()

◆ GetTextVars()

void DS_DRAW_ITEM_LIST::GetTextVars ( wxArrayString *  aVars)
static

◆ Print()

void DS_DRAW_ITEM_LIST::Print ( const RENDER_SETTINGS aSettings)

Draws the item list created by BuildDrawItemsList.

Definition at line 569 of file ds_draw_item.cpp.

References GetFirst(), GetNext(), and WSG_BITMAP_T.

Referenced by PrintDrawingSheet().

◆ Remove()

◆ SetDefaultPenSize()

void DS_DRAW_ITEM_LIST::SetDefaultPenSize ( int  aPenSize)
inline

Definition at line 461 of file ds_draw_item.h.

References m_penSize.

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().

◆ SetFileName()

void DS_DRAW_ITEM_LIST::SetFileName ( const wxString &  aFileName)
inline

◆ SetIsFirstPage()

void DS_DRAW_ITEM_LIST::SetIsFirstPage ( bool  aIsFirstPage)
inline

Set if the page is the first page.

Definition at line 493 of file ds_draw_item.h.

References m_isFirstPage.

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().

◆ SetPageNumber()

void DS_DRAW_ITEM_LIST::SetPageNumber ( const wxString &  aPageNumber)
inline

◆ SetPaperFormat()

void DS_DRAW_ITEM_LIST::SetPaperFormat ( const wxString &  aFormatName)
inline

Set the paper format name (mainly for drawing sheet editor)

Definition at line 439 of file ds_draw_item.h.

References m_paperFormat.

◆ SetPlotterMilsToIUfactor()

void DS_DRAW_ITEM_LIST::SetPlotterMilsToIUfactor ( double  aMils2Iu)
inline

Set the scalar to convert pages units (mils) to plot units.

Definition at line 467 of file ds_draw_item.h.

References m_plotterMilsToIu.

Referenced by PlotDrawingSheet(), and PrintDrawingSheet().

◆ SetProject()

void DS_DRAW_ITEM_LIST::SetProject ( const PROJECT aProject)
inline

◆ SetProperties()

void DS_DRAW_ITEM_LIST::SetProperties ( const std::map< wxString, wxString > *  aProps)
inline

Set properties used for text variable resolution.

Definition at line 434 of file ds_draw_item.h.

References m_properties.

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().

◆ SetSheetCount()

void DS_DRAW_ITEM_LIST::SetSheetCount ( int  aSheetCount)
inline

Set the value of the count of sheets, for basic inscriptions.

Definition at line 498 of file ds_draw_item.h.

References m_sheetCount.

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().

◆ SetSheetLayer()

void DS_DRAW_ITEM_LIST::SetSheetLayer ( const wxString &  aSheetLayer)
inline

◆ SetSheetName()

void DS_DRAW_ITEM_LIST::SetSheetName ( const wxString &  aSheetName)
inline

◆ SetSheetPath()

void DS_DRAW_ITEM_LIST::SetSheetPath ( const wxString &  aSheetPath)
inline

Set the sheet path to draw/plot.

Definition at line 454 of file ds_draw_item.h.

References m_sheetPath.

Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().

◆ SetTitleBlock()

void DS_DRAW_ITEM_LIST::SetTitleBlock ( const TITLE_BLOCK aTblock)
inline

Set the title block (mainly for drawing sheet editor)

Definition at line 429 of file ds_draw_item.h.

References m_titleBlock.

Member Data Documentation

◆ m_fileName

wxString DS_DRAW_ITEM_LIST::m_fileName
protected

Definition at line 575 of file ds_draw_item.h.

Referenced by SetFileName().

◆ m_graphicList

std::vector<DS_DRAW_ITEM_BASE*> DS_DRAW_ITEM_LIST::m_graphicList
protected

Definition at line 563 of file ds_draw_item.h.

Referenced by Append(), GetFirst(), GetNext(), and Remove().

◆ m_idx

unsigned DS_DRAW_ITEM_LIST::m_idx
protected

Definition at line 567 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), GetFirst(), and GetNext().

◆ m_isFirstPage

bool DS_DRAW_ITEM_LIST::m_isFirstPage
protected

Is this the first page or not.

Definition at line 570 of file ds_draw_item.h.

Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), and SetIsFirstPage().

◆ m_iuScale

const EDA_IU_SCALE& DS_DRAW_ITEM_LIST::m_iuScale
protected

Definition at line 564 of file ds_draw_item.h.

Referenced by GetIuScale(), and GetMilsToIUfactor().

◆ m_pageNumber

wxString DS_DRAW_ITEM_LIST::m_pageNumber
protected

The actual page number displayed in the title block.

Definition at line 578 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), and SetPageNumber().

◆ m_paperFormat

wxString DS_DRAW_ITEM_LIST::m_paperFormat
protected

Definition at line 574 of file ds_draw_item.h.

Referenced by BuildDrawItemsList(), and SetPaperFormat().

◆ m_penSize

int DS_DRAW_ITEM_LIST::m_penSize
protected

Definition at line 568 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), GetDefaultPenSize(), and SetDefaultPenSize().

◆ m_plotterMilsToIu

double DS_DRAW_ITEM_LIST::m_plotterMilsToIu
protected

Definition at line 565 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), GetMilsToIUfactor(), and SetPlotterMilsToIUfactor().

◆ m_project

const PROJECT* DS_DRAW_ITEM_LIST::m_project
protected

Definition at line 580 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), and SetProject().

◆ m_properties

const std::map<wxString, wxString>* DS_DRAW_ITEM_LIST::m_properties
protected

Definition at line 582 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), and SetProperties().

◆ m_sheetCount

int DS_DRAW_ITEM_LIST::m_sheetCount
protected

The number of sheets.

Definition at line 571 of file ds_draw_item.h.

Referenced by DS_DRAW_ITEM_LIST(), and SetSheetCount().

◆ m_sheetLayer

wxString DS_DRAW_ITEM_LIST::m_sheetLayer
protected

Definition at line 579 of file ds_draw_item.h.

Referenced by SetSheetLayer().

◆ m_sheetName

wxString DS_DRAW_ITEM_LIST::m_sheetName
protected

Definition at line 576 of file ds_draw_item.h.

Referenced by SetSheetName().

◆ m_sheetPath

wxString DS_DRAW_ITEM_LIST::m_sheetPath
protected

Definition at line 577 of file ds_draw_item.h.

Referenced by SetSheetPath().

◆ m_titleBlock

const TITLE_BLOCK* DS_DRAW_ITEM_LIST::m_titleBlock
protected

Definition at line 573 of file ds_draw_item.h.

Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), and SetTitleBlock().


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