KiCad PCB EDA Suite
eda_draw_frame.cpp File Reference
#include <base_screen.h>
#include <bitmaps.h>
#include <confirm.h>
#include <dialog_shim.h>
#include <eda_draw_frame.h>
#include <fctsys.h>
#include <filehistory.h>
#include <id.h>
#include <kiface_i.h>
#include <lockfile.h>
#include <macros.h>
#include <msgpanel.h>
#include <page_info.h>
#include <pgm_base.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/action_manager.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 <ws_draw_item.h>
#include <wx/snglinst.h>
#include <dialogs/dialog_grid_settings.h>

Go to the source code of this file.


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


wxWindow * findDialog (wxWindowList &aList)
void PrintPageLayout (RENDER_SETTINGS *aSettings, const PAGE_INFO &aPageInfo, const wxString &aFullSheetName, const wxString &aFileName, const TITLE_BLOCK &aTitleBlock, int aSheetCount, int aSheetNumber, double aScalar, const PROJECT *aProject, const wxString &aSheetLayer)
 Function PrintPageLayout is a core function to print the page layout with the frame and the basic inscriptions. 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 60 of file eda_draw_frame.cpp.

Function Documentation

◆ findDialog()

wxWindow* findDialog ( wxWindowList &  aList)

Definition at line 758 of file eda_draw_frame.cpp.

759 {
760  for( wxWindow* window : aList )
761  {
762  if( dynamic_cast<DIALOG_SHIM*>( window ) )
763  return window;
764  }
765  return NULL;
766 }
#define NULL

References NULL.

Referenced by EDA_DRAW_FRAME::FocusOnLocation().

◆ PrintPageLayout()

void PrintPageLayout ( RENDER_SETTINGS aSettings,
const PAGE_INFO aPageInfo,
const wxString &  aFullSheetName,
const wxString &  aFileName,
const TITLE_BLOCK aTitleBlock,
int  aSheetCount,
int  aSheetNumber,
double  aScalar,
const PROJECT aProject,
const wxString &  aSheetLayer = wxEmptyString 

Function PrintPageLayout is a core function to print the page layout with the frame and the basic inscriptions.

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 basic inscriptions.
aSheetCountThe number of sheets (for basic inscriptions).
aSheetNumberThe sheet number (for basic inscriptions).
aScalarthe scale factor to convert from mils to internal units.
aSheetLayerThe layer from pcbnew.

Parameters used in aPageInfo

  • the size of the page layout.
  • the LTmargin The left top margin of the page layout.
  • the RBmargin The right bottom margin of the page layout.

Definition at line 812 of file eda_draw_frame.cpp.

816 {
817  WS_DRAW_ITEM_LIST drawList;
819  drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
820  drawList.SetMilsToIUfactor( aScalar );
821  drawList.SetSheetNumber( aSheetNumber );
822  drawList.SetSheetCount( aSheetCount );
823  drawList.SetFileName( aFileName );
824  drawList.SetSheetName( aFullSheetName );
825  drawList.SetSheetLayer( aSheetLayer );
826  drawList.SetProject( aProject );
828  drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
830  // Draw item list
831  drawList.Print( aSettings );
832 }
void SetDefaultPenSize(int aPenSize)
Definition: ws_draw_item.h:429
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ws_draw_item.h:408
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ws_draw_item.h:424
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ws_draw_item.h:416
void BuildWorkSheetGraphicList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Function BuildWorkSheetGraphicList is a core function for drawing or plotting the page layout with th...
void SetSheetCount(int aSheetCount)
Function SetSheetCount Set the value of the count of sheets, for basic inscriptions.
Definition: ws_draw_item.h:454
void SetMilsToIUfactor(double aScale)
Function SetMilsToIUfactor Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ws_draw_item.h:436
void Print(RENDER_SETTINGS *aSettings)
Draws the item list created by BuildWorkSheetGraphicList.
void SetSheetNumber(int aSheetNumber)
Function SetSheetNumber Set the value of the sheet number, for basic inscriptions.
Definition: ws_draw_item.h:445
int GetDefaultPenWidth() const
void SetProject(const PROJECT *aProject)
Definition: ws_draw_item.h:393

References WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), WS_DRAW_ITEM_LIST::Print(), WS_DRAW_ITEM_LIST::SetDefaultPenSize(), WS_DRAW_ITEM_LIST::SetFileName(), WS_DRAW_ITEM_LIST::SetMilsToIUfactor(), WS_DRAW_ITEM_LIST::SetProject(), WS_DRAW_ITEM_LIST::SetSheetCount(), WS_DRAW_ITEM_LIST::SetSheetLayer(), WS_DRAW_ITEM_LIST::SetSheetName(), and WS_DRAW_ITEM_LIST::SetSheetNumber().

Referenced by EDA_DRAW_FRAME::PrintWorkSheet(), and DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample().

Variable Documentation

◆ productName

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

Definition at line 810 of file eda_draw_frame.cpp.