mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 22:51:41 +00:00
Eeschema: add schematic sheet page number.
The groundwork has now been laid for per sheet instance data. Initially this only supports sheet page numbers but could be expanded to include other per sheet instance information. ADDED: Support for user defined schematic page numbers.
This commit is contained in:
parent
a28f154cc5
commit
8ff51d8899
common
eeschema
dialogs
dialog_sheet_properties.cppdialog_sheet_properties_base.cppdialog_sheet_properties_base.fbpdialog_sheet_properties_base.h
erc.cppfiles-io.cppmenubar.cppplotters
plot_schematic_DXF.cppplot_schematic_HPGL.cppplot_schematic_PDF.cppplot_schematic_PS.cppplot_schematic_SVG.cpp
sch_edit_frame.cppsch_file_versions.hsch_iref.cppsch_iref.hsch_plugins
sch_screen.cppsch_screen.hsch_sheet.cppsch_sheet.hsch_sheet_path.cppsch_sheet_path.hsch_view.cppschematic.cppschematic.hschematic.keywordsschematic_undo_redo.cpptools
gerbview
include
pagelayout_editor
pcbnew
qa/eeschema
@ -35,13 +35,13 @@ wxString BASE_SCREEN::m_PageLayoutDescrFileName; // the name of the page layou
|
||||
BASE_SCREEN::BASE_SCREEN( EDA_ITEM* aParent, KICAD_T aType ) :
|
||||
EDA_ITEM( aParent, aType )
|
||||
{
|
||||
m_Initialized = false;
|
||||
m_ScreenNumber = 1;
|
||||
m_NumberOfScreens = 1; // Hierarchy: Root: ScreenNumber = 1
|
||||
m_Center = true;
|
||||
m_Initialized = false;
|
||||
m_virtualPageNumber = 1;
|
||||
m_pageCount = 1; // Hierarchy: Root: ScreenNumber = 1
|
||||
m_Center = true;
|
||||
|
||||
m_FlagModified = false; // Set when any change is made on board.
|
||||
m_FlagSave = false; // Used in auto save set when an auto save is required.
|
||||
m_FlagModified = false; // Set when any change is made on board.
|
||||
m_FlagSave = false; // Used in auto save set when an auto save is required.
|
||||
}
|
||||
|
||||
|
||||
@ -68,6 +68,27 @@ void BASE_SCREEN::InitDataPoints( const wxSize& aPageSizeIU )
|
||||
}
|
||||
|
||||
|
||||
void BASE_SCREEN::SetPageCount( int aPageCount )
|
||||
{
|
||||
wxCHECK( aPageCount > 0, /* void */ );
|
||||
|
||||
m_pageCount = aPageCount;
|
||||
}
|
||||
|
||||
|
||||
const wxString& BASE_SCREEN::GetPageNumber() const
|
||||
{
|
||||
static wxString pageNumber;
|
||||
|
||||
if( m_pageNumber.IsEmpty() )
|
||||
pageNumber.Printf( "%d", m_virtualPageNumber );
|
||||
else
|
||||
pageNumber = m_pageNumber;
|
||||
|
||||
return pageNumber;
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2018 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -166,11 +166,11 @@ void DIALOG_PAGES_SETTINGS::initDialog()
|
||||
#ifdef EESCHEMA
|
||||
// Init display value for schematic sub-sheet number
|
||||
wxString format = m_TextSheetCount->GetLabel();
|
||||
msg.Printf( format, m_screen->m_NumberOfScreens );
|
||||
msg.Printf( format, m_screen->GetPageCount() );
|
||||
m_TextSheetCount->SetLabel( msg );
|
||||
|
||||
format = m_TextSheetNumber->GetLabel();
|
||||
msg.Printf( format, m_screen->m_ScreenNumber );
|
||||
msg.Printf( format, m_screen->GetVirtualPageNumber() );
|
||||
m_TextSheetNumber->SetLabel( msg );
|
||||
#else
|
||||
m_TextSheetCount->Show( false );
|
||||
@ -771,7 +771,8 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
|
||||
GRFilledRect( NULL, &memDC, 0, 0, m_layout_size.x, m_layout_size.y, WHITE, WHITE );
|
||||
|
||||
PrintPageLayout( &renderSettings, pageDUMMY, emptyString, emptyString, m_tb,
|
||||
m_screen->m_NumberOfScreens, m_screen->m_ScreenNumber, 1, &Prj() );
|
||||
m_screen->GetPageCount(), m_screen->GetPageNumber(), 1, &Prj(),
|
||||
wxEmptyString, m_screen->GetVirtualPageNumber() == 1 );
|
||||
|
||||
memDC.SelectObject( wxNullBitmap );
|
||||
m_PageLayoutExampleBitmap->SetBitmap( *m_page_bitmap );
|
||||
|
@ -89,7 +89,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||
m_gridColor = COLOR4D( DARKGRAY ); // Default grid color
|
||||
m_showPageLimits = false;
|
||||
m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas:
|
||||
// BLACK for Pcbnew, BLACK or WHITE for eeschema
|
||||
// BLACK for Pcbnew, BLACK or WHITE for Eeschema
|
||||
m_colorSettings = nullptr;
|
||||
m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
|
||||
m_userUnits = EDA_UNITS::MILLIMETRES;
|
||||
@ -819,19 +819,21 @@ static const wxString productName = wxT( "KiCad E.D.A. " );
|
||||
|
||||
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 )
|
||||
const TITLE_BLOCK& aTitleBlock, int aSheetCount, const wxString& aPageNumber,
|
||||
double aScalar, const PROJECT* aProject, const wxString& aSheetLayer,
|
||||
bool aIsFirstPage )
|
||||
{
|
||||
WS_DRAW_ITEM_LIST drawList;
|
||||
|
||||
drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
|
||||
drawList.SetMilsToIUfactor( aScalar );
|
||||
drawList.SetSheetNumber( aSheetNumber );
|
||||
drawList.SetPageNumber( aPageNumber );
|
||||
drawList.SetSheetCount( aSheetCount );
|
||||
drawList.SetFileName( aFileName );
|
||||
drawList.SetSheetName( aFullSheetName );
|
||||
drawList.SetSheetLayer( aSheetLayer );
|
||||
drawList.SetProject( aProject );
|
||||
drawList.SetIsFirstPage( aIsFirstPage );
|
||||
|
||||
drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
|
||||
|
||||
@ -857,8 +859,8 @@ void EDA_DRAW_FRAME::PrintWorkSheet( RENDER_SETTINGS* aSettings, BASE_SCREEN* aS
|
||||
}
|
||||
|
||||
PrintPageLayout( aSettings, GetPageSettings(), GetScreenDesc(), aFilename, GetTitleBlock(),
|
||||
aScreen->m_NumberOfScreens, aScreen->m_ScreenNumber, aScalar, &Prj(),
|
||||
aSheetLayer );
|
||||
aScreen->GetPageCount(), aScreen->GetPageNumber(), aScalar, &Prj(),
|
||||
aSheetLayer, aScreen->GetVirtualPageNumber() == 1 );
|
||||
|
||||
if( origin.y > 0 )
|
||||
{
|
||||
@ -874,6 +876,7 @@ wxString EDA_DRAW_FRAME::GetScreenDesc() const
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
|
||||
const wxString& wildcard, const wxString& ext,
|
||||
bool isDirectory )
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2013 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -253,7 +253,8 @@ bool WS_DRAW_ITEM_POLYPOLYGONS::HitTest( const wxPoint& aPosition, int aAccuracy
|
||||
}
|
||||
|
||||
|
||||
bool WS_DRAW_ITEM_POLYPOLYGONS::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
|
||||
bool WS_DRAW_ITEM_POLYPOLYGONS::HitTest( const EDA_RECT& aRect, bool aContained,
|
||||
int aAccuracy ) const
|
||||
{
|
||||
EDA_RECT sel = aRect;
|
||||
|
||||
@ -407,7 +408,7 @@ const EDA_RECT WS_DRAW_ITEM_BITMAP::GetBoundingBox() const
|
||||
auto* bitmap = static_cast<const WS_DATA_ITEM_BITMAP*>( m_peer );
|
||||
wxSize bm_size = bitmap->m_ImageBitmap->GetSize();
|
||||
|
||||
// bm_size is in Eeschma unit (100nm), convert to iu (0.001 mm)
|
||||
// bm_size is in Eeschema unit (100nm), convert to iu (0.001 mm)
|
||||
bm_size.x /= 10;
|
||||
bm_size.y /= 10;
|
||||
|
||||
@ -450,12 +451,13 @@ const EDA_RECT WS_DRAW_ITEM_PAGE::GetBoundingBox() const
|
||||
{
|
||||
EDA_RECT dummy;
|
||||
|
||||
// We want this graphic item alway visible. So gives the max size to the
|
||||
// We want this graphic item always visible. So gives the max size to the
|
||||
// bounding box to avoid any clamping:
|
||||
dummy.SetSize( wxSize( std::numeric_limits<int>::max(), std::numeric_limits<int>::max() ) );
|
||||
return dummy;
|
||||
}
|
||||
|
||||
|
||||
// ====================== WS_DRAW_ITEM_LIST ==============================
|
||||
|
||||
void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo,
|
||||
@ -475,9 +477,9 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( const PAGE_INFO& aPageInfo,
|
||||
for( WS_DATA_ITEM* wsItem : model.GetItems() )
|
||||
{
|
||||
// Generate it only if the page option allows this
|
||||
if( wsItem->GetPage1Option() == FIRST_PAGE_ONLY && m_sheetNumber != 1 )
|
||||
if( wsItem->GetPage1Option() == FIRST_PAGE_ONLY && !m_isFirstPage )
|
||||
continue;
|
||||
else if( wsItem->GetPage1Option() == SUBSEQUENT_PAGES && m_sheetNumber == 1 )
|
||||
else if( wsItem->GetPage1Option() == SUBSEQUENT_PAGES && m_isFirstPage )
|
||||
continue;
|
||||
|
||||
wsItem->SyncDrawItems( this, nullptr );
|
||||
|
@ -133,7 +133,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "#" ) ) )
|
||||
{
|
||||
*token = wxString::Format( wxT( "%d" ), m_sheetNumber );
|
||||
*token = wxString::Format( wxT( "%s" ), m_pageNumber );
|
||||
tokenUpdated = true;
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "##" ) ) )
|
||||
@ -348,7 +348,7 @@ void KIGFX::WS_PAINTER::draw( const WS_DRAW_ITEM_PAGE* aItem, int aLayer ) const
|
||||
m_gal->SetStrokeColor( m_renderSettings.m_pageBorderColor );
|
||||
VECTOR2D pos = VECTOR2D( aItem->GetMarkerPos().x, aItem->GetMarkerPos().y );
|
||||
|
||||
// Draw a cirle and a X
|
||||
// Draw a circle and a X
|
||||
m_gal->DrawCircle( pos, marker_size );
|
||||
m_gal->DrawLine( VECTOR2D( pos.x - marker_size, pos.y - marker_size),
|
||||
VECTOR2D( pos.x + marker_size, pos.y + marker_size ) );
|
||||
|
@ -38,7 +38,7 @@ WS_PROXY_VIEW_ITEM::WS_PROXY_VIEW_ITEM( int aMils2IUscalefactor, const PAGE_INFO
|
||||
m_mils2IUscalefactor( aMils2IUscalefactor ),
|
||||
m_titleBlock( aTitleBlock ),
|
||||
m_pageInfo( aPageInfo ),
|
||||
m_sheetNumber( 1 ),
|
||||
m_pageNumber( "1" ),
|
||||
m_sheetCount( 1 ),
|
||||
m_project( aProject ),
|
||||
m_colorLayer( LAYER_WORKSHEET ),
|
||||
@ -77,7 +77,8 @@ void WS_PROXY_VIEW_ITEM::buildDrawList( VIEW* aView, WS_DRAW_ITEM_LIST* aDrawLis
|
||||
// worksheet items coordinates and sizes are stored in mils,
|
||||
// and must be scaled to the same units as the caller
|
||||
aDrawList->SetMilsToIUfactor( m_mils2IUscalefactor );
|
||||
aDrawList->SetSheetNumber( m_sheetNumber );
|
||||
aDrawList->SetIsFirstPage( m_isFirstPage );
|
||||
aDrawList->SetPageNumber( m_pageNumber );
|
||||
aDrawList->SetSheetCount( m_sheetCount );
|
||||
aDrawList->SetFileName( fileName );
|
||||
aDrawList->SetSheetName( sheetName );
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -55,8 +55,9 @@ wxString GetDefaultPlotExtension( PLOT_FORMAT aFormat )
|
||||
|
||||
|
||||
void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
|
||||
const PAGE_INFO& aPageInfo, int aSheetNumber, int aNumberOfSheets,
|
||||
const wxString &aSheetDesc, const wxString &aFilename, COLOR4D aColor )
|
||||
const PAGE_INFO& aPageInfo, const wxString& aSheetNumber, int aNumberOfSheets,
|
||||
const wxString& aSheetDesc, const wxString& aFilename, COLOR4D aColor,
|
||||
bool aIsFirstPage )
|
||||
{
|
||||
/* Note: Page sizes values are given in mils
|
||||
*/
|
||||
@ -76,11 +77,12 @@ void PlotWorkSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK
|
||||
// Prepare plot parameters
|
||||
drawList.SetDefaultPenSize( PLOTTER::USE_DEFAULT_LINE_WIDTH );
|
||||
drawList.SetMilsToIUfactor( iusPerMil );
|
||||
drawList.SetSheetNumber( aSheetNumber );
|
||||
drawList.SetPageNumber( aSheetNumber );
|
||||
drawList.SetSheetCount( aNumberOfSheets );
|
||||
drawList.SetFileName( fn.GetFullName() ); // Print only the short filename
|
||||
drawList.SetSheetName( aSheetDesc );
|
||||
drawList.SetProject( aProject );
|
||||
drawList.SetIsFirstPage( aIsFirstPage );
|
||||
|
||||
drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
|
||||
|
||||
|
@ -161,6 +161,18 @@ bool DIALOG_SHEET_PROPERTIES::TransferDataToWindow()
|
||||
m_borderSwatch->SetSwatchBackground( canvas );
|
||||
m_backgroundSwatch->SetSwatchBackground( canvas );
|
||||
|
||||
SCH_SHEET_LIST hierarchy = m_frame->Schematic().GetFullHierarchy();
|
||||
SCH_SHEET_PATH instance = m_frame->GetCurrentSheet();
|
||||
|
||||
wxString nextPageNumber;
|
||||
|
||||
if( m_sheet->IsNew() )
|
||||
nextPageNumber.Printf( "%z", hierarchy.size() + 1 );
|
||||
else
|
||||
nextPageNumber = m_sheet->GetPageNumber( instance );
|
||||
|
||||
m_pageNumberTextCtrl->ChangeValue( nextPageNumber );
|
||||
|
||||
// set up the read-only fields
|
||||
m_heirarchyPath->SetValue( m_frame->GetCurrentSheet().PathHumanReadable() );
|
||||
|
||||
@ -316,6 +328,17 @@ bool DIALOG_SHEET_PROPERTIES::TransferDataFromWindow()
|
||||
m_sheet->SetBorderColor( m_borderSwatch->GetSwatchColor() );
|
||||
m_sheet->SetBackgroundColor( m_backgroundSwatch->GetSwatchColor() );
|
||||
|
||||
SCH_SHEET_LIST hierarchy = m_frame->Schematic().GetFullHierarchy();
|
||||
SCH_SHEET_PATH instance = m_frame->GetCurrentSheet();
|
||||
|
||||
if( m_sheet->IsNew() )
|
||||
{
|
||||
instance.push_back( m_sheet );
|
||||
m_sheet->AddInstance( instance.Path() );
|
||||
}
|
||||
|
||||
m_sheet->SetPageNumber( instance, m_pageNumberTextCtrl->GetValue() );
|
||||
|
||||
m_frame->TestDanglingEnds();
|
||||
|
||||
// Refresh all sheets in case ordering changed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -159,29 +159,36 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx
|
||||
|
||||
mainSizer->Add( m_longForm, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer6;
|
||||
bSizer6 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_pageNumberStaticText = new wxStaticText( this, wxID_ANY, _("Page number:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_pageNumberStaticText->Wrap( -1 );
|
||||
bSizer6->Add( m_pageNumberStaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_pageNumberTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer6->Add( m_pageNumberTextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizer6->Add( 0, 0, 3, wxEXPAND, 5 );
|
||||
|
||||
|
||||
mainSizer->Add( bSizer6, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
wxBoxSizer* bSizerBottom;
|
||||
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 1, 2, 0, 0 );
|
||||
fgSizer1->AddGrowableCol( 1 );
|
||||
fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_hiearchicalPathLabel = new wxStaticText( this, wxID_ANY, _("Hierarchical path:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_hiearchicalPathLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_hiearchicalPathLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
|
||||
bSizerBottom->Add( m_hiearchicalPathLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
|
||||
|
||||
m_heirarchyPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
|
||||
m_heirarchyPath->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
|
||||
|
||||
fgSizer1->Add( m_heirarchyPath, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerBottom->Add( fgSizer1, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
bSizerBottom->Add( m_heirarchyPath, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
||||
m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
|
||||
@ -190,10 +197,10 @@ DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wx
|
||||
m_stdDialogButtonSizer->AddButton( m_stdDialogButtonSizerCancel );
|
||||
m_stdDialogButtonSizer->Realize();
|
||||
|
||||
bSizerBottom->Add( m_stdDialogButtonSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
bSizerBottom->Add( m_stdDialogButtonSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
mainSizer->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
|
||||
mainSizer->Add( bSizerBottom, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
this->SetSizer( mainSizer );
|
||||
|
@ -14,6 +14,7 @@
|
||||
<property name="file">dialog_sheet_properties_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_sheet_properties_base</property>
|
||||
@ -25,6 +26,7 @@
|
||||
<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">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
@ -192,6 +194,7 @@
|
||||
<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>
|
||||
@ -265,6 +268,7 @@
|
||||
<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>
|
||||
@ -338,6 +342,7 @@
|
||||
<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>
|
||||
@ -421,6 +426,7 @@
|
||||
<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>
|
||||
@ -975,8 +981,154 @@
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer6</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Page number:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_pageNumberStaticText</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_pageNumberTextCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">3</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
@ -1034,7 +1186,7 @@
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
@ -1042,151 +1194,133 @@
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">2</property>
|
||||
<property name="flexible_direction">wxHORIZONTAL</property>
|
||||
<property name="growablecols">1</property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Hierarchical path:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fgSizer1</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">1</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Hierarchical path:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_hiearchicalPathLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_BTNFACE</property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_heirarchyPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_READONLY</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxBORDER_NONE</property>
|
||||
</object>
|
||||
</object>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_hiearchicalPathLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_BTNFACE</property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_heirarchyPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_READONLY</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxBORDER_NONE</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
||||
<property name="Apply">0</property>
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -56,6 +56,8 @@ class DIALOG_SHEET_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
COLOR_SWATCH* m_borderSwatch;
|
||||
wxStaticText* m_backgroundColorLabel;
|
||||
COLOR_SWATCH* m_backgroundSwatch;
|
||||
wxStaticText* m_pageNumberStaticText;
|
||||
wxTextCtrl* m_pageNumberTextCtrl;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* m_hiearchicalPathLabel;
|
||||
wxTextCtrl* m_heirarchyPath;
|
||||
|
@ -159,7 +159,7 @@ void ERC_TESTER::TestTextVars( KIGFX::WS_PROXY_VIEW_ITEM* aWorksheet )
|
||||
if( aWorksheet )
|
||||
{
|
||||
wsItems.SetMilsToIUfactor( IU_PER_MILS );
|
||||
wsItems.SetSheetNumber( 1 );
|
||||
wsItems.SetPageNumber( "1" );
|
||||
wsItems.SetSheetCount( 1 );
|
||||
wsItems.SetFileName( "dummyFilename" );
|
||||
wsItems.SetSheetName( "dummySheet" );
|
||||
|
@ -406,6 +406,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
"versions of KiCad." ) );
|
||||
}
|
||||
|
||||
if( sheetList.AllSheetPageNumbersEmpty() )
|
||||
sheetList.SetInitialPageNumbers();
|
||||
|
||||
UpdateFileHistory( fullFileName );
|
||||
|
||||
SCH_SCREENS schematic( Schematic().Root() );
|
||||
@ -494,8 +497,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
for( SCH_SCREEN* screen = schematic.GetFirst(); screen; screen = schematic.GetNext() )
|
||||
screen->UpdateLocalLibSymbolLinks();
|
||||
|
||||
// Restore all of the loaded symbol instances from the root sheet screen.
|
||||
// Restore all of the loaded symbol and sheet instances from the root sheet.
|
||||
sheetList.UpdateSymbolInstances( Schematic().RootScreen()->GetSymbolInstances() );
|
||||
sheetList.UpdateSheetInstances( Schematic().RootScreen()->GetSheetInstances() );
|
||||
}
|
||||
|
||||
Schematic().ConnectionGraph()->Reset();
|
||||
@ -788,9 +792,9 @@ bool SCH_EDIT_FRAME::SaveProject()
|
||||
std::vector<SCH_SHEET_PATH>& sheets = screen->GetClientSheetPaths();
|
||||
|
||||
if( sheets.size() == 1 )
|
||||
screen->m_ScreenNumber = sheets[0].GetPageNumber();
|
||||
screen->SetVirtualPageNumber( 1 );
|
||||
else
|
||||
screen->m_ScreenNumber = 0; // multiple uses; no way to store the real sheet #
|
||||
screen->SetVirtualPageNumber( 0 ); // multiple uses; no way to store the real sheet #
|
||||
|
||||
success &= SaveEEFile( screens.GetSheet( i ) );
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019 CERN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -153,7 +153,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||
editMenu->Add( ACTIONS::deleteTool );
|
||||
editMenu->Add( EE_ACTIONS::editTextAndGraphics );
|
||||
editMenu->Add( EE_ACTIONS::changeSymbols );
|
||||
|
||||
editMenu->Add( EE_ACTIONS::editPageNumber );
|
||||
|
||||
//-- View menu -----------------------------------------------------------
|
||||
//
|
||||
|
@ -144,11 +144,11 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
|
||||
if( aPlotFrameRef )
|
||||
{
|
||||
PlotWorkSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), pageInfo,
|
||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||
aScreen->GetPageNumber(), aScreen->GetPageCount(),
|
||||
m_parent->GetScreenDesc(), aScreen->GetFileName(),
|
||||
plotter->GetColorMode() ?
|
||||
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
|
||||
COLOR4D::BLACK );
|
||||
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
|
||||
}
|
||||
|
||||
aScreen->Plot( plotter );
|
||||
|
@ -216,8 +216,9 @@ bool DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL( const wxString& aFileName,
|
||||
if( aPlotFrameRef )
|
||||
{
|
||||
PlotWorkSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), aPageInfo,
|
||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||
m_parent->GetScreenDesc(), aScreen->GetFileName(), COLOR4D::BLACK );
|
||||
aScreen->GetPageNumber(), aScreen->GetPageCount(),
|
||||
m_parent->GetScreenDesc(), aScreen->GetFileName(), COLOR4D::BLACK,
|
||||
aScreen->GetVirtualPageNumber() == 1 );
|
||||
}
|
||||
|
||||
aScreen->Plot( plotter );
|
||||
|
@ -48,7 +48,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef,
|
||||
|
||||
/* When printing all pages, the printed page is not the current page. In
|
||||
* complex hierarchies, we must update component references and others
|
||||
* parameters in the given printed SCH_SCREEN, accordint to the sheet path
|
||||
* parameters in the given printed SCH_SCREEN, accordant to the sheet path
|
||||
* because in complex hierarchies a SCH_SCREEN (a drawing ) is shared
|
||||
* between many sheets and component references depend on the actual sheet
|
||||
* path used
|
||||
@ -164,12 +164,12 @@ void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter,
|
||||
if( aPlotFrameRef )
|
||||
{
|
||||
PlotWorkSheet( aPlotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
|
||||
m_parent->GetPageSettings(), aScreen->m_ScreenNumber,
|
||||
aScreen->m_NumberOfScreens, m_parent->GetScreenDesc(),
|
||||
m_parent->GetPageSettings(), aScreen->GetPageNumber(),
|
||||
aScreen->GetPageCount(), m_parent->GetScreenDesc(),
|
||||
aScreen->GetFileName(),
|
||||
aPlotter->GetColorMode() ?
|
||||
aPlotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
|
||||
COLOR4D::BLACK );
|
||||
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
|
||||
}
|
||||
|
||||
aScreen->Plot( aPlotter );
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <dialog_plot_schematic.h>
|
||||
#include <wx_html_report_panel.h>
|
||||
|
||||
|
||||
void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef,
|
||||
RENDER_SETTINGS* aRenderSettings )
|
||||
{
|
||||
@ -45,7 +46,7 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef,
|
||||
|
||||
/* When printing all pages, the printed page is not the current page.
|
||||
* In complex hierarchies, we must update component references
|
||||
* and others parameters in the given printed SCH_SCREEN, accordint to the sheet path
|
||||
* and others parameters in the given printed SCH_SCREEN, accordant to the sheet path
|
||||
* because in complex hierarchies a SCH_SCREEN (a drawing )
|
||||
* is shared between many sheets and component references depend on the actual sheet path used
|
||||
*/
|
||||
@ -170,11 +171,11 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName,
|
||||
if( aPlotFrameRef )
|
||||
{
|
||||
PlotWorkSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(), aPageInfo,
|
||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||
aScreen->GetPageNumber(), aScreen->GetPageCount(),
|
||||
m_parent->GetScreenDesc(), aScreen->GetFileName(),
|
||||
plotter->GetColorMode() ?
|
||||
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
|
||||
COLOR4D::BLACK );
|
||||
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
|
||||
}
|
||||
|
||||
aScreen->Plot( plotter );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011-2016 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -43,6 +43,7 @@
|
||||
#include "sch_painter.h"
|
||||
#include <plotters_specific.h>
|
||||
|
||||
|
||||
void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef,
|
||||
RENDER_SETTINGS* aRenderSettings )
|
||||
{
|
||||
@ -145,11 +146,11 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( const wxString& aFileName,
|
||||
if( aPlotFrameRef )
|
||||
{
|
||||
PlotWorkSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(), pageInfo,
|
||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||
aScreen->GetPageNumber(), aScreen->GetPageCount(),
|
||||
m_parent->GetScreenDesc(), aScreen->GetFileName(),
|
||||
plotter->GetColorMode() ?
|
||||
plotter->RenderSettings()->GetLayerColor( LAYER_SCHEMATIC_WORKSHEET ) :
|
||||
COLOR4D::BLACK );
|
||||
COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
|
||||
}
|
||||
|
||||
aScreen->Plot( plotter );
|
||||
|
@ -487,22 +487,21 @@ void SCH_EDIT_FRAME::SetSheetNumberAndCount()
|
||||
int sheet_number = 1;
|
||||
const KIID_PATH& current_sheetpath = GetCurrentSheet().Path();
|
||||
|
||||
// Examine all sheets path to find the current sheets path,
|
||||
// and count them from root to the current sheet path:
|
||||
// @todo Remove all psuedo page number system is left over from prior to real page number
|
||||
// implementation.
|
||||
for( const SCH_SHEET_PATH& sheet : Schematic().GetSheets() )
|
||||
{
|
||||
if( sheet.Path() == current_sheetpath ) // Current sheet path found
|
||||
if( sheet.Path() == current_sheetpath ) // Current sheet path found
|
||||
break;
|
||||
|
||||
sheet_number++; // Not found, increment before this current path
|
||||
sheet_number++; // Not found, increment before this current path
|
||||
}
|
||||
|
||||
GetCurrentSheet().SetPageNumber( sheet_number );
|
||||
|
||||
for( screen = s_list.GetFirst(); screen != NULL; screen = s_list.GetNext() )
|
||||
screen->m_NumberOfScreens = sheet_count;
|
||||
screen->SetPageCount( sheet_count );
|
||||
|
||||
GetScreen()->m_ScreenNumber = sheet_number;
|
||||
GetScreen()->SetVirtualPageNumber( sheet_number );
|
||||
GetScreen()->SetPageNumber( GetCurrentSheet().GetPageNumber() );
|
||||
}
|
||||
|
||||
|
||||
@ -1231,10 +1230,10 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
||||
|
||||
int SCH_EDIT_FRAME::RecomputeIntersheetsRefs()
|
||||
{
|
||||
SCHEMATIC_SETTINGS& settings = Schematic().Settings();
|
||||
std::vector<int> pagesNumbers;
|
||||
SCH_GLOBALLABEL* gLabel;
|
||||
SCH_IREF* iref;
|
||||
SCHEMATIC_SETTINGS& settings = Schematic().Settings();
|
||||
std::vector<wxString> pagesNumbers;
|
||||
SCH_GLOBALLABEL* gLabel;
|
||||
SCH_IREF* iref;
|
||||
|
||||
m_labelTable.clear();
|
||||
|
||||
@ -1280,10 +1279,10 @@ int SCH_EDIT_FRAME::RecomputeIntersheetsRefs()
|
||||
iref = gLabel->GetIref();
|
||||
}
|
||||
|
||||
iref->GetRefTable()->clear();
|
||||
iref->GetRefTable()->insert( iref->GetRefTable()->end(),
|
||||
pagesNumbers.begin(),
|
||||
pagesNumbers.end() );
|
||||
iref->GetRefTable().clear();
|
||||
iref->GetRefTable().insert( iref->GetRefTable().end(),
|
||||
pagesNumbers.begin(),
|
||||
pagesNumbers.end() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1295,9 +1294,9 @@ int SCH_EDIT_FRAME::RecomputeIntersheetsRefs()
|
||||
{
|
||||
if( iter->GetText().IsSameAs( item->GetText() ) && ( iter != item ) )
|
||||
{
|
||||
iter->GetIref()->GetRefTable()->insert( iter->GetIref()->GetRefTable()->end(),
|
||||
item->GetIref()->GetRefTable()->begin(),
|
||||
item->GetIref()->GetRefTable()->end() );
|
||||
iter->GetIref()->GetRefTable().insert( iter->GetIref()->GetRefTable().end(),
|
||||
item->GetIref()->GetRefTable().begin(),
|
||||
item->GetIref()->GetRefTable().end() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1309,23 +1308,23 @@ int SCH_EDIT_FRAME::RecomputeIntersheetsRefs()
|
||||
|
||||
iref = item->GetIref();
|
||||
|
||||
sort( iref->GetRefTable()->begin(), iref->GetRefTable()->end() );
|
||||
iref->GetRefTable()->erase( unique( iref->GetRefTable()->begin(),
|
||||
iref->GetRefTable()->end() ),
|
||||
iref->GetRefTable()->end() );
|
||||
std::sort( iref->GetRefTable().begin(), iref->GetRefTable().end() );
|
||||
iref->GetRefTable().erase( std::unique( iref->GetRefTable().begin(),
|
||||
iref->GetRefTable().end() ),
|
||||
iref->GetRefTable().end() );
|
||||
|
||||
text.Printf( "%s", settings.m_IntersheetsRefPrefix );
|
||||
|
||||
if( ( settings.m_IntersheetsRefFormatShort ) && ( iref->GetRefTable()->size() > 2 ) )
|
||||
if( ( settings.m_IntersheetsRefFormatShort ) && ( iref->GetRefTable().size() > 2 ) )
|
||||
{
|
||||
tmp.Printf( "%d..%d", iref->GetRefTable()->front(), iref->GetRefTable()->back() );
|
||||
tmp.Printf( "%s..%s", iref->GetRefTable().front(), iref->GetRefTable().back() );
|
||||
text.Append( tmp );
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int ref : *( iref->GetRefTable() ) )
|
||||
for( wxString ref : iref->GetRefTable() )
|
||||
{
|
||||
tmp.Printf( "%d,", ref );
|
||||
tmp.Printf( "%s,", ref );
|
||||
text.Append( tmp );
|
||||
}
|
||||
|
||||
|
@ -56,5 +56,5 @@
|
||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20200714 // Add alternate pin definitions.
|
||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20200820
|
||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20200827 // Remove host tag
|
||||
|
||||
#define SEXPR_SCHEMATIC_FILE_VERSION 20200828 // Add footprint to symbol_instances.
|
||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20200828 // Add footprint to symbol_instances.
|
||||
#define SEXPR_SCHEMATIC_FILE_VERSION 20201015 // Add sheet instance properties.
|
||||
|
@ -57,6 +57,7 @@ void SCH_IREF::PlaceAtDefaultPosition()
|
||||
SetTextPos( m_parentLabel->GetPosition() + offset );
|
||||
}
|
||||
|
||||
|
||||
wxPoint SCH_IREF::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) const
|
||||
{
|
||||
return m_parentLabel->GetSchematicTextOffset( aSettings );
|
||||
@ -83,6 +84,7 @@ void SCH_IREF::SetIrefOrientation( LABEL_SPIN_STYLE aSpinStyle )
|
||||
pt.y = 0;
|
||||
pt.x = offset;
|
||||
break;
|
||||
|
||||
case LABEL_SPIN_STYLE::UP:
|
||||
SetTextAngle( TEXT_ANGLE_VERT );
|
||||
SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
|
||||
@ -90,6 +92,7 @@ void SCH_IREF::SetIrefOrientation( LABEL_SPIN_STYLE aSpinStyle )
|
||||
pt.y = -offset;
|
||||
pt.x = 0;
|
||||
break;
|
||||
|
||||
case LABEL_SPIN_STYLE::LEFT:
|
||||
SetTextAngle( TEXT_ANGLE_HORIZ );
|
||||
SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT );
|
||||
@ -97,6 +100,7 @@ void SCH_IREF::SetIrefOrientation( LABEL_SPIN_STYLE aSpinStyle )
|
||||
pt.y = 0;
|
||||
pt.x = -offset;
|
||||
break;
|
||||
|
||||
case LABEL_SPIN_STYLE::BOTTOM:
|
||||
SetTextAngle( TEXT_ANGLE_VERT );
|
||||
SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT );
|
||||
@ -122,16 +126,19 @@ void SCH_IREF::CopyParentStyle()
|
||||
|
||||
void SCH_IREF::BuildHypertextMenu( wxMenu* aMenu )
|
||||
{
|
||||
std::map<int, wxString> sheetNames;
|
||||
std::map<wxString, wxString> sheetNames;
|
||||
|
||||
for( const SCH_SHEET_PATH& sheet : Schematic()->GetSheets() )
|
||||
sheetNames[ sheet.GetPageNumber() ] = sheet.Last()->GetName();
|
||||
|
||||
for( int i : m_refTable )
|
||||
int id = ID_HYPERTEXT_BACK;
|
||||
|
||||
for( wxString& i : m_refTable )
|
||||
{
|
||||
aMenu->Append( i, wxString::Format( _( "Go to Page %d (%s)" ),
|
||||
i,
|
||||
i == 1 ? _( "Root" ) : sheetNames[ i ] ) );
|
||||
aMenu->Append( id, wxString::Format( _( "Go to Page %s (%s)" ),
|
||||
i,
|
||||
i == "/" ? _( "Root" ) : sheetNames[ i ] ) );
|
||||
id++;
|
||||
}
|
||||
|
||||
aMenu->AppendSeparator();
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
std::vector<int>* GetRefTable() { return &m_refTable; }
|
||||
std::vector<wxString>& GetRefTable() { return m_refTable; }
|
||||
|
||||
bool IsDangling() const override { return false; }
|
||||
|
||||
@ -81,9 +81,9 @@ private:
|
||||
// the inherited one.
|
||||
using EDA_ITEM::SetParent;
|
||||
|
||||
std::vector<int> m_refTable;
|
||||
SCH_GLOBALLABEL* m_parentLabel;
|
||||
SCH_SCREEN* m_screen;
|
||||
std::vector<wxString> m_refTable;
|
||||
SCH_GLOBALLABEL* m_parentLabel;
|
||||
SCH_SCREEN* m_screen;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1799,6 +1799,63 @@ SCH_SHEET_PIN* SCH_SEXPR_PARSER::parseSchSheetPin( SCH_SHEET* aSheet )
|
||||
}
|
||||
|
||||
|
||||
void SCH_SEXPR_PARSER::parseSchSheetInstances( SCH_SCREEN* aScreen )
|
||||
{
|
||||
wxCHECK_RET( CurTok() == T_sheet_instances,
|
||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) +
|
||||
wxT( " as a instances token." ) );
|
||||
wxCHECK( aScreen, /* void */ );
|
||||
|
||||
T token;
|
||||
|
||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||
{
|
||||
if( token != T_LEFT )
|
||||
Expecting( T_LEFT );
|
||||
|
||||
token = NextTok();
|
||||
|
||||
switch( token )
|
||||
{
|
||||
case T_path:
|
||||
{
|
||||
NeedSYMBOL();
|
||||
|
||||
SCH_SHEET_INSTANCE instance;
|
||||
|
||||
instance.m_Path = KIID_PATH( FromUTF8() );
|
||||
|
||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||
{
|
||||
if( token != T_LEFT )
|
||||
Expecting( T_LEFT );
|
||||
|
||||
token = NextTok();
|
||||
|
||||
switch( token )
|
||||
{
|
||||
case T_page:
|
||||
NeedSYMBOL();
|
||||
instance.m_PageNumber = FromUTF8();
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
default:
|
||||
Expecting( "path or page" );
|
||||
}
|
||||
}
|
||||
|
||||
aScreen->m_sheetInstances.emplace_back( instance );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
Expecting( "path" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_SEXPR_PARSER::parseSchSymbolInstances( SCH_SCREEN* aScreen )
|
||||
{
|
||||
wxCHECK_RET( CurTok() == T_symbol_instances,
|
||||
@ -2020,6 +2077,13 @@ void SCH_SEXPR_PARSER::ParseSchematic( SCH_SHEET* aSheet, bool aIsCopyableOnly,
|
||||
screen->Append( static_cast<SCH_ITEM*>( parseSchText() ) );
|
||||
break;
|
||||
|
||||
case T_sheet_instances:
|
||||
if( aIsCopyableOnly )
|
||||
Unexpected( T_sheet_instances );
|
||||
|
||||
parseSchSheetInstances( screen );
|
||||
break;
|
||||
|
||||
case T_symbol_instances:
|
||||
if( aIsCopyableOnly )
|
||||
Unexpected( T_symbol_instances );
|
||||
|
@ -186,6 +186,7 @@ class SCH_SEXPR_PARSER : public SCHEMATIC_LEXER
|
||||
void parsePAGE_INFO( PAGE_INFO& aPageInfo );
|
||||
void parseTITLE_BLOCK( TITLE_BLOCK& aTitleBlock );
|
||||
void parseSchSymbolInstances( SCH_SCREEN* aScreen );
|
||||
void parseSchSheetInstances( SCH_SCREEN* aScreen );
|
||||
|
||||
SCH_SHEET_PIN* parseSchSheetPin( SCH_SHEET* aSheet );
|
||||
SCH_FIELD* parseSchField( SCH_ITEM* aParent );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user