dialog_drc.h 3.97 KB
Newer Older
jean-pierre charras's avatar
jean-pierre charras committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2011 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
 * Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com
 * Copyright (C) 2004-2012 KiCad Developers, see change_log.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
 */

plyatov's avatar
plyatov committed
26 27 28 29

#ifndef _DIALOG_DRC_H_
#define _DIALOG_DRC_H_

30
#include <wx/htmllbox.h>
plyatov's avatar
plyatov committed
31

32 33 34 35 36 37 38 39 40
#include <fctsys.h>
#include <pcbnew.h>
#include <class_drawpanel.h>
#include <wxstruct.h>
#include <drc_stuff.h>
#include <class_marker_pcb.h>
#include <class_board.h>

#include <dialog_drc_base.h>
jean-pierre charras's avatar
jean-pierre charras committed
41
#include <dialog_drclistbox.h>
dickelbeck's avatar
dickelbeck committed
42

43 44 45 46 47 48 49

// forward declarations
class DRCLISTBOX;
class BOARD_DESIGN_SETTINGS;

//end forward declarations

plyatov's avatar
plyatov committed
50
/*!
51
 * DrcDialog class declaration
plyatov's avatar
plyatov committed
52 53
 */

54
class DIALOG_DRC_CONTROL: public DIALOG_DRC_CONTROL_BASE
dickelbeck's avatar
dickelbeck committed
55
{
56
public:
Dick Hollenbeck's avatar
Dick Hollenbeck committed
57
    BOARD_DESIGN_SETTINGS  m_BrdSettings;
58

59
    /// Constructors
60
    DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* parent );
61
    ~DIALOG_DRC_CONTROL(){};
plyatov's avatar
plyatov committed
62

63
private:
dickelbeck's avatar
dickelbeck committed
64 65
    /**
     * Function writeReport
66
     * outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an
dickelbeck's avatar
dickelbeck committed
67 68 69 70
     * open text file.
     * @param fpOut The text file to write the report to.
     */
    void writeReport( FILE* fpOut );
71

72
    void InitValues( );
73

74 75
    void SetDrcParmeters( );

dickelbeck's avatar
dickelbeck committed
76 77
    /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX
    void OnReportCheckBoxClicked( wxCommandEvent& event );
78

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

dickelbeck's avatar
dickelbeck committed
82 83 84 85 86 87 88 89 90
    /// 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 );

dickelbeck's avatar
dickelbeck committed
91 92 93
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DELETE_ONE
    void OnDeleteOneClick( wxCommandEvent& event );

dickelbeck's avatar
dickelbeck committed
94 95 96 97 98 99 100 101 102 103 104
    /// 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 );
g_harland's avatar
g_harland committed
105 106 107 108

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

dickelbeck's avatar
dickelbeck committed
109 110 111 112 113
    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
    void OnOkClick( wxCommandEvent& event );

    void OnMarkerSelectionEvent( wxCommandEvent& event );
    void OnUnconnectedSelectionEvent( wxCommandEvent& event );
114
	void OnChangingMarkerList( wxNotebookEvent& event );
dickelbeck's avatar
dickelbeck committed
115

dickelbeck's avatar
dickelbeck committed
116
    void DelDRCMarkers();
dickelbeck's avatar
dickelbeck committed
117
    void RedrawDrawPanel();
dickelbeck's avatar
dickelbeck committed
118 119

    void OnPopupMenu( wxCommandEvent& event );
120

dickelbeck's avatar
dickelbeck committed
121

122
    DRC*                m_tester;
123
    PCB_EDIT_FRAME*     m_Parent;
124
    int                 m_UnconnectedCount;
plyatov's avatar
plyatov committed
125 126
};

dickelbeck's avatar
dickelbeck committed
127 128
#endif  // _DIALOG_DRC_H_