Commit b9ba67c8 authored by charras's avatar charras
Browse files

Pcbnew: Fixed: fully broken netlist import from eeschema when using time stamp...

Pcbnew: Fixed: fully broken netlist import from eeschema when using time stamp (fully broken also in stable version).
parent aa51c05d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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:
+1 −16
Original line number Diff line number Diff line
@@ -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

+2 −1
Original line number Diff line number Diff line
@@ -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
+47 −308
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////

// 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

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "fctsys.h"
#include "common.h"
#include "pcbnew.h"

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "dialog_netlist.h"

////@begin XPM images
////@end XPM images

static bool DisplayWarning;
extern void ReadPcbNetlist( WinEDA_PcbFrame* aFrame,
                            const wxString&  aNetlistFullFilename,
                            const wxString&  aCmpFullFileName,
                            wxTextCtrl*      aMessageWindow,
                            bool             aChangeFootprint,
                            bool             aDeleteBadTracks,
                            bool             aDeleteExtraFootprints,
                            bool             aSelect_By_Timestamp );

/*!
 * WinEDA_NetlistFrame type definition
 */

IMPLEMENT_DYNAMIC_CLASS( WinEDA_NetlistFrame, wxDialog )

/*!
 * WinEDA_NetlistFrame event table definition
 */
extern void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow*       frame,
                                                            const wxString& NetlistFullFilename,
                                                            BOARD*          Pcb );

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 );

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 )
{
    m_Parent = parent;
    m_DC = DC;

    Create( parent, id, caption, pos, size, style );
    DIALOG_NETLIST frame( this, DC, fn.GetFullPath() );

    m_NetlistFilenameCtrl->SetValue( aNetlistFilename );
    frame.ShowModal();
}


/*!
 * WinEDA_NetlistFrame destructor
 */

WinEDA_NetlistFrame::~WinEDA_NetlistFrame()
DIALOG_NETLIST::DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename )
    : DIALOG_NETLIST_FBP(aParent)
{
}
    m_Parent = aParent;
    m_DC = aDC;
    m_NetlistFilenameCtrl->SetValue(aNetlistFull_Filename);

/*!
 * WinEDA_NetlistFrame creator
 */
    Init();

bool WinEDA_NetlistFrame::Create( wxWindow* parent,
                                  wxWindowID id,
                                  const wxString& caption,
                                  const wxPoint& pos,
                                  const wxSize& size,
                                  long style )
{
////@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

////@begin WinEDA_NetlistFrame creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    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()
void DIALOG_NETLIST::Init()
{
    return true;
    SetFocus();
}


/*!
 * Get bitmap resources
 */

wxBitmap WinEDA_NetlistFrame::GetBitmapResource( const wxString& name )
void DIALOG_NETLIST::OnOpenNelistClick( wxCommandEvent& event )
{
    // Bitmap retrieval
////@begin WinEDA_NetlistFrame bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end WinEDA_NetlistFrame bitmap retrieval
}
    wxString fullfilename;

    wxFileDialog FilesDialog( this, _( "Netlist Selection:" ), wxGetCwd(),
                              wxEmptyString, NetlistFileWildcard,
                              wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );

/*!
 * 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
}
    if( FilesDialog.ShowModal() != wxID_OK )
        return;

    fullfilename = FilesDialog.GetPath( );

/*!
 * 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() )
        return;
    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 );
}
+18 −127
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////

// 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
 */
#include "dialog_netlist_fbp.h"

#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif


/*!
 * WinEDA_NetlistFrame class declaration
 */

class WinEDA_NetlistFrame: public wxDialog
class DIALOG_NETLIST : public DIALOG_NETLIST_FBP
{
    DECLARE_DYNAMIC_CLASS( WinEDA_NetlistFrame )
    DECLARE_EVENT_TABLE()

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 );
	private:
    WinEDA_PcbFrame * m_Parent;
    wxDC * m_DC;

    /// 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 );

    /// Destructor
    ~WinEDA_NetlistFrame();
	public:
		DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename );
		~DIALOG_NETLIST() {};

    /// 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
		// Virtual event handlers, overide them in your derived class
		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 OnTestFootprintsClick( wxCommandEvent& event );
		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_
Loading