KiCad PCB EDA Suite
|
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) | |
void | SetProperties (const std::map< wxString, wxString > *aProps) |
Set properties used for text variable resolution. | |
void | SetPaperFormat (const wxString &aFormatName) |
Set the paper format name (mainly for drawing sheet editor) | |
void | SetFileName (const wxString &aFileName) |
Set the filename to draw/plot. | |
void | SetSheetName (const wxString &aSheetName) |
Set the sheet name to draw/plot. | |
void | SetSheetPath (const wxString &aSheetPath) |
Set the sheet path to draw/plot. | |
void | SetSheetLayer (const wxString &aSheetLayer) |
Set the sheet layer to draw/plot. | |
void | SetDefaultPenSize (int aPenSize) |
int | GetDefaultPenSize () const |
void | SetPlotterMilsToIUfactor (double aMils2Iu) |
Set the scalar to convert pages units (mils) to plot units. | |
double | GetMilsToIUfactor () |
Get the scalar to convert pages units (mils) to draw/plot units. | |
const EDA_IU_SCALE & | GetIuScale () const |
void | SetPageNumber (const wxString &aPageNumber) |
Set the value of the sheet number. | |
void | SetIsFirstPage (bool aIsFirstPage) |
Set if the page is the first page. | |
void | SetSheetCount (int aSheetCount) |
Set the value of the count of sheets, for basic inscriptions. | |
void | Append (DS_DRAW_ITEM_BASE *aItem) |
void | Remove (DS_DRAW_ITEM_BASE *aItem) |
DS_DRAW_ITEM_BASE * | GetFirst () |
DS_DRAW_ITEM_BASE * | GetNext () |
void | Print (const RENDER_SETTINGS *aSettings) |
Draws the item list created by BuildDrawItemsList. | |
void | BuildDrawItemsList (const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock) |
Drawing or plot the drawing sheet. | |
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_SCALE & | m_iuScale |
double | m_plotterMilsToIu |
unsigned | m_idx |
int | m_penSize |
bool | m_isFirstPage |
Is this the first page or not. | |
int | m_sheetCount |
The number of sheets. | |
const TITLE_BLOCK * | m_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. | |
wxString | m_sheetLayer |
const PROJECT * | m_project |
const std::map< wxString, wxString > * | m_properties |
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.
|
inline |
Definition at line 403 of file ds_draw_item.h.
References m_idx, m_isFirstPage, m_pageNumber, m_penSize, m_plotterMilsToIu, m_project, m_properties, m_sheetCount, and m_titleBlock.
|
inline |
Definition at line 417 of file ds_draw_item.h.
|
inline |
Definition at line 500 of file ds_draw_item.h.
References m_graphicList.
Referenced by DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().
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 );
aPageInfo | The PAGE_INFO, for page size, margins... |
aTitleBlock | The sheet title block, for basic inscriptions. |
aColor | The color for drawing. |
aAltColor | The color for items which need to be "highlighted". |
Definition at line 546 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().
wxString DS_DRAW_ITEM_LIST::BuildFullText | ( | const wxString & | aTextbase | ) |
Definition at line 115 of file ds_painter.cpp.
References ExpandTextVars(), GetBaseVersion(), PgmOrNull(), and productName.
Referenced by DS_DATA_ITEM_TEXT::SyncDrawItems().
|
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().
|
inline |
Definition at line 511 of file ds_draw_item.h.
References m_graphicList, and m_idx.
Referenced by DS_PROXY_VIEW_ITEM::HitTestDrawingSheetItems(), PlotDrawingSheet(), Print(), DRC_TEST_PROVIDER_MISC::testTextVars(), and DS_PROXY_VIEW_ITEM::ViewDraw().
|
inline |
Definition at line 483 of file ds_draw_item.h.
References m_iuScale.
Referenced by DS_DATA_ITEM_TEXT::SyncDrawItems().
|
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().
|
inline |
Definition at line 521 of file ds_draw_item.h.
References m_graphicList, and m_idx.
Referenced by DS_PROXY_VIEW_ITEM::HitTestDrawingSheetItems(), PlotDrawingSheet(), Print(), DRC_TEST_PROVIDER_MISC::testTextVars(), and DS_PROXY_VIEW_ITEM::ViewDraw().
|
static |
Definition at line 97 of file ds_painter.cpp.
References TITLE_BLOCK::GetContextualTextVars().
Referenced by PROPERTIES_FRAME::onScintillaCharAdded().
void DS_DRAW_ITEM_LIST::Print | ( | const RENDER_SETTINGS * | aSettings | ) |
Draws the item list created by BuildDrawItemsList.
Definition at line 579 of file ds_draw_item.cpp.
References GetFirst(), GetNext(), and WSG_BITMAP_T.
Referenced by PrintDrawingSheet().
|
inline |
Definition at line 505 of file ds_draw_item.h.
References m_graphicList.
Referenced by DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and DS_DATA_ITEM_BITMAP::SyncDrawItems().
|
inline |
Definition at line 461 of file ds_draw_item.h.
References m_penSize.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().
|
inline |
Set the filename to draw/plot.
Definition at line 444 of file ds_draw_item.h.
References m_fileName.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
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().
|
inline |
Set the value of the sheet number.
Definition at line 488 of file ds_draw_item.h.
References m_pageNumber.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
inline |
Set the paper format name (mainly for drawing sheet editor)
Definition at line 439 of file ds_draw_item.h.
References m_paperFormat.
|
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().
|
inline |
Definition at line 424 of file ds_draw_item.h.
References m_project.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
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().
|
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().
|
inline |
Set the sheet layer to draw/plot.
Definition at line 459 of file ds_draw_item.h.
References m_sheetLayer.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
inline |
Set the sheet name to draw/plot.
Definition at line 449 of file ds_draw_item.h.
References m_sheetName.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
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().
|
inline |
Set the title block (mainly for drawing sheet editor)
Definition at line 429 of file ds_draw_item.h.
References m_titleBlock.
|
protected |
Definition at line 575 of file ds_draw_item.h.
Referenced by SetFileName().
|
protected |
Definition at line 563 of file ds_draw_item.h.
Referenced by Append(), GetFirst(), GetNext(), and Remove().
|
protected |
Definition at line 567 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), GetFirst(), and GetNext().
|
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().
|
protected |
Definition at line 564 of file ds_draw_item.h.
Referenced by GetIuScale(), and GetMilsToIUfactor().
|
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().
|
protected |
Definition at line 574 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), and SetPaperFormat().
|
protected |
Definition at line 568 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), GetDefaultPenSize(), and SetDefaultPenSize().
|
protected |
Definition at line 565 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), GetMilsToIUfactor(), and SetPlotterMilsToIUfactor().
|
protected |
Definition at line 580 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetProject().
|
protected |
Definition at line 582 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetProperties().
|
protected |
The number of sheets.
Definition at line 571 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetSheetCount().
|
protected |
Definition at line 579 of file ds_draw_item.h.
Referenced by SetSheetLayer().
|
protected |
Definition at line 576 of file ds_draw_item.h.
Referenced by SetSheetName().
|
protected |
Definition at line 577 of file ds_draw_item.h.
Referenced by SetSheetPath().
|
protected |
Definition at line 573 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), and SetTitleBlock().