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 () | |
~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 | SetMilsToIUfactor (double aMils2Iu) |
Set the scalar to convert pages units (mils) to draw/plot units. More... | |
double | GetMilsToIUfactor () |
Get the scalar to convert pages units (mils) to draw/plot units. More... | |
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_BASE * | GetFirst () |
DS_DRAW_ITEM_BASE * | GetNext () |
void | GetAllItems (std::vector< DS_DRAW_ITEM_BASE * > *aList) |
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 |
unsigned | m_idx |
double | m_milsToIu |
int | m_penSize |
bool | m_isFirstPage |
Is this the first page or not. More... | |
int | m_sheetCount |
The number of sheets. More... | |
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. More... | |
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 384 of file ds_draw_item.h.
|
inline |
Definition at line 387 of file ds_draw_item.h.
References m_idx, m_isFirstPage, m_milsToIu, m_pageNumber, m_penSize, m_project, m_properties, m_sheetCount, and m_titleBlock.
|
inline |
Definition at line 400 of file ds_draw_item.h.
|
inline |
Definition at line 472 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 ); SetMilsToIUfactor( aMils2Iu ); 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 492 of file ds_draw_item.cpp.
References FIRST_PAGE_ONLY, DS_DATA_MODEL::GetCount(), DS_DATA_MODEL::GetItems(), DS_DATA_MODEL::GetTheInstance(), PAGE_INFO::GetType(), DS_DATA_MODEL::LoadDrawingSheet(), m_isFirstPage, m_milsToIu, 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 113 of file ds_painter.cpp.
References ExpandTextVars(), Format(), GetBuildVersion(), Pgm(), PgmOrNull(), and productName.
Referenced by DS_DATA_ITEM_TEXT::SyncDrawItems().
|
inline |
Definition at line 503 of file ds_draw_item.h.
References m_graphicList.
|
inline |
Definition at line 445 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 483 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(), ERC_TESTER::TestTextVars(), and DS_PROXY_VIEW_ITEM::ViewDraw().
|
inline |
Get the scalar to convert pages units (mils) to draw/plot units.
Definition at line 455 of file ds_draw_item.h.
References m_milsToIu.
Referenced by DS_DATA_ITEM_BITMAP::SyncDrawItems().
|
inline |
Definition at line 493 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(), ERC_TESTER::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 525 of file ds_draw_item.cpp.
References GetFirst(), GetNext(), and WSG_BITMAP_T.
Referenced by PrintDrawingSheet().
|
inline |
Definition at line 477 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 444 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 427 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 465 of file ds_draw_item.h.
References m_isFirstPage.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), and PrintDrawingSheet().
|
inline |
Set the scalar to convert pages units (mils) to draw/plot units.
Definition at line 450 of file ds_draw_item.h.
References m_milsToIu.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), PlotDrawingSheet(), PrintDrawingSheet(), DRC_TEST_PROVIDER_MISC::testTextVars(), and ERC_TESTER::TestTextVars().
|
inline |
Set the value of the sheet number.
Definition at line 460 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 422 of file ds_draw_item.h.
References m_paperFormat.
|
inline |
Definition at line 407 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 417 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 470 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 442 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 432 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 437 of file ds_draw_item.h.
References m_sheetPath.
Referenced by DS_PROXY_VIEW_ITEM::buildDrawList(), and PlotDrawingSheet().
|
inline |
Set the title block (mainly for drawing sheet editor)
Definition at line 412 of file ds_draw_item.h.
References m_titleBlock.
|
protected |
Definition at line 552 of file ds_draw_item.h.
Referenced by SetFileName().
|
protected |
Definition at line 541 of file ds_draw_item.h.
Referenced by Append(), GetAllItems(), GetFirst(), GetNext(), and Remove().
|
protected |
Definition at line 542 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 547 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), and SetIsFirstPage().
|
protected |
Definition at line 543 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), GetMilsToIUfactor(), and SetMilsToIUfactor().
|
protected |
The actual page number displayed in the title block.
Definition at line 555 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetPageNumber().
|
protected |
Definition at line 551 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), and SetPaperFormat().
|
protected |
Definition at line 545 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), GetDefaultPenSize(), and SetDefaultPenSize().
|
protected |
Definition at line 557 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetProject().
|
protected |
Definition at line 559 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetProperties().
|
protected |
The number of sheets.
Definition at line 548 of file ds_draw_item.h.
Referenced by DS_DRAW_ITEM_LIST(), and SetSheetCount().
|
protected |
Definition at line 556 of file ds_draw_item.h.
Referenced by SetSheetLayer().
|
protected |
Definition at line 553 of file ds_draw_item.h.
Referenced by SetSheetName().
|
protected |
Definition at line 554 of file ds_draw_item.h.
Referenced by SetSheetPath().
|
protected |
Definition at line 550 of file ds_draw_item.h.
Referenced by BuildDrawItemsList(), DS_DRAW_ITEM_LIST(), and SetTitleBlock().