Commit 514c63c7 authored by dickelbeck's avatar dickelbeck
Browse files

DRC rework start

parent 699eaf4a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4,6 +4,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.

2007-Nov-26 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
    DRC code and dialog rework start.  This breaks DRC, until I get out the
    other end of the tunnel.


2007-Nov-24 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+379 −139

File changed.

Preview size limit exceeded, changes collapsed.

+64 −41
Original line number Diff line number Diff line
@@ -24,38 +24,41 @@

////@begin includes
#include "wx/valgen.h"
#include "wx/statline.h"
#include "wx/notebook.h"
////@end includes


/*!
 * Forward declarations
 */

////@begin forward declarations
class wxBoxSizer;
class wxStaticLine;
class DRCLISTBOX;
class wxStdDialogButtonSizer;
////@end forward declarations


/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_DIALOG 10000
#define ID_TEXTCTRL_CLEARANCE 10002
#define ID_CHECKBOX_PAD2PAD 10009
#define ID_CHECKBOX_UNCONNECTED 10008
#define ID_CHECKBOX_TEST_ZONES 10007
#define ID_CHECKBOX_CREATE_FILE 10012
#define ID_DRC_RUN 10003
#define ID_STOP_CONTROL_DRC 10004
#define ID_ERASE_DRC_MARKERS 10005
#define ID_LIST_UNCONNECTED_PADS 10006
#define ID_BUTTON_BROWSE_RPT_FILE 10011
#define ID_TEXTCTRL_GET_RPT_FILENAME 10010
#define ID_TEXTCTRL 10001
#define ID_STATICLINE 10013
#define ID_TEXTCTRL1 10002
#define ID_CHECKBOX 10004
#define ID_TEXTCTRL3 10014
#define ID_BUTTON_BROWSE_RPT_FILE 10018
#define ID_CHECKBOX2 10019
#define ID_CHECKBOX3 10020
#define ID_CHECKBOX7 10021
#define ID_STARTDRC 10006
#define ID_LIST_UNCONNECTED 10003
#define ID_DELETE_ALL 10005
#define ID_DELETE_ONE 10007
#define ID_NOTEBOOK1 10008
#define ID_CLEARANCE_LIST 10001
#define ID_UNCONNECTED_LIST 10009
#define SYMBOL_WINEDA_DRCFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_DRCFRAME_TITLE _("DRC Control")
#define SYMBOL_WINEDA_DRCFRAME_IDNAME ID_DIALOG
@@ -63,6 +66,8 @@ class wxStdDialogButtonSizer;
#define SYMBOL_WINEDA_DRCFRAME_POSITION wxDefaultPosition
////@end control identifiers

#define ID_DRCLISTCTRL 10001   // outside @end control identifiers since DialogBlocks knows not DRCLISTBOX 

/*!
 * Compatibility
 */
@@ -96,32 +101,44 @@ public:
    /// Creates the controls and sizers
    void CreateControls();

    /// Override the event handler so we can direct the m_lowWindows events here initially
    virtual bool ProcessEvent( wxEvent& event );

////@begin WinEDA_DrcFrame event handler declarations

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DRC_RUN
    void OnDrcRunClick( wxCommandEvent& event );
    /// wxEVT_INIT_DIALOG event handler for ID_DIALOG
    void OnInitDialog( wxInitDialogEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_STOP_CONTROL_DRC
    void OnStopControlDrcClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ERASE_DRC_MARKERS
    void OnEraseDrcMarkersClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_LIST_UNCONNECTED_PADS
    void OnListUnconnectedPadsClick( wxCommandEvent& event );
    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX
    void OnReportCheckBoxClicked( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_BROWSE_RPT_FILE
    void OnButtonBrowseRptFileClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
    void OnOkClick( wxCommandEvent& event );
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_STARTDRC
    void OnStartdrcClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_LIST_UNCONNECTED
    void OnListUnconnectedClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DELETE_ALL
    void OnDeleteAllClick( wxCommandEvent& event );

    /// wxEVT_LEFT_DCLICK event handler for ID_CLEARANCE_LIST
    void OnLeftDClickClearance( wxMouseEvent& event );

    /// wxEVT_RIGHT_UP event handler for ID_CLEARANCE_LIST
    void OnRightUpClearance( wxMouseEvent& event );

    /// wxEVT_LEFT_DCLICK event handler for ID_UNCONNECTED_LIST
    void OnLeftDClickUnconnected( wxMouseEvent& event );

    /// wxEVT_RIGHT_UP event handler for ID_UNCONNECTED_LIST
    void OnRightUpUnconnected( wxMouseEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
    void OnCancelClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
    void OnOkClick( wxCommandEvent& event );

////@end WinEDA_DrcFrame event handler declarations

////@begin WinEDA_DrcFrame member function declarations
@@ -133,6 +150,9 @@ public:
    wxIcon GetIconResource( const wxString& name );
////@end WinEDA_DrcFrame member function declarations

    void OnMarkerSelectionEvent( wxCommandEvent& event );
    void OnUnconnectedSelectionEvent( wxCommandEvent& event );

    /// Should we show tooltips?
    static bool ShowToolTips();

@@ -145,19 +165,22 @@ public:
    wxBoxSizer* m_CommandSizer;
    wxStaticText* m_ClearenceTitle;
    wxTextCtrl* m_SetClearance;
    wxCheckBox* m_CreateRptCtrl;
    wxTextCtrl* m_RptFilenameCtrl;
    wxButton* m_BrowseButton;
    wxCheckBox* m_Pad2PadTestCtrl;
    wxCheckBox* m_UnconnectedTestCtrl;
    wxCheckBox* m_ZonesTestCtrl;
    wxCheckBox* m_CreateRptCtrl;
    wxTextCtrl* m_RptFilenameCtrl;
    wxTextCtrl* m_logWindow;
    wxStaticLine* Line;
    wxButton* m_DeleteCurrentMarkerButton;
    DRCLISTBOX* m_ClearanceListBox;
    DRCLISTBOX* m_UnconnectedListBox;
    wxStdDialogButtonSizer* StdDialogButtonSizer;
////@end WinEDA_DrcFrame member variables

    WinEDA_PcbFrame * m_Parent;
    wxDC * m_DC;
    int m_UnconnectedCount;
};

#endif
    // _DIALOG_DRC_H_
#endif  // _DIALOG_DRC_H_
+858 −804

File changed.

Preview size limit exceeded, changes collapsed.

+6 −4
Original line number Diff line number Diff line
@@ -162,12 +162,14 @@ bool WinEDA_GraphicItemsOptionsDialog::Create( wxWindow* parent, wxWindowID id,
////@end WinEDA_GraphicItemsOptionsDialog member initialisation

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

    CreateControls();
    GetSizer()->Fit(this);
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end WinEDA_GraphicItemsOptionsDialog creation
    return true;
@@ -182,7 +184,7 @@ void WinEDA_GraphicItemsOptionsDialog::CreateControls()
	SetFont(*g_DialogFont);
    
////@begin WinEDA_GraphicItemsOptionsDialog content construction
    // Generated by DialogBlocks, 25/02/2006 10:43:53 (unregistered)
    // Generated by DialogBlocks, Mon 26 Nov 2007 18:58:29 CST (unregistered)

    WinEDA_GraphicItemsOptionsDialog* itemDialog1 = this;

Loading