Worksheet -> (industry standard) Drawing Sheet.

This commit is contained in:
Jeff Young 2021-02-22 16:37:43 +00:00
parent 739f43ee4d
commit cad5198ab7
85 changed files with 612 additions and 613 deletions

View File

@ -139,13 +139,13 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
if( m_settings.PrintBorderAndTitleBlock() )
{
bBox = BOX2I( VECTOR2I( 0, 0 ), VECTOR2I( sheetSizeIU ) );
view->SetLayerVisible( LAYER_WORKSHEET, true );
view->SetLayerVisible( LAYER_DRAWINGSHEET, true );
}
else
{
EDA_RECT targetBbox = getBoundingBox();
bBox = BOX2I( targetBbox.GetOrigin(), targetBbox.GetSize() );
view->SetLayerVisible( LAYER_WORKSHEET, false );
view->SetLayerVisible( LAYER_DRAWINGSHEET, false );
}

View File

@ -658,8 +658,8 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
|| m_parent->IsType( FRAME_SCH_VIEWER )
|| m_parent->IsType( FRAME_SCH_VIEWER_MODAL ) )
{
COLOR4D worksheetColor = renderSettings.GetLayerColor( LAYER_SCHEMATIC_WORKSHEET );
renderSettings.SetLayerColor( LAYER_WORKSHEET, worksheetColor );
COLOR4D worksheetColor = renderSettings.GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET );
renderSettings.SetLayerColor( LAYER_DRAWINGSHEET, worksheetColor );
}
GRFilledRect( NULL, &memDC, 0, 0, m_layout_size.x, m_layout_size.y, bgColor, bgColor );

View File

@ -849,14 +849,14 @@ void PrintPageLayout( const RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageIn
drawList.SetProject( aProject );
drawList.SetIsFirstPage( aIsFirstPage );
drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
drawList.BuildDrawItemsList( aPageInfo, aTitleBlock );
// Draw item list
drawList.Print( aSettings );
}
void EDA_DRAW_FRAME::PrintWorkSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
void EDA_DRAW_FRAME::PrintDrawingSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
double aMils2Iu, const wxString &aFilename,
const wxString &aSheetLayer )
{
@ -893,7 +893,8 @@ wxString EDA_DRAW_FRAME::GetScreenDesc() const
bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
const wxString& wildcard, const wxString& ext,
bool isDirectory, bool aIsGlobal, const wxString& aGlobalPath )
bool isDirectory, bool aIsGlobal,
const wxString& aGlobalPath )
{
wxString prompt = doOpen ? _( "Select Library" ) : _( "New Library" );
aFilename.SetExt( ext );

View File

@ -66,7 +66,7 @@ wxString HOTKEY_STORE::GetSectionName( TOOL_ACTION* aAction )
{ wxT( "kicad" ), _( "Project Manager" ) },
{ wxT( "eeschema" ), _( "Schematic Editor" ) },
{ wxT( "pcbnew" ), _( "PCB Editor" ) },
{ wxT( "plEditor" ), _( "Worksheet Editor" ), },
{ wxT( "plEditor" ), _( "Drawing Sheet Editor" ), },
{ wxT( "3DViewer" ), _( "3D Viewer" ) }
};

View File

@ -136,7 +136,7 @@ wxString LayerName( int aLayer )
case LAYER_BRIGHTENED: return _( "Highlighted items" );
case LAYER_HIDDEN: return _( "Hidden items" );
case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" );
case LAYER_SCHEMATIC_WORKSHEET: return _( "Worksheet" );
case LAYER_SCHEMATIC_DRAWINGSHEET: return _( "Drawing sheet" );
// GAL_LAYER_ID
@ -166,7 +166,7 @@ wxString LayerName( int aLayer )
case LAYER_DRC_EXCLUSION: return _( "DRC exclusions" );
case LAYER_MARKER_SHADOWS: return _( "DRC marker shadows" );
case LAYER_ANCHOR: return _( "Anchors" );
case LAYER_WORKSHEET: return _( "Worksheet" );
case LAYER_DRAWINGSHEET: return _( "Drawing sheet" );
case LAYER_CURSOR: return _( "Cursor" );
case LAYER_AUX_ITEMS: return _( "Helper items" );
case LAYER_GRID: return _( "Grid" );

View File

@ -961,7 +961,7 @@ GAL_SET GAL_SET::DefaultVisible()
LAYER_DRC_ERROR,
LAYER_DRC_WARNING,
// LAYER_DRC_EXCLUSION, // DRC exclusions hidden by default
LAYER_WORKSHEET,
LAYER_DRAWINGSHEET,
LAYER_GP_OVERLAY,
LAYER_SELECT_OVERLAY,
LAYER_PCB_BACKGROUND,

View File

@ -117,7 +117,7 @@
// height of the band reference grid 2.0 mm
// worksheet frame reference text size 1.3 mm
// drawing sheet frame reference text size 1.3 mm
// default text size 1.5 mm
// default line width 0.15 mm
// frame ref pitch 50 mm

View File

@ -117,7 +117,7 @@ void WS_DATA_ITEM::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aV
item = new WS_DRAW_ITEM_RECT( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize );
else
{
wxFAIL_MSG( "Unknown worksheet draw item type" );
wxFAIL_MSG( "Unknown drawing sheet item type" );
continue;
}

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2018 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
@ -25,7 +25,7 @@
/*
* The WS_DATA_ITEM_* classes define the basic shapes of a page layout (frame references
* The WS_DATA_ITEM_* classes define the basic shapes of a drawing sheet (frame references
* and title block). The list of these items is stored in a WS_DATA_MODEL instance.
*
* These items cannot be drawn or plotetd "as is". They must be converted to WS_DRAW_*

View File

@ -71,16 +71,16 @@ void WS_DRAW_ITEM_BASE::ViewGetLayers( int aLayers[], int& aCount ) const
if( !dataItem ) // No peer: this item is like a WS_DRAW_ITEM_PAGE
{
aLayers[0] = LAYER_WORKSHEET;
aLayers[0] = LAYER_DRAWINGSHEET;
return;
}
if( dataItem->GetPage1Option() == FIRST_PAGE_ONLY )
aLayers[0] = LAYER_WORKSHEET_PAGE1;
aLayers[0] = LAYER_DRAWINGSHEET_PAGE1;
else if( dataItem->GetPage1Option() == SUBSEQUENT_PAGES )
aLayers[0] = LAYER_WORKSHEET_PAGEn;
aLayers[0] = LAYER_DRAWINGSHEET_PAGEn;
else
aLayers[0] = LAYER_WORKSHEET;
aLayers[0] = LAYER_DRAWINGSHEET;
}
@ -104,8 +104,8 @@ void WS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS
wxString msg;
WS_DATA_ITEM* dataItem = GetPeer();
if( dataItem == nullptr ) // Is only a pure graphic item used in page layout editor
// to handle the page limits
if( dataItem == nullptr ) // Is only a pure graphic item used in drawing sheet editor to
// handle the page limits
return;
switch( dataItem->GetType() )
@ -161,7 +161,7 @@ void WS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS
void WS_DRAW_ITEM_TEXT::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
Print( aSettings, aOffset, aSettings->GetLayerColor( LAYER_WORKSHEET ), FILLED );
Print( aSettings, aOffset, aSettings->GetLayerColor( LAYER_DRAWINGSHEET ), FILLED );
}
@ -200,7 +200,7 @@ void WS_DRAW_ITEM_TEXT::SetTextAngle( double aAngle )
void WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
COLOR4D color = aSettings->GetLayerColor( LAYER_DRAWINGSHEET );
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
std::vector<wxPoint> points_moved;
@ -304,7 +304,7 @@ wxString WS_DRAW_ITEM_POLYPOLYGONS::GetSelectMenuText( EDA_UNITS aUnits ) const
void WS_DRAW_ITEM_RECT::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
COLOR4D color = aSettings->GetLayerColor( LAYER_DRAWINGSHEET );
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
GRRect( nullptr, DC, GetStart().x + aOffset.x, GetStart().y + aOffset.y,
@ -363,7 +363,7 @@ bool WS_DRAW_ITEM_RECT::HitTest( const EDA_RECT& aRect, bool aContained, int aAc
return sel.Contains( GetBoundingBox() );
// For greedy we need to check each side of the rect as we're pretty much always inside the
// rect which defines the worksheet frame.
// rect which defines the drawing sheet frame.
EDA_RECT side = GetBoundingBox();
side.SetHeight( 0 );
@ -403,7 +403,7 @@ wxString WS_DRAW_ITEM_RECT::GetSelectMenuText( EDA_UNITS aUnits ) const
void WS_DRAW_ITEM_LINE::PrintWsItem( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
{
wxDC* DC = aSettings->GetPrintDC();
COLOR4D color = aSettings->GetLayerColor( LAYER_WORKSHEET );
COLOR4D color = aSettings->GetLayerColor( LAYER_DRAWINGSHEET );
int penWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
GRLine( nullptr, DC, GetStart() + aOffset, GetEnd() + aOffset, penWidth, color );
@ -496,7 +496,7 @@ const EDA_RECT WS_DRAW_ITEM_PAGE::GetBoundingBox() const
// ====================== WS_DRAW_ITEM_LIST ==============================
void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo,
void WS_DRAW_ITEM_LIST::BuildDrawItemsList( const PAGE_INFO& aPageInfo,
const TITLE_BLOCK& aTitleBlock )
{
WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance();
@ -523,7 +523,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo,
}
/* Print the item list created by BuildWorkSheetGraphicList
/* Print the item list created by BuildDrawItemsList
* aDC = the current Device Context
* The not selected items are drawn first (most of items)
* The selected items are drawn after (usually 0 or 1)

View File

@ -63,7 +63,7 @@ void WS_RENDER_SETTINGS::LoadColors( const COLOR_SETTINGS* aSettings )
m_backgroundColor = aSettings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
m_pageBorderColor = aSettings->GetColor( LAYER_SCHEMATIC_GRID );
m_normalColor = aSettings->GetColor( LAYER_SCHEMATIC_WORKSHEET );
m_normalColor = aSettings->GetColor( LAYER_SCHEMATIC_DRAWINGSHEET );
}

View File

@ -43,7 +43,7 @@ WS_PROXY_VIEW_ITEM::WS_PROXY_VIEW_ITEM( int aMils2IUscalefactor, const PAGE_INFO
m_sheetCount( 1 ),
m_isFirstPage( false ),
m_project( aProject ),
m_colorLayer( LAYER_WORKSHEET ),
m_colorLayer( LAYER_DRAWINGSHEET ),
m_pageBorderColorLayer( LAYER_GRID )
{
}
@ -74,9 +74,8 @@ void WS_PROXY_VIEW_ITEM::buildDrawList( VIEW* aView, WS_DRAW_ITEM_LIST* aDrawLis
wxString fileName( m_fileName.c_str(), wxConvUTF8 );
wxString sheetName( m_sheetName.c_str(), wxConvUTF8 );
aDrawList->SetDefaultPenSize( (int) settings->GetWorksheetLineWidth() );
// Adjust the scaling factor for worksheet items:
// worksheet items coordinates and sizes are stored in mils,
aDrawList->SetDefaultPenSize( (int) settings->GetDrawingSheetLineWidth() );
// Adjust the scaling factor: drawing sheet item coordinates and sizes are stored in mils,
// and must be scaled to the same units as the caller
aDrawList->SetMilsToIUfactor( m_mils2IUscalefactor );
aDrawList->SetIsFirstPage( m_isFirstPage );
@ -86,7 +85,7 @@ void WS_PROXY_VIEW_ITEM::buildDrawList( VIEW* aView, WS_DRAW_ITEM_LIST* aDrawLis
aDrawList->SetSheetName( sheetName );
aDrawList->SetProject( m_project );
aDrawList->BuildWorkSheetGraphicList( *m_pageInfo, *m_titleBlock );
aDrawList->BuildDrawItemsList( *m_pageInfo, *m_titleBlock );
}
@ -118,7 +117,7 @@ void WS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
// Draw all the components that make the page layout
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
ws_painter.Draw( item, LAYER_WORKSHEET );
ws_painter.Draw( item, LAYER_DRAWINGSHEET );
// Draw gray line that outlines the sheet size
if( settings->GetShowPageLimits() )
@ -132,11 +131,11 @@ void WS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
void WS_PROXY_VIEW_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
{
aCount = 1;
aLayers[0] = LAYER_WORKSHEET;
aLayers[0] = LAYER_DRAWINGSHEET;
}
bool WS_PROXY_VIEW_ITEM::HitTestWorksheetItems( VIEW* aView, const wxPoint& aPosition )
bool WS_PROXY_VIEW_ITEM::HitTestDrawingSheetItems( VIEW* aView, const wxPoint& aPosition )
{
int accuracy = (int) aView->ToWorld( 5.0 ); // five pixels at current zoom
WS_DRAW_ITEM_LIST drawList;

View File

@ -54,8 +54,8 @@ wxString GetDefaultPlotExtension( PLOT_FORMAT aFormat )
}
void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
const PAGE_INFO& aPageInfo, const wxString& aSheetNumber, int aNumberOfSheets,
void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
const PAGE_INFO& aPageInfo, const wxString& aSheetNumber, int aSheetCount,
const wxString& aSheetDesc, const wxString& aFilename, COLOR4D aColor,
bool aIsFirstPage )
{
@ -78,13 +78,13 @@ void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK
drawList.SetDefaultPenSize( PLOTTER::USE_DEFAULT_LINE_WIDTH );
drawList.SetMilsToIUfactor( iusPerMil );
drawList.SetPageNumber( aSheetNumber );
drawList.SetSheetCount( aNumberOfSheets );
drawList.SetSheetCount( aSheetCount );
drawList.SetFileName( fn.GetFullName() ); // Print only the short filename
drawList.SetSheetName( aSheetDesc );
drawList.SetProject( aProject );
drawList.SetIsFirstPage( aIsFirstPage );
drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
drawList.BuildDrawItemsList( aPageInfo, aTitleBlock );
// Draw item list
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
@ -154,7 +154,7 @@ void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK
break;
default:
wxFAIL_MSG( "PlotWorkSheet(): Unknown worksheet item." );
wxFAIL_MSG( "PlotDrawingSheet(): Unknown drawing sheet item." );
break;
}
}

View File

@ -266,7 +266,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
{ 26, 36 }, // LAYER_DRC_WARNING
{ 27, 37 }, // LAYER_DRC_EXCLUSION
{ 28, 38 }, // LAYER_MARKER_SHADOWS
{ 29, 24 }, // LAYER_WORKSHEET
{ 29, 24 }, // LAYER_DRAWINGSHEET
{ 30, 25 }, // LAYER_GP_OVERLAY
{ 31, 26 }, // LAYER_SELECT_OVERLAY
{ 32, 27 }, // LAYER_PCB_BACKGROUND

View File

@ -38,7 +38,7 @@ RENDER_SETTINGS::RENDER_SETTINGS() :
m_hiContrastEnabled = false;
m_hiContrastFactor = 0.2f; //TODO: Make this user-configurable
m_outlineWidth = 1;
m_worksheetLineWidth = 100000;
m_drawingSheetLineWidth = 100000;
m_defaultPenWidth = 0;
m_minPenWidth = 0;
m_showPageLimits = false;

View File

@ -66,14 +66,14 @@ static const std::map<int, COLOR4D> s_defaultTheme =
{ LAYER_SHEETNAME, CSS_COLOR( 0, 100, 100, 1 ) },
{ LAYER_VALUEPART, CSS_COLOR( 0, 100, 100, 1 ) },
{ LAYER_WIRE, CSS_COLOR( 0, 150, 0, 1 ) },
{ LAYER_SCHEMATIC_WORKSHEET, CSS_COLOR( 132, 0, 0, 1 ) },
{ LAYER_SCHEMATIC_DRAWINGSHEET, CSS_COLOR( 132, 0, 0, 1 ) },
{ LAYER_GERBVIEW_AXES, CSS_COLOR( 0, 0, 132, 1 ) },
{ LAYER_GERBVIEW_BACKGROUND, CSS_COLOR( 0, 0, 0, 1 ) },
{ LAYER_DCODES, CSS_COLOR( 255, 255, 255, 1 ) },
{ LAYER_GERBVIEW_GRID, CSS_COLOR( 132, 132, 132, 1 ) },
{ LAYER_NEGATIVE_OBJECTS, CSS_COLOR( 132, 132, 132, 1 ) },
{ LAYER_GERBVIEW_WORKSHEET, CSS_COLOR( 0, 0, 132, 1 ) },
{ LAYER_GERBVIEW_DRAWINGSHEET, CSS_COLOR( 0, 0, 132, 1 ) },
{ LAYER_ANCHOR, CSS_COLOR( 255, 38, 226, 1 ) },
{ LAYER_AUX_ITEMS, CSS_COLOR( 255, 255, 255, 1 ) },
@ -97,7 +97,7 @@ static const std::map<int, COLOR4D> s_defaultTheme =
{ LAYER_VIA_BBLIND, CSS_COLOR( 187, 151, 38, 1 ) },
{ LAYER_VIA_HOLES, CSS_COLOR( 227, 183, 46, 1 ) },
{ LAYER_VIA_MICROVIA, CSS_COLOR( 0, 132, 132, 1 ) },
{ LAYER_WORKSHEET, CSS_COLOR( 200, 114, 171, 1 ) },
{ LAYER_DRAWINGSHEET, CSS_COLOR( 200, 114, 171, 1 ) },
{ F_Cu, CSS_COLOR( 200, 52, 52, 1 ) },
{ In1_Cu, CSS_COLOR( 127, 200, 127, 1 ) },
@ -212,14 +212,14 @@ static const std::map<int, COLOR4D> s_classicTheme =
{ LAYER_SHEETNAME, COLOR4D( CYAN ) },
{ LAYER_VALUEPART, COLOR4D( CYAN ) },
{ LAYER_WIRE, COLOR4D( GREEN ) },
{ LAYER_SCHEMATIC_WORKSHEET, COLOR4D( RED ) },
{ LAYER_SCHEMATIC_DRAWINGSHEET, COLOR4D( RED ) },
{ LAYER_GERBVIEW_AXES, COLOR4D( BLUE ) },
{ LAYER_GERBVIEW_BACKGROUND, COLOR4D( BLACK ) },
{ LAYER_DCODES, COLOR4D( WHITE ) },
{ LAYER_GERBVIEW_GRID, COLOR4D( MAGENTA ) },
{ LAYER_NEGATIVE_OBJECTS, COLOR4D( DARKGRAY ) },
{ LAYER_GERBVIEW_WORKSHEET, COLOR4D( RED ) },
{ LAYER_GERBVIEW_DRAWINGSHEET, COLOR4D( RED ) },
{ LAYER_ANCHOR, COLOR4D( BLUE ) },
{ LAYER_AUX_ITEMS, COLOR4D( WHITE ) },
@ -243,7 +243,7 @@ static const std::map<int, COLOR4D> s_classicTheme =
{ LAYER_VIA_BBLIND, COLOR4D( BROWN ) },
{ LAYER_VIA_HOLES, COLOR4D( 0.5, 0.4, 0, 0.8 ) },
{ LAYER_VIA_MICROVIA, COLOR4D( CYAN ) },
{ LAYER_WORKSHEET, COLOR4D( DARKRED ) },
{ LAYER_DRAWINGSHEET, COLOR4D( DARKRED ) },
{ F_Cu, COLOR4D( RED ) },
{ In1_Cu, COLOR4D( YELLOW ) },

View File

@ -104,14 +104,14 @@ COLOR_SETTINGS::COLOR_SETTINGS( wxString aFilename ) :
CLR( "schematic.sheet_name", LAYER_SHEETNAME );
CLR( "schematic.value", LAYER_VALUEPART );
CLR( "schematic.wire", LAYER_WIRE );
CLR( "schematic.worksheet", LAYER_SCHEMATIC_WORKSHEET );
CLR( "schematic.worksheet", LAYER_SCHEMATIC_DRAWINGSHEET );
CLR( "gerbview.axes", LAYER_GERBVIEW_AXES );
CLR( "gerbview.background", LAYER_GERBVIEW_BACKGROUND );
CLR( "gerbview.dcodes", LAYER_DCODES );
CLR( "gerbview.grid", LAYER_GERBVIEW_GRID );
CLR( "gerbview.negative_objects", LAYER_NEGATIVE_OBJECTS );
CLR( "gerbview.worksheet", LAYER_GERBVIEW_WORKSHEET );
CLR( "gerbview.worksheet", LAYER_GERBVIEW_DRAWINGSHEET );
for( int i = 0, id = GERBVIEW_LAYER_ID_START;
id < GERBER_DRAWLAYERS_COUNT + GERBVIEW_LAYER_ID_START; ++i, ++id )
@ -142,7 +142,7 @@ COLOR_SETTINGS::COLOR_SETTINGS( wxString aFilename ) :
CLR( "board.via_hole", LAYER_VIA_HOLES );
CLR( "board.via_micro", LAYER_VIA_MICROVIA );
CLR( "board.via_through", LAYER_VIA_THROUGH );
CLR( "board.worksheet", LAYER_WORKSHEET );
CLR( "board.worksheet", LAYER_DRAWINGSHEET );
CLR( "board.copper.f", F_Cu );
CLR( "board.copper.in1", In1_Cu );

View File

@ -390,7 +390,7 @@ void DIALOG_ERC::testErc()
if( settings.IsTestEnabled( ERCE_UNRESOLVED_VARIABLE ) )
{
AdvancePhase( _( "Checking for unresolved variables..." ) );
tester.TestTextVars( m_parent->GetCanvas()->GetView()->GetWorksheet() );
tester.TestTextVars( m_parent->GetCanvas()->GetView()->GetDrawingSheet() );
}
if( settings.IsTestEnabled( ERCE_NOCONNECT_CONNECTED ) )

View File

@ -94,7 +94,7 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
setModeColor( cfg->m_PlotPanel.color );
// Set plot or not frame reference option
setPlotFrameRef( cfg->m_PlotPanel.frame_reference );
setPlotDrawingSheet( cfg->m_PlotPanel.frame_reference );
// HPGL plot origin and unit system configuration
m_plotOriginOpt->SetSelection( cfg->m_PlotPanel.hpgl_origin );
@ -277,7 +277,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions( RENDER_SETTINGS* aSettings )
cfg->m_PlotPanel.background_color = m_plotBackgroundColor->GetValue();
cfg->m_PlotPanel.color = getModeColor();
cfg->m_PlotPanel.color_theme = colors->GetFilename();
cfg->m_PlotPanel.frame_reference = getPlotFrameRef();
cfg->m_PlotPanel.frame_reference = getPlotDrawingSheet();
cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
cfg->m_PlotPanel.hpgl_origin = m_plotOriginOpt->GetSelection();
cfg->m_PlotPanel.hpgl_paper_size = m_HPGLPaperSizeSelect;
@ -340,19 +340,19 @@ void DIALOG_PLOT_SCHEMATIC::PlotSchematic( bool aPlotAll )
{
default:
case PLOT_FORMAT::POST:
createPSFile( aPlotAll, getPlotFrameRef(), &renderSettings );
createPSFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
break;
case PLOT_FORMAT::DXF:
CreateDXFFile( aPlotAll, getPlotFrameRef(), &renderSettings );
CreateDXFFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
break;
case PLOT_FORMAT::PDF:
createPDFFile( aPlotAll, getPlotFrameRef(), &renderSettings );
createPDFFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
break;
case PLOT_FORMAT::SVG:
createSVGFile( aPlotAll, getPlotFrameRef(), &renderSettings );
createSVGFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
break;
case PLOT_FORMAT::HPGL:
createHPGLFile( aPlotAll, getPlotFrameRef(), &renderSettings );
createHPGLFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
break;
}
}

View File

@ -96,14 +96,15 @@ private:
PLOT_FORMAT GetPlotFileFormat();
bool getPlotFrameRef() { return m_PlotFrameRefOpt->GetValue(); }
void setPlotFrameRef( bool aPlot) {m_PlotFrameRefOpt->SetValue( aPlot ); }
bool getPlotDrawingSheet() { return m_plotDrawingSheet->GetValue(); }
void setPlotDrawingSheet( bool aPlot) { m_plotDrawingSheet->SetValue( aPlot ); }
void PlotSchematic( bool aPlotAll );
// PDF
void createPDFFile( bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS* aRenderSettings );
void plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen, bool aPlotWorksheet);
void createPDFFile( bool aPlotAll, bool aPlotDrawingSheet,
RENDER_SETTINGS* aRenderSettings );
void plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen, bool aPlotDrawingSheet);
void setupPlotPagePDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen );
/**
@ -114,10 +115,11 @@ private:
void restoreEnvironment( PDF_PLOTTER* aPlotter, SCH_SHEET_PATH& aOldsheetpath );
// DXF
void CreateDXFFile( bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS* aRenderSettings );
void CreateDXFFile( bool aPlotAll, bool aPlotDrawingSheet,
RENDER_SETTINGS* aRenderSettings );
bool PlotOneSheetDXF( const wxString& aFileName, SCH_SCREEN* aScreen,
RENDER_SETTINGS* aRenderSettings,
wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef );
RENDER_SETTINGS* aRenderSettings, wxPoint aPlotOffset, double aScale,
bool aPlotFrameRef );
// HPGL
HPGL_PLOT_ORIGIN_AND_UNITS GetPlotOriginAndUnits()
@ -171,7 +173,6 @@ private:
* @return the created file name
* @throw IO_ERROR on file I/O errors
*/
wxFileName createPlotFileName( const wxString& aPlotFileName,
const wxString& aExtension,
wxFileName createPlotFileName( const wxString& aPlotFileName, const wxString& aExtension,
REPORTER* aReporter = NULL );
};

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -38,7 +38,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
m_optionsSizer = new wxBoxSizer( wxHORIZONTAL );
wxString m_plotFormatOptChoices[] = { _("PostScript"), _("PDF"), _("SVG"), _("DXF"), _("HPGL") };
wxString m_plotFormatOptChoices[] = { _("Postscript"), _("PDF"), _("SVG"), _("DXF"), _("HPGL") };
int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
m_plotFormatOpt->SetSelection( 2 );
@ -62,11 +62,11 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
m_paperSizeOption->SetSelection( 0 );
gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_PlotFrameRefOpt = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot border and title block"), wxDefaultPosition, wxDefaultSize, 0 );
m_PlotFrameRefOpt->SetValue(true);
m_PlotFrameRefOpt->SetToolTip( _("Print the frame references.") );
m_plotDrawingSheet = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotDrawingSheet->SetValue(true);
m_plotDrawingSheet->SetToolTip( _("Plot the drawing sheet border and title block") );
gbSizer1->Add( m_PlotFrameRefOpt, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
gbSizer1->Add( m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
wxStaticText* bOutputModeLabel;
bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );

View File

@ -14,7 +14,6 @@
<property name="file">dialog_plot_schematic_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">Dialog_plot_schematic_base</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -209,7 +207,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -543,7 +540,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot border and title block</property>
<property name="label">Plot drawing sheet</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -551,7 +548,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_PlotFrameRefOpt</property>
<property name="name">m_plotDrawingSheet</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -564,7 +561,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Print the frame references.</property>
<property name="tooltip">Plot the drawing sheet border and title block</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -51,7 +51,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
wxRadioBox* m_plotFormatOpt;
wxStaticText* m_staticText4;
wxChoice* m_paperSizeOption;
wxCheckBox* m_PlotFrameRefOpt;
wxCheckBox* m_plotDrawingSheet;
wxChoice* m_ModeColorOption;
wxCheckBox* m_plotBackgroundColor;
wxStaticText* m_staticText9;

View File

@ -486,14 +486,14 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
if( cfg->m_Printing.use_theme && theme )
renderSettings.LoadColors( theme );
// The worksheet item print code is shared between PCBNew and EESchema, so it's easier
// The drawing sheet item print code is shared between PCBNew and EESchema, so it's easier
// if they just use the PCB layer.
renderSettings.SetLayerColor( LAYER_WORKSHEET,
renderSettings.GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) );
renderSettings.SetLayerColor( LAYER_DRAWINGSHEET,
renderSettings.GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ) );
if( printReference )
{
m_parent->PrintWorkSheet( &renderSettings, aScreen, IU_PER_MILS, aScreen->GetFileName(),
m_parent->PrintDrawingSheet( &renderSettings, aScreen, IU_PER_MILS, aScreen->GetFileName(),
wxEmptyString );
}

View File

@ -245,7 +245,7 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems()
m_page->SetWidthMils( 6000 );
m_ws = new KIGFX::WS_PROXY_VIEW_ITEM( (int) IU_PER_MILS, m_page, nullptr, m_titleBlock );
m_ws->SetColorLayer( LAYER_SCHEMATIC_WORKSHEET );
m_ws->SetColorLayer( LAYER_SCHEMATIC_DRAWINGSHEET );
view->Add( m_ws );
// NOTE: It would be nice to parse a schematic file here.

View File

@ -580,7 +580,7 @@ bool EESCHEMA_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
migrateLegacyColor( "Color4DSheetNameEx", LAYER_SHEETNAME );
migrateLegacyColor( "Color4DValueEx", LAYER_VALUEPART );
migrateLegacyColor( "Color4DWireEx", LAYER_WIRE );
migrateLegacyColor( "Color4DWorksheetEx", LAYER_SCHEMATIC_WORKSHEET );
migrateLegacyColor( "Color4DWorksheetEx", LAYER_SCHEMATIC_DRAWINGSHEET );
Pgm().GetSettingsManager().SaveColorSettings( cs, "schematic" );

View File

@ -159,7 +159,7 @@ int ERC_TESTER::TestDuplicateSheetNames( bool aCreateMarker )
}
void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aDrawingSheet )
{
WS_DRAW_ITEM_LIST wsItems;
@ -169,7 +169,7 @@ void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
return str.Matches( wxT( "*${*}*" ) );
};
if( aWorksheet )
if( aDrawingSheet )
{
wsItems.SetMilsToIUfactor( IU_PER_MILS );
wsItems.SetPageNumber( "1" );
@ -178,7 +178,7 @@ void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
wsItems.SetSheetName( "dummySheet" );
wsItems.SetSheetLayer( "dummyLayer" );
wsItems.SetProject( &m_schematic->Prj() );
wsItems.BuildWorkSheetGraphicList( aWorksheet->GetPageInfo(), aWorksheet->GetTitleBlock() );
wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock());
}
SCH_SHEET_PATH savedCurrentSheet = m_schematic->CurrentSheet();
@ -259,7 +259,7 @@ void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
if( text->GetShownText().Matches( wxT( "*${*}*" ) ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
ercItem->SetErrorMessage( _( "Unresolved text variable in worksheet." ) );
ercItem->SetErrorMessage( _( "Unresolved text variable in drawing sheet." ) );
SCH_MARKER* marker = new SCH_MARKER( ercItem, text->GetPosition() );
screen->Append( marker );

View File

@ -83,7 +83,7 @@ public:
/**
* Check for any unresolved text variable references.
*/
void TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet );
void TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aDrawingSheet );
/**
* Check that there are no conflicting bus alias definitions in the schematic.

View File

@ -920,7 +920,7 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
SCH_IO_MGR::FindPlugin( (SCH_IO_MGR::SCH_FILE_T) aFileType ) );
Schematic().SetRoot( pi->Load( aFileName, &Schematic() ) );
// Eagle sheets do not use a worksheet frame by default, so set it to an empty one
// Eagle sheets do not use a drawing sheet frame by default, so set it to an empty one
WS_DATA_MODEL& pglayout = WS_DATA_MODEL::GetTheInstance();
pglayout.SetEmptyLayout();

View File

@ -38,11 +38,10 @@
#include <wx_html_report_panel.h>
void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef,
void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotDrawingSheet,
RENDER_SETTINGS* aRenderSettings )
{
SCH_EDIT_FRAME* schframe = m_parent;
SCH_SCREEN* screen = schframe->GetScreen();
SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
/* When printing all pages, the printed page is not the current page.
@ -70,8 +69,8 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef,
schframe->SetCurrentSheet( sheetList[i] );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount();
screen = schframe->GetCurrentSheet().LastScreen();
SCH_SCREEN* screen = schframe->GetCurrentSheet().LastScreen();
wxPoint plot_offset;
wxString msg;
@ -87,7 +86,7 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef,
wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
if( PlotOneSheetDXF( plotFileName.GetFullPath(), screen, aRenderSettings,
plot_offset, 1.0, aPlotFrameRef ) )
plot_offset, 1.0, aPlotDrawingSheet ) )
{
msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ACTION );
@ -149,11 +148,11 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
if( aPlotFrameRef )
{
PlotWorkSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), pageInfo,
PlotDrawingSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), pageInfo,
aScreen->GetPageNumber(), aScreen->GetPageCount(),
m_parent->GetScreenDesc(), aScreen->GetFileName(),
plotter->GetColorMode() ?
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ) :
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
}

View File

@ -242,7 +242,7 @@ bool DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL( const wxString& aFileName,
if( aPlotFrameRef )
{
PlotWorkSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), aPageInfo,
PlotDrawingSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), aPageInfo,
aScreen->GetPageNumber(), aScreen->GetPageCount(),
m_parent->GetScreenDesc(), aScreen->GetFileName(), COLOR4D::BLACK,
aScreen->GetVirtualPageNumber() == 1 );

View File

@ -42,7 +42,7 @@
#include <dialog_plot_schematic.h>
#include <wx_html_report_panel.h>
void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef,
void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet,
RENDER_SETTINGS* aRenderSettings )
{
SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
@ -131,7 +131,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef,
plotter->StartPage();
}
plotOneSheetPDF( plotter, screen, aPlotFrameRef );
plotOneSheetPDF( plotter, screen, aPlotDrawingSheet );
}
// Everything done, close the plot and restore the environment
@ -156,7 +156,7 @@ void DIALOG_PLOT_SCHEMATIC::restoreEnvironment( PDF_PLOTTER* aPlotter,
void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScreen,
bool aPlotWorksheet )
bool aPlotDrawingSheet )
{
if( m_plotBackgroundColor->GetValue() )
{
@ -166,17 +166,17 @@ void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter, SCH_SCREEN* aScr
aPlotter->Rect( wxPoint( 0, 0 ), end, FILL_TYPE::FILLED_SHAPE, 1.0 );
}
if( aPlotWorksheet )
if( aPlotDrawingSheet )
{
COLOR4D color = COLOR4D::BLACK;
if( aPlotter->GetColorMode() )
color = aPlotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET );
color = aPlotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET );
PlotWorkSheet( aPlotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
PlotDrawingSheet( aPlotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
m_parent->GetPageSettings(), aScreen->GetPageNumber(),
aScreen->GetPageCount(), m_parent->GetScreenDesc(), aScreen->GetFileName(),
color, aScreen->GetVirtualPageNumber() == 1 );
aScreen->GetPageCount(), m_parent->GetScreenDesc(),
aScreen->GetFileName(), color, aScreen->GetVirtualPageNumber() == 1 );
}
aScreen->Plot( aPlotter );

View File

@ -176,11 +176,11 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName,
if( aPlotFrameRef )
{
PlotWorkSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(), aPageInfo,
aScreen->GetPageNumber(), aScreen->GetPageCount(),
PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
aPageInfo, aScreen->GetPageNumber(), aScreen->GetPageCount(),
m_parent->GetScreenDesc(), aScreen->GetFileName(),
plotter->GetColorMode() ?
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ) :
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
}

View File

@ -150,11 +150,11 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( const wxString& aFileName,
if( aPlotFrameRef )
{
PlotWorkSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(), pageInfo,
aScreen->GetPageNumber(), aScreen->GetPageCount(),
PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
pageInfo, aScreen->GetPageNumber(), aScreen->GetPageCount(),
m_parent->GetScreenDesc(), aScreen->GetFileName(),
plotter->GetColorMode() ?
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_DRAWINGSHEET ) :
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
}

View File

@ -166,8 +166,8 @@ void SCH_DRAW_PANEL::setDefaultLayerDeps()
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY ) ;
m_view->SetLayerTarget( LAYER_WORKSHEET, KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET ) ;
m_view->SetLayerTarget( LAYER_DRAWINGSHEET, KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET ) ;
// m_view->SetLayerTarget( LAYER_SELECTION_SHADOWS, KIGFX::TARGET_NONCACHED );
// m_view->SetLayerDisplayOnly( LAYER_SELECTION_SHADOWS ) ;

View File

@ -1071,7 +1071,7 @@ void SCH_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
aSettings->GetPrintDC()->SetLogicalFunction( wxCOPY );
GetScreen()->Print( aSettings );
PrintWorkSheet( aSettings, GetScreen(), IU_PER_MILS, fileName );
PrintDrawingSheet( aSettings, GetScreen(), IU_PER_MILS, fileName );
}
@ -1466,9 +1466,9 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents( bool aIncludeAllVisible ) const
}
else
{
// Get current worksheet in a form we can compare to an EDA_ITEM
KIGFX::WS_PROXY_VIEW_ITEM* currWs = SCH_BASE_FRAME::GetCanvas()->GetView()->GetWorksheet();
EDA_ITEM* currWsAsItem = static_cast<EDA_ITEM*>( currWs );
// Get current drawing sheet in a form we can compare to an EDA_ITEM
KIGFX::WS_PROXY_VIEW_ITEM* ds = SCH_BASE_FRAME::GetCanvas()->GetView()->GetDrawingSheet();
EDA_ITEM* dsAsItem = static_cast<EDA_ITEM*>( ds );
// Need an EDA_RECT so the first ".Merge" sees it's uninitialized
EDA_RECT bBoxItems;
@ -1476,7 +1476,7 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents( bool aIncludeAllVisible ) const
// Calc the bounding box of all items on screen except the page border
for( EDA_ITEM* item : GetScreen()->Items() )
{
if( item != currWsAsItem ) // Ignore the worksheet itself
if( item != dsAsItem ) // Ignore the worksheet itself
{
if( item->Type() == SCH_COMPONENT_T )
{

View File

@ -118,8 +118,8 @@ void SCH_PREVIEW_PANEL::setDefaultLayerDeps()
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY , KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY ) ;
m_view->SetLayerTarget( LAYER_WORKSHEET , KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET ) ;
m_view->SetLayerTarget( LAYER_DRAWINGSHEET , KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET ) ;
}

View File

@ -67,7 +67,7 @@ SCH_VIEW::~SCH_VIEW()
void SCH_VIEW::Cleanup()
{
Clear();
m_worksheet.reset();
m_drawingSheet.reset();
m_preview.reset();
}
@ -97,25 +97,25 @@ void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen )
for( SCH_ITEM* item : aScreen->Items() )
Add( item );
m_worksheet.reset( new KIGFX::WS_PROXY_VIEW_ITEM( static_cast< int >( IU_PER_MILS ),
m_drawingSheet.reset( new KIGFX::WS_PROXY_VIEW_ITEM( static_cast< int >( IU_PER_MILS ),
&aScreen->GetPageSettings(),
&aScreen->Schematic()->Prj(),
&aScreen->GetTitleBlock() ) );
m_worksheet->SetPageNumber( TO_UTF8( aScreen->GetPageNumber() ) );
m_worksheet->SetSheetCount( aScreen->GetPageCount() );
m_worksheet->SetFileName( TO_UTF8( aScreen->GetFileName() ) );
m_worksheet->SetColorLayer( LAYER_SCHEMATIC_WORKSHEET );
m_worksheet->SetPageBorderColorLayer( LAYER_SCHEMATIC_GRID );
m_worksheet->SetIsFirstPage( aScreen->GetVirtualPageNumber() == 1 );
m_drawingSheet->SetPageNumber( TO_UTF8( aScreen->GetPageNumber() ) );
m_drawingSheet->SetSheetCount( aScreen->GetPageCount() );
m_drawingSheet->SetFileName( TO_UTF8( aScreen->GetFileName() ) );
m_drawingSheet->SetColorLayer( LAYER_SCHEMATIC_DRAWINGSHEET );
m_drawingSheet->SetPageBorderColorLayer( LAYER_SCHEMATIC_GRID );
m_drawingSheet->SetIsFirstPage( aScreen->GetVirtualPageNumber() == 1 );
if( m_frame && m_frame->IsType( FRAME_SCH ) )
m_worksheet->SetSheetName( TO_UTF8( m_frame->GetScreenDesc() ) );
m_drawingSheet->SetSheetName( TO_UTF8( m_frame->GetScreenDesc() ) );
else
m_worksheet->SetSheetName( "" );
m_drawingSheet->SetSheetName( "" );
ResizeSheetWorkingArea( aScreen );
Add( m_worksheet.get() );
Add( m_drawingSheet.get() );
InitPreview();
}
@ -178,9 +178,9 @@ void SCH_VIEW::ClearHiddenFlags()
}
void SCH_VIEW::HideWorksheet()
void SCH_VIEW::HideDrawingSheet()
{
// SetVisible( m_worksheet.get(), false );
// SetVisible( m_drawingSheet.get(), false );
}

View File

@ -55,7 +55,7 @@ static const LAYER_NUM SCH_LAYER_ORDER[] =
LAYER_SELECTION_SHADOWS,
LAYER_DEVICE_BACKGROUND,
LAYER_SHEET_BACKGROUND,
LAYER_WORKSHEET
LAYER_DRAWINGSHEET
};
@ -92,15 +92,15 @@ public:
*/
void ClearHiddenFlags();
void HideWorksheet();
void HideDrawingSheet();
WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_worksheet.get(); }
WS_PROXY_VIEW_ITEM* GetDrawingSheet() const { return m_drawingSheet.get(); }
private:
SCH_BASE_FRAME* m_frame; // The frame using this view. Can be null. Used mainly
// to know the sheet path name when drawing the page layout
std::unique_ptr<WS_PROXY_VIEW_ITEM> m_worksheet;
std::unique_ptr<WS_PROXY_VIEW_ITEM> m_drawingSheet;
};
}; // namespace

View File

@ -697,7 +697,7 @@ void SYMBOL_EDIT_FRAME::SetCurPart( LIB_PART* aPart, bool aUpdateZoom )
GetRenderSettings()->m_ShowDisabled = IsSymbolFromLegacyLibrary() && !IsSymbolFromSchematic();
GetRenderSettings()->m_ShowGraphicsDisabled = IsSymbolAlias() && !IsSymbolFromSchematic();
GetCanvas()->DisplayComponent( m_my_part );
GetCanvas()->GetView()->HideWorksheet();
GetCanvas()->GetView()->HideDrawingSheet();
GetCanvas()->GetView()->ClearHiddenFlags();
if( aUpdateZoom )
@ -1099,7 +1099,7 @@ void SYMBOL_EDIT_FRAME::RebuildView()
GetRenderSettings()->m_ShowDisabled = IsSymbolFromLegacyLibrary() && !IsSymbolFromSchematic();
GetRenderSettings()->m_ShowGraphicsDisabled = IsSymbolAlias() && !IsSymbolFromSchematic();
GetCanvas()->DisplayComponent( m_my_part );
GetCanvas()->GetView()->HideWorksheet();
GetCanvas()->GetView()->HideDrawingSheet();
GetCanvas()->GetView()->ClearHiddenFlags();
GetCanvas()->Refresh();

View File

@ -1333,12 +1333,12 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
if( selection.Empty() )
{
if( getView()->IsLayerVisible( LAYER_SCHEMATIC_WORKSHEET ) )
if( getView()->IsLayerVisible( LAYER_SCHEMATIC_DRAWINGSHEET ) )
{
KIGFX::WS_PROXY_VIEW_ITEM* worksheet = m_frame->GetCanvas()->GetView()->GetWorksheet();
KIGFX::WS_PROXY_VIEW_ITEM* ds = m_frame->GetCanvas()->GetView()->GetDrawingSheet();
VECTOR2D cursorPos = getViewControls()->GetCursorPosition( false );
if( worksheet && worksheet->HitTestWorksheetItems( getView(), (wxPoint) cursorPos ) )
if( ds && ds->HitTestDrawingSheetItems( getView(), (wxPoint) cursorPos ) )
m_toolMgr->RunAction( ACTIONS::pageSettings );
}

View File

@ -167,7 +167,7 @@ void GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_GRID );
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_AXES );
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_BACKGROUND );
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET );
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET );
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY );
@ -177,10 +177,10 @@ void GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps()
}
void GERBVIEW_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
void GERBVIEW_DRAW_PANEL_GAL::SetDrawingSheet( KIGFX::WS_PROXY_VIEW_ITEM* aDrawingSheet )
{
m_worksheet.reset( aWorksheet );
m_view->Add( m_worksheet.get() );
m_drawingSheet.reset( aDrawingSheet );
m_view->Add( m_drawingSheet.get() );
}
@ -209,10 +209,9 @@ void GERBVIEW_DRAW_PANEL_GAL::SetTopLayer( int aLayer )
BOX2I GERBVIEW_DRAW_PANEL_GAL::GetDefaultViewBBox() const
{
// Even in Gervbview, this is the LAYER_WORKSHEET that controls the visibility
// of the worksheet
if( m_worksheet && m_view->IsLayerVisible( LAYER_WORKSHEET ) )
return m_worksheet->ViewBBox();
// Even in Gervbview, LAYER_DRAWINGSHEET controls the visibility of the drawingsheet
if( m_drawingSheet && m_view->IsLayerVisible( LAYER_DRAWINGSHEET ) )
return m_drawingSheet->ViewBBox();
return BOX2I();
}

View File

@ -58,22 +58,22 @@ public:
/**
* Set or update worksheet used by the draw panel.
*
* @param aWorksheet is the worksheet to be used.
* @param aDrawingSheet is the worksheet to be used.
* The object is then owned by GERBVIEW_DRAW_PANEL_GAL.
*/
void SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet );
void SetDrawingSheet( KIGFX::WS_PROXY_VIEW_ITEM* aDrawingSheet );
/**
* @return the current worksheet
*/
KIGFX::WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_worksheet.get(); }
KIGFX::WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_drawingSheet.get(); }
protected:
///< Set rendering targets & dependencies for layers.
void setDefaultLayerDeps();
///< Currently used worksheet
std::unique_ptr<KIGFX::WS_PROXY_VIEW_ITEM> m_worksheet;
std::unique_ptr<KIGFX::WS_PROXY_VIEW_ITEM> m_drawingSheet;
};

View File

@ -317,7 +317,7 @@ void GERBVIEW_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
GERBVIEW_SETTINGS* cfg = dynamic_cast<GERBVIEW_SETTINGS*>( aCfg );
wxCHECK( cfg, /*void*/ );
SetElementVisibility( LAYER_GERBVIEW_WORKSHEET, cfg->m_Appearance.show_border_and_titleblock );
SetElementVisibility( LAYER_GERBVIEW_DRAWINGSHEET, cfg->m_Appearance.show_border_and_titleblock );
PAGE_INFO pageInfo( wxT( "GERBER" ) );
pageInfo.SetType( cfg->m_Appearance.page_type );
@ -405,11 +405,11 @@ void GERBVIEW_FRAME::SetElementVisibility( int aLayerID, bool aNewState )
break;
}
case LAYER_GERBVIEW_WORKSHEET:
case LAYER_GERBVIEW_DRAWINGSHEET:
m_showBorderAndTitleBlock = aNewState;
// NOTE: LAYER_WORKSHEET always used for visibility, but the layer manager passes
// LAYER_GERBVIEW_WORKSHEET because of independent color control
GetCanvas()->GetView()->SetLayerVisible( LAYER_WORKSHEET, aNewState );
// NOTE: LAYER_DRAWINGSHEET always used for visibility, but the layer manager passes
// LAYER_GERBVIEW_DRAWINGSHEET because of independent color control
GetCanvas()->GetView()->SetLayerVisible( LAYER_DRAWINGSHEET, aNewState );
break;
case LAYER_GERBVIEW_GRID:
@ -656,7 +656,7 @@ bool GERBVIEW_FRAME::IsElementVisible( int aLayerID ) const
case LAYER_DCODES: return m_DisplayOptions.m_DisplayDCodes;
case LAYER_NEGATIVE_OBJECTS: return m_DisplayOptions.m_DisplayNegativeObjects;
case LAYER_GERBVIEW_GRID: return IsGridVisible();
case LAYER_GERBVIEW_WORKSHEET: return m_showBorderAndTitleBlock;
case LAYER_GERBVIEW_DRAWINGSHEET: return m_showBorderAndTitleBlock;
case LAYER_GERBVIEW_BACKGROUND: return true;
default:
@ -712,7 +712,7 @@ COLOR4D GERBVIEW_FRAME::GetVisibleElementColor( int aLayerID )
{
case LAYER_NEGATIVE_OBJECTS:
case LAYER_DCODES:
case LAYER_GERBVIEW_WORKSHEET:
case LAYER_GERBVIEW_DRAWINGSHEET:
case LAYER_GERBVIEW_BACKGROUND:
color = settings->GetColor( aLayerID );
break;
@ -748,12 +748,12 @@ void GERBVIEW_FRAME::SetVisibleElementColor( int aLayerID, COLOR4D aColor )
settings->SetColor( aLayerID, aColor );
break;
case LAYER_GERBVIEW_WORKSHEET:
settings->SetColor( LAYER_GERBVIEW_WORKSHEET, aColor );
// LAYER_WORKSHEET color is also used to draw the worksheet
// FIX ME: why LAYER_WORKSHEET must be set, although LAYER_GERBVIEW_WORKSHEET
case LAYER_GERBVIEW_DRAWINGSHEET:
settings->SetColor( LAYER_GERBVIEW_DRAWINGSHEET, aColor );
// LAYER_DRAWINGSHEET color is also used to draw the worksheet
// FIX ME: why LAYER_DRAWINGSHEET must be set, although LAYER_GERBVIEW_DRAWINGSHEET
// is used to initialize the worksheet color layer.
settings->SetColor( LAYER_WORKSHEET, aColor );
settings->SetColor( LAYER_DRAWINGSHEET, aColor );
break;
case LAYER_GERBVIEW_GRID:
@ -831,10 +831,10 @@ void GERBVIEW_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
worksheet->SetSheetCount( 1 );
}
worksheet->SetColorLayer( LAYER_GERBVIEW_WORKSHEET );
worksheet->SetColorLayer( LAYER_GERBVIEW_DRAWINGSHEET );
// Draw panel takes ownership of the worksheet
drawPanel->SetWorksheet( worksheet );
drawPanel->SetDrawingSheet( worksheet );
}

View File

@ -76,7 +76,7 @@ void GERBVIEW_RENDER_SETTINGS::LoadColors( const COLOR_SETTINGS* aSettings )
// Draw layers specific to Gerbview:
// LAYER_DCODES, LAYER_NEGATIVE_OBJECTS, LAYER_GERBVIEW_GRID,
// LAYER_GERBVIEW_AXES, LAYER_GERBVIEW_BACKGROUND, LAYER_GERBVIEW_WORKSHEET,
// LAYER_GERBVIEW_AXES, LAYER_GERBVIEW_BACKGROUND, LAYER_GERBVIEW_DRAWINGSHEET,
for( int i = LAYER_DCODES; i < GERBVIEW_LAYER_ID_END; i++ )
m_layerColors[i] = aSettings->GetColor( i );

View File

@ -134,7 +134,7 @@ bool GERBVIEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
migrateLegacyColor( "DCodeColorEx", LAYER_DCODES );
migrateLegacyColor( "GridColorEx", LAYER_GERBVIEW_GRID );
migrateLegacyColor( "NegativeObjectsColorEx", LAYER_NEGATIVE_OBJECTS );
migrateLegacyColor( "WorksheetColorEx", LAYER_GERBVIEW_WORKSHEET );
migrateLegacyColor( "WorksheetColorEx", LAYER_GERBVIEW_DRAWINGSHEET );
wxString key;

View File

@ -101,7 +101,7 @@ void GERBER_LAYER_WIDGET::ReFillRender()
RR( _( "Negative Objects" ), LAYER_NEGATIVE_OBJECTS, DARKGRAY, _( "Show negative objects in this color" ) ),
RR(),
RR( _( "Grid" ), LAYER_GERBVIEW_GRID, WHITE, _( "Show the (x,y) grid dots" ) ),
RR( _( "Worksheet" ), LAYER_GERBVIEW_WORKSHEET, DARKRED, _( "Show worksheet") ),
RR( _( "Drawing Sheet" ), LAYER_GERBVIEW_DRAWINGSHEET, DARKRED, _( "Show drawing sheet border and title block") ),
RR( _( "Background" ), LAYER_GERBVIEW_BACKGROUND, BLACK, _( "PCB Background" ), true, false )
};

View File

@ -302,15 +302,16 @@ public:
void AddStandardSubMenus( TOOL_MENU& aMenu );
/**
* Prints the page layout with the frame and the basic inscriptions.
* Prints the drawing sheet with the frame and title block.
*
* @param aScreen screen to draw.
* @param aMils2Iu The mils to Iu conversion factor.
* @param aFilename The filename to display in basic inscriptions.
* @param aSheetLayer The layer displayed from PcbNew.
*/
void PrintWorkSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen, double aMils2Iu,
const wxString& aFilename, const wxString& aSheetLayer = wxEmptyString );
void PrintDrawingSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
double aMils2Iu, const wxString& aFilename,
const wxString& aSheetLayer = wxEmptyString );
void DisplayToolMsg( const wxString& msg ) override;

View File

@ -214,7 +214,7 @@ enum GAL_LAYER_ID: int
LAYER_PAD_PLATEDHOLES = GAL_LAYER_ID_START + 21, ///< to draw pad holes (plated)
LAYER_VIA_HOLES = GAL_LAYER_ID_START + 22, ///< to draw via holes (pad holes do not use this layer)
LAYER_DRC_ERROR = GAL_LAYER_ID_START + 23, ///< layer for drc markers with SEVERITY_ERROR
LAYER_WORKSHEET = GAL_LAYER_ID_START + 24, ///< worksheet frame
LAYER_DRAWINGSHEET = GAL_LAYER_ID_START + 24, ///< drawingsheet frame and titleblock
LAYER_GP_OVERLAY = GAL_LAYER_ID_START + 25, ///< general purpose overlay
LAYER_SELECT_OVERLAY = GAL_LAYER_ID_START + 26, ///< currently selected items overlay
LAYER_PCB_BACKGROUND = GAL_LAYER_ID_START + 27, ///< PCB background color
@ -239,8 +239,8 @@ enum GAL_LAYER_ID: int
// Add layers below this point that do not have visibility controls, so don't need explicit
// enum values
LAYER_WORKSHEET_PAGE1, ///< for pageLayout editor previewing
LAYER_WORKSHEET_PAGEn, ///< for pageLayout editor previewing
LAYER_DRAWINGSHEET_PAGE1, ///< for drawingsheetEditor previewing
LAYER_DRAWINGSHEET_PAGEn, ///< for drawingsheetEditor previewing
/// Virtual layers for stacking zones and tracks on a given copper layer
LAYER_ZONE_START,
@ -361,7 +361,7 @@ enum SCH_LAYER_ID: int
LAYER_BRIGHTENED,
LAYER_HIDDEN,
LAYER_SELECTION_SHADOWS,
LAYER_SCHEMATIC_WORKSHEET,
LAYER_SCHEMATIC_DRAWINGSHEET,
LAYER_BUS_JUNCTION,
LAYER_SCHEMATIC_AUX_ITEMS,
@ -394,7 +394,7 @@ enum GERBVIEW_LAYER_ID: int
LAYER_GERBVIEW_GRID,
LAYER_GERBVIEW_AXES,
LAYER_GERBVIEW_BACKGROUND,
LAYER_GERBVIEW_WORKSHEET,
LAYER_GERBVIEW_DRAWINGSHEET,
GERBVIEW_LAYER_ID_END
};

View File

@ -210,7 +210,7 @@ protected:
public:
wxString m_Name; // a item name used in page layout
// editor to identify items
wxString m_Info; // a comment, only useful in page layout editor
wxString m_Info; // a comment, only useful in drawing sheet editor
POINT_COORD m_Pos;
POINT_COORD m_End;
double m_LineWidth;

View File

@ -74,7 +74,7 @@ public:
* In KiCad applications, a page layout description is needed
* So if the list is empty, a default description is loaded,
* the first time a page layout is drawn.
* However, in page layout editor, an empty list is acceptable.
* However, in drawing sheet editor an empty list is acceptable.
* AllowVoidList allows or not the empty list
*/
void AllowVoidList( bool Allow ) { m_allowVoidList = Allow; }
@ -197,7 +197,7 @@ public:
double m_DefaultLineWidth; // Used when object line width is 0
DSIZE m_DefaultTextSize; // Used when object text size is 0
double m_DefaultTextThickness; // Used when object text stroke width is 0
bool m_EditMode; // Used in page layout editor to toggle variable substation
bool m_EditMode; // Used in drawing sheet editor to toggle variable substitution
// In normal mode (m_EditMode = false) the %format is
// replaced by the corresponding text.
// In edit mode (m_EditMode = true) the %format is
@ -206,8 +206,8 @@ public:
private:
std::vector <WS_DATA_ITEM*> m_list;
bool m_allowVoidList; // If false, the default page layout will be loaded the
// first time WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList
// is run (useful mainly for page layout editor)
// first time WS_DRAW_ITEM_LIST::BuildDrawItemsList
// is run (useful mainly for drawing sheet editor)
double m_leftMargin; // the left page margin in mm
double m_rightMargin; // the right page margin in mm
double m_topMargin; // the top page margin in mm

View File

@ -195,7 +195,7 @@ public:
private:
wxPoint m_pos; // position of reference point, from the WS_DATA_ITEM_POLYGONS parent
// (used only in page layout editor to draw anchors)
// (used only in drawing sheet editor to draw anchors)
};
@ -400,12 +400,12 @@ public:
void SetProject( const PROJECT* aProject ) { m_project = aProject; }
/**
* Set the title block (mainly for page layout editor)
* Set the title block (mainly for drawing sheet editor)
*/
void SetTitleBlock( const TITLE_BLOCK* aTblock ) { m_titleBlock = aTblock; }
/**
* Set the paper format name (mainly for page layout editor)
* Set the paper format name (mainly for drawing sheet editor)
*/
void SetPaperFormat( const wxString* aFormatName ) { m_paperFormat = aFormatName; }
@ -507,7 +507,7 @@ public:
}
/**
* Draws the item list created by BuildWorkSheetGraphicList
* Draws the item list created by BuildDrawItemsList
*/
void Print( const RENDER_SETTINGS* aSettings );
@ -527,7 +527,7 @@ public:
* @param aColor The color for drawing.
* @param aAltColor The color for items which need to be "highlighted".
*/
void BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo, const TITLE_BLOCK& aTitleBlock );
void BuildDrawItemsList( const PAGE_INFO& aPageInfo, const TITLE_BLOCK& aTitleBlock );
static void GetTextVars( wxArrayString* aVars );

View File

@ -79,7 +79,7 @@ public:
/**
* Can be used to override which layer ID is used for worksheet item colors
* @param aLayerId is the color to use (will default to LAYER_WORKSHEET if this is not called)
* @param aLayerId is the color to use (defaults to LAYER_DRAWINGSHEET if this is not called)
*/
void SetColorLayer( int aLayerId )
{
@ -120,7 +120,7 @@ public:
return wxT( "WS_PROXY_VIEW_ITEM" );
}
bool HitTestWorksheetItems( VIEW* aView, const wxPoint& aPosition );
bool HitTestDrawingSheetItems( VIEW* aView, const wxPoint& aPosition );
protected:
void buildDrawList( VIEW* aView, WS_DRAW_ITEM_LIST* aDrawList ) const;
@ -138,7 +138,7 @@ protected:
bool m_isFirstPage;
const PROJECT* m_project;
/// Layer that is used for worksheet color (LAYER_WORKSHEET is always used for visibility)
/// Layer that is used for worksheet color (LAYER_DRAWINGSHEET is always used for visibility)
int m_colorLayer;
/// Layer that is used for page border color

View File

@ -600,8 +600,8 @@ protected: // variables used in most of plotters:
class TITLE_BLOCK;
void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
const PAGE_INFO& aPageInfo, const wxString& aSheetNumber, int aNumberOfSheets,
void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
const PAGE_INFO& aPageInfo, const wxString& aSheetNumber, int aSheetCount,
const wxString& aSheetDesc, const wxString& aFilename,
COLOR4D aColor = COLOR4D::UNSPECIFIED, bool aIsFirstPage = true );

View File

@ -180,7 +180,7 @@ public:
*/
virtual COLOR4D GetColor( const VIEW_ITEM* aItem, int aLayer ) const = 0;
float GetWorksheetLineWidth() const { return m_worksheetLineWidth; }
float GetDrawingSheetLineWidth() const { return m_drawingSheetLineWidth; }
int GetDefaultPenWidth() const { return m_defaultPenWidth; }
void SetDefaultPenWidth( int aWidth ) { m_defaultPenWidth = aWidth; }
@ -289,7 +289,7 @@ protected:
float m_selectFactor; // Specifies how color of selected items is changed
float m_outlineWidth; // Line width used when drawing outlines
float m_worksheetLineWidth; // Line width used when drawing worksheet
float m_drawingSheetLineWidth;// Line width used for borders and titleblock
int m_defaultPenWidth;
int m_minPenWidth; // Some clients (such as PDF) don't like ultra-thin

View File

@ -88,8 +88,17 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers()
int row = m_toolsSizer->GetRows();
m_toolsSizer->Add( btn, wxGBPosition( row, 0 ), wxGBSpan( 2, 1 ), wxALL, CELL_MARGINS );
#ifdef __WXGTK__
// Due to https://trac.wxwidgets.org/ticket/16088?cversion=0&cnum_hist=7 GTK fails to
// correctly set the BestSize of non-default-size text so we need to make sure that the
// BestSize isn't needed.
// However, another bug on OSX causes this to make the text top-aligned, so we have to
// do it only on GTK. Sigh.
m_toolsSizer->Add( label, wxGBPosition( row, 1 ), wxGBSpan( 1, 1 ), wxALIGN_BOTTOM|wxEXPAND, 0 );
m_toolsSizer->Add( help, wxGBPosition( row + 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_TOP|wxEXPAND, 0 );
#else
m_toolsSizer->Add( label, wxGBPosition( row, 1 ), wxGBSpan( 1, 1 ), wxALIGN_BOTTOM, 0 );
#endif
m_toolsSizer->Add( help, wxGBPosition( row + 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_TOP, 0 );
};
addLauncher( KICAD_MANAGER_ACTIONS::editSchematic, KiScaledBitmap( icon_eeschema_xpm, this ),
@ -115,9 +124,10 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers()
KiScaledBitmap( icon_pcbcalculator_xpm, this ),
_( "Show tools for calculating resistance, current capacity, etc." ) );
addLauncher( KICAD_MANAGER_ACTIONS::editWorksheet,
addLauncher( KICAD_MANAGER_ACTIONS::editDrawingSheet,
KiScaledBitmap( icon_pagelayout_editor_xpm, this ),
_( "Edit worksheet borders and title blocks for use in schematics and PCB designs" ) );
_( "Edit drawing sheet borders and title blocks for use in schematics and PCB "
"designs" ) );
if( m_toolsSizer->IsColGrowable( 1 ) )
m_toolsSizer->RemoveGrowableCol( 1 );

View File

@ -148,7 +148,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
toolsMenu->Add( KICAD_MANAGER_ACTIONS::viewGerbers );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::convertImage );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::showCalculator );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::editWorksheet );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::editDrawingSheet );
toolsMenu->AppendSeparator();
toolsMenu->Add( _( "Edit Local File..." ),

View File

@ -215,7 +215,7 @@ void PROJECT_TREE_ITEM::Activate( PROJECT_TREE_PANE* aTreePrjFrame )
break;
case TREE_FILE_TYPE::PAGE_LAYOUT_DESCR:
toolMgr->RunAction( KICAD_MANAGER_ACTIONS::editWorksheet, true, &fullFileName );
toolMgr->RunAction( KICAD_MANAGER_ACTIONS::editDrawingSheet, true, &fullFileName );
break;
case TREE_FILE_TYPE::FOOTPRINT_FILE:

View File

@ -99,10 +99,10 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator
_( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
icon_pcbcalculator_24_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
TOOL_ACTION KICAD_MANAGER_ACTIONS::editDrawingSheet( "kicad.Control.editDrawingSheet",
AS_GLOBAL,
MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
_( "Worksheet Editor" ), _( "Edit worksheet graphics and text" ),
_( "Drawing Sheet Editor" ), _( "Edit drawing sheet borders and title block" ),
icon_pagelayout_editor_24_xpm );
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",

View File

@ -48,7 +48,7 @@ public:
static TOOL_ACTION viewGerbers;
static TOOL_ACTION convertImage;
static TOOL_ACTION showCalculator;
static TOOL_ACTION editWorksheet;
static TOOL_ACTION editDrawingSheet;
static TOOL_ACTION openTextEditor;
static TOOL_ACTION editOtherSch;

View File

@ -727,7 +727,7 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent )
execFile = BITMAPCONVERTER_EXE;
else if( aEvent.IsAction( &KICAD_MANAGER_ACTIONS::showCalculator ) )
execFile = PCB_CALCULATOR_EXE;
else if( aEvent.IsAction( &KICAD_MANAGER_ACTIONS::editWorksheet ) )
else if( aEvent.IsAction( &KICAD_MANAGER_ACTIONS::editDrawingSheet ) )
execFile = PL_EDITOR_EXE;
else if( aEvent.IsAction( &KICAD_MANAGER_ACTIONS::openTextEditor ) )
execFile = Pgm().GetEditorName();
@ -776,8 +776,7 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent )
void KICAD_MANAGER_CONTROL::setTransitions()
{
Go( &KICAD_MANAGER_CONTROL::NewProject, KICAD_MANAGER_ACTIONS::newProject.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::NewFromTemplate,
KICAD_MANAGER_ACTIONS::newFromTemplate.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::NewFromTemplate, KICAD_MANAGER_ACTIONS::newFromTemplate.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::OpenProject, KICAD_MANAGER_ACTIONS::openProject.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::CloseProject, KICAD_MANAGER_ACTIONS::closeProject.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::SaveProjectAs, ACTIONS::saveAs.MakeEvent() );
@ -788,15 +787,12 @@ void KICAD_MANAGER_CONTROL::setTransitions()
Go( &KICAD_MANAGER_CONTROL::ShowPlayer, KICAD_MANAGER_ACTIONS::editSchematic.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::ShowPlayer, KICAD_MANAGER_ACTIONS::editSymbols.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::ShowPlayer, KICAD_MANAGER_ACTIONS::editPCB.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::ShowPlayer,
KICAD_MANAGER_ACTIONS::editFootprints.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::ShowPlayer, KICAD_MANAGER_ACTIONS::editFootprints.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::viewGerbers.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::convertImage.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute,
KICAD_MANAGER_ACTIONS::showCalculator.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editWorksheet.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute,
KICAD_MANAGER_ACTIONS::openTextEditor.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::showCalculator.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editDrawingSheet.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::openTextEditor.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherSch.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherPCB.MakeEvent() );

View File

@ -344,7 +344,7 @@ void DIALOG_INSPECTOR::onCellClicked( wxGridEvent& event )
if( !item ) // only WS_DATA_ITEM are returned.
return;
// Select this item in page layout editor, and update the properties panel:
// Select this item in drawing sheet editor, and update the properties panel:
PL_SELECTION_TOOL* selectionTool = m_editorFrame->GetToolManager()->GetTool<PL_SELECTION_TOOL>();
selectionTool->ClearSelection();
EDA_ITEM* draw_item = item->GetDrawItems()[0];

View File

@ -190,7 +190,7 @@ void PLEDITOR_PRINTOUT::PrintPage( int aPageNum )
KIGFX::WS_RENDER_SETTINGS renderSettings;
renderSettings.SetDefaultPenWidth( 1 );
renderSettings.SetLayerColor( LAYER_WORKSHEET, COLOR4D( RED ) );
renderSettings.SetLayerColor( LAYER_DRAWINGSHEET, COLOR4D( RED ) );
renderSettings.SetPrintDC( dc );
// Ensure the scaling factor (used only in printing) of bitmaps is up to date
@ -205,7 +205,7 @@ void PLEDITOR_PRINTOUT::PrintPage( int aPageNum )
}
}
m_parent->PrintWorkSheet( &renderSettings, screen, IU_PER_MILS, wxEmptyString );
m_parent->PrintDrawingSheet( &renderSettings, screen, IU_PER_MILS, wxEmptyString );
m_parent->SetDrawBgColor( bg_color );
@ -214,7 +214,7 @@ void PLEDITOR_PRINTOUT::PrintPage( int aPageNum )
screen->m_StartVisu = tmp_startvisu;
screen->m_DrawOrg = old_org;
// PrintWorkSheet clears the current display list when calling BuildWorkSheetGraphicList()
// PrintDrawingSheet clears the current display list when calling BuildDrawItemsList()
// So rebuild and redraw it.
m_parent->GetCanvas()->DisplayWorksheet();
}

View File

@ -115,7 +115,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
case ID_APPEND_DESCR_FILE:
{
wxFileDialog openFileDialog( this, _( "Append Existing Page Layout File" ),
wxFileDialog openFileDialog( this, _( "Append Existing Drawing Sheet" ),
wxEmptyString, wxEmptyString,
PageLayoutDescrFileWildcard(), wxFD_OPEN );

View File

@ -84,7 +84,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
fileMenu->Add( ACTIONS::print );
fileMenu->AppendSeparator();
fileMenu->AddQuitOrClose( &Kiface(), _( "Worksheet Editor" ) );
fileMenu->AddQuitOrClose( &Kiface(), _( "Drawing Sheet Editor" ) );
//-- Edit menu -------------------------------------------------------
//

View File

@ -64,9 +64,9 @@ PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindo
setDefaultLayerDeps();
m_view->SetLayerVisible( LAYER_WORKSHEET, true );
m_view->SetLayerVisible( LAYER_WORKSHEET_PAGE1, true );
m_view->SetLayerVisible( LAYER_WORKSHEET_PAGEn, false );
m_view->SetLayerVisible( LAYER_DRAWINGSHEET, true );
m_view->SetLayerVisible( LAYER_DRAWINGSHEET_PAGE1, true );
m_view->SetLayerVisible( LAYER_DRAWINGSHEET_PAGEn, false );
m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this );
}
@ -101,7 +101,7 @@ void PL_DRAW_PANEL_GAL::DisplayWorksheet()
model.SetupDrawEnvironment( m_edaFrame->GetPageSettings(), Mils2iu( 1 ) );
// To show the formatted texts instead of raw texts in page layout editor, we need
// To show the formatted texts instead of raw texts in drawing sheet editor, we need
// a dummy WS_DRAW_ITEM_LIST.
WS_DRAW_ITEM_LIST dummy;
dummy.SetPaperFormat( &m_edaFrame->GetPageSettings().GetType() );
@ -155,7 +155,7 @@ void PL_DRAW_PANEL_GAL::setDefaultLayerDeps()
for( int i = 0; i < KIGFX::VIEW::VIEW_MAX_LAYERS; i++ )
m_view->SetLayerTarget( i, KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET );
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET );
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY );

View File

@ -1,8 +1,3 @@
/**
* @file pl_editor.cpp
* @brief page layout editor main file.
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*

View File

@ -93,7 +93,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_showBorderAndTitleBlock = true; // true for reference drawings.
WS_DATA_MODEL::GetTheInstance().m_EditMode = true;
SetShowPageLimits( true );
m_aboutTitle = _( "KiCad Worksheet Editor" );
m_aboutTitle = _( "KiCad Drawing Sheet Editor" );
// Give an icon
wxIcon icon;
@ -386,8 +386,8 @@ void PL_EDITOR_FRAME::doCloseWindow()
void PL_EDITOR_FRAME::OnSelectPage( wxCommandEvent& event )
{
KIGFX::VIEW* view = GetCanvas()->GetView();
view->SetLayerVisible( LAYER_WORKSHEET_PAGE1, m_pageSelectBox->GetSelection() == 0 );
view->SetLayerVisible( LAYER_WORKSHEET_PAGEn, m_pageSelectBox->GetSelection() == 1 );
view->SetLayerVisible( LAYER_DRAWINGSHEET_PAGE1, m_pageSelectBox->GetSelection() == 0 );
view->SetLayerVisible( LAYER_DRAWINGSHEET_PAGEn, m_pageSelectBox->GetSelection() == 1 );
GetCanvas()->Refresh();
}
@ -461,7 +461,7 @@ void PL_EDITOR_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
{
wxTreebook* book = aParent->GetTreebook();
book->AddPage( new wxPanel( book ), _( "Worksheet Editor" ) );
book->AddPage( new wxPanel( book ), _( "Drawing Sheet Editor" ) );
book->AddSubPage( new PANEL_GAL_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) );
book->AddSubPage( new PANEL_PL_EDITOR_COLOR_SETTINGS( this, aParent->GetTreebook() ), _( "Colors" ) );
@ -529,7 +529,7 @@ void PL_EDITOR_FRAME::UpdateTitleAndInfo()
wxString title;
wxFileName file( GetCurrentFileName() );
title.Printf( wxT( "%s \u2014 " ) + _( "Worksheet Editor" ),
title.Printf( wxT( "%s \u2014 " ) + _( "Drawing Sheet Editor" ),
file.IsOk() ? file.GetName() : _( "no file selected" ) );
SetTitle( title );
}
@ -761,7 +761,7 @@ void PL_EDITOR_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
}
}
PrintWorkSheet( aSettings, GetScreen(), IU_PER_MILS, wxEmptyString );
PrintDrawingSheet( aSettings, GetScreen(), IU_PER_MILS, wxEmptyString );
GetCanvas()->DisplayWorksheet();
GetCanvas()->Refresh();

View File

@ -40,7 +40,7 @@ class WS_DATA_ITEM;
/**
* PL_EDITOR_FRAME
* is the main window used in the page layout editor.
* is the main window used in the drawing sheet editor.
*/
class PL_EDITOR_FRAME : public EDA_DRAW_FRAME
@ -167,7 +167,7 @@ public:
const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override;
/**
* Page layout editor can show the title block using a page number 1 or another number.
* Drawing sheet editor can show the title block using a page number 1 or another number.
* This is because some items can be shown (or not) only on page 1 (a feature which
* looks like word processing option "page 1 differs from other pages").
* @return true if the page 1 is selected, and false if not

View File

@ -28,7 +28,7 @@
#include <id.h>
/**
* Page layout editor IDs.
* Drawing sheet editor IDs.
*/
enum pl_editor_ids

View File

@ -70,8 +70,8 @@ TOOL_ACTION PL_ACTIONS::move( "plEditor.InteractiveMove.move",
TOOL_ACTION PL_ACTIONS::appendImportedWorksheet( "plEditor.InteractiveEdit.appendWorksheet",
AS_GLOBAL, 0, "",
_( "Append Existing Page Layout File..." ),
_( "Append an existing page layout design file to current file" ),
_( "Append Existing Drawing Sheet..." ),
_( "Append an existing drawing sheet file to current file" ),
import_xpm, AF_ACTIVATE );

View File

@ -32,7 +32,7 @@ class PL_EDITOR_FRAME;
/**
* Handle actions specific to the page layout editor.
* Handle actions specific to the drawing sheet editor.
*/
class PL_EDITOR_CONTROL : public wxEvtHandler, public TOOL_INTERACTIVE
{

View File

@ -514,8 +514,8 @@ void PANEL_PCBNEW_COLOR_SETTINGS::createPreviewItems()
auto worksheet = new KIGFX::WS_PROXY_VIEW_ITEM( (int) IU_PER_MILS, m_page, nullptr,
m_titleBlock );
worksheet->SetColorLayer( LAYER_WORKSHEET );
m_preview->SetWorksheet( worksheet );
worksheet->SetColorLayer( LAYER_DRAWINGSHEET );
m_preview->SetDrawingSheet( worksheet );
zoomFitPreview();
}

View File

@ -93,7 +93,7 @@ public:
NETLIST* GetSchematicNetlist() const { return m_schematicNetlist; }
void SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet ) { m_worksheet = aWorksheet; }
KIGFX::WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_worksheet; }
KIGFX::WS_PROXY_VIEW_ITEM* GetDrawingSheet() const { return m_worksheet; }
void SetDebugOverlay( std::shared_ptr<KIGFX::VIEW_OVERLAY> aOverlay ) { m_debugOverlay = aOverlay; }
std::shared_ptr<KIGFX::VIEW_OVERLAY> GetDebugOverlay() const { return m_debugOverlay; }

View File

@ -176,22 +176,22 @@ void DRC_TEST_PROVIDER_MISC::testTextVars()
forEachGeometryItem( { PCB_FP_TEXT_T, PCB_TEXT_T }, LSET::AllLayersMask(),
checkUnresolvedTextVar );
KIGFX::WS_PROXY_VIEW_ITEM* worksheet = m_drcEngine->GetWorksheet();
WS_DRAW_ITEM_LIST wsItems;
KIGFX::WS_PROXY_VIEW_ITEM* drawingSheet = m_drcEngine->GetDrawingSheet();
WS_DRAW_ITEM_LIST drawItems;
if( !worksheet || m_drcEngine->IsErrorLimitExceeded( DRCE_UNRESOLVED_VARIABLE ) )
if( !drawingSheet || m_drcEngine->IsErrorLimitExceeded( DRCE_UNRESOLVED_VARIABLE ) )
return;
wsItems.SetMilsToIUfactor( IU_PER_MILS );
wsItems.SetPageNumber( "1" );
wsItems.SetSheetCount( 1 );
wsItems.SetFileName( "dummyFilename" );
wsItems.SetSheetName( "dummySheet" );
wsItems.SetSheetLayer( "dummyLayer" );
wsItems.SetProject( m_board->GetProject() );
wsItems.BuildWorkSheetGraphicList( worksheet->GetPageInfo(), worksheet->GetTitleBlock() );
drawItems.SetMilsToIUfactor( IU_PER_MILS );
drawItems.SetPageNumber( "1" );
drawItems.SetSheetCount( 1 );
drawItems.SetFileName( "dummyFilename" );
drawItems.SetSheetName( "dummySheet" );
drawItems.SetSheetLayer( "dummyLayer" );
drawItems.SetProject( m_board->GetProject() );
drawItems.BuildDrawItemsList( drawingSheet->GetPageInfo(), drawingSheet->GetTitleBlock() );
for( WS_DRAW_ITEM_BASE* item = wsItems.GetFirst(); item; item = wsItems.GetNext() )
for( WS_DRAW_ITEM_BASE* item = drawItems.GetFirst(); item; item = drawItems.GetNext() )
{
if( m_drcEngine->IsErrorLimitExceeded( DRCE_UNRESOLVED_VARIABLE ) )
break;

View File

@ -366,7 +366,7 @@ bool FOOTPRINT_EDITOR_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
migrateLegacyColor( f + "Color4DViaBBlindEx", LAYER_VIA_BBLIND );
migrateLegacyColor( f + "Color4DViaMicroEx", LAYER_VIA_MICROVIA );
migrateLegacyColor( f + "Color4DViaThruEx", LAYER_VIA_THROUGH );
migrateLegacyColor( f + "Color4DWorksheet", LAYER_WORKSHEET );
migrateLegacyColor( f + "Color4DWorksheet", LAYER_DRAWINGSHEET );
manager.SaveColorSettings( cs, "board" );

View File

@ -132,7 +132,7 @@ const LAYER_NUM GAL_LAYER_ORDER[] =
B_Fab, ZONE_LAYER_FOR( B_Fab ),
LAYER_MOD_TEXT_BK,
LAYER_WORKSHEET
LAYER_DRAWINGSHEET
};
@ -231,7 +231,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard )
}
void PCB_DRAW_PANEL_GAL::SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
void PCB_DRAW_PANEL_GAL::SetDrawingSheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
{
m_worksheet.reset( aWorksheet );
m_view->Add( m_worksheet.get() );
@ -535,7 +535,7 @@ void PCB_DRAW_PANEL_GAL::RedrawRatsnest()
BOX2I PCB_DRAW_PANEL_GAL::GetDefaultViewBBox() const
{
if( m_worksheet && m_view->IsLayerVisible( LAYER_WORKSHEET ) )
if( m_worksheet && m_view->IsLayerVisible( LAYER_DRAWINGSHEET ) )
return m_worksheet->ViewBBox();
return BOX2I();
@ -617,8 +617,8 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetLayerTarget( LAYER_MARKER_SHADOWS, KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_MARKER_SHADOWS );
m_view->SetLayerTarget( LAYER_WORKSHEET, KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET ) ;
m_view->SetLayerTarget( LAYER_DRAWINGSHEET, KIGFX::TARGET_NONCACHED );
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET ) ;
m_view->SetLayerDisplayOnly( LAYER_GRID );
}

View File

@ -59,7 +59,7 @@ public:
* @param aWorksheet is the worksheet to be used. The object is then owned by
* #PCB_DRAW_PANEL_GAL.
*/
void SetWorksheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet );
void SetDrawingSheet( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet );
KIGFX::WS_PROXY_VIEW_ITEM* GetWorksheet() const { return m_worksheet.get(); }

View File

@ -396,7 +396,7 @@ void PCB_EDIT_FRAME::SetBoard( BOARD* aBoard )
aBoard->SetProject( &Prj() );
aBoard->GetConnectivity()->Build( aBoard );
// reload the worksheet
// reload the drawing sheet
SetPageSettings( aBoard->GetPageSettings() );
}
@ -411,25 +411,25 @@ void PCB_EDIT_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
{
PCB_BASE_FRAME::SetPageSettings( aPageSettings );
// Prepare worksheet template
KIGFX::WS_PROXY_VIEW_ITEM* worksheet;
worksheet = new KIGFX::WS_PROXY_VIEW_ITEM( IU_PER_MILS, &m_pcb->GetPageSettings(),
// Prepare drawingSheet template
KIGFX::WS_PROXY_VIEW_ITEM* drawingSheet;
drawingSheet = new KIGFX::WS_PROXY_VIEW_ITEM( IU_PER_MILS, &m_pcb->GetPageSettings(),
m_pcb->GetProject(), &m_pcb->GetTitleBlock() );
worksheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) );
drawingSheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) );
BASE_SCREEN* screen = GetScreen();
if( screen != NULL )
{
worksheet->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
worksheet->SetSheetCount( screen->GetPageCount() );
drawingSheet->SetPageNumber(TO_UTF8( screen->GetPageNumber() ) );
drawingSheet->SetSheetCount( screen->GetPageCount() );
}
if( auto board = GetBoard() )
worksheet->SetFileName( TO_UTF8( board->GetFileName() ) );
if( BOARD* board = GetBoard() )
drawingSheet->SetFileName( TO_UTF8( board->GetFileName() ) );
// PCB_DRAW_PANEL_GAL takes ownership of the worksheet
GetCanvas()->SetWorksheet( worksheet );
// PCB_DRAW_PANEL_GAL takes ownership of the drawing sheet
GetCanvas()->SetDrawingSheet( drawingSheet );
}

View File

@ -169,7 +169,7 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
setVisibility( LAYER_DRC_ERROR );
setVisibility( LAYER_DRC_EXCLUSION );
setVisibility( LAYER_ANCHOR );
setVisibility( LAYER_WORKSHEET );
setVisibility( LAYER_DRAWINGSHEET );
setVisibility( LAYER_GRID );
// Keep certain items always enabled and just rely on either the finer or coarser

View File

@ -757,7 +757,7 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
migrateLegacyColor( "Color4DViaBBlindEx", LAYER_VIA_BBLIND );
migrateLegacyColor( "Color4DViaMicroEx", LAYER_VIA_MICROVIA );
migrateLegacyColor( "Color4DViaThruEx", LAYER_VIA_THROUGH );
migrateLegacyColor( "Color4DWorksheet", LAYER_WORKSHEET );
migrateLegacyColor( "Color4DWorksheet", LAYER_DRAWINGSHEET );
Pgm().GetSettingsManager().SaveColorSettings( cs, "board" );

View File

@ -1109,8 +1109,9 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, int aLayer,
// Plot the frame reference if requested
if( aPlotOpts->GetPlotFrameRef() )
{
PlotWorkSheet( plotter, aBoard->GetProject(), aBoard->GetTitleBlock(),
aBoard->GetPageSettings(), "1", 1, aSheetDesc, aBoard->GetFileName() );
PlotDrawingSheet( plotter, aBoard->GetProject(), aBoard->GetTitleBlock(),
aBoard->GetPageSettings(), "1", 1, aSheetDesc,
aBoard->GetFileName() );
if( aPlotOpts->GetMirror() )
initializePlotter( plotter, aBoard, aPlotOpts );

View File

@ -1234,12 +1234,12 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
// Notify other tools of the changes
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
}
else if( selection.Size() == 0 && getView()->IsLayerVisible( LAYER_WORKSHEET ) )
else if( selection.Size() == 0 && getView()->IsLayerVisible( LAYER_DRAWINGSHEET ) )
{
KIGFX::WS_PROXY_VIEW_ITEM* worksheet = editFrame->GetCanvas()->GetWorksheet();
VECTOR2D cursorPos = getViewControls()->GetCursorPosition( false );
if( worksheet && worksheet->HitTestWorksheetItems( getView(), (wxPoint) cursorPos ) )
if( worksheet && worksheet->HitTestDrawingSheetItems( getView(), (wxPoint) cursorPos ) )
m_toolMgr->RunAction( ACTIONS::pageSettings );
}

View File

@ -350,7 +350,7 @@ const APPEARANCE_CONTROLS::APPEARANCE_SETTING APPEARANCE_CONTROLS::s_objectSetti
RR( _( "DRC Errors" ), LAYER_DRC_ERROR, _( "DRC violations with an Error severity" ) ),
RR( _( "DRC Exclusions" ), LAYER_DRC_EXCLUSION, _( "DRC violations which have been individually excluded" ) ),
RR( _( "Anchors" ), LAYER_ANCHOR, _( "Show footprint and text origins as a cross" ) ),
RR( _( "Worksheet" ), LAYER_WORKSHEET, _( "Show worksheet" ) ),
RR( _( "Drawing Sheet" ), LAYER_DRAWINGSHEET, _( "Show drawing sheet borders and title block" ) ),
RR( _( "Grid" ), LAYER_GRID, _( "Show the (x,y) grid dots" ) )
};

View File

@ -22,7 +22,7 @@
<key>CFBundleIdentifier</key> <string>org.kicad-pcb.pl_editor</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
<key>CFBundleLongVersionString</key> <string>@KICAD_VERSION_FULL@</string>
<key>CFBundleName</key> <string>Page Layout Editor</string>
<key>CFBundleName</key> <string>Drawing Sheet Editor</string>
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleShortVersionString</key> <string>@KICAD_VERSION@</string>
<key>CFBundleSignature</key> <string>????</string>