dialog_erc.h 1.86 KB
Newer Older
1 2 3
/////////////////////////////////////////////////////////////////////////////
// Name:        dialog_erc.h
// Author:      jean-pierre Charras
4
// Licence:    GPL
5 6 7 8 9
/////////////////////////////////////////////////////////////////////////////

#ifndef _DIALOG_ERC_H_
#define _DIALOG_ERC_H_

10 11 12 13
#include <wx/htmllbox.h>
#include <vector>


14
#include <dialog_erc_base.h>
15 16

/* Variable locales */
17
extern int           DiagErc[PIN_NMAX][PIN_NMAX];
18
extern bool          DiagErcTableInit; // go to true after DiagErc init
19
extern int           DefaultDiagErc[PIN_NMAX][PIN_NMAX];
20 21
extern const wxChar* CommentERC_H[];
extern const wxChar* CommentERC_V[];
22

23
/*  Control identifiers */
24 25 26
#define ID_MATRIX_0 1800

/*!
27
 * DIALOG_ERC class declaration
28 29
 */

30
class DIALOG_ERC : public DIALOG_ERC_BASE
31
{
32
    DECLARE_EVENT_TABLE()
33 34

private:
35 36 37 38
    SCH_EDIT_FRAME* m_parent;
    wxBitmapButton* m_buttonList[PIN_NMAX][PIN_NMAX];
    bool            m_initialized;
    const SCH_MARKER* m_lastMarkerFound;
39
    static bool     m_writeErcFile;
40 41

public:
42
    DIALOG_ERC( SCH_EDIT_FRAME* parent );
43
    ~DIALOG_ERC();
44

45
private:
46
    void Init();
47

48 49
    // from DIALOG_ERC_BASE:
	void OnCloseErcDialog( wxCloseEvent& event );
50 51
    void OnErcCmpClick( wxCommandEvent& event );
    void OnEraseDrcMarkersClick( wxCommandEvent& event );
52
    void OnButtonCloseClick( wxCommandEvent& event );
53
    void OnResetMatrixClick( wxCommandEvent& event );
54 55
    void OnLeftClickMarkersList( wxCommandEvent& event );

56
    // Double click on a marker info:
57
    void OnLeftDblClickMarkersList( wxCommandEvent& event );
58

59 60 61 62 63 64 65
    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();
66 67
};

68

69
#endif
70 71

// _DIALOG_ERC_H_