From a42490e0f35c9051d4fc12071190d5c4ab3afcf2 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 15 Apr 2012 22:18:41 -0500 Subject: [PATCH] work on footprint plugin API --- common/base_screen.cpp | 9 - common/drawframe.cpp | 2 +- common/footprint_info.cpp | 89 +- .../dialogs/dialog_edit_component_in_lib.cpp | 1 - .../dialog_edit_component_in_lib_base.cpp | 21 +- .../dialog_edit_component_in_lib_base.fbp | 6620 ++++++++--------- .../dialog_edit_component_in_lib_base.h | 7 +- ...dialog_edit_component_in_schematic_fbp.fbp | 5400 +++++++------- eeschema/dialogs/dialog_lib_new_component.fbp | 3206 ++++---- .../dialogs/dialog_lib_new_component_base.cpp | 473 +- .../dialogs/dialog_lib_new_component_base.h | 148 +- eeschema/libeditframe.cpp | 2 +- include/class_base_screen.h | 7 - include/dialog_helpers.h | 68 - include/footprint_info.h | 1 + include/pcbstruct.h | 11 +- pcbnew/CMakeLists.txt | 2 +- ...pp => class_footprint_library.cpp.notused} | 0 ...ry.h => class_footprint_library.h.notused} | 11 +- pcbnew/class_module.h | 6 + pcbnew/classpcb.cpp | 49 +- pcbnew/io_mgr.cpp | 63 +- pcbnew/io_mgr.h | 92 +- pcbnew/legacy_plugin.cpp | 443 +- pcbnew/legacy_plugin.h | 40 +- pcbnew/librairi.cpp | 120 +- pcbnew/loadcmp.cpp | 18 +- pcbnew/modview.cpp | 1 - pcbnew/modview_frame.h | 1 - pcbnew/specctra_export.cpp | 1 - 30 files changed, 8860 insertions(+), 8052 deletions(-) rename pcbnew/{class_footprint_library.cpp => class_footprint_library.cpp.notused} (100%) rename pcbnew/{class_footprint_library.h => class_footprint_library.h.notused} (90%) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index 89c757134b..f9895a287c 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -116,15 +116,6 @@ void BASE_SCREEN::SetScalingFactor(double aScale ) } -void BASE_SCREEN::SetZoomList( const wxArrayDouble& zoomlist ) -{ - if( !m_ZoomList.IsEmpty() ) - m_ZoomList.Empty(); - - m_ZoomList = zoomlist; -} - - bool BASE_SCREEN::SetFirstZoom() { if( m_ZoomList.IsEmpty() ) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 14ca16430d..63cf484890 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -369,7 +369,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) else { id--; - int selectedZoom = GetScreen()->m_ZoomList[id]; + double selectedZoom = GetScreen()->m_ZoomList[id]; if( GetScreen()->GetZoom() == selectedZoom ) return; diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index 7e4797fa73..a8af4e515d 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -39,9 +40,8 @@ * ...... other data (pads, outlines ..) * $Endmodule */ -bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString & aFootprintsLibNames ) +bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintsLibNames ) { - FILE* file; wxFileName filename; wxString libname; @@ -50,7 +50,9 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString & aFootprintsLibNames ) m_filesInvalid.Empty(); m_List.clear(); - /* Parse Libraries Listed */ + PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); + + // Parse Libraries Listed for( unsigned ii = 0; ii < aFootprintsLibNames.GetCount(); ii++ ) { filename = aFootprintsLibNames[ii]; @@ -64,82 +66,28 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString & aFootprintsLibNames ) continue; } - /* Open library file */ - file = wxFopen( libname, wxT( "rt" ) ); - - if( file == NULL ) + try { - m_filesInvalid << libname << _(" (file cannot be opened)") << wxT("\n"); - continue; - } + wxArrayString fpnames = pi->FootprintEnumerate( libname ); - FILE_LINE_READER fileReader( file, libname ); - FILTER_READER reader( fileReader ); - - /* Read header. */ - reader.ReadLine(); - char * line = reader.Line(); - StrPurge( line ); - - if( strnicmp( line, FOOTPRINT_LIBRARY_HEADER, FOOTPRINT_LIBRARY_HEADER_CNT ) != 0 ) - { - wxString msg; - msg.Printf( _( "<%s> is not a valid KiCad PCB footprint library." ), - GetChars( libname ) ); - m_filesInvalid << msg << wxT("\n"); - continue; - } - - // Read library - bool end = false; - while( !end && reader.ReadLine() ) - { - line = reader.Line(); - StrPurge( line ); - if( strnicmp( line, "$EndLIBRARY", 11 ) == 0 ) - { - end = true; - break; - } - if( strnicmp( line, "$MODULE", 7 ) == 0 ) + for( unsigned i=0; i m( pi->FootprintLoad( libname, fpnames[i] ) ); - line += 7; - FOOTPRINT_INFO* ItemLib = new FOOTPRINT_INFO(); - ItemLib->m_Module = FROM_UTF8( StrPurge( line ) ); - ItemLib->m_LibName = libname; - AddItem( ItemLib ); + FOOTPRINT_INFO* fpinfo = new FOOTPRINT_INFO(); - while( reader.ReadLine() ) - { - line = reader.Line(); - StrPurge( line ); - if( strnicmp( line, "$EndMODULE", 10 ) == 0 ) - break; + fpinfo->m_Module = fpnames[i]; + fpinfo->m_LibName = libname; + fpinfo->m_padCount = m->GetPadCount(); + fpinfo->m_KeyWord = m->GetKeywords(); + fpinfo->m_Doc = m->GetDescription(); - if( strnicmp( line, "$PAD", 4 ) == 0 ) - ItemLib->m_padCount++; - - int id = ((line[0] & 0xFF) << 8) + (line[1] & 0xFF); - switch( id ) - { - /* KeyWords */ - case (('K'<<8) + 'w'): - ItemLib->m_KeyWord = FROM_UTF8( StrPurge( line + 3 ) ); - break; - - /* Doc */ - case (('C'<<8) + 'd'): - ItemLib->m_Doc = FROM_UTF8( StrPurge( line + 3 ) ); - break; - } - } + AddItem( fpinfo ); } } - - if( !end ) + catch( IO_ERROR ioe ) { - m_filesInvalid << libname << _(" (Unexpected end of file)") << wxT("\n"); + m_filesInvalid << ioe.errorText << wxT("\n"); } } @@ -147,3 +95,4 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString & aFootprintsLibNames ) return true; } + diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index 2568908c28..262fd77d17 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -39,7 +39,6 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY() */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::initDlg() { - SetFocus(); m_AliasLocation = -1; LIB_COMPONENT* component = m_Parent->GetComponent(); diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp b/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp index 8fff9d8f3c..11d0ce68eb 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -50,6 +50,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_OptionsBoxSizer->Add( m_PinsNameInsideButt, 0, wxALL, 5 ); + bSizerBasicPanel->Add( m_OptionsBoxSizer, 0, 0, 5 ); m_staticline3 = new wxStaticLine( m_PanelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); @@ -70,6 +71,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_SelNumberOfUnits = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 26, 1 ); bSizernbunits->Add( m_SelNumberOfUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + bSizerMidBasicPanel->Add( bSizernbunits, 1, wxEXPAND, 5 ); wxBoxSizer* bSizer17; @@ -84,8 +86,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_SetSkew = new wxSpinCtrl( m_PanelBasic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 0 ); bSizer17->Add( m_SetSkew, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerMidBasicPanel->Add( bSizer17, 1, wxEXPAND, 5 ); + bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( m_PanelBasic, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); @@ -101,6 +105,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx bSizerBasicPanel->Add( m_OptionPartsLocked, 0, wxALL, 5 ); + m_PanelBasic->SetSizer( bSizerBasicPanel ); m_PanelBasic->Layout(); bSizerBasicPanel->Fit( m_PanelBasic ); @@ -145,8 +150,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_buttonBrowseDocFiles = new wxButton( m_PanelDoc, ID_BROWSE_DOC_FILES, _("Browse DocFiles"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerPaneldocbutts->Add( m_buttonBrowseDocFiles, 0, wxALL, 5 ); + m_PanelDocBoxSizer->Add( bSizerPaneldocbutts, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + m_PanelDoc->SetSizer( m_PanelDocBoxSizer ); m_PanelDoc->Layout(); m_PanelDocBoxSizer->Fit( m_PanelDoc ); @@ -167,6 +174,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_PartAliasListCtrl = new wxListBox( m_PanelAlias, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); bLeftBoxSizerPanelAlias->Add( m_PartAliasListCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerMainPanelAlias->Add( bLeftBoxSizerPanelAlias, 1, wxEXPAND, 5 ); wxBoxSizer* bRightBoxSizerPanelAlias; @@ -181,8 +189,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_ButtonDeleteAllAlias = new wxButton( m_PanelAlias, ID_DELETE_ALL_ALIAS, _("Delete All"), wxDefaultPosition, wxDefaultSize, 0 ); bRightBoxSizerPanelAlias->Add( m_ButtonDeleteAllAlias, 0, wxALL, 5 ); + bSizerMainPanelAlias->Add( bRightBoxSizerPanelAlias, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_PanelAlias->SetSizer( bSizerMainPanelAlias ); m_PanelAlias->Layout(); bSizerMainPanelAlias->Fit( m_PanelAlias ); @@ -203,6 +213,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_FootprintFilterListBox = new wxListBox( m_PanelFootprintFilter, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); bFpFilterLeftBoxSizer->Add( m_FootprintFilterListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bPanelFpFilterBoxSizer->Add( bFpFilterLeftBoxSizer, 1, wxEXPAND, 5 ); wxBoxSizer* bFpFilterRightBoxSizer; @@ -217,8 +228,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_ButtonDeleteAllFootprintFilter = new wxButton( m_PanelFootprintFilter, ID_DELETE_ALL_FOOTPRINT_FILTER, _("Delete All"), wxDefaultPosition, wxDefaultSize, 0 ); bFpFilterRightBoxSizer->Add( m_ButtonDeleteAllFootprintFilter, 0, wxALL|wxEXPAND, 5 ); + bPanelFpFilterBoxSizer->Add( bFpFilterRightBoxSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + m_PanelFootprintFilter->SetSizer( bPanelFpFilterBoxSizer ); m_PanelFootprintFilter->Layout(); bPanelFpFilterBoxSizer->Fit( m_PanelFootprintFilter ); @@ -226,6 +239,7 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx bUpperSizer->Add( m_NoteBook, 1, wxEXPAND, 5 ); + bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 ); m_stdSizerButton = new wxStdDialogButtonSizer(); @@ -234,10 +248,13 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wx m_stdSizerButtonCancel = new wxButton( this, wxID_CANCEL ); m_stdSizerButton->AddButton( m_stdSizerButtonCancel ); m_stdSizerButton->Realize(); + bMainSizer->Add( m_stdSizerButton, 0, wxEXPAND|wxALL, 5 ); + this->SetSizer( bMainSizer ); this->Layout(); + bMainSizer->Fit( this ); // Connect Events m_ButtonCopyDoc->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE::CopyDocToAlias ), NULL, this ); diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp b/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp index a6079ef26a..05000dcfcb 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.fbp @@ -1,3358 +1,3262 @@ - - - - - - C++ - 1 - source_name - 0 - res - UTF-8 - connect - dialog_edit_component_in_lib_base - 1000 - none - 1 - DIALOG_EDIT_COMPONENT_IN_LIBRARY_FBP - - . - - 1 - 1 - 0 - 0 - - 1 - 1 - 1 - 1 - 0 - - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - ID_LIBEDIT_NOTEBOOK - - - 0 - - - 0 - - 1 - DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE - 1 - - - 1 - - - Resizable - - 1 - 465,384 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Lib Component Properties - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bMainSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bUpperSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_NoteBook - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Options - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PanelBasic - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerBasicPanel - wxVERTICAL - none - - 5 - - 0 - - wxID_ANY - General : - - m_OptionsBoxSizer - wxVERTICAL - none - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - As Convert - - - 0 - - - 0 - - 1 - m_AsConvertButt - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check this option for components that have a De Morgan representation. This is usual for gates. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show Pin Num - - - 0 - - - 0 - - 1 - m_ShowPinNumButt - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Show or hide pin numbers - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show Pin Name - - - 0 - - - 0 - - 1 - m_ShowPinNameButt - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Show or hide pin names - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pin Name Inside - - - 0 - - - 0 - - 1 - m_PinsNameInsideButt - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check this option to have pin names inside the body and pin number outside. If not checked pins names and pins numbers are outside. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizerMidBasicPanel - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizernbunits - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Number of Units: - - - 0 - - - 0 - - 1 - m_staticTextNbUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - This is the number of parts in this component package. A 74LS00 gate has 4 parts per packages. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 1 - - 26 - - 0 - - 1 - - 0 - - 1 - m_SelNumberOfUnits - 1 - - - protected - 1 - - - Resizable - - 1 - - wxSP_ARROW_KEYS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer17 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Skew: - - - 0 - - - 0 - - 1 - m_staticTextskew - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Margin (in 0.001 inches) between a pin name position and the component body. A value from 10 to 40 is usually good. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 0 - - 100 - - 0 - - 1 - - 0 - - 1 - m_SetSkew - 1 - - - protected - 1 - - - Resizable - - 1 - - wxSP_ARROW_KEYS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Power Symbol - - - 0 - - - 0 - - 1 - m_OptionPower - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check this option for power symbols. Power symbols have specific properties for Eeschema: - Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol - Reference is updated automatically when a netlist is created (no need to run Annotate) - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Parts are locked - - - 0 - - - 0 - - 1 - m_OptionPartsLocked - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check this option if Eeschema cannot change parts selections inside a given package This happens when parts are different in this package. When this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Description - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PanelDoc - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - m_PanelDocBoxSizer - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Description: - - - 0 - - - 0 - - 1 - m_staticTextDescription - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - A short description that is displayed in Eeschema. Can be a very good help when selecting components in libraries components lists. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_DocCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Keywords: - - - 0 - - - 0 - - 1 - m_staticTextKeywords - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Enter key words that can be used to select this component. Key words cannot have spaces and are separated by a space. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_KeywordsCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - DocFileName: - - - 0 - - - 0 - - 1 - m_staticTextDocFileName - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Enter the documentation file (a .pdf document) associated to the component. - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - m_DocfileCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - 400,-1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_HORIZONTAL - 0 - - - bSizerPaneldocbutts - wxHORIZONTAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_COPY_DOC_TO_ALIAS - Copy Doc - - - 0 - - - 0 - - 1 - m_ButtonCopyDoc - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - CopyDocToAlias - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_BROWSE_DOC_FILES - Browse DocFiles - - - 0 - - - 0 - - 1 - m_buttonBrowseDocFiles - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - BrowseAndSelectDocFile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alias - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PanelAlias - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMainPanelAlias - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bLeftBoxSizerPanelAlias - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Alias List: - - - 0 - - - 0 - - 1 - m_staticTextAlias - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - An alias is a component that uses the body of its root component. It has its own documentation and keywords. A fast way to extend a library with similar components - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PartAliasListCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - - bRightBoxSizerPanelAlias - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_ADD_ALIAS - Add - - - 0 - - - 0 - - 1 - m_ButtonAddeAlias - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - AddAliasOfPart - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_DELETE_ONE_ALIAS - Delete - - - 0 - - - 0 - - 1 - m_ButtonDeleteOneAlias - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - DeleteAliasOfPart - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_DELETE_ALL_ALIAS - Delete All - - - 0 - - - 0 - - 1 - m_ButtonDeleteAllAlias - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - DeleteAllAliasOfPart - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footprint Filter - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_PanelFootprintFilter - 1 - - - protected - 1 - - - Resizable - - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bPanelFpFilterBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bFpFilterLeftBoxSizer - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Footprints - - - 0 - - - 0 - - 1 - m_staticTextFootprints - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - A list of footprints names that can be used for this component. Footprints names can used jockers. (like sm* to allow all footprints names starting by sm). - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - m_FootprintFilterListBox - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - - bFpFilterRightBoxSizer - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_ADD_FOOTPRINT_FILTER - Add - - - 0 - - - 0 - - 1 - m_buttonAddFpF - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - AddFootprintFilter - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_DELETE_ONE_FOOTPRINT_FILTER - Delete - - - 0 - - - 0 - - 1 - m_ButtonDeleteOneFootprintFilter - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - DeleteOneFootprintFilter - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_DELETE_ALL_FOOTPRINT_FILTER - Delete All - - - 0 - - - 0 - - 1 - m_ButtonDeleteAllFootprintFilter - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - DeleteAllFootprintFilter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_stdSizerButton - protected - - OnCancelClick - - - - OnOkClick - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_edit_component_in_lib_base + 1000 + none + 1 + DIALOG_EDIT_COMPONENT_IN_LIBRARY_FBP + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + ID_LIBEDIT_NOTEBOOK + + + DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Lib Component Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bUpperSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_NoteBook + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Options + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelBasic + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerBasicPanel + wxVERTICAL + none + + 5 + + 0 + + wxID_ANY + General : + + m_OptionsBoxSizer + wxVERTICAL + none + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + As Convert + + 0 + + + 0 + + 1 + m_AsConvertButt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option for components that have a De Morgan representation. This is usual for gates. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show Pin Num + + 0 + + + 0 + + 1 + m_ShowPinNumButt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Show or hide pin numbers + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show Pin Name + + 0 + + + 0 + + 1 + m_ShowPinNameButt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Show or hide pin names + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pin Name Inside + + 0 + + + 0 + + 1 + m_PinsNameInsideButt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option to have pin names inside the body and pin number outside. If not checked pins names and pins numbers are outside. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerMidBasicPanel + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizernbunits + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Number of Units: + + 0 + + + 0 + + 1 + m_staticTextNbUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the number of parts in this component package. A 74LS00 gate has 4 parts per packages. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 1 + 26 + + 0 + + 1 + + 0 + + 1 + m_SelNumberOfUnits + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer17 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Skew: + + 0 + + + 0 + + 1 + m_staticTextskew + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Margin (in 0.001 inches) between a pin name position and the component body. A value from 10 to 40 is usually good. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 100 + + 0 + + 1 + + 0 + + 1 + m_SetSkew + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Power Symbol + + 0 + + + 0 + + 1 + m_OptionPower + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option for power symbols. Power symbols have specific properties for Eeschema: - Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol - Reference is updated automatically when a netlist is created (no need to run Annotate) + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Parts are locked + + 0 + + + 0 + + 1 + m_OptionPartsLocked + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option if Eeschema cannot change parts selections inside a given package This happens when parts are different in this package. When this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Description + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelDoc + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + m_PanelDocBoxSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Description: + + 0 + + + 0 + + 1 + m_staticTextDescription + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + A short description that is displayed in Eeschema. Can be a very good help when selecting components in libraries components lists. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_DocCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Keywords: + + 0 + + + 0 + + 1 + m_staticTextKeywords + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Enter key words that can be used to select this component. Key words cannot have spaces and are separated by a space. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_KeywordsCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + DocFileName: + + 0 + + + 0 + + 1 + m_staticTextDocFileName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Enter the documentation file (a .pdf document) associated to the component. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_DocfileCtrl + 1 + + + protected + 1 + + Resizable + 1 + 400,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizerPaneldocbutts + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_COPY_DOC_TO_ALIAS + Copy Doc + + 0 + + + 0 + + 1 + m_ButtonCopyDoc + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + CopyDocToAlias + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_BROWSE_DOC_FILES + Browse DocFiles + + 0 + + + 0 + + 1 + m_buttonBrowseDocFiles + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + BrowseAndSelectDocFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Alias + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelAlias + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMainPanelAlias + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bLeftBoxSizerPanelAlias + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Alias List: + + 0 + + + 0 + + 1 + m_staticTextAlias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + An alias is a component that uses the body of its root component. It has its own documentation and keywords. A fast way to extend a library with similar components + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PartAliasListCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bRightBoxSizerPanelAlias + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ADD_ALIAS + Add + + 0 + + + 0 + + 1 + m_ButtonAddeAlias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + AddAliasOfPart + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DELETE_ONE_ALIAS + Delete + + 0 + + + 0 + + 1 + m_ButtonDeleteOneAlias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + DeleteAliasOfPart + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DELETE_ALL_ALIAS + Delete All + + 0 + + + 0 + + 1 + m_ButtonDeleteAllAlias + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + DeleteAllAliasOfPart + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Footprint Filter + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelFootprintFilter + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bPanelFpFilterBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bFpFilterLeftBoxSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Footprints + + 0 + + + 0 + + 1 + m_staticTextFootprints + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + A list of footprints names that can be used for this component. Footprints names can used jockers. (like sm* to allow all footprints names starting by sm). + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_FootprintFilterListBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bFpFilterRightBoxSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ADD_FOOTPRINT_FILTER + Add + + 0 + + + 0 + + 1 + m_buttonAddFpF + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + AddFootprintFilter + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DELETE_ONE_FOOTPRINT_FILTER + Delete + + 0 + + + 0 + + 1 + m_ButtonDeleteOneFootprintFilter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + DeleteOneFootprintFilter + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_DELETE_ALL_FOOTPRINT_FILTER + Delete All + + 0 + + + 0 + + 1 + m_ButtonDeleteAllFootprintFilter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + DeleteAllFootprintFilter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_stdSizerButton + protected + + OnCancelClick + + + + OnOkClick + + + + + + + + diff --git a/eeschema/dialogs/dialog_edit_component_in_lib_base.h b/eeschema/dialogs/dialog_edit_component_in_lib_base.h index b45283b44d..202202e8d6 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib_base.h +++ b/eeschema/dialogs/dialog_edit_component_in_lib_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 30 2011) +// C++ code generated with wxFormBuilder (version Apr 11 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,7 @@ #include #include #include +#include "dialog_shim.h" #include #include #include @@ -47,7 +48,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public wxDialog +class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public DIALOG_SHIM { private: @@ -106,7 +107,7 @@ class DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE : public wxDialog public: - DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id = ID_LIBEDIT_NOTEBOOK, const wxString& title = _("Lib Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 465,384 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( wxWindow* parent, wxWindowID id = ID_LIBEDIT_NOTEBOOK, const wxString& title = _("Lib Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE(); }; diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp index b103568505..3a99632ae6 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp @@ -1,2700 +1,2700 @@ - - - - - ; - C++ - 1 - source_name - 0 - res - ANSI - connect - dialog_edit_component_in_schematic_fbp - 1000 - none - 1 - - - . - - 1 - 1 - 0 - 0 - - 1 - 1 - 1 - 1 - 0 - - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP - 1 - - - 1 - - - Resizable - - 1 - 700,521 - wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU - - Component Properties - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mainSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - upperSizer - wxHORIZONTAL - none - - 5 - wxALIGN_TOP|wxALL|wxEXPAND - 0 - - wxID_ANY - Options - - optionsSizer - wxVERTICAL - none - - - 8 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - wxID_ANY - Unit - - unitSizer - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - - 1 - unitChoice - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxLEFT|wxRIGHT|wxTOP|wxEXPAND - 0 - - - orientationSizer - wxHORIZONTAL - none - - 8 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "0" "+90" "180" "-90" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Orientation (Degrees) - - 1 - - 0 - - - 0 - - 1 - orientationRadioBox - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Select if the component is to be rotated when drawn - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxLEFT|wxRIGHT|wxTOP|wxEXPAND - 0 - - - mirrorSizer - wxHORIZONTAL - none - - 8 - wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Normal" "Mirror ---" "Mirror |" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Mirror - - 1 - - 0 - - - 0 - - 1 - mirrorRadioBox - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Pick the graphical transformation to be used when displaying the component, if any - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 0 - - wxID_ANY - Chip Name - - chipnameSizer - wxHORIZONTAL - none - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 32 - - 0 - - 1 - chipnameTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The name of the symbol in the library from which this component came - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Convert - - - 0 - - - 0 - - 1 - convertCheckBox - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Use the alternate shape of this component. For gates, this is the "De Morgan" conversion - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Parts are locked - - - 0 - - - 0 - - 1 - partsAreLockedLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Reset to Library Defaults - - - 0 - - - 0 - - 1 - defaultsButton - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Set position and style of fields and component orientation to default lib value. Fields texts are not modified. - - wxFILTER_NONE - wxDefaultValidator - - - - - SetInitCmp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - wxID_ANY - Fields - - fieldsSizer - wxHORIZONTAL - none - - - 8 - wxEXPAND|wxRIGHT|wxLEFT - 3 - - wxID_ANY - - - gridStaticBoxSizer - wxVERTICAL - none - - - 8 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - - 0 - 220,-1 - 1 - fieldListCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnListItemDeselected - - - - OnListItemSelected - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Add Field - - - 0 - - - 0 - - 1 - addFieldButton - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Add a new custom field - - wxFILTER_NONE - wxDefaultValidator - - - - - addFieldButtonHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Delete Field - - - 0 - - - 0 - - 1 - deleteFieldButton - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Delete one of the optional fields - - wxFILTER_NONE - wxDefaultValidator - - - - - deleteFieldButtonHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Move Up - - - 0 - - - 0 - - 1 - moveUpButton - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Move the selected optional fields up one position - - wxFILTER_NONE - wxDefaultValidator - - - - - moveUpButtonHandler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 2 - - - fieldEditBoxSizer - wxVERTICAL - none - - 5 - wxEXPAND - 0 - - wxID_ANY - Text Justification: - - sbSizerOptions - wxHORIZONTAL - none - - - 5 - wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Left" "Center" "Right" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Horiz. Justify - - 1 - - 0 - - - 0 - - 1 - m_FieldHJustifyCtrl - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Bottom" "Center" "Top" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Vert. Justify - - 1 - - 0 - - - 0 - - 1 - m_FieldVJustifyCtrl - 1 - - - protected - 1 - - - Resizable - - 2 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxTOP - 0 - - wxID_ANY - Visibility - - visibilitySizer - wxHORIZONTAL - none - - - 5 - wxALIGN_CENTER_VERTICAL - 1 - - - bShowRotateSizer - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show - - - 0 - - - 0 - - 1 - showCheckBox - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check if you want this field visible - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotate - - - 0 - - - 0 - - 1 - rotateCheckBox - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - Check if you want this field's text rotated 90 degrees - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - "Normal" "Italic" "Bold" "Bold Italic" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Style: - - 1 - - 0 - - - 0 - - 1 - m_StyleRadioBox - 1 - - - protected - 1 - - - Resizable - - 3 - 1 - - wxRA_SPECIFY_COLS - - 0 - The style of the currently selected field's text in the schemati - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - fieldNameBoxSizer - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Field Name - - - 0 - - - 0 - - 1 - fieldNameLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - fieldNameTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The name of the currently selected field Some fixed fields names are not editable - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - fieldTextBoxSizer - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Field Value - - - 0 - - - 0 - - 1 - fieldValueLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - fieldValueTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The text (or value) of the currently selected field - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - textSizeBoxSizer - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size(") - - - 0 - - - 0 - - 1 - textSizeLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - textSizeTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The size of the currently selected field's text in the schematic - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - positionBoxSizer - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 1 - - - posXBoxSizer - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - PosX(") - - - 0 - - - 0 - - 1 - posXLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - posXTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The X coordinate of the text relative to the component - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - - posYBoxSizer - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - PosY(") - - - 0 - - - 0 - - 1 - posYLabel - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - - 0 - - 0 - - 0 - - 1 - posYTextCtrl - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - The Y coordinate of the text relative to the component - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - wxALL|wxEXPAND - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - stdDialogButtonSizer - protected - - OnCancelButtonClick - - - - OnOKButtonClick - - - - - - - - + + + + + ; + C++ + 1 + source_name + 0 + res + ANSI + connect + dialog_edit_component_in_schematic_fbp + 1000 + none + 1 + + + . + + 1 + 1 + 0 + 0 + + 1 + 1 + 1 + 1 + 0 + + + + + 1 + + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + impl_virtual + + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP + 1 + + + 1 + + + Resizable + + 1 + 700,521 + wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU + + Component Properties + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + upperSizer + wxHORIZONTAL + none + + 5 + wxALIGN_TOP|wxALL|wxEXPAND + 0 + + wxID_ANY + Options + + optionsSizer + wxVERTICAL + none + + + 8 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + wxID_ANY + Unit + + unitSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + unitChoice + 1 + + + protected + 1 + + + Resizable + + 0 + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxLEFT|wxRIGHT|wxTOP|wxEXPAND + 0 + + + orientationSizer + wxHORIZONTAL + none + + 8 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "0" "+90" "180" "-90" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Orientation (Degrees) + + 1 + + 0 + + + 0 + + 1 + orientationRadioBox + 1 + + + protected + 1 + + + Resizable + + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Select if the component is to be rotated when drawn + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxLEFT|wxRIGHT|wxTOP|wxEXPAND + 0 + + + mirrorSizer + wxHORIZONTAL + none + + 8 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "Normal" "Mirror ---" "Mirror |" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Mirror + + 1 + + 0 + + + 0 + + 1 + mirrorRadioBox + 1 + + + protected + 1 + + + Resizable + + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Pick the graphical transformation to be used when displaying the component, if any + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 0 + + wxID_ANY + Chip Name + + chipnameSizer + wxHORIZONTAL + none + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 32 + + 0 + + 1 + chipnameTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The name of the symbol in the library from which this component came + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Convert + + + 0 + + + 0 + + 1 + convertCheckBox + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Use the alternate shape of this component. For gates, this is the "De Morgan" conversion + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Parts are locked + + + 0 + + + 0 + + 1 + partsAreLockedLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Reset to Library Defaults + + + 0 + + + 0 + + 1 + defaultsButton + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Set position and style of fields and component orientation to default lib value. Fields texts are not modified. + + wxFILTER_NONE + wxDefaultValidator + + + + + SetInitCmp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Fields + + fieldsSizer + wxHORIZONTAL + none + + + 8 + wxEXPAND|wxRIGHT|wxLEFT + 3 + + wxID_ANY + + + gridStaticBoxSizer + wxVERTICAL + none + + + 8 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + 220,-1 + 1 + fieldListCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnListItemDeselected + + + + OnListItemSelected + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Add Field + + + 0 + + + 0 + + 1 + addFieldButton + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Add a new custom field + + wxFILTER_NONE + wxDefaultValidator + + + + + addFieldButtonHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Delete Field + + + 0 + + + 0 + + 1 + deleteFieldButton + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Delete one of the optional fields + + wxFILTER_NONE + wxDefaultValidator + + + + + deleteFieldButtonHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Move Up + + + 0 + + + 0 + + 1 + moveUpButton + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Move the selected optional fields up one position + + wxFILTER_NONE + wxDefaultValidator + + + + + moveUpButtonHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 2 + + + fieldEditBoxSizer + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + wxID_ANY + Text Justification: + + sbSizerOptions + wxHORIZONTAL + none + + + 5 + wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "Left" "Center" "Right" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Horiz. Justify + + 1 + + 0 + + + 0 + + 1 + m_FieldHJustifyCtrl + 1 + + + protected + 1 + + + Resizable + + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "Bottom" "Center" "Top" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Vert. Justify + + 1 + + 0 + + + 0 + + 1 + m_FieldVJustifyCtrl + 1 + + + protected + 1 + + + Resizable + + 2 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP + 0 + + wxID_ANY + Visibility + + visibilitySizer + wxHORIZONTAL + none + + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + + bShowRotateSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show + + + 0 + + + 0 + + 1 + showCheckBox + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Check if you want this field visible + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotate + + + 0 + + + 0 + + 1 + rotateCheckBox + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + Check if you want this field's text rotated 90 degrees + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + "Normal" "Italic" "Bold" "Bold Italic" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Style: + + 1 + + 0 + + + 0 + + 1 + m_StyleRadioBox + 1 + + + protected + 1 + + + Resizable + + 3 + 1 + + wxRA_SPECIFY_COLS + + 0 + The style of the currently selected field's text in the schemati + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + fieldNameBoxSizer + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Field Name + + + 0 + + + 0 + + 1 + fieldNameLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + fieldNameTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The name of the currently selected field Some fixed fields names are not editable + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + fieldTextBoxSizer + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Field Value + + + 0 + + + 0 + + 1 + fieldValueLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + fieldValueTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The text (or value) of the currently selected field + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + textSizeBoxSizer + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size(") + + + 0 + + + 0 + + 1 + textSizeLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + textSizeTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The size of the currently selected field's text in the schematic + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + positionBoxSizer + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + posXBoxSizer + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + PosX(") + + + 0 + + + 0 + + 1 + posXLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + posXTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The X coordinate of the text relative to the component + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + posYBoxSizer + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + PosY(") + + + 0 + + + 0 + + 1 + posYLabel + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + posYTextCtrl + 1 + + + protected + 1 + + + Resizable + + 1 + + + + 0 + The Y coordinate of the text relative to the component + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + stdDialogButtonSizer + protected + + OnCancelButtonClick + + + + OnOKButtonClick + + + + + + + + diff --git a/eeschema/dialogs/dialog_lib_new_component.fbp b/eeschema/dialogs/dialog_lib_new_component.fbp index 21b0b26092..54660f05a6 100644 --- a/eeschema/dialogs/dialog_lib_new_component.fbp +++ b/eeschema/dialogs/dialog_lib_new_component.fbp @@ -1,1307 +1,1899 @@ - - - - - - C++ - 1 - UTF-8 - table - dialog_lib_new_component_base - 1000 - none - 1 - dialog_lib_new_component - - . - - 1 - 1 - 0 - - - wxBOTH - - 1 - - - - 0 - wxID_ANY - - - DIALOG_LIB_NEW_COMPONENT_BASE - - - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Component Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mainSizer - wxHORIZONTAL - none - - 12 - wxALL|wxEXPAND - 1 - - - bSizer5 - wxVERTICAL - none - - 3 - wxALIGN_LEFT - 0 - - - - 1 - - ,90,92,-1,70,0 - 0 - wxID_ANY - General Settings - - - m_staticText6 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer2 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - Component &name: - - - m_staticText2 - protected - - - - - This is the component name in library, and also the default component value when loaded in the schematic. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textName - protected - - 100,-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxEXPAND - 0 - - 0 - protected - 30 - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer3 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - Default &reference designator: - - - m_staticText3 - protected - - - - - This is the reference used in schematic for annotation. Do not use digits in reference. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textReference - protected - - 100,-1 - - - - U - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 0 - protected - 30 - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer4 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - Number of &parts per package: - - - m_staticText4 - protected - - - - - This is the number of parts in this component package. A 74LS00 gate has 4 parts per packages. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - 0 - 26 - - 1 - - m_spinPartCount - protected - - 100,-1 - wxSP_ARROW_KEYS - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxEXPAND - 0 - - 0 - protected - 30 - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer7 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 0 - - 1 - - - 0 - wxID_ANY - Create component with &alternate body style (DeMorgan) - - - m_checkHasConversion - protected - - - - - Check this option for components that have a De Morgan representation. This is usual for gates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer8 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 0 - - 1 - - - 0 - wxID_ANY - Create component as power &symbol - - - m_checkIsPowerSymbol - protected - - - - - Check this option for power symbols. Power symbols have specific properties for Eeschema: - Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol - Reference is updated automatically when a netlist is created (no need to run Annotate) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer9 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 0 - - 1 - - - 0 - wxID_ANY - Parts in package locked (cannot be swapped) - - - m_checkLockItems - protected - - - - - Check this option if Eeschema cannot change parts selections inside a given package This happens when parts are different in this package. When this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - wxALL|wxEXPAND - 0 - - 0 - protected - 0 - - - - 3 - wxALIGN_LEFT|wxBOTTOM - 0 - - - - 1 - - ,90,92,-1,70,0 - 0 - wxID_ANY - Global Pin Settings - - - m_staticText7 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 1 - - - bSizer6 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - Pin text position &offset: - - - m_staticText41 - protected - - - - - Margin (in 0.001 inches) between a pin name position and the component body. A value from 10 to 40 is usually good. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - 40 - 100 - - 1 - - m_spinPinTextPosition - protected - - 100,-1 - wxSP_ARROW_KEYS - - - 40 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - mils - - - m_staticText5 - protected - - 30,-1 - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer10 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 1 - - 1 - - - 0 - wxID_ANY - Show pin n&umber text - - - m_checkShowPinNumber - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxALL|wxEXPAND - 0 - - - bSizer12 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 1 - - 1 - - - 0 - wxID_ANY - Show pin name te&xt - - - m_checkShowPinName - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizer121 - wxHORIZONTAL - none - - 3 - wxEXPAND - 0 - - 0 - protected - 12 - - - - 3 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - 1 - - 1 - - - 0 - wxID_ANY - Pin name &inside - - - m_checkShowPinNameInside - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - wxALL|wxEXPAND - 0 - - 5 - protected - 0 - - - - 0 - wxALL|wxEXPAND - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizer - protected - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + table + dialog_lib_new_component_base + 1000 + none + 1 + dialog_lib_new_component + + . + + 1 + 1 + 1 + 1 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_LIB_NEW_COMPONENT_BASE + + + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Component Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxHORIZONTAL + none + + 12 + wxALL|wxEXPAND + 1 + + + bSizer5 + wxVERTICAL + none + + 3 + wxALIGN_LEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + General Settings + + 0 + + + 0 + + 1 + m_staticText6 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Component &name: + + 0 + + + 0 + + 1 + m_staticText2 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the component name in library, and also the default component value when loaded in the schematic. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textName + 1 + + + protected + 1 + + Resizable + 1 + 100,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND + 0 + + 0 + protected + 30 + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer3 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Default &reference designator: + + 0 + + + 0 + + 1 + m_staticText3 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the reference used in schematic for annotation. Do not use digits in reference. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textReference + 1 + + + protected + 1 + + Resizable + 1 + 100,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + U + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 0 + protected + 30 + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer4 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Number of &parts per package: + + 0 + + + 0 + + 1 + m_staticText4 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the number of parts in this component package. A 74LS00 gate has 4 parts per packages. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 26 + + 0 + + 1 + + 0 + + 1 + m_spinPartCount + 1 + + + protected + 1 + + Resizable + 1 + 100,-1 + wxSP_ARROW_KEYS + + 0 + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND + 0 + + 0 + protected + 30 + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer7 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Create component with &alternate body style (DeMorgan) + + 0 + + + 0 + + 1 + m_checkHasConversion + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option for components that have a De Morgan representation. This is usual for gates. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer8 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Create component as power &symbol + + 0 + + + 0 + + 1 + m_checkIsPowerSymbol + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option for power symbols. Power symbols have specific properties for Eeschema: - Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol - Reference is updated automatically when a netlist is created (no need to run Annotate) + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer9 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Parts in package locked (cannot be swapped) + + 0 + + + 0 + + 1 + m_checkLockItems + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Check this option if Eeschema cannot change parts selections inside a given package This happens when parts are different in this package. When this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALL|wxEXPAND + 0 + + 0 + protected + 0 + + + + 3 + wxALIGN_LEFT|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Global Pin Settings + + 0 + + + 0 + + 1 + m_staticText7 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 1 + + + bSizer6 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pin text position &offset: + + 0 + + + 0 + + 1 + m_staticText41 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Margin (in 0.001 inches) between a pin name position and the component body. A value from 10 to 40 is usually good. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 40 + 100 + + 0 + + 1 + + 0 + + 1 + m_spinPinTextPosition + 1 + + + protected + 1 + + Resizable + 1 + 100,-1 + wxSP_ARROW_KEYS + + 0 + + 40 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + + 0 + + + 0 + + 1 + m_staticText5 + 1 + + + protected + 1 + + Resizable + 1 + 30,-1 + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer10 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show pin n&umber text + + 0 + + + 0 + + 1 + m_checkShowPinNumber + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + bSizer12 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show pin name te&xt + + 0 + + + 0 + + 1 + m_checkShowPinName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer121 + wxHORIZONTAL + none + + 3 + wxEXPAND + 0 + + 0 + protected + 12 + + + + 3 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pin name &inside + + 0 + + + 0 + + 1 + m_checkShowPinNameInside + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxALL|wxEXPAND + 0 + + 5 + protected + 0 + + + + 0 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer + protected + + + + + + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_lib_new_component_base.cpp b/eeschema/dialogs/dialog_lib_new_component_base.cpp index 350860ee53..37f30b736c 100644 --- a/eeschema/dialogs/dialog_lib_new_component_base.cpp +++ b/eeschema/dialogs/dialog_lib_new_component_base.cpp @@ -1,233 +1,240 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_lib_new_component_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* mainSizer; - mainSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer5; - bSizer5 = new wxBoxSizer( wxVERTICAL ); - - m_staticText6 = new wxStaticText( this, wxID_ANY, _("General Settings"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText6->Wrap( -1 ); - m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bSizer5->Add( m_staticText6, 0, wxALIGN_LEFT, 3 ); - - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer2->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Component &name:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - m_staticText2->SetToolTip( _("This is the component name in library,\nand also the default component value when loaded in the schematic.") ); - - bSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer2->Add( 0, 0, 1, wxEXPAND, 3 ); - - m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 100,-1 ), 0 ); - bSizer2->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer2->Add( 30, 0, 0, wxEXPAND, 3 ); - - bSizer5->Add( bSizer2, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer3; - bSizer3 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer3->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_staticText3 = new wxStaticText( this, wxID_ANY, _("Default &reference designator:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3->Wrap( -1 ); - m_staticText3->SetToolTip( _("This is the reference used in schematic for annotation.\nDo not use digits in reference.") ); - - bSizer3->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_textReference = new wxTextCtrl( this, wxID_ANY, _("U"), wxDefaultPosition, wxSize( 100,-1 ), 0 ); - bSizer3->Add( m_textReference, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer3->Add( 30, 0, 0, wxEXPAND, 5 ); - - bSizer5->Add( bSizer3, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer4; - bSizer4 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer4->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_staticText4 = new wxStaticText( this, wxID_ANY, _("Number of &parts per package:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - m_staticText4->SetToolTip( _("This is the number of parts in this component package.\nA 74LS00 gate has 4 parts per packages.") ); - - bSizer4->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer4->Add( 0, 0, 1, wxEXPAND, 3 ); - - m_spinPartCount = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 26, 0 ); - bSizer4->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer4->Add( 30, 0, 0, wxEXPAND, 3 ); - - bSizer5->Add( bSizer4, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer7; - bSizer7 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer7->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create component with &alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkHasConversion->SetToolTip( _("Check this option for components that have a De Morgan representation.\nThis is usual for gates.") ); - - bSizer7->Add( m_checkHasConversion, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer7, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer8; - bSizer8 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer8->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkIsPowerSymbol = new wxCheckBox( this, wxID_ANY, _("Create component as power &symbol"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkIsPowerSymbol->SetToolTip( _("Check this option for power symbols.\nPower symbols have specific properties for Eeschema:\n- Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol\n- Reference is updated automatically when a netlist is created (no need to run Annotate)") ); - - bSizer8->Add( m_checkIsPowerSymbol, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer8, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer9; - bSizer9 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer9->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkLockItems = new wxCheckBox( this, wxID_ANY, _("Parts in package locked (cannot be swapped)"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkLockItems->SetToolTip( _("Check this option if Eeschema cannot change parts selections inside a given package\nThis happens when parts are different in this package.\nWhen this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count") ); - - bSizer9->Add( m_checkLockItems, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer9, 0, wxALL|wxEXPAND, 0 ); - - - bSizer5->Add( 0, 0, 0, wxALL|wxEXPAND, 10 ); - - m_staticText7 = new wxStaticText( this, wxID_ANY, _("Global Pin Settings"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText7->Wrap( -1 ); - m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); - - bSizer5->Add( m_staticText7, 0, wxALIGN_LEFT|wxBOTTOM, 3 ); - - wxBoxSizer* bSizer6; - bSizer6 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer6->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_staticText41 = new wxStaticText( this, wxID_ANY, _("Pin text position &offset:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText41->Wrap( -1 ); - m_staticText41->SetToolTip( _("Margin (in 0.001 inches) between a pin name position and the component body.\nA value from 10 to 40 is usually good.") ); - - bSizer6->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - - bSizer6->Add( 0, 0, 1, wxEXPAND, 3 ); - - m_spinPinTextPosition = new wxSpinCtrl( this, wxID_ANY, wxT("40"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 100, 40 ); - bSizer6->Add( m_spinPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - m_staticText5 = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxSize( 30,-1 ), 0 ); - m_staticText5->Wrap( -1 ); - bSizer6->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 3 ); - - bSizer5->Add( bSizer6, 1, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer10->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkShowPinNumber = new wxCheckBox( this, wxID_ANY, _("Show pin n&umber text"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkShowPinNumber->SetValue(true); - - bSizer10->Add( m_checkShowPinNumber, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer10, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer12; - bSizer12 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer12->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkShowPinName = new wxCheckBox( this, wxID_ANY, _("Show pin name te&xt"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkShowPinName->SetValue(true); - - bSizer12->Add( m_checkShowPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer12, 0, wxALL|wxEXPAND, 0 ); - - wxBoxSizer* bSizer121; - bSizer121 = new wxBoxSizer( wxHORIZONTAL ); - - - bSizer121->Add( 12, 0, 0, wxEXPAND, 3 ); - - m_checkShowPinNameInside = new wxCheckBox( this, wxID_ANY, _("Pin name &inside"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkShowPinNameInside->SetValue(true); - - bSizer121->Add( m_checkShowPinNameInside, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - - bSizer5->Add( bSizer121, 1, wxEXPAND, 5 ); - - - bSizer5->Add( 0, 5, 0, wxALL|wxEXPAND, 10 ); - - m_sdbSizer = new wxStdDialogButtonSizer(); - m_sdbSizerOK = new wxButton( this, wxID_OK ); - m_sdbSizer->AddButton( m_sdbSizerOK ); - m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizer->AddButton( m_sdbSizerCancel ); - m_sdbSizer->Realize(); - bSizer5->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 0 ); - - mainSizer->Add( bSizer5, 1, wxALL|wxEXPAND, 12 ); - - this->SetSizer( mainSizer ); - this->Layout(); - mainSizer->Fit( this ); - - this->Centre( wxBOTH ); -} - -DIALOG_LIB_NEW_COMPONENT_BASE::~DIALOG_LIB_NEW_COMPONENT_BASE() -{ -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_lib_new_component_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_staticText6 = new wxStaticText( this, wxID_ANY, _("General Settings"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6->Wrap( -1 ); + m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bSizer5->Add( m_staticText6, 0, wxALIGN_LEFT, 3 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer2->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Component &name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + m_staticText2->SetToolTip( _("This is the component name in library,\nand also the default component value when loaded in the schematic.") ); + + bSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer2->Add( 0, 0, 1, wxEXPAND, 3 ); + + m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 100,-1 ), 0 ); + bSizer2->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer2->Add( 30, 0, 0, wxEXPAND, 3 ); + + + bSizer5->Add( bSizer2, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer3->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, _("Default &reference designator:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + m_staticText3->SetToolTip( _("This is the reference used in schematic for annotation.\nDo not use digits in reference.") ); + + bSizer3->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_textReference = new wxTextCtrl( this, wxID_ANY, _("U"), wxDefaultPosition, wxSize( 100,-1 ), 0 ); + bSizer3->Add( m_textReference, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer3->Add( 30, 0, 0, wxEXPAND, 5 ); + + + bSizer5->Add( bSizer3, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer4->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, _("Number of &parts per package:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + m_staticText4->SetToolTip( _("This is the number of parts in this component package.\nA 74LS00 gate has 4 parts per packages.") ); + + bSizer4->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer4->Add( 0, 0, 1, wxEXPAND, 3 ); + + m_spinPartCount = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 26, 0 ); + bSizer4->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer4->Add( 30, 0, 0, wxEXPAND, 3 ); + + + bSizer5->Add( bSizer4, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer7->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create component with &alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkHasConversion->SetToolTip( _("Check this option for components that have a De Morgan representation.\nThis is usual for gates.") ); + + bSizer7->Add( m_checkHasConversion, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer7, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer8->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkIsPowerSymbol = new wxCheckBox( this, wxID_ANY, _("Create component as power &symbol"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkIsPowerSymbol->SetToolTip( _("Check this option for power symbols.\nPower symbols have specific properties for Eeschema:\n- Value cannot be edited (to avoid mistakes) because this is the pin name that is important for a power symbol\n- Reference is updated automatically when a netlist is created (no need to run Annotate)") ); + + bSizer8->Add( m_checkIsPowerSymbol, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer8, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer9->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkLockItems = new wxCheckBox( this, wxID_ANY, _("Parts in package locked (cannot be swapped)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkLockItems->SetToolTip( _("Check this option if Eeschema cannot change parts selections inside a given package\nThis happens when parts are different in this package.\nWhen this option is not checked, Eeschema automatically choose the parts in packages to minimize packages count") ); + + bSizer9->Add( m_checkLockItems, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer9, 0, wxALL|wxEXPAND, 0 ); + + + bSizer5->Add( 0, 0, 0, wxALL|wxEXPAND, 10 ); + + m_staticText7 = new wxStaticText( this, wxID_ANY, _("Global Pin Settings"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7->Wrap( -1 ); + m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + + bSizer5->Add( m_staticText7, 0, wxALIGN_LEFT|wxBOTTOM, 3 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer6->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_staticText41 = new wxStaticText( this, wxID_ANY, _("Pin text position &offset:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText41->Wrap( -1 ); + m_staticText41->SetToolTip( _("Margin (in 0.001 inches) between a pin name position and the component body.\nA value from 10 to 40 is usually good.") ); + + bSizer6->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer6->Add( 0, 0, 1, wxEXPAND, 3 ); + + m_spinPinTextPosition = new wxSpinCtrl( this, wxID_ANY, wxT("40"), wxDefaultPosition, wxSize( 100,-1 ), wxSP_ARROW_KEYS, 1, 100, 40 ); + bSizer6->Add( m_spinPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxSize( 30,-1 ), 0 ); + m_staticText5->Wrap( -1 ); + bSizer6->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 3 ); + + + bSizer5->Add( bSizer6, 1, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer10->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkShowPinNumber = new wxCheckBox( this, wxID_ANY, _("Show pin n&umber text"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkShowPinNumber->SetValue(true); + bSizer10->Add( m_checkShowPinNumber, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer10, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer12->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkShowPinName = new wxCheckBox( this, wxID_ANY, _("Show pin name te&xt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkShowPinName->SetValue(true); + bSizer12->Add( m_checkShowPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer12, 0, wxALL|wxEXPAND, 0 ); + + wxBoxSizer* bSizer121; + bSizer121 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer121->Add( 12, 0, 0, wxEXPAND, 3 ); + + m_checkShowPinNameInside = new wxCheckBox( this, wxID_ANY, _("Pin name &inside"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkShowPinNameInside->SetValue(true); + bSizer121->Add( m_checkShowPinNameInside, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); + + + bSizer5->Add( bSizer121, 1, wxEXPAND, 5 ); + + + bSizer5->Add( 0, 5, 0, wxALL|wxEXPAND, 10 ); + + m_sdbSizer = new wxStdDialogButtonSizer(); + m_sdbSizerOK = new wxButton( this, wxID_OK ); + m_sdbSizer->AddButton( m_sdbSizerOK ); + m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer->AddButton( m_sdbSizerCancel ); + m_sdbSizer->Realize(); + + bSizer5->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 0 ); + + + mainSizer->Add( bSizer5, 1, wxALL|wxEXPAND, 12 ); + + + this->SetSizer( mainSizer ); + this->Layout(); + mainSizer->Fit( this ); + + this->Centre( wxBOTH ); +} + +DIALOG_LIB_NEW_COMPONENT_BASE::~DIALOG_LIB_NEW_COMPONENT_BASE() +{ +} diff --git a/eeschema/dialogs/dialog_lib_new_component_base.h b/eeschema/dialogs/dialog_lib_new_component_base.h index d9b410610a..8c6846745e 100644 --- a/eeschema/dialogs/dialog_lib_new_component_base.h +++ b/eeschema/dialogs/dialog_lib_new_component_base.h @@ -1,82 +1,66 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __dialog_lib_new_component_base__ -#define __dialog_lib_new_component_base__ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_LIB_NEW_COMPONENT_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_LIB_NEW_COMPONENT_BASE : public wxDialog -{ - private: - - protected: - wxStaticText* m_staticText6; - - wxStaticText* m_staticText2; - - wxTextCtrl* m_textName; - - - wxStaticText* m_staticText3; - - wxTextCtrl* m_textReference; - - - wxStaticText* m_staticText4; - - wxSpinCtrl* m_spinPartCount; - - - wxCheckBox* m_checkHasConversion; - - wxCheckBox* m_checkIsPowerSymbol; - - wxCheckBox* m_checkLockItems; - - wxStaticText* m_staticText7; - - wxStaticText* m_staticText41; - - wxSpinCtrl* m_spinPinTextPosition; - wxStaticText* m_staticText5; - - wxCheckBox* m_checkShowPinNumber; - - wxCheckBox* m_checkShowPinName; - - wxCheckBox* m_checkShowPinNameInside; - - wxStdDialogButtonSizer* m_sdbSizer; - wxButton* m_sdbSizerOK; - wxButton* m_sdbSizerCancel; - - public: - DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_LIB_NEW_COMPONENT_BASE(); - -}; - -#endif //__dialog_lib_new_component_base__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 11 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_LIB_NEW_COMPONENT_BASE_H__ +#define __DIALOG_LIB_NEW_COMPONENT_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_LIB_NEW_COMPONENT_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_LIB_NEW_COMPONENT_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticText* m_staticText6; + wxStaticText* m_staticText2; + wxTextCtrl* m_textName; + wxStaticText* m_staticText3; + wxTextCtrl* m_textReference; + wxStaticText* m_staticText4; + wxSpinCtrl* m_spinPartCount; + wxCheckBox* m_checkHasConversion; + wxCheckBox* m_checkIsPowerSymbol; + wxCheckBox* m_checkLockItems; + wxStaticText* m_staticText7; + wxStaticText* m_staticText41; + wxSpinCtrl* m_spinPinTextPosition; + wxStaticText* m_staticText5; + wxCheckBox* m_checkShowPinNumber; + wxCheckBox* m_checkShowPinName; + wxCheckBox* m_checkShowPinNameInside; + wxStdDialogButtonSizer* m_sdbSizer; + wxButton* m_sdbSizerOK; + wxButton* m_sdbSizerCancel; + + public: + + DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LIB_NEW_COMPONENT_BASE(); + +}; + +#endif //__DIALOG_LIB_NEW_COMPONENT_BASE_H__ diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index fe4d61ef63..b130655020 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -50,7 +50,7 @@ #include #include -#include +//#include #include #include diff --git a/include/class_base_screen.h b/include/class_base_screen.h index 3c8abc128f..43b46d5c16 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -296,13 +296,6 @@ public: */ bool SetZoom( double coeff ); - /** - * Function SetZoomList - * sets the list of zoom factors. - * @param aZoomList An array of zoom factors in ascending order, zero terminated - */ - void SetZoomList( const wxArrayDouble& aZoomList ); - bool SetNextZoom(); bool SetPreviousZoom(); bool SetFirstZoom(); diff --git a/include/dialog_helpers.h b/include/dialog_helpers.h index 720fa2b498..380f3f9096 100644 --- a/include/dialog_helpers.h +++ b/include/dialog_helpers.h @@ -182,72 +182,4 @@ public: } }; - -/** - * Template DIALOG_SHIM - * is a way to have a common way of handling KiCad dialog windows: - *
    - *
  • class specific: static s_LastPos and static s_LastSize for retentative - * dialog window positioning, per class. - *
  • invocation of SetFocus() to allow ESC key to work on Linux. - *
  • future others... - *
- * by wedging in a class (a SHIM) between the wxFormbuilder coded base class and - * our derived dialog classes. Use it via the macro named DIALOG_EXTEND_WITH_SHIM - * and be sure to code your constructor to invoke *_SHIM() base class constructor, - * not the one from wxFormbuilder. - * @author Dick Hollenbeck - */ -template -class DIALOG_SHIM : public T -{ -public: - - DIALOG_SHIM( wxFrame* aParent ) : - T( aParent ) - { - wxDialog::SetFocus(); - } - - // overload wxDialog::Show - bool Show( bool show ) - { - bool ret; - - if( show ) - { - ret = wxDialog::Show( show ); - if( s_LastPos.x != -1 ) - wxDialog::SetSize( s_LastPos.x, s_LastPos.y, s_LastSize.x, s_LastSize.y, 0 ); - } - else - { - // Save the dialog's position before hiding - s_LastPos = wxDialog::GetPosition(); - s_LastSize = wxDialog::GetSize(); - ret = wxDialog::Show( show ); - } - return ret; - } - -private: - static wxPoint s_LastPos; - static wxSize s_LastSize; -}; - -template -wxPoint DIALOG_SHIM::s_LastPos( -1, -1 ); - -template -wxSize DIALOG_SHIM::s_LastSize( 0, 0 ); - -/** - * Macro DIALOG_EXTEND_WITH_SHIM - * instantiates the template DIALOG_SHIM<> and thereby declares a shim class. - * @author Dick Hollenbeck - */ -#define DIALOG_EXTEND_WITH_SHIM( DERRIVED, BASE ) \ - typedef DIALOG_SHIM BASE##_SHIM; \ - class DERRIVED : public BASE##_SHIM - #endif // DIALOG_HELPERS_H_ diff --git a/include/footprint_info.h b/include/footprint_info.h index dddefde175..4684e34092 100644 --- a/include/footprint_info.h +++ b/include/footprint_info.h @@ -32,6 +32,7 @@ public: } }; + class FOOTPRINT_LIST { public: diff --git a/include/pcbstruct.h b/include/pcbstruct.h index 670dd11a38..20f339e4db 100644 --- a/include/pcbstruct.h +++ b/include/pcbstruct.h @@ -3,13 +3,8 @@ * @brief Classes and definitions used in Pcbnew. */ -#ifndef PCBSTRUCT_H -#define PCBSTRUCT_H - - -// Definitions relatives aux libraries -#define FOOTPRINT_LIBRARY_HEADER "PCBNEW-LibModule-V1" -#define FOOTPRINT_LIBRARY_HEADER_CNT 18 +#ifndef PCBSTRUCT_H_ +#define PCBSTRUCT_H_ /// Values for m_DisplayViaMode member: @@ -83,4 +78,4 @@ public: DISPLAY_OPTIONS(); }; -#endif // PCBSTRUCT_H +#endif // PCBSTRUCT_H_ diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 7911bfbb99..547a57beee 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -96,7 +96,7 @@ set(PCBNEW_SRCS block.cpp block_module_editor.cpp build_BOM_from_board.cpp - class_footprint_library.cpp +# class_footprint_library.cpp class_pcb_layer_widget.cpp clean.cpp connect.cpp diff --git a/pcbnew/class_footprint_library.cpp b/pcbnew/class_footprint_library.cpp.notused similarity index 100% rename from pcbnew/class_footprint_library.cpp rename to pcbnew/class_footprint_library.cpp.notused diff --git a/pcbnew/class_footprint_library.h b/pcbnew/class_footprint_library.h.notused similarity index 90% rename from pcbnew/class_footprint_library.h rename to pcbnew/class_footprint_library.h.notused index c834f53e90..e4a0090da4 100644 --- a/pcbnew/class_footprint_library.h +++ b/pcbnew/class_footprint_library.h.notused @@ -11,15 +11,16 @@ class FOOTPRINT_LIBRARY public: wxArrayString m_List; // list of footprints, used to read/write INDEX section wxString m_LibraryName; // the full library name - int m_LineNum; // the line count private: FILTER_READER * m_reader; // FILTER_READER to read file. If NULL, use m_file FILE * m_file; // footprint file to read/write. + int m_LineNum; // the line count public: + /** - * ctor + * Constructor FOOTPRINT_LIBRARY * @param aFile = a FILE * pointer used for write operations, * and read operations when aReader = NULL * @param aReader = a FILTER_READER pointer used for read operations @@ -27,7 +28,11 @@ public: */ FOOTPRINT_LIBRARY( FILE * aFile, FILTER_READER * aReader = NULL ); - ~FOOTPRINT_LIBRARY() { } + FOOTPRINT_LIBRARY() : + m_reader( 0 ), + m_file( 0 ), + m_LineNum( 0 ) + {} /** * function IsLibrary diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 24014e6ebc..246fc04953 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -332,6 +332,12 @@ public: */ D_PAD* GetPad( const wxPoint& aPosition, int aLayerMask = ALL_LAYERS ); + /** + * GetPadCount + * returns the number of pads. + */ + unsigned GetPadCount() const { return m_Pads.GetCount() ; } + SEARCH_RESULT Visit( INSPECTOR* inspector, const void* testData, const KICAD_T scanTypes[] ); diff --git a/pcbnew/classpcb.cpp b/pcbnew/classpcb.cpp index 26213ea229..21fdf370f9 100644 --- a/pcbnew/classpcb.cpp +++ b/pcbnew/classpcb.cpp @@ -18,23 +18,40 @@ #include -/* Default Pcbnew zoom values. - * Limited to 19 values to keep a decent size to menus - * 15 it better but does not allow a sufficient number of values - * roughtly a 1.5 progression. - * The last 2 values is handy when somebody uses a library import of a module - * (or foreign data) which has a bad coordinate - * Also useful in GerbView for this reason. - * Zoom 5 and 10 can create artefacts when drawing (integer overflow in low level graphic - * functions ) - */ +/** + Default Pcbnew zoom values. + Limited to 19 values to keep a decent size to menus. + Roughly a 1.5 progression. + The last 2 values are handy when somebody uses a library import of a module + (or foreign data) which has a bad coordinate. + Also useful in GerbView for this reason. + Zoom 5 and 10 can create artefacts when drawing (integer overflow in low level graphic + functions ) +*/ static const double pcbZoomList[] = { - 0.5, 1.0, 1.5, 2.0, 3.0, 4.5, 7.0, - 10.0, 15.0, 22.0, 35.0, 50.0, 80.0, 120.0, - 200.0, 350.0, 500.0, 1000.0, 2000.0 + 0.5, + 1.0, + 1.5, + 2.0, + 3.0, + 4.5, + 7.0, + 10.0, + 15.0, + 22.0, + 35.0, + 50.0, + 80.0, + 120.0, + 200.0, + 350.0, + 500.0, + 1000.0, + 2000.0 }; + #define MM_TO_PCB_UNITS (10000.0 / 25.4) @@ -63,9 +80,9 @@ static GRID_TYPE pcbGridList[] = { ID_POPUP_GRID_LEVEL_0_25MM, wxRealPoint( MM_TO_PCB_UNITS * 0.25, MM_TO_PCB_UNITS * 0.25 ) }, { ID_POPUP_GRID_LEVEL_0_2MM, wxRealPoint( MM_TO_PCB_UNITS * 0.2, MM_TO_PCB_UNITS * 0.2 ) }, { ID_POPUP_GRID_LEVEL_0_1MM, wxRealPoint( MM_TO_PCB_UNITS * 0.1, MM_TO_PCB_UNITS * 0.1 ) }, - { ID_POPUP_GRID_LEVEL_0_0_5MM, wxRealPoint( MM_TO_PCB_UNITS * 0.05, MM_TO_PCB_UNITS * 0.05 ) }, - { ID_POPUP_GRID_LEVEL_0_0_25MM, wxRealPoint( MM_TO_PCB_UNITS * 0.025, MM_TO_PCB_UNITS * 0.025 ) }, - { ID_POPUP_GRID_LEVEL_0_0_1MM, wxRealPoint( MM_TO_PCB_UNITS * 0.01, MM_TO_PCB_UNITS * 0.01 ) } + { ID_POPUP_GRID_LEVEL_0_0_5MM, wxRealPoint( MM_TO_PCB_UNITS * 0.05, MM_TO_PCB_UNITS * 0.05 ) }, + { ID_POPUP_GRID_LEVEL_0_0_25MM, wxRealPoint( MM_TO_PCB_UNITS * 0.025, MM_TO_PCB_UNITS * 0.025 ) }, + { ID_POPUP_GRID_LEVEL_0_0_1MM, wxRealPoint( MM_TO_PCB_UNITS * 0.01, MM_TO_PCB_UNITS * 0.01 ) } }; diff --git a/pcbnew/io_mgr.cpp b/pcbnew/io_mgr.cpp index 8a262181d8..4b8e2fac40 100644 --- a/pcbnew/io_mgr.cpp +++ b/pcbnew/io_mgr.cpp @@ -28,6 +28,10 @@ #include +#define FMT_UNIMPLEMENTED _( "Plugin '%s' does not implement the '%s' function." ) +#define FMT_NOTFOUND _( "Plugin type '%s' is not found." ) + + // Some day plugins might be in separate DLL/DSOs, simply because of numbers of them // and code size. Until then, use the simplest method: @@ -40,8 +44,8 @@ // plugins coexisting. -// static LEGACY_PLUGIN kicad_plugin; // a secret -//static EAGLE_PLUGIN eagle_plugin; +// static LEGACY_PLUGIN kicad_plugin; +// static EAGLE_PLUGIN eagle_plugin; PLUGIN* IO_MGR::PluginFind( PCB_FILE_T aFileType ) { @@ -118,7 +122,7 @@ BOARD* IO_MGR::Load( PCB_FILE_T aFileType, const wxString& aFileName, return pi->Load( aFileName, aAppendToMe, aProperties ); // virtual } - THROW_IO_ERROR( wxString::Format( _( "Plugin type '%s' is not found." ), ShowType( aFileType ).GetData() ) ); + THROW_IO_ERROR( wxString::Format( FMT_NOTFOUND, ShowType( aFileType ).GetData() ) ); } @@ -133,25 +137,56 @@ void IO_MGR::Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoar return; } - THROW_IO_ERROR( wxString::Format( _( "Plugin type '%s' is not found." ), ShowType( aFileType ).GetData() ) ); + THROW_IO_ERROR( wxString::Format( FMT_NOTFOUND, ShowType( aFileType ).GetData() ) ); } BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES* aProperties ) { - // not pure virtual so that plugins only have to implement subset of the PLUGIN interface, - // e.g. Load() or Save() but not both. - - THROW_IO_ERROR( wxString::Format( - _( "Plugin %s does not implement the BOARD Load() function." ), PluginName().GetData() ) ); + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData(), __FUNCTION__ ) ); } void PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* aProperties ) { - // not pure virtual so that plugins only have to implement subset of the PLUGIN interface, - // e.g. Load() or Save() but not both. - - THROW_IO_ERROR( wxString::Format( - _( "Plugin %s does not implement the BOARD Save() function." ), PluginName().GetData() ) ); + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData(), __FUNCTION__ ) ); } + + +wxArrayString PLUGIN::FootprintEnumerate( const wxString& aLibraryPath, PROPERTIES* aProperties ) +{ + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData() , __FUNCTION__ ) ); +} + + +MODULE* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, + PROPERTIES* aProperties ) +{ + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData() , __FUNCTION__ ) ); +} + + +void PLUGIN::FootprintSave( const wxString& aLibraryPath, MODULE* aFootprint, PROPERTIES* aProperties ) +{ + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData() , __FUNCTION__ ) ); +} + + +void PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName ) +{ + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData() , __FUNCTION__ ) ); +} + + +bool PLUGIN::IsLibraryWritable( const wxString& aLibraryPath ) +{ + // not pure virtual so that plugins only have to implement subset of the PLUGIN interface. + THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, PluginName().GetData() , __FUNCTION__ ) ); +} + diff --git a/pcbnew/io_mgr.h b/pcbnew/io_mgr.h index 4acaa27940..67d88d2bf1 100644 --- a/pcbnew/io_mgr.h +++ b/pcbnew/io_mgr.h @@ -30,6 +30,7 @@ class BOARD; class PLUGIN; +class MODULE; /** @@ -237,13 +238,102 @@ public: virtual void Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* aProperties = NULL ); + /** + * Function FootprintEnumerate + * returns a list of footprint names contained within the library at @a aLibraryPath. + * + * @param aLibraryPath is locator for the "library", usually a directory + * or file containing several footprints. + * + * @param aProperties is an associative array that can be used to tell the + * plugin how to access the library. + * The caller continues to own this object (plugin may not delete it), and + * plugins should expect it to be optionally NULL. + * + * @return wxArrayString - is the array of available footprint names inside + * a library + * + * @throw IO_ERROR if the library cannot be found, or footprint cannot be loaded. + */ + virtual wxArrayString FootprintEnumerate( const wxString& aLibraryPath, PROPERTIES* aProperties = NULL); + + /** + * Function FootprintLoad + * loads a MODULE having @a aFootprintName from the @a aLibraryPath containing + * a library format that this PLUGIN knows about. + * + * @param aLibraryPath is locator for the "library", usually a directory + * or file containing several footprints. + * + * @param aFootprintName is the name of the footprint to load. + * + * @param aProperties is an associative array that can be used to tell the + * saver how to save the file, because it can take any number of + * additional named tuning arguments that the plugin is known to support. + * The caller continues to own this object (plugin may not delete it), and + * plugins should expect it to be optionally NULL. + * + * @return MODULE* - caller owns it. Never NULL because exception thrown if error. + * + * @throw IO_ERROR if the PLUGIN cannot be found, library cannot be found, + * or footprint cannot be loaded. + */ + virtual MODULE* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, + PROPERTIES* aProperties = NULL ); + + /** + * Function FootprintSave + * will write @a aModule to an existing library located at @a aLibraryPath, + * and create the library if it doesn't exist then perform the write. If a + * footprint by the same name already exists, it is replaced. + * + * @param aLibraryPath is locator for the "library", usually a directory + * or file containing several footprints. This is where the footprint is + * to be stored. + * + * @param aFootprint is what to store in the library. + * The caller continues to own the footprint. + * + * @param aProperties is an associative array that can be used to tell the + * saver how to save the file, because it can take any number of + * additional named tuning arguments that the plugin is known to support. + * The caller continues to own this object (plugin may not delete it), and + * plugins should expect it to be optionally NULL. + * + * @throw IO_ERROR if there is a problem saving. + */ + virtual void FootprintSave( const wxString& aLibraryPath, MODULE* aFootprint, + PROPERTIES* aProperties = NULL ); + + /** + * Function FootprintDelete + * deletes the @a aFootprintName from the library at @a aLibraryPath. + * + * @param aLibraryPath is locator for the "library", usually a directory + * or file containing several footprints. + * + * @param aFootprintName is the name of a footprint to delete from the specificed library. + * + * @throw IO_ERROR if there is a problem finding the footprint or the library, or deleting it. + */ + virtual void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName ); + + /** + * Function IsLibraryWritable + * returns true iff the library at @a aLibraryPath is writable. (Often + * system libraries are read only because of where they are installed.) + */ + virtual bool IsLibraryWritable( const wxString& aLibraryPath ); + //----------------------------------------------------- + /* The compiler writes the "zero argument" constructor for a PLUGIN automatically if you do not provide one. If you decide you need to provide a zero argument constructor of your own design, that is allowed. It must be public, and it is what the IO_MGR uses. Parameters may be - passed into a PLUGIN via the PROPERTIES variable for either Save() and Load(). + passed into a PLUGIN via the PROPERTIES variable for any of the public + API functions which take one. */ virtual ~PLUGIN() {} diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 8f5626634c..e44f5c9105 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -106,7 +106,7 @@ #if 1 -#define READLINE() m_reader->ReadLine() +#define READLINE( rdr ) rdr->ReadLine() #else /// The function and macro which follow comprise a shim which can be a @@ -128,7 +128,7 @@ static inline unsigned ReadLine( LINE_READER* rdr, const char* caller ) return ret; } -#define READLINE() ReadLine( m_reader, __FUNCTION__ ) +#define READLINE( rdr ) ReadLine( rdr, __FUNCTION__ ) #endif static const char delims[] = " \t\r\n"; @@ -167,12 +167,14 @@ BOARD* LEGACY_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPE { LOCALE_IO toggle; // toggles on, then off, the C locale. + init( aProperties ); + m_board = aAppendToMe ? aAppendToMe : new BOARD(); // delete on exception, iff I own m_board, according to aAppendToMe auto_ptr deleter( aAppendToMe ? NULL : m_board ); - FILE* fp = wxFopen( aFileName, wxT( "rt" ) ); + FILE* fp = wxFopen( aFileName, wxT( "r" ) ); if( !fp ) { m_error.Printf( _( "Unable to open file '%s'" ), aFileName.GetData() ); @@ -184,8 +186,6 @@ BOARD* LEGACY_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPE m_reader = &reader; // member function accessibility - init( aProperties ); - checkVersion(); loadAllSections( bool( aAppendToMe ) ); @@ -205,7 +205,7 @@ void LEGACY_PLUGIN::loadAllSections( bool doAppend ) // Then follows $EQUIPOT and all the rest - while( READLINE() ) + while( READLINE( m_reader ) ) { char* line = m_reader->Line(); @@ -213,7 +213,8 @@ void LEGACY_PLUGIN::loadAllSections( bool doAppend ) if( TESTLINE( "$MODULE" ) ) { - loadMODULE(); + MODULE* m = LoadMODULE(); + m_board->Add( m, ADD_APPEND ); } else if( TESTLINE( "$DRAWSEGMENT" ) ) @@ -281,7 +282,7 @@ void LEGACY_PLUGIN::loadAllSections( bool doAppend ) } else { - while( READLINE() ) + while( READLINE( m_reader ) ) { line = m_reader->Line(); // gobble until $EndSetup @@ -332,7 +333,7 @@ void LEGACY_PLUGIN::checkVersion() void LEGACY_PLUGIN::loadGENERAL() { - while( READLINE() ) + while( READLINE( m_reader ) ) { char* line = m_reader->Line(); const char* data; @@ -460,7 +461,7 @@ void LEGACY_PLUGIN::loadSHEET() char buf[260]; TITLE_BLOCK tb; - while( READLINE() ) + while( READLINE( m_reader ) ) { char* line = m_reader->Line(); @@ -575,7 +576,7 @@ void LEGACY_PLUGIN::loadSETUP() BOARD_DESIGN_SETTINGS bds = m_board->GetDesignSettings(); ZONE_SETTINGS zs = m_board->GetZoneSettings(); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -863,15 +864,16 @@ void LEGACY_PLUGIN::loadSETUP() } -void LEGACY_PLUGIN::loadMODULE() +MODULE* LEGACY_PLUGIN::LoadMODULE() { auto_ptr module( new MODULE( m_board ) ); - while( READLINE() ) + while( READLINE( m_reader ) ) { - const char* data; char* line = m_reader->Line(); + const char* data; + // most frequently encountered ones at the top if( TESTSUBSTR( "D" ) ) // read a drawing item, e.g. "DS" @@ -1053,9 +1055,7 @@ void LEGACY_PLUGIN::loadMODULE() { module->CalculateBoundingBox(); - m_board->Add( module.release(), ADD_APPEND ); - - return; // preferred exit + return module.release(); // preferred exit } } @@ -1067,7 +1067,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) { auto_ptr pad( new D_PAD( aModule ) ); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -1288,8 +1288,8 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) void LEGACY_PLUGIN::loadMODULE_EDGE( MODULE* aModule ) { - STROKE_T shape; - char* line = m_reader->Line(); // obtain current (old) line + STROKE_T shape; + char* line = m_reader->Line(); // obtain current (old) line switch( line[1] ) { @@ -1371,7 +1371,7 @@ void LEGACY_PLUGIN::loadMODULE_EDGE( MODULE* aModule ) for( int ii = 0; iiLine(); @@ -1596,7 +1596,7 @@ void LEGACY_PLUGIN::loadPCB_LINE() auto_ptr dseg( new DRAWSEGMENT( m_board ) ); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -1704,7 +1704,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM() NETINFO_ITEM* net = new NETINFO_ITEM( m_board ); m_board->AppendNet( net ); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -1756,7 +1756,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() TEXTE_PCB* pcbtxt = new TEXTE_PCB( m_board ); m_board->Add( pcbtxt, ADD_APPEND ); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -1866,7 +1866,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT() void LEGACY_PLUGIN::loadTrackList( TRACK* aInsertBeforeMe, int aStructType ) { - while( READLINE() ) + while( READLINE( m_reader ) ) { // read two lines per loop iteration, each loop is one TRACK or VIA // example first line: @@ -1899,7 +1899,7 @@ void LEGACY_PLUGIN::loadTrackList( TRACK* aInsertBeforeMe, int aStructType ) // differentiates between PCB_TRACE_T and PCB_VIA_T. With virtual // functions in use, it is critical to instantiate the PCB_VIA_T // exactly. - READLINE(); + READLINE( m_reader ); line = m_reader->Line(); @@ -1989,7 +1989,7 @@ void LEGACY_PLUGIN::loadNETCLASS() // just before returning. auto_ptr nc( new NETCLASS( m_board, wxEmptyString ) ); - while( READLINE() ) + while( READLINE( m_reader ) ) { char* line = m_reader->Line(); @@ -2082,7 +2082,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() bool sawCorner = false; char buf[1024]; - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -2233,7 +2233,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() { // Read the PolysList (polygons used for fill areas in the zone) - while( READLINE() ) + while( READLINE( m_reader ) ) { line = m_reader->Line(); @@ -2253,7 +2253,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER() else if( TESTLINE( "$FILLSEGMENTS" ) ) { - while( READLINE() ) + while( READLINE( m_reader ) ) { line = m_reader->Line(); @@ -2304,7 +2304,7 @@ void LEGACY_PLUGIN::loadDIMENSION() { auto_ptr dim( new DIMENSION( m_board ) ); - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -2498,7 +2498,7 @@ void LEGACY_PLUGIN::loadDIMENSION() void LEGACY_PLUGIN::loadPCB_TARGET() { - while( READLINE() ) + while( READLINE( m_reader ) ) { const char* data; char* line = m_reader->Line(); @@ -2675,6 +2675,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) { + m_board = NULL; m_props = aProperties; // conversion factor for saving RAM BIUs to KICAD legacy file format. @@ -2706,9 +2707,11 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* { LOCALE_IO toggle; // toggles on, then off, the C locale. + init( aProperties ); + m_board = aBoard; - FILE* fp = wxFopen( aFileName, wxT( "wt" ) ); + FILE* fp = wxFopen( aFileName, wxT( "w" ) ); if( !fp ) { m_error.Printf( _( "Unable to open file '%s'" ), aFileName.GetData() ); @@ -2722,8 +2725,6 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* m_fp = fp; // member function accessibility - init( aProperties ); - if( m_props ) { wxString header = (*m_props)["header"]; @@ -2751,8 +2752,6 @@ do { \ void LEGACY_PLUGIN::saveAllSections() const { - - saveGENERAL(); saveSHEET(); @@ -3698,3 +3697,371 @@ void LEGACY_PLUGIN::savePCB_TEXT( const TEXTE_PCB* me ) const fprintf( m_fp, "$EndTEXTPCB\n" ); } + + +//------------------------------------------------- + +/* + + The legacy file format is being obsoleted and this code will have a short + lifetime, so it only needs to be good enough for a short duration of time. + Caching all the MODULEs is a bit memory intensive, but it is a considerably + faster way of fulfilling the API contract. Otherwise, without the cache, you + would have to re-read the file when searching for any MODULE, and this would + be very problematic filling a FOOTPRINT_LIST via this PLUGIN API. If memory + becomes a concern, consider the cache lifetime policy, which determines the + time that a FPL_CACHE is in RAM. Note PLUGIN lifetime also plays a role in + cache lifetime. + +*/ + + +#include + +typedef boost::ptr_map< wxString, MODULE > MODULE_MAP; +typedef MODULE_MAP::iterator MODULE_ITER; +typedef MODULE_MAP::const_iterator MODULE_CITER; + +#define FOOTPRINT_LIBRARY_HEADER "PCBNEW-LibModule-V1" + + +/** + * Class FPL_CACHE + * assists only for the footprint portion of the PLUGIN API, and only for the + * LEGACY_PLUGIN, so therefore is private to this implementation file, i.e. not placed + * into a header. + */ +struct FPL_CACHE +{ + LEGACY_PLUGIN* m_owner; // my owner, I need its LEGACY_PLUGIN::LoadMODULE() + wxString m_lib_name; + wxDateTime m_mod_time; + MODULE_MAP m_modules; // tuple of footprint name vs. MODULE* + bool m_writable; + + FPL_CACHE( LEGACY_PLUGIN* aOwner, const wxString& aLibraryPath ); + + // Most all functions in this class throw IO_ERROR exceptions. There is no + // error codes nor user interface calls from here. + // Catch these exceptions higher up please. + + /// save the entire legacy library to m_lib_name; + void Save(); + + void SaveHeader( FILE* aFile ); + + void SaveIndex( FILE* aFile ); + + void SaveModules( FILE* aFile ); + + void SaveEndOfFile( FILE* aFile ); + + void Load( LINE_READER* aReader ); + + void ReadAndVerifyHeader( LINE_READER* aReader ); + + void SkipIndex( LINE_READER* aReader ); + + void LoadModules( LINE_READER* aReader ); + + wxDateTime GetLibModificationTime(); +}; + + +FPL_CACHE::FPL_CACHE( LEGACY_PLUGIN* aOwner, const wxString& aLibraryPath ) : + m_owner( aOwner ), + m_lib_name( aLibraryPath ), + m_writable( false ) +{ + FILE* fp = wxFopen( aLibraryPath, wxT( "r" ) ); + if( !fp ) + { + THROW_IO_ERROR( wxString::Format( + _( "Unable to open legacy library file '%s'" ), aLibraryPath.GetData() ) ); + } + + // reader now owns fp, will close on exception or return + FILE_LINE_READER reader( fp, aLibraryPath ); + + Load( &reader ); +} + + +wxDateTime FPL_CACHE::GetLibModificationTime() +{ + wxFileName fn( m_lib_name ); + + m_writable = fn.IsFileWritable(); + + return fn.GetModificationTime(); +} + + +void FPL_CACHE::Load( LINE_READER* aReader ) +{ + ReadAndVerifyHeader( aReader ); + SkipIndex( aReader ); + LoadModules( aReader ); + + // Remember the file modification time of library file when the + // cache snapshot was made, so that in a networked environment we will + // reload the cache as needed. + m_mod_time = GetLibModificationTime(); +} + + +void FPL_CACHE::ReadAndVerifyHeader( LINE_READER* aReader ) +{ + if( !aReader->ReadLine() ) + { + L_not_library: + THROW_IO_ERROR( wxString::Format( _( "File %s is empty or is not a legacy library" ), + m_lib_name.GetData() ) ); + } + + char* line = aReader->Line(); + + if( !TESTLINE( "PCBNEW-LibModule-V1" ) ) + goto L_not_library; +} + + +void FPL_CACHE::SkipIndex( LINE_READER* aReader ) +{ + // Some broken INDEX sections have more than one section, due to prior bugs. + // So we must read the next line after $EndINDEX tag, + // to see if this is not a new $INDEX tag. + bool exit = false; + + while( aReader->ReadLine() ) + { + char* line = aReader->Line(); + + if( TESTLINE( "$INDEX" ) ) + { + exit = false; + + while( aReader->ReadLine() ) + { + line = aReader->Line(); + + if( TESTLINE( "$EndINDEX" ) ) + { + exit = true; + break; + } + } + } + else if( exit ) + break; + } +} + + +void FPL_CACHE::LoadModules( LINE_READER* aReader ) +{ + m_owner->SetReader( aReader ); + + do + { + // test first for the $MODULE, even before reading because of INDEX bug. + char* line = aReader->Line(); + + if( TESTLINE( "$MODULE" ) ) + { + MODULE* m = m_owner->LoadMODULE(); + + wxString reference = m->GetReference(); + + MODULE_CITER it = m_modules.find( reference ); + + if( it != m_modules.end() ) + { + THROW_IO_ERROR( wxString::Format( + _( "library %s has a duplicate footprint named %s" ), + m_lib_name.GetData(), reference.GetData() ) ); + } + m_modules.insert( reference, m ); + } + + } while( aReader->ReadLine() ); +} + + +void FPL_CACHE::Save() +{ + if( !m_writable ) + { + THROW_IO_ERROR( wxString::Format( + _( "Legacy library file '%s' is read only" ), m_lib_name.GetData() ) ); + } + + wxString tempFileName = wxFileName::CreateTempFileName( m_lib_name ); + + wxLogDebug( "tempFileName:'%s'\n", TO_UTF8( tempFileName ) ); + + FILE* fp = wxFopen( tempFileName, wxT( "w" ) ); + if( !fp ) + { + THROW_IO_ERROR( wxString::Format( + _( "Unable to open legacy library file '%s'" ), m_lib_name.GetData() ) ); + } + + // wxf now owns fp, will close on exception or return + wxFFile wxf( fp ); + + SaveHeader( fp ); + SaveIndex( fp ); + SaveModules( fp ); + SaveEndOfFile( fp ); + + wxRemoveFile( m_lib_name ); + wxRenameFile( tempFileName, m_lib_name ); +} + + +void FPL_CACHE::SaveHeader( FILE* aFile ) +{ + fprintf( aFile, "%s %s\n", FOOTPRINT_LIBRARY_HEADER, TO_UTF8( DateAndTime() ) ); + fprintf( aFile, "# encoding utf-8\n" ); +} + + +void FPL_CACHE::SaveIndex( FILE* aFile ) +{ + fprintf( aFile, "$INDEX\n" ); + + for( MODULE_CITER it = m_modules.begin(); it != m_modules.end(); ++it ) + { + fprintf( aFile, "%s\n", TO_UTF8( it->first ) ); + } + + fprintf( aFile, "$EndINDEX\n" ); +} + + +void FPL_CACHE::SaveModules( FILE* aFile ) +{ +} + + +void LEGACY_PLUGIN::cacheLib( const wxString& aLibraryPath ) +{ + if( !m_cache || m_cache->m_lib_name != aLibraryPath || + m_cache->m_mod_time != m_cache->GetLibModificationTime() ) + { + // a spectacular episode in memory management. + delete m_cache; + m_cache = new FPL_CACHE( this, aLibraryPath ); + } +} + + +wxArrayString LEGACY_PLUGIN::FootprintEnumerate( const wxString& aLibraryPath, PROPERTIES* aProperties ) +{ + wxArrayString ret; + + init( aProperties ); + + cacheLib( aLibraryPath ); + + const MODULE_MAP& mods = m_cache->m_modules; + + for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) + { + ret.Add( it->first ); + } + + return ret; +} + + +MODULE* LEGACY_PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, + PROPERTIES* aProperties ) +{ + init( aProperties ); + + cacheLib( aLibraryPath ); + + const MODULE_MAP& mods = m_cache->m_modules; + + MODULE_CITER it = mods.find( aFootprintName ); + + if( it == mods.end() ) + { + THROW_IO_ERROR( wxString::Format( _( "No '%s' footprint in library '%s'" ), + aFootprintName.GetData(), aLibraryPath.GetData() ) ); + } + + // copy constructor to clone the already loaded MODULE + return new MODULE( *it->second ); +} + + +void LEGACY_PLUGIN::FootprintSave( const wxString& aLibraryPath, MODULE* aFootprint, PROPERTIES* aProperties ) +{ + init( aProperties ); + + cacheLib( aLibraryPath ); + + if( !m_cache->m_writable ) + { + } + + wxString reference = aFootprint->GetReference(); + + MODULE_MAP& mods = m_cache->m_modules; + + // quietly overwrite any by same name. + MODULE_CITER it = mods.find( reference ); + if( it != mods.end() ) + { + mods.erase( reference ); + } + + aFootprint->SetParent( 0 ); + + mods.insert( reference, aFootprint ); + + m_cache->Save(); +} + + +void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName ) +{ + init( NULL ); + + cacheLib( aLibraryPath ); + + if( !m_cache->m_writable ) + { + } + + size_t erasedCount = m_cache->m_modules.erase( aFootprintName ); + + if( erasedCount != 1 ) + { + THROW_IO_ERROR( wxString::Format( + _( "library '%s' has no footprint '%s' to delete" ), + aLibraryPath.GetData(), aFootprintName.GetData() ) ); + } + + m_cache->Save(); +} + + +bool LEGACY_PLUGIN::IsLibraryWritable( const wxString& aLibraryPath ) +{ + init( NULL ); + + cacheLib( aLibraryPath ); + + return m_cache->m_writable; +} + + +LEGACY_PLUGIN::~LEGACY_PLUGIN() +{ + delete m_cache; +} + diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index fab6450741..b2011b8fe8 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -44,6 +44,8 @@ class EDGE_MODULE; class TRACK; class SEGZONE; class D_PAD; +class FPL_CACHE; + /** * Class LEGACY_PLUGIN @@ -55,7 +57,7 @@ class LEGACY_PLUGIN : public PLUGIN public: - //------------------------------------------------------------------ + //--------------------------------------------------- const wxString& PluginName() const { @@ -73,7 +75,35 @@ public: void Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* aProperties = NULL ); // overload - //----------------------------------------------------------------- + wxArrayString FootprintEnumerate( const wxString& aLibraryPath, PROPERTIES* aProperties = NULL); + + MODULE* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName, + PROPERTIES* aProperties = NULL ); + + void FootprintSave( const wxString& aLibraryPath, MODULE* aFootprint, + PROPERTIES* aProperties = NULL ); + + void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName ); + + bool IsLibraryWritable( const wxString& aLibraryPath ); + + //-------------------------------------------------- + + LEGACY_PLUGIN() : + m_board( 0 ), + m_props( 0 ), + m_reader( 0 ), + m_fp( 0 ), + m_cache( 0 ) + {} + + ~LEGACY_PLUGIN(); + + void SetReader( LINE_READER* aReader ) { m_reader = aReader; } + void SetFilePtr( FILE* aFile ) { m_fp = aFile; } + + MODULE* LoadMODULE(); + protected: @@ -87,6 +117,8 @@ protected: wxString m_field; ///< reused to stuff MODULE fields. int m_loading_format_version; ///< which BOARD_FORMAT_VERSION am I Load()ing? + FPL_CACHE* m_cache; + /// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed. void init( PROPERTIES* aProperties ); @@ -131,11 +163,11 @@ protected: void loadAllSections( bool doAppend ); + void loadGENERAL(); void loadSETUP(); void loadSHEET(); - void loadMODULE(); void load3D( MODULE* aModule ); void loadPAD( MODULE* aModule ); void loadMODULE_TEXT( TEXTE_MODULE* aText ); @@ -235,6 +267,8 @@ protected: //--------------------------------------------------------- + /// we only cache one footprint library for now, this determines which one. + void cacheLib( const wxString& aLibraryPath ); }; #endif // LEGACY_PLUGIN_H_ diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 37611da303..8845cda5a8 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -225,122 +224,15 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname ) if( !IsOK( this, msg ) ) return; - oldFileName = aLibname; - - if( ( lib_module = wxFopen( oldFileName.GetFullPath(), wxT( "rt" ) ) ) == NULL ) + try { - wxString msg; - msg.Printf( _( "Library <%s> not found" ), GetChars(oldFileName.GetFullPath() ) ); - DisplayError( NULL, msg ); - return; + PLUGIN::HOLDER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); + + pi->FootprintDelete( aLibname, CmpName ); } - - - FOOTPRINT_LIBRARY input_lib( lib_module ); - - // Read header. - if( ! input_lib.IsLibrary() ) + catch( IO_ERROR ioe ) { - fclose( lib_module ); - wxString msg; - msg.Printf( _( "<%s> is not a valid footprint library file" ), - GetChars( oldFileName.GetFullPath() ) ); - DisplayError( NULL, msg ); - return; - } - - // Read module names. - input_lib.RebuildIndex(); - bool found = input_lib.FindInList( CmpName ); - - if( !found ) - { - fclose( lib_module ); - msg.Printf( _( "Module [%s] not found" ), GetChars( CmpName ) ); - DisplayError( NULL, msg ); - return; - } - - // Create new library. - newFileName = oldFileName; - newFileName.SetExt( FILETMP_EXT ); - - if( ( out_file = wxFopen( newFileName.GetFullPath(), wxT( "wt" ) ) ) == NULL ) - { - fclose( lib_module ); - msg.Printf( _( "Unable to create %s" ), GetChars( newFileName.GetFullPath() ) ); - DisplayError( NULL, msg ); - return; - } - - wxBeginBusyCursor(); - - FOOTPRINT_LIBRARY output_lib( out_file ); - output_lib.m_List = input_lib.m_List; - - output_lib.WriteHeader(); - output_lib.RemoveFromList( CmpName ); - output_lib.SortList(); - output_lib.WriteSectionIndex(); - - // Copy modules. - rewind( lib_module ); - LineNum = input_lib.m_LineNum; - - bool copylines = false; - while( GetLine( lib_module, Line, &LineNum ) ) - { - StrPurge( Line ); - - if( strnicmp( Line, "$MODULE", 7 ) == 0 ) - { - copylines = true; - sscanf( Line + 7, " %s", Name ); - msg = FROM_UTF8( Name ); - - if( msg.CmpNoCase( CmpName ) == 0 ) - { - // Delete old module (i.e. do not copy description to out_file). - while( GetLine( lib_module, Line, &LineNum ) ) - { - if( strnicmp( Line, "$EndMODULE", 9 ) == 0 ) - break; - } - - continue; - } - } - - if( copylines ) - fprintf( out_file, "%s\n", Line ); - } - - fclose( lib_module ); - fclose( out_file ); - - wxEndBusyCursor(); - - // The old library file is renamed .bak - wxFileName backupFileName = oldFileName; - backupFileName.SetExt( BACKUP_EXT ); - - if( backupFileName.FileExists() ) - wxRemoveFile( backupFileName.GetFullPath() ); - - if( !wxRenameFile( oldFileName.GetFullPath(), backupFileName.GetFullPath() ) ) - { - msg.Printf( _( "Could not create library back up file <%s>." ), - GetChars( backupFileName.GetFullName() ) ); - DisplayError( this, msg ); - return; - } - - // The temporary file is renamed as the previous library. - if( !wxRenameFile( newFileName.GetFullPath(), oldFileName.GetFullPath() ) ) - { - msg.Printf( _("Could not create temporary library file <%s>."), - GetChars( oldFileName.GetFullName() ) ); - DisplayError( this, msg ); + DisplayError( NULL, ioe.errorText ); return; } diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 95e4b04a08..b571f1176e 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -153,7 +153,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, static wxArrayString HistoryList; static wxString lastComponentName; - /* Ask for a component name or key words */ + // Ask for a component name or key words DIALOG_GET_COMPONENT dlg( this, GetComponentDialogPosition(), HistoryList, _( "Load Module" ), aUseFootprintViewer ); @@ -171,7 +171,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, moduleName = dlg.GetComponentName(); } - if( moduleName.IsEmpty() ) /* Cancel command */ + if( moduleName.IsEmpty() ) // Cancel command { m_canvas->MoveCursorToCrossHair(); return NULL; @@ -185,7 +185,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, keys = moduleName; moduleName = Select_1_Module_From_List( this, aLibrary, wxEmptyString, keys ); - if( moduleName.IsEmpty() ) /* Cancel command */ + if( moduleName.IsEmpty() ) // Cancel command { m_canvas->MoveCursorToCrossHair(); return NULL; @@ -200,13 +200,13 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, if( moduleName.IsEmpty() ) { m_canvas->MoveCursorToCrossHair(); - return NULL; /* Cancel command. */ + return NULL; // Cancel command. } } module = GetModuleLibrary( aLibrary, moduleName, false ); - if( ( module == NULL ) && AllowWildSeach ) /* Search with wild card */ + if( ( module == NULL ) && AllowWildSeach ) // Search with wild card { AllowWildSeach = false; wxString wildname = wxChar( '*' ) + moduleName + wxChar( '*' ); @@ -216,7 +216,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, if( moduleName.IsEmpty() ) { m_canvas->MoveCursorToCrossHair(); - return NULL; /* Cancel command. */ + return NULL; // Cancel command. } else { @@ -376,7 +376,7 @@ wxString PCB_BASE_FRAME::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow, const wxString& aMask, const wxString& aKeyWord ) { - static wxString OldName; /* Save the name of the last module loaded. */ + static wxString OldName; // Save the name of the last module loaded. wxString CmpName; wxString msg; wxArrayString libnames_list; @@ -386,7 +386,7 @@ wxString PCB_BASE_FRAME::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow, else libnames_list.Add( aLibraryFullFilename ); - /* Find modules in libraries. */ + // Find modules in libraries. MList.ReadFootprintFiles( libnames_list ); wxArrayString footprint_names_list; @@ -461,7 +461,7 @@ static void DisplayCmpDoc( wxString& Name ) MODULE* FOOTPRINT_EDIT_FRAME::Select_1_Module_From_BOARD( BOARD* aPcb ) { MODULE* module; - static wxString OldName; /* Save name of last module selected. */ + static wxString OldName; // Save name of last module selected. wxString CmpName, msg; wxArrayString listnames; diff --git a/pcbnew/modview.cpp b/pcbnew/modview.cpp index df7f1065d7..5b30206376 100644 --- a/pcbnew/modview.cpp +++ b/pcbnew/modview.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index ec9706616c..5ef1bc3462 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -35,7 +35,6 @@ class wxSashLayoutWindow; class wxListBox; class wxSemaphore; -class FOOTPRINT_LIBRARY; /** diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 59efb6ee7a..d30579ad35 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -543,7 +543,6 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) /// data type used to ensure unique-ness of pin names, holding (wxString and int) -//typedef std::map PINMAP; typedef std::map PINMAP;