More platform-standard presentation of DRC dialog.
Also makes better use of space to significantly increase number of markers shown. Fixes: lp:1748676 * https://bugs.launchpad.net/kicad/+bug/1748676 (cherry picked from commit a1d8097)
This commit is contained in:
parent
6ad37972c0
commit
a1ef5401f4
|
@ -72,20 +72,18 @@ public:
|
|||
{
|
||||
wxString htmlpage;
|
||||
wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
|
||||
wxColour lncolor = wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT );
|
||||
wxColour fgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||
// for each marker, build a link like:
|
||||
// <A HREF="marker_index">text to click</A>
|
||||
// The "text to click" is the error name (first line of the full error text).
|
||||
wxString marker_text;
|
||||
wxString href;
|
||||
|
||||
for( unsigned ii = 0; ii < m_MarkerListReferences.size(); ii++ )
|
||||
{
|
||||
marker_text.Printf( wxT( "<font color='%s'><a href='%d'>%s</font>" ),
|
||||
lncolor.GetAsString( wxC2S_HTML_SYNTAX ),
|
||||
ii,
|
||||
m_MarkerListReferences[ii]->GetReporter().ShowHtml() );
|
||||
marker_text.Replace( wxT( "<ul>" ), wxT( "</a><ul>" ), false );
|
||||
href.Printf( wxT( "href='%d'" ), ii );
|
||||
marker_text = m_MarkerListReferences[ii]->GetReporter().ShowHtml();
|
||||
marker_text.Replace( wxT( "href=''"), href );
|
||||
htmlpage += marker_text;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,3 +75,80 @@ wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
|
|||
ret << aPos;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString DRC_ITEM::ShowHtml() const
|
||||
{
|
||||
wxString ret;
|
||||
wxString mainText = m_MainText;
|
||||
// a wxHtmlWindows does not like < and > in the text to display
|
||||
// because these chars have a special meaning in html
|
||||
mainText.Replace( wxT("<"), wxT("<") );
|
||||
mainText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
wxString errText = GetErrorText();
|
||||
errText.Replace( wxT("<"), wxT("<") );
|
||||
errText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
wxColour hrefColour = wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT );
|
||||
|
||||
if( m_noCoordinate )
|
||||
{
|
||||
// omit the coordinate, a NETCLASS has no location
|
||||
ret.Printf( _( "<p><b>%s</b><br> %s" ),
|
||||
GetChars( errText ),
|
||||
GetChars( mainText ) );
|
||||
}
|
||||
else if( m_hasSecondItem )
|
||||
{
|
||||
wxString auxText = m_AuxiliaryText;
|
||||
auxText.Replace( wxT("<"), wxT("<") );
|
||||
auxText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
// an html fragment for the entire message in the listbox. feel free
|
||||
// to add color if you want:
|
||||
ret.Printf( _( "<p><b>%s</b><br> <font color='%s'><a href=''>%s</a></font>: %s<br> %s: %s" ),
|
||||
GetChars( errText ),
|
||||
hrefColour.GetAsString( wxC2S_HTML_SYNTAX ),
|
||||
GetChars( ShowCoord( m_MainPosition )),
|
||||
GetChars( mainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition )),
|
||||
GetChars( auxText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( _( "<p><b>%s</b><br> <font color='%s'><a href=''>%s</a></font>: %s" ),
|
||||
GetChars( errText ),
|
||||
hrefColour.GetAsString( wxC2S_HTML_SYNTAX ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ),
|
||||
GetChars( mainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString DRC_ITEM::ShowReport() const
|
||||
{
|
||||
wxString ret;
|
||||
|
||||
if( m_hasSecondItem )
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition ) ), GetChars( m_AuxiliaryText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -170,53 +170,7 @@ public:
|
|||
* wxWidget's wxHtmlListBox class.
|
||||
* @return wxString - the html text.
|
||||
*/
|
||||
wxString ShowHtml() const
|
||||
{
|
||||
wxString ret;
|
||||
wxString mainText = m_MainText;
|
||||
// a wxHtmlWindows does not like < and > in the text to display
|
||||
// because these chars have a special meaning in html
|
||||
mainText.Replace( wxT("<"), wxT("<") );
|
||||
mainText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
wxString errText = GetErrorText();
|
||||
errText.Replace( wxT("<"), wxT("<") );
|
||||
errText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
|
||||
if( m_noCoordinate )
|
||||
{
|
||||
// omit the coordinate, a NETCLASS has no location
|
||||
ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s </li></ul>" ),
|
||||
m_ErrorCode,
|
||||
GetChars( errText ),
|
||||
GetChars( mainText ) );
|
||||
}
|
||||
else if( m_hasSecondItem )
|
||||
{
|
||||
wxString auxText = m_AuxiliaryText;
|
||||
auxText.Replace( wxT("<"), wxT("<") );
|
||||
auxText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
// an html fragment for the entire message in the listbox. feel free
|
||||
// to add color if you want:
|
||||
ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>" ),
|
||||
m_ErrorCode,
|
||||
GetChars( errText ),
|
||||
GetChars( ShowCoord( m_MainPosition )), GetChars( mainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( auxText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>" ),
|
||||
m_ErrorCode,
|
||||
GetChars( errText ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( mainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
wxString ShowHtml() const;
|
||||
|
||||
/**
|
||||
* Function ShowReport
|
||||
|
@ -224,29 +178,7 @@ public:
|
|||
* to disk in a report.
|
||||
* @return wxString - the simple multi-line report text.
|
||||
*/
|
||||
wxString ShowReport() const
|
||||
{
|
||||
wxString ret;
|
||||
|
||||
if( m_hasSecondItem )
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition ) ), GetChars( m_AuxiliaryText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
wxString ShowReport() const;
|
||||
|
||||
/**
|
||||
* Function GetErrorCode
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <kiface_i.h>
|
||||
#include <confirm.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <bitmaps.h>
|
||||
#include <pgm_base.h>
|
||||
#include <dialog_drc.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
|
@ -95,33 +96,55 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, PCB_EDIT_FRAME* aEditorFra
|
|||
m_currentBoard = m_brdEditor->GetBoard();
|
||||
m_BrdSettings = m_brdEditor->GetBoard()->GetDesignSettings();
|
||||
|
||||
wxFont messagesLabelFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
||||
messagesLabelFont.SetSymbolicSize( wxFONTSIZE_SMALL );
|
||||
m_messagesLabel->SetFont( messagesLabelFont );
|
||||
|
||||
m_BrowseButton->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
|
||||
// We use a sdbSizer here to get the order right, which is platform-dependent
|
||||
m_sdbSizer1OK->SetLabel( _( "Run DRC" ) );
|
||||
m_sdbSizer1Apply->SetLabel( _( "List Unconnected" ) );
|
||||
m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
|
||||
m_sizerButtons->Layout();
|
||||
|
||||
m_sdbSizer1OK->SetDefault();
|
||||
|
||||
InitValues();
|
||||
|
||||
// Connect events
|
||||
m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this );
|
||||
m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickUnconnected ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this );
|
||||
|
||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||
FinishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
DIALOG_DRC_CONTROL::~DIALOG_DRC_CONTROL()
|
||||
{
|
||||
m_config->Write( TestMissingCourtyardKey, m_cbCourtyardMissing->GetValue() );
|
||||
m_config->Write( TestFootprintCourtyardKey, m_cbCourtyardOverlap->GetValue() );
|
||||
m_config->Write( RefillZonesBeforeDrc, m_cbRefillZones->GetValue() );
|
||||
|
||||
// Disonnect events
|
||||
// Disconnect events
|
||||
m_ClearanceListBox->Disconnect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this );
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this );
|
||||
m_ClearanceListBox->Disconnect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this );
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this );
|
||||
m_UnconnectedListBox->Disconnect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::
|
||||
OnLeftDClickUnconnected ), NULL, this );
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnLeftDClickUnconnected ), NULL, this );
|
||||
m_UnconnectedListBox->Disconnect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this );
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_DRC_CONTROL::OnActivateDlg( wxActivateEvent& event )
|
||||
{
|
||||
if( m_currentBoard != m_brdEditor->GetBoard() )
|
||||
|
@ -157,19 +180,8 @@ void DIALOG_DRC_CONTROL::DisplayDRCValues()
|
|||
|
||||
void DIALOG_DRC_CONTROL::InitValues()
|
||||
{
|
||||
// Connect events and objects
|
||||
m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnLeftDClickClearance ), NULL, this );
|
||||
m_ClearanceListBox->Connect( ID_CLEARANCE_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnRightUpClearance ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_LEFT_DCLICK,
|
||||
wxMouseEventHandler( DIALOG_DRC_CONTROL::
|
||||
OnLeftDClickUnconnected ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( ID_UNCONNECTED_LIST, wxEVT_RIGHT_UP,
|
||||
wxMouseEventHandler(
|
||||
DIALOG_DRC_CONTROL::OnRightUpUnconnected ), NULL, this );
|
||||
m_markersTitleTemplate = m_Notebook->GetPageText( 0 );
|
||||
m_unconnectedTitleTemplate = m_Notebook->GetPageText( 1 );
|
||||
|
||||
m_DeleteCurrentMarkerButton->Enable( false );
|
||||
|
||||
|
@ -184,8 +196,6 @@ void DIALOG_DRC_CONTROL::InitValues()
|
|||
m_config->Read( RefillZonesBeforeDrc, &value, false );
|
||||
m_cbRefillZones->SetValue( value );
|
||||
|
||||
m_BrowseButton->SetBitmap( KiBitmap( folder_xpm ) );
|
||||
|
||||
Layout(); // adding the units above expanded Clearance text, now resize.
|
||||
|
||||
SetFocus();
|
||||
|
@ -205,10 +215,8 @@ void DIALOG_DRC_CONTROL::SetDrcParmeters( )
|
|||
|
||||
void DIALOG_DRC_CONTROL::SetRptSettings( bool aEnable, const wxString& aFileName )
|
||||
{
|
||||
m_RptFilenameCtrl->Enable( aEnable );
|
||||
m_BrowseButton->Enable( aEnable );
|
||||
m_CreateRptCtrl->SetValue( aEnable );
|
||||
m_RptFilenameCtrl->SetValue( aFileName );
|
||||
m_CreateRptCtrl->SetValue( aEnable );
|
||||
}
|
||||
|
||||
|
||||
|
@ -221,7 +229,7 @@ void DIALOG_DRC_CONTROL::GetRptSettings( bool* aEnable, wxString& aFileName )
|
|||
|
||||
void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event )
|
||||
{
|
||||
wxString reportName;
|
||||
wxString reportName, msg;
|
||||
|
||||
bool make_report = m_CreateRptCtrl->IsChecked();
|
||||
|
||||
|
@ -257,27 +265,25 @@ void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event )
|
|||
|
||||
// run all the tests, with no UI at this time.
|
||||
m_Messages->Clear();
|
||||
wxSafeYield(); // Allows time slice to refresh the m_Messages window
|
||||
m_brdEditor->GetBoard()->m_Status_Pcb = 0; // Force full connectivity and ratsnest recalculations
|
||||
wxSafeYield(); // Allows time slice to refresh the Messages
|
||||
m_brdEditor->GetBoard()->m_Status_Pcb = 0; // Force full connectivity and ratsnest calculations
|
||||
m_tester->RunTests(m_Messages);
|
||||
m_Notebook->ChangeSelection( 0 ); // display the 1at tab "...Markers ..."
|
||||
|
||||
m_Notebook->ChangeSelection( 0 ); // display the "Problems/Markers" tab
|
||||
|
||||
// Generate the report
|
||||
if( !reportName.IsEmpty() )
|
||||
{
|
||||
if( writeReport( reportName ) )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) );
|
||||
|
||||
wxString caption( _( "Disk File Report Completed" ) );
|
||||
wxMessageDialog popupWindow( this, msg, caption );
|
||||
wxMessageDialog popupWindow( this, msg, _( "Disk File Report Completed" ) );
|
||||
popupWindow.ShowModal();
|
||||
}
|
||||
else
|
||||
DisplayError( this, wxString::Format( _( "Unable to create report file \"%s\""),
|
||||
GetChars( reportName ) ) );
|
||||
{
|
||||
msg.Printf( _( "Unable to create report file \"%s\"" ), GetChars( reportName ) );
|
||||
DisplayError( this, msg );
|
||||
}
|
||||
}
|
||||
|
||||
wxEndBusyCursor();
|
||||
|
@ -296,7 +302,7 @@ void DIALOG_DRC_CONTROL::OnDeleteAllClick( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
|
||||
{
|
||||
wxString reportName;
|
||||
wxString reportName, msg;
|
||||
|
||||
bool make_report = m_CreateRptCtrl->IsChecked();
|
||||
|
||||
|
@ -333,22 +339,22 @@ void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
|
|||
m_Messages->Clear();
|
||||
m_tester->ListUnconnectedPads();
|
||||
|
||||
m_Notebook->ChangeSelection( 1 ); // display the 2nd tab "Unconnected..."
|
||||
m_Notebook->ChangeSelection( 1 ); // display the "Unconnected" tab
|
||||
|
||||
// Generate the report
|
||||
if( !reportName.IsEmpty() )
|
||||
{
|
||||
if( writeReport( reportName ) )
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) );
|
||||
wxString caption( _( "Disk File Report Completed" ) );
|
||||
wxMessageDialog popupWindow( this, msg, caption );
|
||||
wxMessageDialog popupWindow( this, msg, _( "Disk File Report Completed" ) );
|
||||
popupWindow.ShowModal();
|
||||
}
|
||||
else
|
||||
DisplayError( this, wxString::Format( _( "Unable to create report file \"%s\""),
|
||||
GetChars( reportName ) ) );
|
||||
{
|
||||
msg.Printf( _( "Unable to create report file \"%s\"" ), GetChars( reportName ) );
|
||||
DisplayError( this, msg );
|
||||
}
|
||||
}
|
||||
|
||||
UpdateDisplayedCounts();
|
||||
|
@ -361,37 +367,27 @@ void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick( wxCommandEvent& event )
|
||||
void DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick( wxCommandEvent& )
|
||||
{
|
||||
wxFileName fn = m_brdEditor->GetBoard()->GetFileName();
|
||||
fn.SetExt( ReportFileExtension );
|
||||
wxString prj_path = Prj().GetProjectPath();
|
||||
|
||||
wxFileDialog dlg( this, _( "Save DRC Report File" ), prj_path,
|
||||
fn.GetFullName(), ReportFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
wxFileDialog dlg( this, _( "Save DRC Report File" ), prj_path, fn.GetFullName(),
|
||||
ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
m_CreateRptCtrl->SetValue( true );
|
||||
m_RptFilenameCtrl->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
|
||||
{
|
||||
SetReturnCode( wxID_OK );
|
||||
SetDrcParmeters();
|
||||
|
||||
// The dialog can be modal or not modal.
|
||||
// Leave the DRC caller destroy (or not) the dialog
|
||||
m_tester->DestroyDRCDialog( wxID_OK );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event )
|
||||
{
|
||||
SetReturnCode( wxID_CANCEL );
|
||||
SetDrcParmeters();
|
||||
|
||||
// The dialog can be modal or not modal.
|
||||
// Leave the DRC caller destroy (or not) the dialog
|
||||
|
@ -401,8 +397,14 @@ void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_DRC_CONTROL::OnReportCheckBoxClicked( wxCommandEvent& event )
|
||||
{
|
||||
m_RptFilenameCtrl->Enable( m_CreateRptCtrl->IsChecked() );
|
||||
m_BrowseButton->Enable( m_CreateRptCtrl->IsChecked() );
|
||||
if( m_CreateRptCtrl->IsChecked() )
|
||||
m_RptFilenameCtrl->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_DRC_CONTROL::OnReportFilenameEdited( wxCommandEvent &event )
|
||||
{
|
||||
m_CreateRptCtrl->SetValue( event.GetString().Length() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -410,8 +412,6 @@ void DIALOG_DRC_CONTROL::OnLeftDClickClearance( wxMouseEvent& event )
|
|||
{
|
||||
event.Skip();
|
||||
|
||||
// I am assuming that the double click actually changed the selected item.
|
||||
// please verify this.
|
||||
int selection = m_ClearanceListBox->GetSelection();
|
||||
|
||||
if( selection != wxNOT_FOUND )
|
||||
|
@ -438,8 +438,8 @@ void DIALOG_DRC_CONTROL::OnLeftDClickClearance( wxMouseEvent& event )
|
|||
// no destruction so we can preserve listbox cursor
|
||||
Show( false );
|
||||
|
||||
// We do not want the clarification popup window.
|
||||
// when releasing the left button in the main window
|
||||
// We do not want the clarify selection popup when releasing the
|
||||
// left button in the main window
|
||||
m_brdEditor->SkipNextLeftButtonReleaseEvent();
|
||||
}
|
||||
}
|
||||
|
@ -489,14 +489,11 @@ void DIALOG_DRC_CONTROL::OnLeftDClickUnconnected( wxMouseEvent& event )
|
|||
{
|
||||
event.Skip();
|
||||
|
||||
// I am assuming that the double click actually changed the selected item.
|
||||
// please verify this.
|
||||
int selection = m_UnconnectedListBox->GetSelection();
|
||||
|
||||
if( selection != wxNOT_FOUND )
|
||||
{
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there,
|
||||
// at the first of the two pads.
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there.
|
||||
// Then hide the dialog.
|
||||
const DRC_ITEM* item = m_UnconnectedListBox->GetItem( selection );
|
||||
if( item )
|
||||
|
@ -510,8 +507,8 @@ void DIALOG_DRC_CONTROL::OnLeftDClickUnconnected( wxMouseEvent& event )
|
|||
{
|
||||
Show( false );
|
||||
|
||||
// We do not want the clarification popup window.
|
||||
// when releasing the left button in the main window
|
||||
// We do not want the clarify selection popup when releasing the
|
||||
// left button in the main window
|
||||
m_brdEditor->SkipNextLeftButtonReleaseEvent();
|
||||
}
|
||||
}
|
||||
|
@ -542,8 +539,7 @@ void DIALOG_DRC_CONTROL::OnMarkerSelectionEvent( wxCommandEvent& event )
|
|||
// until a MARKER is selected, this button is not enabled.
|
||||
m_DeleteCurrentMarkerButton->Enable( true );
|
||||
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there,
|
||||
// at the first of the two pads.
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there.
|
||||
const DRC_ITEM* item = m_ClearanceListBox->GetItem( selection );
|
||||
if( item )
|
||||
{
|
||||
|
@ -573,8 +569,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event )
|
|||
// until a MARKER is selected, this button is not enabled.
|
||||
m_DeleteCurrentMarkerButton->Enable( true );
|
||||
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there,
|
||||
// at the first of the two pads.
|
||||
// Find the selected DRC_ITEM in the listbox, position cursor there.
|
||||
const DRC_ITEM* item = m_UnconnectedListBox->GetItem( selection );
|
||||
|
||||
if( item )
|
||||
|
@ -712,6 +707,7 @@ void DIALOG_DRC_CONTROL::UpdateDisplayedCounts()
|
|||
int marker_count = m_ClearanceListBox->GetItemCount();
|
||||
int unconnected_count = m_UnconnectedListBox->GetItemCount();
|
||||
|
||||
m_MarkerCount->SetLabelText( wxString::Format( "%d", marker_count ) );
|
||||
m_UnconnectedCount->SetLabelText( wxString::Format( "%d", unconnected_count ) );
|
||||
m_Notebook->SetPageText( 0, wxString::Format( m_markersTitleTemplate, marker_count ) );
|
||||
m_Notebook->SetPageText( 1, wxString::Format( m_unconnectedTitleTemplate, unconnected_count ) );
|
||||
|
||||
}
|
||||
|
|
|
@ -93,9 +93,12 @@ private:
|
|||
|
||||
void SetDrcParmeters( );
|
||||
|
||||
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX
|
||||
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_RPT_FILE
|
||||
void OnReportCheckBoxClicked( wxCommandEvent& event ) override;
|
||||
|
||||
/// wxEVT_COMMAND_TEXT_UPDATED event handler for m_RptFilenameCtrl
|
||||
void OnReportFilenameEdited( wxCommandEvent &event ) override;
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON_BROWSE_RPT_FILE
|
||||
void OnButtonBrowseRptFileClick( wxCommandEvent& event ) override;
|
||||
|
||||
|
@ -126,9 +129,6 @@ private:
|
|||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
|
||||
void OnCancelClick( wxCommandEvent& event ) override;
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
||||
void OnOkClick( wxCommandEvent& event ) override;
|
||||
|
||||
/// handler for activate event, updating data which can be modified outside the dialog
|
||||
/// (DRC parameters)
|
||||
void OnActivateDlg( wxActivateEvent& event ) override;
|
||||
|
@ -148,6 +148,8 @@ private:
|
|||
DRC* m_tester;
|
||||
PCB_EDIT_FRAME* m_brdEditor;
|
||||
wxConfigBase* m_config;
|
||||
wxString m_markersTitleTemplate;
|
||||
wxString m_unconnectedTitleTemplate;
|
||||
};
|
||||
|
||||
#endif // _DIALOG_DRC_H_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -18,27 +18,14 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
wxBoxSizer* m_MainSizer;
|
||||
m_MainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* m_CommandSizer;
|
||||
m_CommandSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 0, 10 );
|
||||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxBoxSizer* bSizerOptions;
|
||||
bSizerOptions = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextOptions = new wxStaticText( this, wxID_ANY, _("Options:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextOptions->Wrap( -1 );
|
||||
m_staticTextOptions->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerOptions->Add( m_staticTextOptions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerOptsSettings;
|
||||
bSizerOptsSettings = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizerOptsSettings->Add( 20, 20, 0, 0, 5 );
|
||||
|
||||
wxBoxSizer* bSizerOptSettings;
|
||||
bSizerOptSettings = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgMinValuesSizer;
|
||||
fgMinValuesSizer = new wxFlexGridSizer( 4, 3, 0, 0 );
|
||||
fgMinValuesSizer->AddGrowableCol( 1 );
|
||||
|
@ -47,12 +34,12 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
m_ClearanceTitle = new wxStaticText( this, wxID_ANY, _("Clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ClearanceTitle->Wrap( -1 );
|
||||
fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_SetClearance = new wxTextCtrl( this, wxID_ANY, _("By Netclass"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SetClearance = new wxTextCtrl( this, wxID_ANY, _("by Netclass"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SetClearance->Enable( false );
|
||||
|
||||
fgMinValuesSizer->Add( m_SetClearance, 0, wxEXPAND|wxALL, 5 );
|
||||
fgMinValuesSizer->Add( m_SetClearance, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
|
||||
fgMinValuesSizer->Add( 0, 0, 0, 0, 5 );
|
||||
|
@ -64,7 +51,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxEXPAND|wxALL, 5 );
|
||||
fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_TrackMinWidthUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TrackMinWidthUnit->Wrap( -1 );
|
||||
|
@ -76,10 +63,10 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_ViaMinTitle->Wrap( -1 );
|
||||
m_ViaMinTitle->SetHelpText( _("Enter the minimum acceptable diameter for a standard via") );
|
||||
|
||||
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
|
||||
|
||||
m_ViaMinUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_ViaMinUnit->Wrap( -1 );
|
||||
|
@ -91,10 +78,10 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_MicroViaMinTitle->Wrap( -1 );
|
||||
m_MicroViaMinTitle->SetToolTip( _("Enter the minimum acceptable diameter for a micro via") );
|
||||
|
||||
fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
|
||||
|
||||
m_MicroViaMinUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MicroViaMinUnit->Wrap( -1 );
|
||||
|
@ -103,42 +90,45 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgMinValuesSizer->Add( m_MicroViaMinUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerOptSettings->Add( fgMinValuesSizer, 0, wxEXPAND, 5 );
|
||||
bSizerOptions->Add( fgMinValuesSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxBoxSizer* bSizerOptSettings;
|
||||
bSizerOptSettings = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_cbRefillZones = new wxCheckBox( this, wxID_ANY, _("Refill all zones before performing DRC"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerOptSettings->Add( m_cbRefillZones, 0, wxLEFT|wxRIGHT, 5 );
|
||||
bSizerOptSettings->Add( m_cbRefillZones, 0, wxALL, 5 );
|
||||
|
||||
m_cbReportAllTrackErrors = new wxCheckBox( this, wxID_ANY, _("Report all errors for tracks (slower)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbReportAllTrackErrors->SetToolTip( _("If selected, all DRC violations for tracks will be reported. This can be slow for complicated designs.\n\nIf unselected, only the first DRC violation will be reported for each track connection.") );
|
||||
|
||||
bSizerOptSettings->Add( m_cbReportAllTrackErrors, 0, wxRIGHT|wxLEFT, 5 );
|
||||
bSizerOptSettings->Add( m_cbReportAllTrackErrors, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_cbCourtyardOverlap = new wxCheckBox( this, wxID_ANY, _("Check footprint courtyard overlap"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerOptSettings->Add( m_cbCourtyardOverlap, 0, wxLEFT|wxRIGHT, 5 );
|
||||
bSizerOptSettings->Add( m_cbCourtyardOverlap, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_cbCourtyardMissing = new wxCheckBox( this, wxID_ANY, _("Check courtyard missing in footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerOptSettings->Add( m_cbCourtyardMissing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerOptsSettings->Add( bSizerOptSettings, 1, wxEXPAND, 5 );
|
||||
bSizerOptions->Add( bSizerOptSettings, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerOptions->Add( bSizerOptsSettings, 1, wxEXPAND, 5 );
|
||||
gbSizer1->Add( bSizerOptions, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerMessages;
|
||||
bSizerMessages = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_messagesLabel = new wxStaticText( this, wxID_ANY, _("Messages"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_messagesLabel->Wrap( -1 );
|
||||
bSizerMessages->Add( m_messagesLabel, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_Messages->SetMinSize( wxSize( 280,-1 ) );
|
||||
|
||||
bSizerMessages->Add( m_Messages, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 2 );
|
||||
|
||||
|
||||
bSizerOptions->Add( 10, 5, 0, 0, 5 );
|
||||
|
||||
m_staticTextRpt = new wxStaticText( this, wxID_ANY, _("Create Report File:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRpt->Wrap( -1 );
|
||||
m_staticTextRpt->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerOptions->Add( m_staticTextRpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerRpt;
|
||||
bSizerRpt = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizerRpt->Add( 20, 20, 0, 0, 5 );
|
||||
gbSizer1->Add( bSizerMessages, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerRpt;
|
||||
fgSizerRpt = new wxFlexGridSizer( 0, 3, 0, 0 );
|
||||
|
@ -146,118 +136,49 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgSizerRpt->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerRpt->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_CreateRptCtrl = new wxCheckBox( this, ID_CHECKBOX_RPT_FILE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_CreateRptCtrl = new wxCheckBox( this, ID_CHECKBOX_RPT_FILE, _("Create report file:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_CreateRptCtrl->SetToolTip( _("Enable writing report to this file") );
|
||||
|
||||
fgSizerRpt->Add( m_CreateRptCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizerRpt->Add( m_CreateRptCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_RptFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_RptFilenameCtrl->SetToolTip( _("Enter the report filename") );
|
||||
m_RptFilenameCtrl->SetMinSize( wxSize( 180,-1 ) );
|
||||
|
||||
fgSizerRpt->Add( m_RptFilenameCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
fgSizerRpt->Add( m_RptFilenameCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_BrowseButton = new wxButton( this, ID_BUTTON_BROWSE_RPT_FILE, _("..."), wxDefaultPosition, wxSize( 50,-1 ), 0 );
|
||||
fgSizerRpt->Add( m_BrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
m_BrowseButton = new wxBitmapButton( this, ID_BUTTON_BROWSE_RPT_FILE, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
||||
m_BrowseButton->SetMinSize( wxSize( 30,28 ) );
|
||||
|
||||
fgSizerRpt->Add( m_BrowseButton, 0, wxALIGN_CENTER_VERTICAL, 2 );
|
||||
|
||||
|
||||
bSizerRpt->Add( fgSizerRpt, 1, 0, 5 );
|
||||
gbSizer1->Add( fgSizerRpt, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxEXPAND|wxTOP|wxRIGHT, 7 );
|
||||
|
||||
|
||||
bSizerOptions->Add( bSizerRpt, 0, wxEXPAND, 5 );
|
||||
gbSizer1->AddGrowableCol( 0 );
|
||||
gbSizer1->AddGrowableCol( 1 );
|
||||
|
||||
m_MainSizer->Add( gbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_CommandSizer->Add( bSizerOptions, 1, wxEXPAND, 5 );
|
||||
m_Notebook = new wxNotebook( this, ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Notebook->SetMinSize( wxSize( 640,280 ) );
|
||||
|
||||
wxBoxSizer* bSizerMessages;
|
||||
bSizerMessages = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText6->Wrap( -1 );
|
||||
bSizerMessages->Add( m_staticText6, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_Messages->SetMinSize( wxSize( 220,-1 ) );
|
||||
|
||||
bSizerMessages->Add( m_Messages, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_CommandSizer->Add( bSizerMessages, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer11;
|
||||
bSizer11 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_buttonRunDRC = new wxButton( this, ID_STARTDRC, _("Start DRC"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonRunDRC->SetDefault();
|
||||
m_buttonRunDRC->SetToolTip( _("Start the Design Rule Checker") );
|
||||
|
||||
bSizer11->Add( m_buttonRunDRC, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonListUnconnected = new wxButton( this, ID_LIST_UNCONNECTED, _("List Unconnected"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonListUnconnected->SetToolTip( _("List unconnected pads or tracks") );
|
||||
|
||||
bSizer11->Add( m_buttonListUnconnected, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_DeleteAllButton = new wxButton( this, ID_DELETE_ALL, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DeleteAllButton->SetToolTip( _("Delete every marker") );
|
||||
|
||||
bSizer11->Add( m_DeleteAllButton, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_DeleteCurrentMarkerButton = new wxButton( this, wxID_ANY, _("Delete Current Marker"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DeleteCurrentMarkerButton->SetToolTip( _("Delete the marker selected in the list box below") );
|
||||
|
||||
bSizer11->Add( m_DeleteCurrentMarkerButton, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_CommandSizer->Add( bSizer11, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
m_MainSizer->Add( m_CommandSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* m_ErrorMsgs;
|
||||
m_ErrorMsgs = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error Messages:") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_MarkerCountLabel = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("Marker count:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MarkerCountLabel->Wrap( -1 );
|
||||
bSizer8->Add( m_MarkerCountLabel, 0, wxALL, 5 );
|
||||
|
||||
m_MarkerCount = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MarkerCount->Wrap( -1 );
|
||||
bSizer8->Add( m_MarkerCount, 1, wxALL, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( m_ErrorMsgs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
bSizer8->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_UnconnectedCountLabel = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("Unconnected count:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_UnconnectedCountLabel->Wrap( -1 );
|
||||
bSizer8->Add( m_UnconnectedCountLabel, 0, wxALL, 5 );
|
||||
|
||||
m_UnconnectedCount = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_UnconnectedCount->Wrap( -1 );
|
||||
bSizer8->Add( m_UnconnectedCount, 1, wxALL, 5 );
|
||||
|
||||
|
||||
m_ErrorMsgs->Add( bSizer8, 0, wxEXPAND, 5 );
|
||||
|
||||
m_Notebook = new wxNotebook( m_ErrorMsgs->GetStaticBox(), ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_panelClearanceListBox = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizeClearanceBox;
|
||||
bSizeClearanceBox = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_ClearanceListBox = new DRCLISTBOX( m_panelClearanceListBox, ID_CLEARANCE_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
m_ClearanceListBox->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||
m_ClearanceListBox->SetToolTip( _("MARKERs, double click any to go there in PCB, right click for popup menu") );
|
||||
m_ClearanceListBox->SetMinSize( wxSize( -1,80 ) );
|
||||
|
||||
bSizeClearanceBox->Add( m_ClearanceListBox, 1, wxALL|wxEXPAND, 5 );
|
||||
bSizeClearanceBox->Add( m_ClearanceListBox, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_panelClearanceListBox->SetSizer( bSizeClearanceBox );
|
||||
m_panelClearanceListBox->Layout();
|
||||
bSizeClearanceBox->Fit( m_panelClearanceListBox );
|
||||
m_Notebook->AddPage( m_panelClearanceListBox, _("Problems / Markers"), true );
|
||||
m_Notebook->AddPage( m_panelClearanceListBox, _("Problems / Markers (%d)"), true );
|
||||
m_panelUnconnectedBox = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerUnconnectedBox;
|
||||
bSizerUnconnectedBox = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -271,21 +192,31 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_panelUnconnectedBox->SetSizer( bSizerUnconnectedBox );
|
||||
m_panelUnconnectedBox->Layout();
|
||||
bSizerUnconnectedBox->Fit( m_panelUnconnectedBox );
|
||||
m_Notebook->AddPage( m_panelUnconnectedBox, _("Unconnected"), false );
|
||||
m_Notebook->AddPage( m_panelUnconnectedBox, _("Unconnected Items (%d)"), false );
|
||||
|
||||
m_ErrorMsgs->Add( m_Notebook, 1, wxEXPAND | wxALL, 5 );
|
||||
m_MainSizer->Add( m_Notebook, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_sizerButtons = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_MainSizer->Add( m_ErrorMsgs, 1, wxEXPAND, 5 );
|
||||
m_DeleteCurrentMarkerButton = new wxButton( this, wxID_ANY, _("Delete Marker"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sizerButtons->Add( m_DeleteCurrentMarkerButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
m_DeleteAllMarkersButton = new wxButton( this, wxID_ANY, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sizerButtons->Add( m_DeleteAllMarkersButton, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
||||
m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1Apply );
|
||||
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
||||
m_sdbSizer1->Realize();
|
||||
|
||||
m_MainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
|
||||
m_sizerButtons->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_MainSizer->Add( m_sizerButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( m_MainSizer );
|
||||
|
@ -295,11 +226,8 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
// Connect Events
|
||||
this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( DIALOG_DRC_CONTROL_BASE::OnActivateDlg ) );
|
||||
m_CreateRptCtrl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportCheckBoxClicked ), NULL, this );
|
||||
m_RptFilenameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportFilenameEdited ), NULL, this );
|
||||
m_BrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnButtonBrowseRptFileClick ), NULL, this );
|
||||
m_buttonRunDRC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnStartdrcClick ), NULL, this );
|
||||
m_buttonListUnconnected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnListUnconnectedClick ), NULL, this );
|
||||
m_DeleteAllButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteAllClick ), NULL, this );
|
||||
m_DeleteCurrentMarkerButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteOneClick ), NULL, this );
|
||||
m_Notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DRC_CONTROL_BASE::OnChangingMarkerList ), NULL, this );
|
||||
m_ClearanceListBox->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnLeftDClickClearance ), NULL, this );
|
||||
m_ClearanceListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnMarkerSelectionEvent ), NULL, this );
|
||||
|
@ -307,8 +235,11 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_UnconnectedListBox->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnLeftDClickUnconnected ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnUnconnectedSelectionEvent ), NULL, this );
|
||||
m_UnconnectedListBox->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnRightUpUnconnected ), NULL, this );
|
||||
m_DeleteCurrentMarkerButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteOneClick ), NULL, this );
|
||||
m_DeleteAllMarkersButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteAllClick ), NULL, this );
|
||||
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnListUnconnectedClick ), NULL, this );
|
||||
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnOkClick ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnStartdrcClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_DRC_CONTROL_BASE::~DIALOG_DRC_CONTROL_BASE()
|
||||
|
@ -316,11 +247,8 @@ DIALOG_DRC_CONTROL_BASE::~DIALOG_DRC_CONTROL_BASE()
|
|||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( DIALOG_DRC_CONTROL_BASE::OnActivateDlg ) );
|
||||
m_CreateRptCtrl->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportCheckBoxClicked ), NULL, this );
|
||||
m_RptFilenameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportFilenameEdited ), NULL, this );
|
||||
m_BrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnButtonBrowseRptFileClick ), NULL, this );
|
||||
m_buttonRunDRC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnStartdrcClick ), NULL, this );
|
||||
m_buttonListUnconnected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnListUnconnectedClick ), NULL, this );
|
||||
m_DeleteAllButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteAllClick ), NULL, this );
|
||||
m_DeleteCurrentMarkerButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteOneClick ), NULL, this );
|
||||
m_Notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_DRC_CONTROL_BASE::OnChangingMarkerList ), NULL, this );
|
||||
m_ClearanceListBox->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnLeftDClickClearance ), NULL, this );
|
||||
m_ClearanceListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnMarkerSelectionEvent ), NULL, this );
|
||||
|
@ -328,7 +256,10 @@ DIALOG_DRC_CONTROL_BASE::~DIALOG_DRC_CONTROL_BASE()
|
|||
m_UnconnectedListBox->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnLeftDClickUnconnected ), NULL, this );
|
||||
m_UnconnectedListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnUnconnectedSelectionEvent ), NULL, this );
|
||||
m_UnconnectedListBox->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( DIALOG_DRC_CONTROL_BASE::OnRightUpUnconnected ), NULL, this );
|
||||
m_DeleteCurrentMarkerButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteOneClick ), NULL, this );
|
||||
m_DeleteAllMarkersButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnDeleteAllClick ), NULL, this );
|
||||
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnListUnconnectedClick ), NULL, this );
|
||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnOkClick ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnStartdrcClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -23,27 +23,24 @@ class DRCLISTBOX;
|
|||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ID_CHECKBOX_RPT_FILE 1000
|
||||
#define ID_BUTTON_BROWSE_RPT_FILE 1001
|
||||
#define ID_STARTDRC 1002
|
||||
#define ID_LIST_UNCONNECTED 1003
|
||||
#define ID_DELETE_ALL 1004
|
||||
#define ID_NOTEBOOK1 1005
|
||||
#define ID_CLEARANCE_LIST 1006
|
||||
#define ID_UNCONNECTED_LIST 1007
|
||||
#define ID_NOTEBOOK1 1002
|
||||
#define ID_CLEARANCE_LIST 1003
|
||||
#define ID_UNCONNECTED_LIST 1004
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_DRC_CONTROL_BASE
|
||||
|
@ -54,7 +51,6 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
|
|||
wxPanel* m_panelUnconnectedBox;
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextOptions;
|
||||
wxStaticText* m_ClearanceTitle;
|
||||
wxStaticText* m_TrackMinWidthTitle;
|
||||
wxStaticText* m_TrackMinWidthUnit;
|
||||
|
@ -66,33 +62,26 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_cbReportAllTrackErrors;
|
||||
wxCheckBox* m_cbCourtyardOverlap;
|
||||
wxCheckBox* m_cbCourtyardMissing;
|
||||
wxStaticText* m_staticTextRpt;
|
||||
wxStaticText* m_messagesLabel;
|
||||
wxTextCtrl* m_Messages;
|
||||
wxCheckBox* m_CreateRptCtrl;
|
||||
wxTextCtrl* m_RptFilenameCtrl;
|
||||
wxButton* m_BrowseButton;
|
||||
wxStaticText* m_staticText6;
|
||||
wxTextCtrl* m_Messages;
|
||||
wxButton* m_buttonRunDRC;
|
||||
wxButton* m_buttonListUnconnected;
|
||||
wxButton* m_DeleteAllButton;
|
||||
wxButton* m_DeleteCurrentMarkerButton;
|
||||
wxStaticText* m_MarkerCountLabel;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* m_UnconnectedCountLabel;
|
||||
wxBitmapButton* m_BrowseButton;
|
||||
wxNotebook* m_Notebook;
|
||||
wxPanel* m_panelClearanceListBox;
|
||||
wxBoxSizer* m_sizerButtons;
|
||||
wxButton* m_DeleteCurrentMarkerButton;
|
||||
wxButton* m_DeleteAllMarkersButton;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Apply;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnActivateDlg( wxActivateEvent& event ) { event.Skip(); }
|
||||
virtual void OnReportCheckBoxClicked( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnReportFilenameEdited( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonBrowseRptFileClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnStartdrcClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnListUnconnectedClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDeleteAllClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDeleteOneClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnChangingMarkerList( wxNotebookEvent& event ) { event.Skip(); }
|
||||
virtual void OnLeftDClickClearance( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void OnMarkerSelectionEvent( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
@ -100,8 +89,11 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
|
|||
virtual void OnLeftDClickUnconnected( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void OnUnconnectedSelectionEvent( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRightUpUnconnected( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void OnDeleteOneClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDeleteAllClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnListUnconnectedClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnStartdrcClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
@ -109,8 +101,6 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_SetTrackMinWidthCtrl;
|
||||
wxTextCtrl* m_SetViaMinSizeCtrl;
|
||||
wxTextCtrl* m_SetMicroViakMinSizeCtrl;
|
||||
wxStaticText* m_MarkerCount;
|
||||
wxStaticText* m_UnconnectedCount;
|
||||
DRCLISTBOX* m_ClearanceListBox;
|
||||
DRCLISTBOX* m_UnconnectedListBox;
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
|
|||
bottomSizer->Add( m_closeButton, 0, wxALL, 5 );
|
||||
|
||||
|
||||
m_mainSizer->Add( bottomSizer, 0, wxEXPAND, 5 );
|
||||
m_mainSizer->Add( bottomSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( m_mainSizer );
|
||||
|
|
|
@ -1589,7 +1589,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
|
|
@ -118,11 +118,7 @@ void DRC::DestroyDRCDialog( int aReason )
|
|||
{
|
||||
if( m_drcDialog )
|
||||
{
|
||||
if( aReason == wxID_OK )
|
||||
{
|
||||
// if user clicked OK, save his choices in this DRC object.
|
||||
m_drcDialog->GetRptSettings( &m_doCreateRptFile, m_rptFilename);
|
||||
}
|
||||
|
||||
m_drcDialog->Destroy();
|
||||
m_drcDialog = NULL;
|
||||
|
|
|
@ -156,11 +156,82 @@ wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString DRC_ITEM::ShowHtml() const
|
||||
{
|
||||
wxString ret;
|
||||
wxString mainText = m_MainText;
|
||||
// a wxHtmlWindows does not like < and > in the text to display
|
||||
// because these chars have a special meaning in html
|
||||
mainText.Replace( wxT("<"), wxT("<") );
|
||||
mainText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
wxString errText = GetErrorText();
|
||||
errText.Replace( wxT("<"), wxT("<") );
|
||||
errText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
|
||||
if( m_noCoordinate )
|
||||
{
|
||||
// omit the coordinate, a NETCLASS has no location
|
||||
ret.Printf( _( "<b>%s</b><br> %s" ),
|
||||
GetChars( errText ),
|
||||
GetChars( mainText ) );
|
||||
}
|
||||
else if( m_hasSecondItem )
|
||||
{
|
||||
wxString auxText = m_AuxiliaryText;
|
||||
auxText.Replace( wxT("<"), wxT("<") );
|
||||
auxText.Replace( wxT(">"), wxT(">") );
|
||||
|
||||
// an html fragment for the entire message in the listbox. feel free
|
||||
// to add color if you want:
|
||||
ret.Printf( _( "<b>%s</b><br> %s: %s<br> %s:%s" ),
|
||||
GetChars( errText ),
|
||||
GetChars( ShowCoord( m_MainPosition )), GetChars( mainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( auxText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( _( "<b>%s</b><br> %s: %s" ),
|
||||
GetChars( errText ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( mainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString DRC_ITEM::ShowReport() const
|
||||
{
|
||||
wxString ret;
|
||||
|
||||
if( m_hasSecondItem )
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ),
|
||||
GetChars( ShowCoord( m_AuxiliaryPosition ) ), GetChars( m_AuxiliaryText ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.Printf( wxT( "ErrType(%d): %s\n %s: %s\n" ),
|
||||
m_ErrorCode,
|
||||
GetChars( GetErrorText() ),
|
||||
GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
BOARD_ITEM* DRC_ITEM::GetMainItem( BOARD* aBoard ) const
|
||||
{
|
||||
return aBoard->GetItem( m_mainItemWeakRef, false /* copper only */ );
|
||||
}
|
||||
|
||||
|
||||
BOARD_ITEM* DRC_ITEM::GetAuxiliaryItem( BOARD* aBoard ) const
|
||||
{
|
||||
return aBoard->GetItem( m_auxItemWeakRef, false /* copper only */ );
|
||||
|
|
Loading…
Reference in New Issue