KiCad PCB EDA Suite
eda_draw_frame.cpp File Reference
#include <base_screen.h>
#include <bitmaps.h>
#include <confirm.h>
#include <core/arraydim.h>
#include <dialog_shim.h>
#include <eda_draw_frame.h>
#include <filehistory.h>
#include <id.h>
#include <kiface_base.h>
#include <lockfile.h>
#include <macros.h>
#include <page_info.h>
#include <paths.h>
#include <pgm_base.h>
#include <render_settings.h>
#include <settings/app_settings.h>
#include <settings/color_settings.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <title_block.h>
#include <tool/actions.h>
#include <tool/common_tools.h>
#include <tool/grid_menu.h>
#include <tool/selection_conditions.h>
#include <tool/tool_dispatcher.h>
#include <tool/tool_manager.h>
#include <tool/tool_menu.h>
#include <tool/zoom_menu.h>
#include <trace_helpers.h>
#include <view/view.h>
#include <drawing_sheet/ds_draw_item.h>
#include <widgets/msgpanel.h>
#include <wx/event.h>
#include <wx/snglinst.h>
#include <dialogs/dialog_grid_settings.h>
#include <widgets/ui_common.h>
#include <widgets/search_pane.h>
#include <wx/dirdlg.h>
#include <wx/filedlg.h>
#include <wx/msgdlg.h>
#include <wx/socket.h>
#include <wx/fdrepdlg.h>

Go to the source code of this file.


#define FR_HISTORY_LIST_CNT   10
 Maximum size of the find/replace history stacks. More...


void PrintDrawingSheet (const RENDER_SETTINGS *aSettings, const PAGE_INFO &aPageInfo, const wxString &aFullSheetName, const wxString &aFileName, const TITLE_BLOCK &aTitleBlock, const std::map< wxString, wxString > *aProperties, int aSheetCount, const wxString &aPageNumber, double aMils2Iu, const PROJECT *aProject, const wxString &aSheetLayer, bool aIsFirstPage)
 Print the border and title block. More...


static const wxString productName = wxT( "KiCad E.D.A. " )

Macro Definition Documentation


#define FR_HISTORY_LIST_CNT   10

Maximum size of the find/replace history stacks.

Definition at line 71 of file eda_draw_frame.cpp.

Function Documentation

◆ PrintDrawingSheet()

void PrintDrawingSheet ( const RENDER_SETTINGS aSettings,
const PAGE_INFO aPageInfo,
const wxString &  aFullSheetName,
const wxString &  aFileName,
const TITLE_BLOCK aTitleBlock,
const std::map< wxString, wxString > *  aProperties,
int  aSheetCount,
const wxString &  aPageNumber,
double  aScalar,
const PROJECT aProject,
const wxString &  aSheetLayer = wxEmptyString,
bool  aIsFirstPage = true 

Print the border and title block.

aDCThe device context.
aPageInfofor margins and page size (in mils).
aFullSheetNameThe sheetpath (full sheet name), for basic inscriptions.
aFileNameThe file name, for basic inscriptions.
aTitleBlockThe sheet title block, for text variable resolution.
aPropertiesOptional properties for text variable resolution.
aSheetCountThe number of sheets (for text variable resolution).
aPageNumberThe page number.
aScalarthe scale factor to convert from mils to internal units.
aSheetLayerThe layer from Pcbnew.
aIsFirstPageTrue when this is the first page. This only has meaning for schematics.

Parameters used in aPageInfo

  • the size of the drawing sheet.
  • the LTmargin The left top margin of the drawing sheet.
  • the RBmargin The right bottom margin of the drawing sheet.

Definition at line 983 of file eda_draw_frame.cpp.

990 DS_DRAW_ITEM_LIST drawList;
992 drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
993 drawList.SetMilsToIUfactor( aMils2Iu );
994 drawList.SetPageNumber( aPageNumber );
995 drawList.SetSheetCount( aSheetCount );
996 drawList.SetFileName( aFileName );
997 drawList.SetSheetName( aFullSheetName );
998 drawList.SetSheetLayer( aSheetLayer );
999 drawList.SetProject( aProject );
1000 drawList.SetIsFirstPage( aIsFirstPage );
1001 drawList.SetProperties( aProperties );
1003 drawList.BuildDrawItemsList( aPageInfo, aTitleBlock );
1005 // Draw item list
1006 drawList.Print( aSettings );
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
Definition: ds_draw_item.h:385
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ds_draw_item.h:429
void SetDefaultPenSize(int aPenSize)
Definition: ds_draw_item.h:446
void Print(const RENDER_SETTINGS *aSettings)
Draws the item list created by BuildDrawItemsList.
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ds_draw_item.h:434
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
Definition: ds_draw_item.h:467
void SetProperties(const std::map< wxString, wxString > *aProps)
Set properties used for text variable resolution.
Definition: ds_draw_item.h:419
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ds_draw_item.h:444
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
Definition: ds_draw_item.h:472
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Definition: ds_draw_item.h:462
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ds_draw_item.h:452
void SetProject(const PROJECT *aProject)
Definition: ds_draw_item.h:409
int GetDefaultPenWidth() const

References DS_DRAW_ITEM_LIST::BuildDrawItemsList(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), DS_DRAW_ITEM_LIST::Print(), DS_DRAW_ITEM_LIST::SetDefaultPenSize(), DS_DRAW_ITEM_LIST::SetFileName(), DS_DRAW_ITEM_LIST::SetIsFirstPage(), DS_DRAW_ITEM_LIST::SetMilsToIUfactor(), DS_DRAW_ITEM_LIST::SetPageNumber(), DS_DRAW_ITEM_LIST::SetProject(), DS_DRAW_ITEM_LIST::SetProperties(), DS_DRAW_ITEM_LIST::SetSheetCount(), DS_DRAW_ITEM_LIST::SetSheetLayer(), and DS_DRAW_ITEM_LIST::SetSheetName().

Referenced by DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample().

Variable Documentation

◆ productName

const wxString productName = wxT( "KiCad E.D.A. " )

Definition at line 980 of file eda_draw_frame.cpp.