2014-10-21 15:48:00 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
|
|
|
* Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef _DIALOG_ERC_H_
|
|
|
|
#define _DIALOG_ERC_H_
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
#include <wx/htmllbox.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_erc_base.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* Variable locales */
|
2009-07-08 15:42:45 +00:00
|
|
|
extern int DiagErc[PIN_NMAX][PIN_NMAX];
|
2012-01-22 17:20:22 +00:00
|
|
|
extern bool DiagErcTableInit; // go to true after DiagErc init
|
2009-07-08 15:42:45 +00:00
|
|
|
extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX];
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
/* Control identifiers */
|
2007-06-05 12:10:51 +00:00
|
|
|
#define ID_MATRIX_0 1800
|
|
|
|
|
|
|
|
/*!
|
2009-07-03 18:25:06 +00:00
|
|
|
* DIALOG_ERC class declaration
|
2007-06-05 12:10:51 +00:00
|
|
|
*/
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
class DIALOG_ERC : public DIALOG_ERC_BASE
|
2009-07-05 12:09:41 +00:00
|
|
|
{
|
2009-07-08 15:42:45 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2009-07-03 18:25:06 +00:00
|
|
|
|
|
|
|
private:
|
2012-11-30 12:28:23 +00:00
|
|
|
SCH_EDIT_FRAME* m_parent;
|
|
|
|
wxBitmapButton* m_buttonList[PIN_NMAX][PIN_NMAX];
|
|
|
|
bool m_initialized;
|
|
|
|
const SCH_MARKER* m_lastMarkerFound;
|
2010-12-08 20:12:46 +00:00
|
|
|
static bool m_writeErcFile;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
public:
|
2010-12-08 20:12:46 +00:00
|
|
|
DIALOG_ERC( SCH_EDIT_FRAME* parent );
|
2012-12-10 19:08:09 +00:00
|
|
|
~DIALOG_ERC();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2012-12-10 19:08:09 +00:00
|
|
|
private:
|
2009-07-03 18:25:06 +00:00
|
|
|
void Init();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2012-12-10 19:08:09 +00:00
|
|
|
// from DIALOG_ERC_BASE:
|
2015-03-06 08:58:32 +00:00
|
|
|
void OnCloseErcDialog( wxCloseEvent& event );
|
2007-06-05 12:10:51 +00:00
|
|
|
void OnErcCmpClick( wxCommandEvent& event );
|
|
|
|
void OnEraseDrcMarkersClick( wxCommandEvent& event );
|
2012-12-10 19:08:09 +00:00
|
|
|
void OnButtonCloseClick( wxCommandEvent& event );
|
2007-06-05 12:10:51 +00:00
|
|
|
void OnResetMatrixClick( wxCommandEvent& event );
|
2012-11-30 12:28:23 +00:00
|
|
|
void OnLeftClickMarkersList( wxCommandEvent& event );
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
// Double click on a marker info:
|
2012-11-30 12:28:23 +00:00
|
|
|
void OnLeftDblClickMarkersList( wxCommandEvent& event );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
void TestErc( wxArrayString* aMessagesList );
|
|
|
|
void DisplayERC_MarkersList();
|
|
|
|
void SelLocal( wxCommandEvent& event );
|
|
|
|
void SelNewCmp( wxCommandEvent& event );
|
|
|
|
void ResetDefaultERCDiag( wxCommandEvent& event );
|
|
|
|
void ChangeErrorLevel( wxCommandEvent& event );
|
|
|
|
void ReBuildMatrixPanel();
|
2014-10-08 04:02:48 +00:00
|
|
|
void setDRCMatrixButtonState( wxBitmapButton *aButton, int aState );
|
2014-10-08 22:40:47 +00:00
|
|
|
void updateMarkerCounts( SCH_SCREENS *screens );
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
// _DIALOG_ERC_H_
|