Commit 91d5bb58 authored by jean-pierre charras's avatar jean-pierre charras

Eeschema: dialog ERC: minor enhancements and code cleaning.

parent 6559d6a5
This diff is collapsed.
...@@ -32,9 +32,10 @@ class DIALOG_ERC : public DIALOG_ERC_BASE ...@@ -32,9 +32,10 @@ class DIALOG_ERC : public DIALOG_ERC_BASE
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
private: private:
SCH_EDIT_FRAME* m_Parent; SCH_EDIT_FRAME* m_parent;
wxBitmapButton* m_ButtonList[PIN_NMAX][PIN_NMAX]; wxBitmapButton* m_buttonList[PIN_NMAX][PIN_NMAX];
bool m_Initialized; bool m_initialized;
const SCH_MARKER* m_lastMarkerFound;
static bool m_writeErcFile; static bool m_writeErcFile;
public: public:
...@@ -56,8 +57,11 @@ public: ...@@ -56,8 +57,11 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RESET_MATRIX /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RESET_MATRIX
void OnResetMatrixClick( wxCommandEvent& event ); void OnResetMatrixClick( wxCommandEvent& event );
// Single click on a marker info:
void OnLeftClickMarkersList( wxCommandEvent& event );
// Double click on a marker info: // Double click on a marker info:
void OnLeftDClickMarkersList( wxCommandEvent& event ); void OnLeftDblClickMarkersList( wxCommandEvent& event );
void TestErc( wxArrayString* aMessagesList ); void TestErc( wxArrayString* aMessagesList );
void DisplayERC_MarkersList(); void DisplayERC_MarkersList();
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 11 2012) // C++ code generated with wxFormBuilder (version Apr 10 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_ERC_BASE_H__ #ifndef __DIALOG_ERC_BASE_H__
#define __DIALOG_ERC_BASE_H__ #define __DIALOG_ERC_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include "dialog_erc_listbox.h" #include "dialog_erc_listbox.h"
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/textctrl.h>
#include <wx/statbox.h> #include <wx/sizer.h>
#include <wx/textctrl.h> #include <wx/checkbox.h>
#include <wx/button.h> #include <wx/statbox.h>
#include <wx/checkbox.h> #include <wx/button.h>
#include <wx/statline.h> #include <wx/listbox.h>
#include <wx/listbox.h> #include <wx/panel.h>
#include <wx/panel.h> #include <wx/bitmap.h>
#include <wx/bitmap.h> #include <wx/image.h>
#include <wx/image.h> #include <wx/icon.h>
#include <wx/icon.h> #include <wx/notebook.h>
#include <wx/notebook.h> #include <wx/dialog.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_ERC_BASE
/// Class DIALOG_ERC_BASE ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// class DIALOG_ERC_BASE : public DIALOG_SHIM
class DIALOG_ERC_BASE : public DIALOG_SHIM {
{ DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE() private:
private:
// Private event handlers
// Private event handlers void _wxFB_OnErcCmpClick( wxCommandEvent& event ){ OnErcCmpClick( event ); }
void _wxFB_OnErcCmpClick( wxCommandEvent& event ){ OnErcCmpClick( event ); } void _wxFB_OnEraseDrcMarkersClick( wxCommandEvent& event ){ OnEraseDrcMarkersClick( event ); }
void _wxFB_OnEraseDrcMarkersClick( wxCommandEvent& event ){ OnEraseDrcMarkersClick( event ); } void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); }
void _wxFB_OnCancelClick( wxCommandEvent& event ){ OnCancelClick( event ); } void _wxFB_OnLeftClickMarkersList( wxCommandEvent& event ){ OnLeftClickMarkersList( event ); }
void _wxFB_OnLeftDClickMarkersList( wxCommandEvent& event ){ OnLeftDClickMarkersList( event ); } void _wxFB_OnLeftDblClickMarkersList( wxCommandEvent& event ){ OnLeftDblClickMarkersList( event ); }
void _wxFB_OnResetMatrixClick( wxCommandEvent& event ){ OnResetMatrixClick( event ); } void _wxFB_OnResetMatrixClick( wxCommandEvent& event ){ OnResetMatrixClick( event ); }
protected: protected:
enum enum
{ {
ID_ERC_CMP = 1000, ID_ERC_CMP = 1000,
ID_ERASE_DRC_MARKERS, ID_ERASE_DRC_MARKERS,
ID_MAKER_HTMLLISTBOX, ID_MAKER_HTMLLISTBOX,
ID_RESET_MATRIX ID_RESET_MATRIX
}; };
wxNotebook* m_NoteBook; wxNotebook* m_NoteBook;
wxPanel* m_PanelERC; wxPanel* m_PanelERC;
wxStaticText* m_ErcTotalErrorsText; wxStaticText* m_ErcTotalErrorsText;
wxStaticText* m_TotalErrCount; wxTextCtrl* m_TotalErrCount;
wxStaticText* m_WarnErcErrorsText; wxStaticText* m_WarnErcErrorsText;
wxStaticText* m_LastWarningCount; wxTextCtrl* m_LastWarningCount;
wxStaticText* m_LastErrCountText; wxStaticText* m_LastErrCountText;
wxStaticText* m_LastErrCount; wxTextCtrl* m_LastErrCount;
wxStaticText* m_titleMessages; wxCheckBox* m_WriteResultOpt;
wxTextCtrl* m_MessagesList; wxStaticText* m_titleMessages;
wxButton* m_buttonERC; wxTextCtrl* m_MessagesList;
wxButton* m_buttondelmarkers; wxButton* m_buttonERC;
wxButton* m_buttonClose; wxButton* m_buttondelmarkers;
wxCheckBox* m_WriteResultOpt; wxButton* m_buttonClose;
wxStaticLine* m_staticline2; wxStaticText* m_textMarkers;
wxStaticText* m_textMarkers; ERC_HTML_LISTBOX* m_MarkersList;
ERC_HTML_LISTBOX* m_MarkersList; wxPanel* m_PanelERCOptions;
wxPanel* m_PanelERCOptions; wxButton* m_ResetOptButton;
wxBoxSizer* m_PanelMatrixSizer; wxPanel* m_matrixPanel;
wxButton* m_ResetOptButton;
wxStaticLine* m_staticline1; // Virtual event handlers, overide them in your derived class
wxBoxSizer* m_MatrixSizer; virtual void OnErcCmpClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEraseDrcMarkersClick( wxCommandEvent& event ) { event.Skip(); }
// Virtual event handlers, overide them in your derived class virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnErcCmpClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnLeftClickMarkersList( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEraseDrcMarkersClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnLeftDblClickMarkersList( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnResetMatrixClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLeftDClickMarkersList( wxCommandEvent& event ) { event.Skip(); }
virtual void OnResetMatrixClick( wxCommandEvent& event ) { event.Skip(); }
public:
public: DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Erc"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,392 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ERC_BASE();
DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Erc"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ERC_BASE(); };
}; #endif //__DIALOG_ERC_BASE_H__
#endif //__DIALOG_ERC_BASE_H__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment