Pcbnew: Fixed: fully broken netlist import from eeschema when using time stamp (fully broken also in stable version).

This commit is contained in:
charras 2009-04-24 07:36:36 +00:00
parent aa51c05dc6
commit b9ba67c8c3
13 changed files with 1382 additions and 2318 deletions

View File

@ -4,6 +4,13 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-apr-24 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
Fixed: fully broken netlist import from eeschema when using time stamp.
(normal operation worked fine)
Added: alawys print diags in dialog window when reading a netlist
2009-apr-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++ALL:

View File

@ -14,7 +14,6 @@ LIBVIEWER3D = ../3d-viewer/3d-viewer.a
OBJECTS = $(TARGET).o \
class_cvpcb.o\
class_board_item.o\
memoire.o \
cvframe.o\
dialog_cvpcb_config.o\
dialog_cvpcb_config_fbp.o\
@ -48,21 +47,11 @@ displayframe.o: displayframe.cpp
listboxes.o: listboxes.cpp
drawframe.o: ../share/drawframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
init.o: init.cpp
memoire.o: memoire.cpp
rdpcad.o: rdpcad.cpp
class_board_item.o: ../pcbnew/class_board_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
@ -83,10 +72,6 @@ class_equipot.o: ../pcbnew/class_equipot.cpp
readschematicnetlist.o: readschematicnetlist.cpp
viewlogi.o: viewlogi.cpp
viewlnet.o: viewlnet.cpp
loadcmp.o: loadcmp.cpp
savecmp.o: savecmp.cpp
@ -100,7 +85,7 @@ ioascii.o: ../pcbnew/ioascii.cpp
listlib.o: listlib.cpp
cfg.o: cfg.cpp cfg.h
cfg.o: cfg.cpp
menucfg.o: menucfg.cpp dialog_cvpcb_config.cpp dialog_cvpcb_config.h

View File

@ -46,7 +46,8 @@ set(PCBNEW_SRCS
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
# dialog_initpcb.cpp
# dialog_netlist.cpp
dialog_netlist.cpp
dialog_netlist_fbp.cpp
dialog_pcb_text_properties.cpp
zones_non_copper_type_functions.cpp
dialog_non_copper_zones_properties_base.cpp

View File

@ -1,339 +1,83 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_netlist.cpp
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 26/02/2006 17:42:19
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 26/02/2006 17:42:19
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "dialog_netlist.h"
////@begin XPM images
////@end XPM images
extern void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
const wxString& aNetlistFullFilename,
const wxString& aCmpFullFileName,
wxTextCtrl* aMessageWindow,
bool aChangeFootprint,
bool aDeleteBadTracks,
bool aDeleteExtraFootprints,
bool aSelect_By_Timestamp );
static bool DisplayWarning;
extern void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* frame,
const wxString& NetlistFullFilename,
BOARD* Pcb );
/*!
* WinEDA_NetlistFrame type definition
*/
IMPLEMENT_DYNAMIC_CLASS( WinEDA_NetlistFrame, wxDialog )
/*!
* WinEDA_NetlistFrame event table definition
*/
BEGIN_EVENT_TABLE( WinEDA_NetlistFrame, wxDialog )
////@begin WinEDA_NetlistFrame event table entries
EVT_BUTTON( ID_OPEN_NELIST, WinEDA_NetlistFrame::OnOpenNelistClick )
EVT_BUTTON( ID_READ_NETLIST_FILE, WinEDA_NetlistFrame::OnReadNetlistFileClick )
EVT_BUTTON( ID_TEST_NETLIST, WinEDA_NetlistFrame::OnTestNetlistClick )
EVT_BUTTON( ID_COMPILE_RATSNEST, WinEDA_NetlistFrame::OnCompileRatsnestClick )
EVT_BUTTON( wxID_CANCEL, WinEDA_NetlistFrame::OnCancelClick )
////@end WinEDA_NetlistFrame event table entries
END_EVENT_TABLE()
/*!
* WinEDA_NetlistFrame constructors
*/
WinEDA_NetlistFrame::WinEDA_NetlistFrame()
/*************************************************************************/
void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
/*************************************************************************/
{
/* Setup the default netlist file name according to the board file name */
wxFileName fn = GetScreen()->m_FileName;
fn.SetExt( NetExtBuffer );
DIALOG_NETLIST frame( this, DC, fn.GetFullPath() );
frame.ShowModal();
}
WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_PcbFrame* parent,
wxDC* DC,
const wxString& aNetlistFilename,
wxWindowID id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
DIALOG_NETLIST::DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename )
: DIALOG_NETLIST_FBP(aParent)
{
m_Parent = parent;
m_DC = DC;
m_Parent = aParent;
m_DC = aDC;
m_NetlistFilenameCtrl->SetValue(aNetlistFull_Filename);
Create( parent, id, caption, pos, size, style );
Init();
m_NetlistFilenameCtrl->SetValue( aNetlistFilename );
if( GetSizer() )
GetSizer()->SetSizeHints( this );
}
/*!
* WinEDA_NetlistFrame destructor
*/
WinEDA_NetlistFrame::~WinEDA_NetlistFrame()
void DIALOG_NETLIST::Init()
{
SetFocus();
}
/*!
* WinEDA_NetlistFrame creator
*/
bool WinEDA_NetlistFrame::Create( wxWindow* parent,
wxWindowID id,
const wxString& caption,
const wxPoint& pos,
const wxSize& size,
long style )
void DIALOG_NETLIST::OnOpenNelistClick( wxCommandEvent& event )
{
////@begin WinEDA_NetlistFrame member initialisation
m_Select_By_Timestamp = NULL;
m_ChangeExistingFootprintCtrl = NULL;
m_DeleteBadTracks = NULL;
m_DisplayWarningCtrl = NULL;
m_RemoveExtraFootprintsCtrl = NULL;
m_btClose = NULL;
m_NetlistFilenameCtrl = NULL;
m_MessageWindow = NULL;
StdDialogButtonSizer = NULL;
////@end WinEDA_NetlistFrame member initialisation
wxString fullfilename;
////@begin WinEDA_NetlistFrame creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
wxFileDialog FilesDialog( this, _( "Netlist Selection:" ), wxGetCwd(),
wxEmptyString, NetlistFileWildcard,
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
CreateControls();
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end WinEDA_NetlistFrame creation
return true;
}
/*!
* Control creation for WinEDA_NetlistFrame
*/
void WinEDA_NetlistFrame::CreateControls()
{
SetFont( *g_DialogFont );
////@begin WinEDA_NetlistFrame content construction
// Generated by DialogBlocks, 29/04/2008 20:56:53 (unregistered)
WinEDA_NetlistFrame* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxALL, 5);
wxArrayString m_Select_By_TimestampStrings;
m_Select_By_TimestampStrings.Add(_("Reference"));
m_Select_By_TimestampStrings.Add(_("Timestamp"));
m_Select_By_Timestamp = new wxRadioBox( itemDialog1, ID_SELECTION_FOOTPRINT_MODE, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampStrings, 1, wxRA_SPECIFY_COLS );
m_Select_By_Timestamp->SetSelection(0);
if (WinEDA_NetlistFrame::ShowToolTips())
m_Select_By_Timestamp->SetToolTip(_("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)"));
itemBoxSizer5->Add(m_Select_By_Timestamp, 0, wxGROW|wxALL, 5);
wxArrayString m_ChangeExistingFootprintCtrlStrings;
m_ChangeExistingFootprintCtrlStrings.Add(_("Keep"));
m_ChangeExistingFootprintCtrlStrings.Add(_("Change"));
m_ChangeExistingFootprintCtrl = new wxRadioBox( itemDialog1, ID_KEEP_OR_CHANGE_FOOTPRINTS, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlStrings, 1, wxRA_SPECIFY_COLS );
m_ChangeExistingFootprintCtrl->SetSelection(0);
if (WinEDA_NetlistFrame::ShowToolTips())
m_ChangeExistingFootprintCtrl->SetToolTip(_("Keep or change an existing footprint when the netlist gives a different footprint"));
itemBoxSizer5->Add(m_ChangeExistingFootprintCtrl, 0, wxGROW|wxALL, 5);
itemBoxSizer4->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer4->Add(itemBoxSizer9, 0, wxGROW|wxALL, 5);
wxArrayString m_DeleteBadTracksStrings;
m_DeleteBadTracksStrings.Add(_("Keep"));
m_DeleteBadTracksStrings.Add(_("Delete"));
m_DeleteBadTracks = new wxRadioBox( itemDialog1, ID_DELETE_TRACKS_OPTION, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksStrings, 1, wxRA_SPECIFY_COLS );
m_DeleteBadTracks->SetSelection(0);
if (WinEDA_NetlistFrame::ShowToolTips())
m_DeleteBadTracks->SetToolTip(_("Keep or delete bad tracks after a netlist change"));
itemBoxSizer9->Add(m_DeleteBadTracks, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Options"));
wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL);
itemBoxSizer9->Add(itemStaticBoxSizer11, 0, wxGROW|wxALL, 5);
m_DisplayWarningCtrl = new wxCheckBox( itemDialog1, ID_DISPLAY_WARNINGS_OPT, _("Display Warnings"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_DisplayWarningCtrl->SetValue(false);
itemStaticBoxSizer11->Add(m_DisplayWarningCtrl, 0, wxGROW|wxALL, 5);
m_RemoveExtraFootprintsCtrl = new wxCheckBox( itemDialog1, ID_REMOVE_EXTRA_FOOTPRINTS_OPT, _("Remove Extra Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
m_RemoveExtraFootprintsCtrl->SetValue(false);
if (WinEDA_NetlistFrame::ShowToolTips())
m_RemoveExtraFootprintsCtrl->SetToolTip(_("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed"));
itemStaticBoxSizer11->Add(m_RemoveExtraFootprintsCtrl, 0, wxGROW|wxALL, 5);
itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer3->Add(itemBoxSizer15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
wxButton* itemButton16 = new wxButton( itemDialog1, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton16->SetForegroundColour(wxColour(217, 0, 0));
itemBoxSizer15->Add(itemButton16, 0, wxGROW|wxALL, 5);
wxButton* itemButton17 = new wxButton( itemDialog1, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton17->SetForegroundColour(wxColour(0, 128, 0));
itemBoxSizer15->Add(itemButton17, 0, wxGROW|wxALL, 5);
wxButton* itemButton18 = new wxButton( itemDialog1, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 );
if (WinEDA_NetlistFrame::ShowToolTips())
itemButton18->SetToolTip(_("Read the current neltist file and list missing and extra footprints"));
itemButton18->SetForegroundColour(wxColour(0, 128, 128));
itemBoxSizer15->Add(itemButton18, 0, wxGROW|wxALL, 5);
wxButton* itemButton19 = new wxButton( itemDialog1, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 );
if (WinEDA_NetlistFrame::ShowToolTips())
itemButton19->SetToolTip(_("Rebuild the full ratsnest (usefull after a manual pad netname edition)"));
itemButton19->SetForegroundColour(wxColour(0, 0, 132));
itemBoxSizer15->Add(itemButton19, 0, wxGROW|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_btClose->SetDefault();
itemBoxSizer15->Add(m_btClose, 0, wxGROW|wxALL, 5);
wxStaticBox* itemStaticBoxSizer21Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Netlist File:"));
wxStaticBoxSizer* itemStaticBoxSizer21 = new wxStaticBoxSizer(itemStaticBoxSizer21Static, wxVERTICAL);
itemStaticBoxSizer21Static->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer2->Add(itemStaticBoxSizer21, 0, wxGROW|wxALL, 5);
m_NetlistFilenameCtrl = new wxTextCtrl( itemDialog1, ID_TEXT_NETLIST_FILENAME, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer21->Add(m_NetlistFilenameCtrl, 0, wxGROW|wxALL, 5);
m_MessageWindow = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(-1, 120), wxTE_MULTILINE|wxTE_READONLY );
itemBoxSizer2->Add(m_MessageWindow, 1, wxGROW|wxALL, 10);
wxStaticLine* itemStaticLine24 = new wxStaticLine( itemDialog1, ID_STATICLINE, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
itemBoxSizer2->Add(itemStaticLine24, 0, wxGROW|wxLEFT|wxRIGHT, 5);
StdDialogButtonSizer = new wxStdDialogButtonSizer;
itemBoxSizer2->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
wxButton* itemButton26 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton26->SetForegroundColour(wxColour(0, 0, 255));
StdDialogButtonSizer->AddButton(itemButton26);
StdDialogButtonSizer->Realize();
// Set validators
m_DisplayWarningCtrl->SetValidator( wxGenericValidator(& DisplayWarning) );
////@end WinEDA_NetlistFrame content construction
m_btClose->SetFocus();
}
/*!
* Should we show tooltips?
*/
bool WinEDA_NetlistFrame::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap WinEDA_NetlistFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_NetlistFrame bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end WinEDA_NetlistFrame bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon WinEDA_NetlistFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_NetlistFrame icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end WinEDA_NetlistFrame icon retrieval
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_OPEN_NELIST
*/
void WinEDA_NetlistFrame::OnOpenNelistClick( wxCommandEvent& event )
{
wxString fullfilename, mask( wxT( "*" ) );
fullfilename = m_NetlistFilenameCtrl->GetValue();
mask += NetExtBuffer;
fullfilename = EDA_FileSelector( _( "Netlist Selection:" ),
wxEmptyString, /* Chemin par defaut */
fullfilename, /* nom fichier par defaut */
NetExtBuffer, /* extension par defaut */
mask, /* Masque d'affichage */
this,
0,
TRUE
);
if( fullfilename.IsEmpty() )
if( FilesDialog.ShowModal() != wxID_OK )
return;
fullfilename = FilesDialog.GetPath( );
m_NetlistFilenameCtrl->SetValue( fullfilename );
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_READ_NETLIST_FILE
*/
void WinEDA_NetlistFrame::OnReadNetlistFileClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
{
wxFileName fn = m_NetlistFilenameCtrl->GetValue();
fn.SetExt( NetCmpExtBuffer );
@ -342,17 +86,12 @@ void WinEDA_NetlistFrame::OnReadNetlistFileClick( wxCommandEvent& event )
fn.GetFullPath(), m_MessageWindow,
m_ChangeExistingFootprintCtrl->GetSelection() == 1 ? TRUE : FALSE,
m_DeleteBadTracks->GetSelection() == 1 ? TRUE : FALSE,
m_RemoveExtraFootprintsCtrl->IsChecked(),
m_Select_By_Timestamp->GetSelection() == 1 ? TRUE : FALSE,
m_DisplayWarningCtrl->IsChecked());
m_RemoveExtraFootprintsCtrl->GetSelection() == 1 ? TRUE : FALSE,
m_Select_By_Timestamp->GetSelection() == 1 ? TRUE : FALSE );
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_TEST_NETLIST
*/
void WinEDA_NetlistFrame::OnTestNetlistClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
{
TestFor_Duplicate_Missing_And_Extra_Footprints( this, m_NetlistFilenameCtrl->GetValue(), m_Parent->GetBoard() );
}
@ -362,7 +101,7 @@ void WinEDA_NetlistFrame::OnTestNetlistClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COMPILE_RATSNEST
*/
void WinEDA_NetlistFrame::OnCompileRatsnestClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnCompileRatsnestClick( wxCommandEvent& event )
{
m_Parent->Compile_Ratsnest( m_DC, TRUE );
}
@ -372,7 +111,7 @@ void WinEDA_NetlistFrame::OnCompileRatsnestClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
*/
void WinEDA_NetlistFrame::OnCancelClick( wxCommandEvent& event )
void DIALOG_NETLIST::OnCancelClick( wxCommandEvent& event )
{
EndModal( -1 );
}

View File

@ -1,13 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_netlist.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 26/02/2006 17:42:19
// RCS-ID:
// Copyright: License GNU
// Licence:
/// Author: jean-pierre Charras
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 26/02/2006 17:42:19
@ -15,132 +9,29 @@
#ifndef _DIALOG_NETLIST_H_
#define _DIALOG_NETLIST_H_
/*!
* Includes
*/
////@begin includes
#include "wx/valgen.h"
#include "wx/statline.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxStdDialogButtonSizer;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_SELECTION_FOOTPRINT_MODE 10005
#define ID_KEEP_OR_CHANGE_FOOTPRINTS 10007
#define ID_DELETE_TRACKS_OPTION 10006
#define ID_DISPLAY_WARNINGS_OPT 10008
#define ID_REMOVE_EXTRA_FOOTPRINTS_OPT 10011
#define ID_OPEN_NELIST 10001
#define ID_READ_NETLIST_FILE 10002
#define ID_TEST_NETLIST 10003
#define ID_COMPILE_RATSNEST 10004
#define ID_TEXT_NETLIST_FILENAME 10012
#define ID_TEXTCTRL 10009
#define ID_STATICLINE 10010
#define SYMBOL_WINEDA_NETLISTFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist Dialog")
#define SYMBOL_WINEDA_NETLISTFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_NETLISTFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_NETLISTFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
#include "dialog_netlist_fbp.h"
/*!
* WinEDA_NetlistFrame class declaration
*/
class WinEDA_NetlistFrame: public wxDialog
class DIALOG_NETLIST : public DIALOG_NETLIST_FBP
{
DECLARE_DYNAMIC_CLASS( WinEDA_NetlistFrame )
DECLARE_EVENT_TABLE()
private:
WinEDA_PcbFrame * m_Parent;
wxDC * m_DC;
public:
/// Constructors
WinEDA_NetlistFrame();
WinEDA_NetlistFrame(WinEDA_PcbFrame* parent,
wxDC* DC,
const wxString& aNetlistFilename,
wxWindowID id = SYMBOL_WINEDA_NETLISTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_NETLISTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_NETLISTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_NETLISTFRAME_SIZE, long style = SYMBOL_WINEDA_NETLISTFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_NETLISTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_NETLISTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_NETLISTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_NETLISTFRAME_SIZE, long style = SYMBOL_WINEDA_NETLISTFRAME_STYLE );
public:
DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename );
~DIALOG_NETLIST() {};
/// Destructor
~WinEDA_NetlistFrame();
void Init();
// Virtual event handlers, overide them in your derived class
void OnOpenNelistClick( wxCommandEvent& event );
void OnReadNetlistFileClick( wxCommandEvent& event );
void OnTestFootprintsClick( wxCommandEvent& event );
void OnCompileRatsnestClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
/// Initialises member variables
void Init();
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_NetlistFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_OPEN_NELIST
void OnOpenNelistClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_READ_NETLIST_FILE
void OnReadNetlistFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_TEST_NETLIST
void OnTestNetlistClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COMPILE_RATSNEST
void OnCompileRatsnestClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_NetlistFrame event handler declarations
////@begin WinEDA_NetlistFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_NetlistFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin WinEDA_NetlistFrame member variables
wxRadioBox* m_Select_By_Timestamp;
wxRadioBox* m_ChangeExistingFootprintCtrl;
wxRadioBox* m_DeleteBadTracks;
wxCheckBox* m_DisplayWarningCtrl;
wxCheckBox* m_RemoveExtraFootprintsCtrl;
wxButton* m_btClose;
wxTextCtrl* m_NetlistFilenameCtrl;
wxTextCtrl* m_MessageWindow;
wxStdDialogButtonSizer* StdDialogButtonSizer;
////@end WinEDA_NetlistFrame member variables
WinEDA_PcbFrame* m_Parent;
wxDC* m_DC;
};
#endif
// _DIALOG_NETLIST_H_
#endif // _DIALOG_NETLIST_H_

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
#include "wx/msw/wx.rc"

View File

@ -0,0 +1,128 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_netlist_fbp.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( 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* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") };
int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString );
m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS );
m_Select_By_Timestamp->SetSelection( 0 );
m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") );
bLeftSizer->Add( m_Select_By_Timestamp, 0, wxALL|wxEXPAND, 5 );
wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") };
int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString );
m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_ChangeExistingFootprintCtrl->SetSelection( 0 );
m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") );
bLeftSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bMiddleSizer;
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") };
int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString );
m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS );
m_DeleteBadTracks->SetSelection( 0 );
m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") );
bMiddleSizer->Add( m_DeleteBadTracks, 0, wxALL|wxEXPAND, 5 );
wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") };
int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString );
m_RemoveExtraFootprintsCtrl = new wxRadioBox( this, wxID_ANY, _("Extra Footprints"), wxDefaultPosition, wxDefaultSize, m_RemoveExtraFootprintsCtrlNChoices, m_RemoveExtraFootprintsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_RemoveExtraFootprintsCtrl->SetSelection( 0 );
m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") );
bMiddleSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizerButtons;
bRightSizerButtons = new wxBoxSizer( wxVERTICAL );
m_button1 = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizerButtons->Add( m_button1, 0, wxALL|wxEXPAND, 5 );
m_button2 = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
m_button2->SetToolTip( _("Read the current netlist and update connections and connectivity info") );
bRightSizerButtons->Add( m_button2, 0, wxALL|wxEXPAND, 5 );
m_button3 = new wxButton( this, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 );
m_button3->SetToolTip( _("Read the current neltist file and list missing and extra footprints") );
bRightSizerButtons->Add( m_button3, 0, wxALL|wxEXPAND, 5 );
m_button4 = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 );
m_button4->SetToolTip( _("Rebuild the full ratsnest (usefull after a manual pad netname edition)") );
bRightSizerButtons->Add( m_button4, 0, wxALL|wxEXPAND, 5 );
m_button5 = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizerButtons->Add( m_button5, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetfilename->Wrap( -1 );
bMainSizer->Add( m_staticTextNetfilename, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bMainSizer->Add( m_NetlistFilenameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP );
bMainSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this );
m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
}
DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP()
{
// Disconnect Events
m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this );
m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
}

View File

@ -0,0 +1,862 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="9" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_netlist_fbp</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">1</property>
<property name="name">dialog_netlist_fbp</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">DIALOG_NETLIST_FBP</property>
<property name="pos"></property>
<property name="size">519,431</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Netlist Dialog</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bUpperSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Reference&quot; &quot;Timestamp&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Module Selection:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Select_By_Timestamp</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Select how footprints are recognized:&#x0A;by their reference (U1, R3...) (normal setting)&#x0A;or their time stamp (special setting after a full schematic reannotation)</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Keep&quot; &quot;Change&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Exchange Module:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ChangeExistingFootprintCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Keep or change an existing footprint when the netlist gives a different footprint</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMiddleSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Keep&quot; &quot;Delete&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Bad Tracks Deletion:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_DeleteBadTracks</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Keep or delete bad tracks after a netlist change</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Keep&quot; &quot;Delete&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Extra Footprints</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_RemoveExtraFootprintsCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Remove footprints found on the Board but not in netlist&#x0A;Note: only not locked footprints will be removed</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizerButtons</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_OPEN_NELIST</property>
<property name="label">Browse Netlist Files</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button1</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnOpenNelistClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_READ_NETLIST_FILE</property>
<property name="label">Read Current Netlist</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button2</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Read the current netlist and update connections and connectivity info</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnReadNetlistFileClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_TEST_NETLIST</property>
<property name="label">Footprints Test</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button3</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Read the current neltist file and list missing and extra footprints</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnTestFootprintsClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_COMPILE_RATSNEST</property>
<property name="label">Rebuild Board Connectivity</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button4</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Rebuild the full ratsnest (usefull after a manual pad netname edition)</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnCompileRatsnestClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Close</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button5</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnCancelClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticline1</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Netlist File:</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticTextNetfilename</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_NetlistFilenameCtrl</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Messages:</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticText1</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_MessageWindow</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>

View File

@ -0,0 +1,73 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_netlist_fbp__
#define __dialog_netlist_fbp__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_NETLIST_FBP
///////////////////////////////////////////////////////////////////////////////
class DIALOG_NETLIST_FBP : public wxDialog
{
private:
protected:
enum
{
ID_OPEN_NELIST = 1000,
ID_READ_NETLIST_FILE,
ID_TEST_NETLIST,
ID_COMPILE_RATSNEST,
};
wxRadioBox* m_Select_By_Timestamp;
wxRadioBox* m_ChangeExistingFootprintCtrl;
wxRadioBox* m_DeleteBadTracks;
wxRadioBox* m_RemoveExtraFootprintsCtrl;
wxButton* m_button1;
wxButton* m_button2;
wxButton* m_button3;
wxButton* m_button4;
wxButton* m_button5;
wxStaticLine* m_staticline1;
wxStaticText* m_staticTextNetfilename;
wxTextCtrl* m_NetlistFilenameCtrl;
wxStaticText* m_staticText1;
wxTextCtrl* m_MessageWindow;
// Virtual event handlers, overide them in your derived class
virtual void OnOpenNelistClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnReadNetlistFileClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnTestFootprintsClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCompileRatsnestClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist Dialog"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_NETLIST_FBP();
};
#endif //__dialog_netlist_fbp__

View File

@ -40,7 +40,7 @@ DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame* parent ):
SetTitle( title );
if( GetSizer() )
GetSizer()->SetSizeHints( this );
GetSizer()->SetSizeHints( this );
}

View File

@ -55,6 +55,8 @@ OBJECTS= $(TARGET).o\
set_grid.o \
pcbcfg.o \
netlist.o \
dialog_netlist.o \
dialog_netlist_fbp.o \
affiche.o \
swap_layers.o \
tracepcb.o \
@ -152,7 +154,7 @@ pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \
pcbcfg.o: pcbcfg.cpp pcbcfg.h pcbplot.h
netlist.o: netlist.cpp dialog_netlist.cpp dialog_netlist.h
netlist.o: netlist.cpp dialog_netlist.h
gen_modules_placefile.o: gen_modules_placefile.cpp

View File

@ -1,130 +1,109 @@
/************************************/
/* PCBNEW: traitement des netlistes */
/************************************/
/* Fichier NETLIST.CPP */
/***********************/
/* PCBNEW: netlist.cpp */
/***********************/
/*
* Fonction de lecture de la netliste pour:
* - Chargement modules et nouvelles connexions
* - Test des modules (modules manquants ou en trop
* - Recalcul du chevelu
* Function to read a netlist. Whele readint a netlis:
* - Load new footprints
* - Initialise net info
* - Test for missing or extra footprints
* - Recalculate ratsnest
*
* Remarque importante:
* Lors de la lecture de la netliste pour Chargement modules
* et nouvelles connexions, l'identification des modules peut se faire selon
* 2 criteres:
* - la reference (U2, R5 ..): c'est le mode normal
* - le Time Stamp (Signature Temporelle), a utiliser apres reannotation
* d'un schema, donc apres modification des references sans pourtant
* avoir reellement modifie le schema
* Important remark:
* When reading a netlist Pcbnew must identify existing footprints (link between existing footprints an components in netlist)
* This identification can be from 2 fields:
* - The reference (U2, R5 ..): this is the normal mode
* - The Time Stamp (Signature Temporelle), useful after a full schematic reannotation
* because references can be changed for the same schematic.
* So when reading a netlist this identification ReadPcbNetlist() has aselection of the way to identify footprints.
* If we want to fully reannotate a schematic this sequence must be used
* SAVE your board !!!
* Create and read the netlist (to ensure all info is correct, mainly references and time stamp)
* Reannotate the schematic (references will be changed, but not time stamp)
* Recreate and read the new netlist using the Time Stamp identification (that reinit the new references)
*/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "kicad_string.h"
#include "gestfich.h"
#include "pcbnew.h"
#include "autorout.h"
#include "dialog_netlist.h"
#include "protos.h"
#define TESTONLY 1 /* ctes utilisees lors de l'appel a */
#define READMODULE 0 /* ReadPcbNetlist() */
// constants used by ReadPcbNetlist():
#define TESTONLY 1
#define READMODULE 0
/* Structures locales */
class MODULEtoLOAD : public EDA_BaseStruct
class MODULEtoLOAD
{
public:
wxString m_LibName;
wxString m_CmpName;
wxString m_Path;
wxString m_LibName;
wxString m_CmpName;
wxString m_TimeStampPath;
MODULEtoLOAD* m_Next;
public:
MODULEtoLOAD( const wxString& libname,
const wxString& cmpname,
int timestamp,
const wxString& path );
const wxString& timestamp_path )
{
m_LibName = libname;
m_CmpName = cmpname;
m_TimeStampPath = timestamp_path;
m_Next = NULL;
}
~MODULEtoLOAD() { };
MODULEtoLOAD* Next() const { return (MODULEtoLOAD*) Pnext; }
MODULEtoLOAD* Next() const { return (MODULEtoLOAD*) m_Next; }
void SetNext( MODULEtoLOAD* next ) { m_Next = next; }
};
/* Fonctions locales : */
static void SortListModulesToLoadByLibname( int NbModules );
static void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* frame,
const wxString& NetlistFullFilename,
BOARD* Pcb );
static int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename,
wxArrayString& aBufName );
static bool OpenNetlistFile( const wxString& aFullFileName );
static void AddToList( const wxString& NameLibCmp,
const wxString& NameCmp,
int TimeStamp,
const wxString& path );
static int SetPadNetName( wxWindow* aFrame, char* Text, MODULE* Module );
static void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
const wxString& aNetlistFullFilename,
const wxString& aCmpFullFileName,
wxTextCtrl* aMessageWindow,
bool aChangeFootprint,
bool aDeleteBadTracks,
bool aDeleteExtraFootprints,
bool aSelect_By_Timestamp,
bool aVerbose );
static int ReadListeModules( const wxString& CmpFullFileName,
const wxString* RefCmp,
long TimeStamp,
wxString& NameModule );
static MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
wxTextCtrl* aMessageWindow,
const wxString& CmpFullFileName,
char* Text,
int* UseFichCmp,
int TstOnly,
bool Select_By_Timestamp,
bool aChangeFootprint );
static void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC );
static void SortListModulesToLoadByLibname( int NbModules );
static int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename,
wxArrayString& aBufName );
static bool OpenNetlistFile( const wxString& aFullFileName );
static void AddToList( const wxString& NameLibCmp,
const wxString& NameCmp,
const wxString& TimeStampPath );
static int SetPadNetName( wxWindow* aFrame,
char* Text,
MODULE* Module,
wxTextCtrl* aMessageWindow );
static int ReadListeModules( const wxString& CmpFullFileName,
const wxString* RefCmp,
const wxString* TimeStampPath,
wxString& NameModule );
static MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
wxTextCtrl* aMessageWindow,
const wxString& CmpFullFileName,
char* Text,
int* UseFichCmp,
int TstOnly,
bool Select_By_Timestamp,
bool aChangeFootprint );
static void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC );
/* Variables locales */
static int s_NbNewModules;
static MODULEtoLOAD* s_ModuleToLoad_List;
FILE* source;
static int DisplayWarningCount;
/*****************************/
/* class WinEDA_NetlistFrame */
/*****************************/
#include "dialog_netlist.cpp"
/*************************************************************************/
void WinEDA_PcbFrame::InstallNetlistFrame( wxDC* DC, const wxPoint& pos )
/*************************************************************************/
{
/* Setup the default netlist file name according to the board file name */
wxFileName fn = GetScreen()->m_FileName;
fn.SetExt( NetExtBuffer );
WinEDA_NetlistFrame* frame = new WinEDA_NetlistFrame( this, DC,
fn.GetFullPath() );
frame->ShowModal();
frame->Destroy();
}
/************************************************************************/
bool OpenNetlistFile( const wxString& aFullFileName )
/************************************************************************/
/*
* routine de selection et d'ouverture du fichier Netlist
/** function OpenNetlistFile
* used to open a netlist file
*/
{
if( aFullFileName.IsEmpty() )
@ -139,7 +118,7 @@ bool OpenNetlistFile( const wxString& aFullFileName )
return FALSE;
}
return TRUE;
return true;
}
@ -151,14 +130,17 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
bool aChangeFootprint,
bool aDeleteBadTracks,
bool aDeleteExtraFootprints,
bool aSelect_By_Timestamp,
bool aVerbose )
bool aSelect_By_Timestamp )
/********************************************************************************/
/* mise a jour des empreintes :
* corrige les Net Names, les textes, les "TIME STAMP"
/** Function ReadPcbNetlist
* Update footprints (load missing footprints and delete on request extra footprints)
* Update connectivity info ( Net Name list )
* Update Reference, value and "TIME STAMP"
* @param aNetlistFullFilename = netlist file name (*.net)
* @param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found, only the netmist will be used
*
* Analyse les lignes:
* the format of the netlist is something like:
# EESchema Netlist Version 1.0 generee le 18/5/2005-12:30:22
* (
* ( 40C08647 $noname R20 4,7K {Lib=R}
@ -170,36 +152,33 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
* ( 2 MODA_1 )
* )
* }
#End
* #End
*/
{
int LineNum, State, Comment;
MODULE* Module = NULL;
D_PAD* PtPad;
char Line[256];
char* Text;
int UseFichCmp = 1;
wxString msg;
if( aVerbose )
DisplayWarningCount = 8;
else
DisplayWarningCount = 0;
int LineNum, State, Comment;
MODULE* Module = NULL;
D_PAD* PtPad;
char Line[256];
char* Text;
int UseFichCmp = 1;
if( !OpenNetlistFile( aNetlistFullFilename ) )
return;
msg = _( "Read Netlist " ) + aNetlistFullFilename;
if( aMessageWindow )
aMessageWindow->AppendText( msg );
{
wxString msg;
msg.Printf( _( "Reading Netlist \"%s\"" ), GetChars( aNetlistFullFilename ) );
aMessageWindow->AppendText( msg + wxT( "\n" ) );
}
aFrame->GetScreen()->SetModify();
aFrame->GetBoard()->m_Status_Pcb = 0; State = 0; LineNum = 0; Comment = 0;
s_NbNewModules = 0;
wxBusyCursor dummy; // Shows an hourglass while calculating
wxBusyCursor dummy; // Shows an hourglass while calculating
/* First read of the netlist: Build the list of footprints to load (new footprints)
/* First, read the netlist: Build the list of footprints to load (new footprints)
*/
while( GetLine( source, Line, &LineNum ) )
{
@ -227,13 +206,13 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
if( State == 2 )
{
Module = ReadNetModule( aFrame,
aMessageWindow,
aCmpFullFileName,
Text,
&UseFichCmp,
TESTONLY,
aSelect_By_Timestamp,
aChangeFootprint );
aMessageWindow,
aCmpFullFileName,
Text,
&UseFichCmp,
TESTONLY,
aSelect_By_Timestamp,
aChangeFootprint );
continue;
}
@ -265,13 +244,13 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
{
Text = StrPurge( Line );
if( Comment ) /* Commentaires en cours */
if( Comment ) /* we are reading a commment */
{
if( ( Text = strchr( Text, '}' ) ) == NULL )
if( ( Text = strchr( Text, '}' ) ) == NULL ) /* this is the end of a comment */
continue;
Comment = 0;
}
if( *Text == '{' ) /* Commentaires */
if( *Text == '{' ) /* this is the beginning of a comment */
{
Comment = 1;
if( ( Text = strchr( Text, '}' ) ) == NULL )
@ -286,18 +265,18 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
if( State == 2 )
{
Module = ReadNetModule( aFrame,
aMessageWindow,
aCmpFullFileName,
Text,
&UseFichCmp,
READMODULE,
aSelect_By_Timestamp,
aChangeFootprint );
if( Module == NULL )
{ /* empreinte non trouvee dans la netliste */
aMessageWindow,
aCmpFullFileName,
Text,
&UseFichCmp,
READMODULE,
aSelect_By_Timestamp,
aChangeFootprint );
if( Module == NULL ) // the module could not be created (perhaps footprint not found in library)
{
continue;
}
else /* Raz netnames sur pads */
else /* clear pads netnames */
{
PtPad = Module->m_Pads;
for( ; PtPad != NULL; PtPad = (D_PAD*) PtPad->Next() )
@ -312,7 +291,7 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
{
if( Module )
{
SetPadNetName( NULL, Text, Module );
SetPadNetName( NULL, Text, Module, aMessageWindow );
}
State--;
}
@ -321,21 +300,23 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
fclose( source );
// Delete footprints not found in netlist:
if ( aDeleteExtraFootprints )
if( aDeleteExtraFootprints )
{
wxArrayString ModuleListFromNetlist;
/* Build list of modules in the netlist */
int NbModulesNetListe = BuildFootprintsListFromNetlistFile( aNetlistFullFilename, ModuleListFromNetlist );
wxArrayString ModuleListFromNetlist;
/* Build list of modules in the netlist */
int NbModulesNetListe = BuildFootprintsListFromNetlistFile(
aNetlistFullFilename,
ModuleListFromNetlist );
if( NbModulesNetListe )
{
MODULE * NextModule;
MODULE* NextModule;
Module = aFrame->GetBoard()->m_Modules;
bool ask_for_confirmation = true;
bool ask_for_confirmation = true;
for( ; Module != NULL; Module = NextModule )
{
int ii;
NextModule = Module->Next();
if ( (Module->m_ModuleStatus & MODULE_is_LOCKED) )
if( (Module->m_ModuleStatus & MODULE_is_LOCKED) )
continue;
for( ii = 0; ii < NbModulesNetListe; ii++ )
{
@ -348,10 +329,10 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
if( ii == NbModulesNetListe ) /* Module not found in netlist */
{
if ( ask_for_confirmation )
if( ask_for_confirmation )
{
ask_for_confirmation = false;
if ( ! IsOK( NULL, _("Ok to delete footprints not in netlist ?") ) )
if( !IsOK( NULL, _( "Ok to delete footprints not in netlist ?" ) ) )
break;
}
aFrame->Delete_Module( Module, NULL, false );
@ -361,14 +342,14 @@ void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
}
/* Rebuild the connectivity */
aFrame->Compile_Ratsnest( NULL, TRUE );
aFrame->Compile_Ratsnest( NULL, true );
if( aFrame->GetBoard()->m_Track )
{
if( aDeleteBadTracks ) // Remove erroneous tracks
{
Netliste_Controle_piste( aFrame, NULL, TRUE );
aFrame->Compile_Ratsnest( NULL, TRUE );
Netliste_Controle_piste( aFrame, NULL, true );
aFrame->Compile_Ratsnest( NULL, true );
}
}
@ -405,17 +386,16 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
* ( 2 MODB_1 )
*/
{
MODULE* Module;
char* text;
wxString TextTimeStamp;
wxString TextNameLibMod;
wxString TextValeur;
wxString TextCmpName;
wxString NameLibCmp;
unsigned long TimeStamp = 0;
int Error = 0;
char Line[1024];
bool Found;
MODULE* Module;
char* text;
wxString TimeStampPath;
wxString TextNameLibMod;
wxString TextValeur;
wxString TextCmpName;
wxString NameLibCmp;
int Error = 0;
char Line[1024];
bool Found;
strcpy( Line, Text );
@ -424,7 +404,7 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
if( ( text = strtok( Line, " ()\t\n" ) ) == NULL )
Error = 1;
else
TextTimeStamp = CONV_FROM_UTF8( text );
TimeStampPath = CONV_FROM_UTF8( text );
if( ( text = strtok( NULL, " ()\t\n" ) ) == NULL )
Error = 1;
@ -444,27 +424,24 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
if( Error > 0 )
return NULL;
wxString LocalTimeStamp = TextTimeStamp.AfterLast( '/' );
LocalTimeStamp.ToULong( &TimeStamp, 16 );
/* Tst si composant deja charge */
Module = aFrame->GetBoard()->m_Modules;
MODULE* NextModule;
for( Found = FALSE; Module != NULL; Module = NextModule )
for( Found = false; Module != NULL; Module = NextModule )
{
NextModule = Module->Next();
if( aSelect_By_Timestamp ) /* Reconnaissance par signature temporelle */
if( aSelect_By_Timestamp ) /* identification by time stamp */
{
//if( TimeStamp == Module->m_TimeStamp )
if( TextTimeStamp.CmpNoCase( Module->m_Path ) )
Found = TRUE;
if( TimeStampPath.CmpNoCase( Module->m_Path ) == 0 )
Found = true;
}
else /* Reconnaissance par Reference */
else /* identification by Reference */
{
if( TextCmpName.CmpNoCase( Module->m_Reference->m_Text ) == 0 )
Found = TRUE;
Found = true;
}
if( Found ) // Test si module (m_LibRef) et module specifie en netlist concordent
if( Found ) // test footprint matching for existing modules: current m_LibRef and module name in netlist must match
{
if( TstOnly != TESTONLY )
{
@ -472,45 +449,40 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
if( *UseFichCmp )
{
if( aSelect_By_Timestamp )
{ /* Reconnaissance par signature temporelle */
*UseFichCmp = ReadListeModules( aCmpFullFileName,
NULL,
TimeStamp,
NameLibCmp );
}
else /* Reconnaissance par Reference */
{
*UseFichCmp = ReadListeModules( aCmpFullFileName,
&TextCmpName,
0l,
NameLibCmp );
NULL,
&TimeStampPath,
NameLibCmp );
}
else
{
*UseFichCmp = ReadListeModules( aCmpFullFileName,
&TextCmpName,
NULL,
NameLibCmp );
}
}
if( Module->m_LibRef.CmpNoCase( NameLibCmp ) != 0 )
{ // Module Mismatch: Current module and module specified in netlist are diff.
if( aChangeFootprint )
if( Module->m_LibRef.CmpNoCase( NameLibCmp ) != 0 ) // Module Mismatch: Current module and module specified in netlist are different.
{
if( aChangeFootprint ) // footprint exchange allowed:
{
MODULE* NewModule =
aFrame->Get_Librairie_Module( wxEmptyString, NameLibCmp, TRUE );
if( NewModule ) /* Nouveau module trouve : changement de module */
aFrame->Get_Librairie_Module( wxEmptyString, NameLibCmp, true );
if( NewModule ) /* Change old module to the new module (and delete the old one)*/
Module = aFrame->Exchange_Module( NULL, Module, NewModule );
}
else
{
wxString msg;
msg.Printf(
_(
"Component \"%s\": Mismatch! module is [%s] and netlist said [%s]\n" ),
TextCmpName.GetData(), Module->m_LibRef.GetData(),
NameLibCmp.GetData() );
if( aMessageWindow )
{
msg.Printf(
_( "Cmp %s: Mismatch! module is [%s] and netlist said [%s]\n" ),
TextCmpName.GetData(), Module->m_LibRef.GetData(),
NameLibCmp.GetData() );
aMessageWindow->AppendText( msg );
}
if( DisplayWarningCount > 0 )
{
DisplayError( NULL, msg, 2 );
DisplayWarningCount--;
}
}
}
}
@ -518,62 +490,53 @@ MODULE* ReadNetModule( WinEDA_PcbFrame* aFrame,
}
}
if( Module == NULL ) /* Module a charger */
if( Module == NULL ) /* a new module must be loaded from libs */
{
NameLibCmp = TextNameLibMod;
if( *UseFichCmp )
{
if( aSelect_By_Timestamp == 1 )
{ /* Reconnaissance par signature temporelle */
*UseFichCmp = ReadListeModules( aCmpFullFileName, NULL, TimeStamp, NameLibCmp );
}
else /* Reconnaissance par Reference */
{
*UseFichCmp = ReadListeModules( aCmpFullFileName, &TextCmpName, 0l, NameLibCmp );
*UseFichCmp = ReadListeModules( aCmpFullFileName, NULL, &TimeStampPath, NameLibCmp );
}
else
{
*UseFichCmp = ReadListeModules( aCmpFullFileName, &TextCmpName, NULL, NameLibCmp );
}
}
if( TstOnly == TESTONLY )
AddToList( NameLibCmp, TextCmpName, TimeStamp, TextTimeStamp );
AddToList( NameLibCmp, TextCmpName, TimeStampPath );
else
{
if( aMessageWindow && (DisplayWarningCount> 0) )
if( aMessageWindow )
{
wxString msg;
msg.Printf( _( "Component [%s] not found" ), TextCmpName.GetData() );
aMessageWindow->AppendText( msg + wxT( "\n" ) );
DisplayError( NULL, msg, 2 );
DisplayWarningCount--;
}
}
return NULL; /* Le module n'avait pas pu etre charge */
}
/* mise a jour des reperes ( nom et ref "Time Stamp") si module charge */
/* Fields update ( reference, value and "Time Stamp") */
Module->m_Reference->m_Text = TextCmpName;
Module->m_Value->m_Text = TextValeur;
Module->m_TimeStamp = TimeStamp;
Module->m_Path = TextTimeStamp;
#if defined (DEBUG)
printf( "in ReadNetModule() m_Path = %s\n",
CONV_TO_UTF8( Module->m_Path ) );
#endif
Module->m_Value->m_Text = TextValeur;
Module->m_Path = TimeStampPath;
return Module; /* composant trouve */
}
/********************************************************************/
int SetPadNetName( wxWindow* frame, char* Text, MODULE* Module )
/********************************************************************/
/*******************************************************************************************/
int SetPadNetName( wxWindow* frame, char* Text, MODULE* Module, wxTextCtrl* aMessageWindow )
/*******************************************************************************************/
/** Function SetPadNetName
* Update a pad netname in a given footprint
* @param Text = Text from netlist (format: (pad = net) )
* @param Module = the given footprint
* @param aMessageWindow = a wxTextCtrl to print error and warning message (can be NULL)
*/
{
D_PAD* pad;
@ -599,23 +562,25 @@ int SetPadNetName( wxWindow* frame, char* Text, MODULE* Module )
pad = Module->m_Pads; trouve = FALSE;
for( ; pad != NULL; pad = (D_PAD*) pad->Next() )
{
if( strnicmp( TextPinName, pad->m_Padname, 4 ) == 0 )
{ /* trouve */
trouve = TRUE;
if( strnicmp( TextPinName, pad->m_Padname, 4 ) == 0 ) /* trouve */
{
trouve = true;
if( *TextNetName != '?' )
pad->SetNetname( CONV_FROM_UTF8( TextNetName ) );
else
pad->SetNetname( wxEmptyString);
pad->SetNetname( wxEmptyString );
}
}
if( !trouve && (DisplayWarningCount > 0) )
if( !trouve )
{
wxString pin_name = CONV_FROM_UTF8( TextPinName );
Msg.Printf( _( "Module [%s]: Pad [%s] not found" ),
Module->m_Reference->m_Text.GetData(), pin_name.GetData() );
DisplayError( frame, Msg, 1 );
DisplayWarningCount--;
if( aMessageWindow )
{
wxString pin_name = CONV_FROM_UTF8( TextPinName );
Msg.Printf( _( "Module [%s]: Pad [%s] not found" ),
Module->m_Reference->m_Text.GetData(), pin_name.GetData() );
aMessageWindow->AppendText( Msg + wxT( "\n" ) );
}
}
return trouve;
@ -626,62 +591,52 @@ int SetPadNetName( wxWindow* frame, char* Text, MODULE* Module )
MODULE* WinEDA_PcbFrame::ListAndSelectModuleName( void )
/*****************************************************/
/* liste les noms des modules du PCB
* Retourne:
* un pointeur sur le module selectionne
* NULL si pas de selection
/**
* build and shows a list of existing modules on board
* The user can slect a module from this list
* @return a pointer to the selected module or NULL
*/
{
int ii, jj, nb_empr;
MODULE* Module;
WinEDAListBox* ListBox;
const wxChar** ListNames = NULL;
int ii, jj;
MODULE* Module;
if( GetBoard()->m_Modules == NULL )
{
DisplayError( this, _( "No Modules" ) ); return 0;
}
/* Calcul du nombre des modules */
nb_empr = 0; Module = (MODULE*) GetBoard()->m_Modules;
WinEDAListBox listbox( this, _( "Components" ), NULL, wxEmptyString );
Module = (MODULE*) GetBoard()->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
nb_empr++;
ListNames = (const wxChar**) MyZMalloc( (nb_empr + 1) * sizeof(wxChar*) );
Module = (MODULE*) GetBoard()->m_Modules;
for( ii = 0; Module != NULL; Module = (MODULE*) Module->Next(), ii++ )
{
ListNames[ii] = Module->m_Reference->m_Text.GetData();
listbox.Append( Module->m_Reference->m_Text );
}
ListBox = new WinEDAListBox( this, _( "Components" ),
ListNames, wxEmptyString );
ii = ListBox->ShowModal(); ListBox->Destroy();
ii = listbox.ShowModal();
if( ii < 0 ) /* Pas de selection */
if( ii < 0 )
{
Module = NULL;
}
else /* Recherche du module selectionne */
else /* Search for the selected footprint */
{
wxString ref = listbox.GetTextSelection();
Module = (MODULE*) GetBoard()->m_Modules;
for( jj = 0; Module != NULL; Module = (MODULE*) Module->Next(), jj++ )
{
if( Module->m_Reference->m_Text.Cmp( ListNames[ii] ) == 0 )
if( Module->m_Reference->m_Text.Cmp( ref ) == 0 )
break;
}
}
free( ListNames );
return Module;
}
/*****************************************************************************************/
void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
const wxString& aNetlistFullFilename,
BOARD* aPcb )
void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
const wxString& aNetlistFullFilename,
BOARD* aPcb )
/******************************************************************************************/
/** Function TestFor_Duplicate_Missing_And_Extra_Footprints
@ -695,7 +650,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
*/
#define MAX_LEN_TXT 32
{
int ii;
int ii;
MODULE* Module, * pt_aux;
int NbModulesNetListe, nberr = 0;
WinEDA_TextFrame* List;
@ -707,7 +662,8 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
}
/* Construction de la liste des references des modules de la netliste */
NbModulesNetListe = BuildFootprintsListFromNetlistFile( aNetlistFullFilename, ModuleListFromNetlist );
NbModulesNetListe = BuildFootprintsListFromNetlistFile( aNetlistFullFilename,
ModuleListFromNetlist );
if( NbModulesNetListe < 0 )
return; /* File not found */
@ -785,7 +741,8 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
/***************************************************************************************/
int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename, wxArrayString& aBufName )
int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename,
wxArrayString& aBufName )
/***************************************************************************************/
/** Function BuildFootprintsListFromNetlistFile
@ -855,14 +812,14 @@ int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename, wx
/*****************************************************************************************/
int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, long TimeStamp,
wxString& NameModule )
int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp,
const wxString* TimeStamp, wxString& NameModule )
/*****************************************************************************************/
/*
* Lit le fichier .CMP donnant l'equivalence Modules / Composants
* Retourne:
* Si ce fichier existe:
* Si ce fichier existe retourne :
* 1 et le nom module dans NameModule
* -1 si module non trouve en fichier
* sinon 0;
@ -877,14 +834,14 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
* Cmp-Mod V01 Genere par PcbNew le 29/10/2003-13:11:6
*
* BeginCmp
* TimeStamp = 322D3011;
* TimeStamp = /322D3011;
* Reference = BUS1;
* ValeurCmp = BUSPC;
* IdModule = BUS_PC;
* EndCmp
*
* BeginCmp
* TimeStamp = 32307DE2;
* TimeStamp = /32307DE2/AA450F67;
* Reference = C1;
* ValeurCmp = 47uF;
* IdModule = CP6;
@ -892,9 +849,8 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
*
*/
{
wxString refcurrcmp, idmod;
wxString refcurrcmp, timestamp, idmod;
char ia[1024];
int timestamp;
char* ptcar;
FILE* FichCmp;
@ -906,7 +862,7 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
{
wxString msg;
msg.Printf( _( "File <%s> not found, use Netlist for lib module selection" ),
CmpFullFileName.GetData() );
CmpFullFileName.GetData() );
DisplayError( NULL, msg, 20 );
return 0;
}
@ -919,7 +875,7 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
/* Ici une description de 1 composant commence */
refcurrcmp.Empty();
idmod.Empty();
timestamp = -1;
timestamp.Empty();
while( fgets( ia, sizeof(ia), FichCmp ) != NULL )
{
if( strnicmp( ia, "EndCmp", 6 ) == 0 )
@ -947,7 +903,7 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
ptcar = ia + 11;
ptcar = strtok( ptcar, " =;\t\n" );
if( ptcar )
sscanf( ptcar, "%X", &timestamp );
timestamp = CONV_FROM_UTF8( ptcar );
}
}
@ -956,16 +912,16 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
/* Test du Composant lu en fichier: est-il le bon */
if( RefCmp )
{
if( RefCmp->CmpNoCase( refcurrcmp ) == 0 )
if( RefCmp->CmpNoCase( refcurrcmp ) == 0 ) //Found!
{
fclose( FichCmp );
NameModule = idmod;
return 1;
}
}
else if( TimeStamp != -1 )
else if( TimeStamp )
{
if( TimeStamp == timestamp )
if( TimeStamp->CmpNoCase( timestamp ) == 0 && !timestamp.IsEmpty() ) //Found
{
fclose( FichCmp );
NameModule = idmod;
@ -980,8 +936,7 @@ int ReadListeModules( const wxString& CmpFullFileName, const wxString* RefCmp, l
/***********************************************************************************/
void AddToList( const wxString& NameLibCmp, const wxString& CmpName,
int TimeStamp, const wxString& path )
void AddToList( const wxString& NameLibCmp, const wxString& CmpName, const wxString& path )
/************************************************************************************/
/* Fontion copiant en memoire de travail les caracteristiques
@ -990,7 +945,7 @@ void AddToList( const wxString& NameLibCmp, const wxString& CmpName,
{
MODULEtoLOAD* NewMod;
NewMod = new MODULEtoLOAD( NameLibCmp, CmpName, TimeStamp, path );
NewMod = new MODULEtoLOAD( NameLibCmp, CmpName, path );
NewMod->SetNext( s_ModuleToLoad_List );
s_ModuleToLoad_List = NewMod;
s_NbNewModules++;
@ -1022,9 +977,9 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
if( aPcbFrame->SetBoardBoundaryBoxFromEdgesOnly() )
{
aPcbFrame->GetScreen()->m_Curseur.x = aPcbFrame->GetBoard()->m_BoundaryBox.GetRight() +
5000;
5000;
aPcbFrame->GetScreen()->m_Curseur.y = aPcbFrame->GetBoard()->m_BoundaryBox.GetBottom() +
10000;
10000;
}
else
{
@ -1042,7 +997,7 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
{
wxString msg;
msg.Printf( _( "Component [%s]: footprint <%s> not found" ),
cmp->m_CmpName.GetData(), cmp->m_LibName.GetData() );
cmp->m_CmpName.GetData(), cmp->m_LibName.GetData() );
DisplayError( NULL, msg );
continue;
}
@ -1050,8 +1005,8 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
/* Update schematic links : reference "Time Stamp" and schematic hierarchical path */
Module->m_Reference->m_Text = cmp->m_CmpName;
Module->m_TimeStamp = cmp->m_TimeStamp;
Module->m_Path = cmp->m_Path;
Module->m_TimeStamp = GetTimeStamp();
Module->m_Path = cmp->m_TimeStampPath;
}
else
{
@ -1067,8 +1022,8 @@ void LoadListeModules( WinEDA_PcbFrame* aPcbFrame, wxDC* DC )
Module = newmodule;
Module->m_Reference->m_Text = cmp->m_CmpName;
Module->m_TimeStamp = cmp->m_TimeStamp;
Module->m_Path = cmp->m_Path;
Module->m_TimeStamp = GetTimeStamp();
Module->m_Path = cmp->m_TimeStampPath;
}
}
@ -1105,7 +1060,7 @@ void SortListModulesToLoadByLibname( int NbModules )
}
qsort( base_list, NbModules, sizeof(MODULEtoLOAD*),
( int( * ) ( const void*, const void* ) )SortByLibName );
( int( * ) ( const void*, const void* ) )SortByLibName );
// Reconstruction du chainage:
s_ModuleToLoad_List = *base_list;
@ -1121,15 +1076,3 @@ void SortListModulesToLoadByLibname( int NbModules )
free( base_list );
}
/*****************************************************************************/
MODULEtoLOAD::MODULEtoLOAD( const wxString& libname, const wxString& cmpname,
int timestamp, const wxString& path ) : EDA_BaseStruct( TYPE_NOT_INIT )
/*****************************************************************************/
{
m_LibName = libname;
m_CmpName = cmpname;
m_TimeStamp = timestamp;
m_Path = path;
}