kicad/pcbnew/dialog_drc.h

215 lines
6.1 KiB
C
Raw Normal View History

2007-05-06 16:03:28 +00:00
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_drc.h
2007-11-27 01:34:35 +00:00
// Purpose:
2007-05-06 16:03:28 +00:00
// Author: jean-pierre Charras
2007-11-27 01:34:35 +00:00
// Modified by:
2007-05-06 16:03:28 +00:00
// Created: 27/02/2006 20:42:00
2007-11-27 01:34:35 +00:00
// RCS-ID:
2007-05-06 16:03:28 +00:00
// Copyright: License GNU
2007-11-27 01:34:35 +00:00
// Licence:
2007-05-06 16:03:28 +00:00
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 27/02/2006 20:42:00
#ifndef _DIALOG_DRC_H_
#define _DIALOG_DRC_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog_drc.h"
#endif
/*!
* Includes
*/
////@begin includes
2007-11-27 01:34:35 +00:00
#include "wx/notebook.h"
#include "wxPcbStruct.h"
#include "drc_stuff.h"
2007-05-06 16:03:28 +00:00
////@end includes
2007-11-27 01:34:35 +00:00
2007-05-06 16:03:28 +00:00
/*!
* Forward declarations
*/
////@begin forward declarations
class wxBoxSizer;
2007-12-03 05:14:51 +00:00
class wxNotebook;
2007-11-27 01:34:35 +00:00
class DRCLISTBOX;
2007-11-13 09:35:39 +00:00
class wxStdDialogButtonSizer;
2007-05-06 16:03:28 +00:00
////@end forward declarations
2007-11-27 01:34:35 +00:00
2007-05-06 16:03:28 +00:00
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
2007-11-27 01:34:35 +00:00
#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_CHECKBOX7 10021
2007-12-01 03:42:52 +00:00
#define ID_CHECKBOX3 10011
2007-11-27 01:34:35 +00:00
#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
2007-12-03 05:14:51 +00:00
#define SYMBOL_DRCDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX
2007-12-01 03:42:52 +00:00
#define SYMBOL_DRCDIALOG_TITLE _("DRC Control")
#define SYMBOL_DRCDIALOG_IDNAME ID_DIALOG
#define SYMBOL_DRCDIALOG_SIZE wxSize(400, 300)
#define SYMBOL_DRCDIALOG_POSITION wxDefaultPosition
2007-05-06 16:03:28 +00:00
////@end control identifiers
2007-12-01 03:42:52 +00:00
#define ID_DRCLISTCTRL 14000 // outside @end control identifiers since DialogBlocks knows not DRCLISTBOX
2007-11-27 01:34:35 +00:00
2007-12-04 20:44:41 +00:00
#define ID_POPUP_UNCONNECTED_A 14001
#define ID_POPUP_UNCONNECTED_B 14002
#define ID_POPUP_MARKERS_A 14003
#define ID_POPUP_MARKERS_B 14004
2007-05-06 16:03:28 +00:00
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
2007-12-01 03:42:52 +00:00
* DrcDialog class declaration
2007-05-06 16:03:28 +00:00
*/
2007-12-01 03:42:52 +00:00
class DrcDialog: public wxDialog
2007-11-27 01:34:35 +00:00
{
2007-12-01 03:42:52 +00:00
DECLARE_DYNAMIC_CLASS( DrcDialog )
2007-05-06 16:03:28 +00:00
DECLARE_EVENT_TABLE()
2007-12-04 18:23:38 +00:00
/**
* Function writeReport
* outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an
* open text file.
* @param fpOut The text file to write the report to.
*/
void writeReport( FILE* fpOut );
2007-05-06 16:03:28 +00:00
public:
/// Constructors
2007-12-01 03:42:52 +00:00
DrcDialog( );
DrcDialog( DRC* aTester, WinEDA_PcbFrame* parent,
wxWindowID id = SYMBOL_DRCDIALOG_IDNAME,
const wxString& caption = SYMBOL_DRCDIALOG_TITLE,
const wxPoint& pos = SYMBOL_DRCDIALOG_POSITION,
const wxSize& size = SYMBOL_DRCDIALOG_SIZE,
long style = SYMBOL_DRCDIALOG_STYLE );
2007-05-06 16:03:28 +00:00
/// Creation
2007-12-01 03:42:52 +00:00
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_DRCDIALOG_IDNAME, const wxString& caption = SYMBOL_DRCDIALOG_TITLE, const wxPoint& pos = SYMBOL_DRCDIALOG_POSITION, const wxSize& size = SYMBOL_DRCDIALOG_SIZE, long style = SYMBOL_DRCDIALOG_STYLE );
2007-05-06 16:03:28 +00:00
/// Creates the controls and sizers
void CreateControls();
2007-12-01 03:42:52 +00:00
////@begin DrcDialog event handler declarations
2007-11-27 01:34:35 +00:00
/// wxEVT_INIT_DIALOG event handler for ID_DIALOG
void OnInitDialog( wxInitDialogEvent& event );
2007-11-27 01:34:35 +00:00
/// 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 );
2007-11-27 01:34:35 +00:00
/// 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 );
2007-12-03 05:14:51 +00:00
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DELETE_ONE
void OnDeleteOneClick( wxCommandEvent& event );
2007-11-27 01:34:35 +00:00
/// 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 );
2007-11-13 09:35:39 +00:00
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
2007-11-27 01:34:35 +00:00
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
2007-12-04 20:44:41 +00:00
2007-12-01 03:42:52 +00:00
////@end DrcDialog event handler declarations
2007-05-06 16:03:28 +00:00
2007-12-01 03:42:52 +00:00
////@begin DrcDialog member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
2007-12-01 03:42:52 +00:00
////@end DrcDialog member function declarations
2007-05-06 16:03:28 +00:00
2007-11-27 01:34:35 +00:00
void OnMarkerSelectionEvent( wxCommandEvent& event );
void OnUnconnectedSelectionEvent( wxCommandEvent& event );
2007-05-06 16:03:28 +00:00
/// Should we show tooltips?
static bool ShowToolTips();
2007-12-03 05:14:51 +00:00
void DelDRCMarkers();
2007-12-03 21:28:56 +00:00
void RedrawDrawPanel();
2007-12-04 20:44:41 +00:00
void OnPopupMenu( wxCommandEvent& event );
2007-12-03 21:28:56 +00:00
2007-12-01 03:42:52 +00:00
////@begin DrcDialog member variables
wxBoxSizer* m_MainSizer;
wxBoxSizer* m_CommandSizer;
wxStaticText* m_ClearenceTitle;
wxTextCtrl* m_SetClearance;
2007-11-27 01:34:35 +00:00
wxCheckBox* m_CreateRptCtrl;
wxTextCtrl* m_RptFilenameCtrl;
wxButton* m_BrowseButton;
wxCheckBox* m_Pad2PadTestCtrl;
wxCheckBox* m_ZonesTestCtrl;
2007-12-01 03:42:52 +00:00
wxCheckBox* m_UnconnectedTestCtrl;
wxButton* m_DeleteAllButton;
2007-11-27 01:34:35 +00:00
wxButton* m_DeleteCurrentMarkerButton;
2007-12-03 05:14:51 +00:00
wxNotebook* m_Notebook;
2007-11-27 01:34:35 +00:00
DRCLISTBOX* m_ClearanceListBox;
DRCLISTBOX* m_UnconnectedListBox;
2007-11-13 09:35:39 +00:00
wxStdDialogButtonSizer* StdDialogButtonSizer;
2007-12-01 03:42:52 +00:00
////@end DrcDialog member variables
2007-11-27 01:34:35 +00:00
2007-11-27 22:49:35 +00:00
2007-12-03 21:28:56 +00:00
2007-12-01 03:42:52 +00:00
DRC* m_tester;
2007-11-27 22:49:35 +00:00
WinEDA_PcbFrame* m_Parent;
int m_UnconnectedCount;
2007-05-06 16:03:28 +00:00
};
2007-11-27 01:34:35 +00:00
#endif // _DIALOG_DRC_H_