Browse Source
Re-factor boundary/courtyard checker error handling.
Re-factor boundary/courtyard checker error handling.
ADDED Footprint Checker dialog to display the results in. Fixes https://gitlab.com/kicad/code/kicad/issues/64466.0.7
28 changed files with 855 additions and 184 deletions
-
213d-viewer/3d_canvas/board_adapter.cpp
-
3common/rc_item.cpp
-
4eeschema/symbol_editor/menubar_symbol_editor.cpp
-
2eeschema/symbol_editor/toolbars_symbol_editor.cpp
-
5eeschema/tools/ee_actions.cpp
-
1eeschema/tools/ee_actions.h
-
33eeschema/tools/ee_inspection_tool.cpp
-
4eeschema/tools/ee_inspection_tool.h
-
2pcbnew/CMakeLists.txt
-
6pcbnew/board.cpp
-
8pcbnew/board.h
-
182pcbnew/convert_drawsegment_list_to_polygon.cpp
-
15pcbnew/convert_drawsegment_list_to_polygon.h
-
186pcbnew/dialogs/dialog_footprint_checker.cpp
-
60pcbnew/dialogs/dialog_footprint_checker.h
-
73pcbnew/dialogs/dialog_footprint_checker_base.cpp
-
209pcbnew/dialogs/dialog_footprint_checker_base.fbp
-
59pcbnew/dialogs/dialog_footprint_checker_base.h
-
40pcbnew/drc/drc_test_provider_courtyard_clearance.cpp
-
51pcbnew/drc/drc_test_provider_misc.cpp
-
15pcbnew/footprint.cpp
-
6pcbnew/footprint.h
-
3pcbnew/menubar_footprint_editor.cpp
-
1pcbnew/toolbars_footprint_editor.cpp
-
38pcbnew/tools/footprint_editor_tools.cpp
-
6pcbnew/tools/footprint_editor_tools.h
-
4pcbnew/tools/pcb_actions.cpp
-
2pcbnew/tools/pcb_actions.h
@ -0,0 +1,186 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.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 |
|||
*/ |
|||
|
|||
#include <wx/wx.h>
|
|||
#include <dialog_footprint_checker.h>
|
|||
#include <tool/tool_manager.h>
|
|||
#include <tools/pcb_actions.h>
|
|||
#include <pcb_marker.h>
|
|||
#include <drc/drc_results_provider.h>
|
|||
#include <footprint_edit_frame.h>
|
|||
#include <convert_drawsegment_list_to_polygon.h>
|
|||
#include <tools/footprint_editor_tools.h>
|
|||
|
|||
|
|||
DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER( FOOTPRINT_EDIT_FRAME* aParent ) : |
|||
DIALOG_FOOTPRINT_CHECKER_BASE( aParent ), |
|||
m_frame( aParent ) |
|||
{ |
|||
m_markersTreeModel = new RC_TREE_MODEL( m_frame, m_markersDataView ); |
|||
m_markersDataView->AssociateModel( m_markersTreeModel ); |
|||
|
|||
m_markersTreeModel->SetSeverities( -1 ); |
|||
|
|||
// We use a sdbSizer to get platform-dependent ordering of the action buttons, but
|
|||
// that requires us to correct the button labels here.
|
|||
m_sdbSizerOK->SetLabel( _( "Run Checks" ) ); |
|||
m_sdbSizerCancel->SetLabel( _( "Close" ) ); |
|||
|
|||
m_sdbSizerOK->SetDefault(); |
|||
GetSizer()->SetSizeHints(this); |
|||
Centre(); |
|||
} |
|||
|
|||
|
|||
DIALOG_FOOTPRINT_CHECKER::~DIALOG_FOOTPRINT_CHECKER() |
|||
{ |
|||
m_markersTreeModel->DecRef(); |
|||
} |
|||
|
|||
|
|||
bool DIALOG_FOOTPRINT_CHECKER::TransferDataToWindow() |
|||
{ |
|||
runChecks(); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
bool DIALOG_FOOTPRINT_CHECKER::TransferDataFromWindow() |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::runChecks() |
|||
{ |
|||
BOARD* board = m_frame->GetBoard(); |
|||
FOOTPRINT* footprint = board->GetFirstFootprint(); |
|||
wxString msg; |
|||
|
|||
deleteAllMarkers(); |
|||
|
|||
if( !footprint ) |
|||
{ |
|||
msg = _( "No footprint loaded." ); |
|||
return; |
|||
} |
|||
|
|||
OUTLINE_ERROR_HANDLER errorHandler = |
|||
[&]( const wxString& msg, BOARD_ITEM* itemA, BOARD_ITEM* itemB, const wxPoint& pt ) |
|||
{ |
|||
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_MALFORMED_COURTYARD ); |
|||
|
|||
drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS( " " ) + msg ); |
|||
drcItem->SetItems( itemA, itemB ); |
|||
|
|||
PCB_MARKER* marker = new PCB_MARKER( drcItem, pt ); |
|||
board->Add( marker ); |
|||
m_frame->GetCanvas()->GetView()->Add( marker ); |
|||
}; |
|||
|
|||
footprint->BuildPolyCourtyards( &errorHandler ); |
|||
|
|||
SetMarkersProvider( new BOARD_DRC_ITEMS_PROVIDER( m_frame->GetBoard() ) ); |
|||
|
|||
WINDOW_THAWER thawer( m_frame ); |
|||
|
|||
m_frame->GetCanvas()->Refresh(); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::SetMarkersProvider( RC_ITEMS_PROVIDER* aProvider ) |
|||
{ |
|||
m_markersTreeModel->SetProvider( aProvider ); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnRunChecksClick( wxCommandEvent& aEvent ) |
|||
{ |
|||
runChecks(); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnCancelClick( wxCommandEvent& aEvent ) |
|||
{ |
|||
m_frame->FocusOnItem( nullptr ); |
|||
|
|||
SetReturnCode( wxID_CANCEL ); |
|||
|
|||
// Leave the tool to destroy (or not) the dialog
|
|||
FOOTPRINT_EDITOR_TOOLS* tool = m_frame->GetToolManager()->GetTool<FOOTPRINT_EDITOR_TOOLS>(); |
|||
tool->DestroyCheckerDialog(); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnClose( wxCloseEvent& aEvent ) |
|||
{ |
|||
wxCommandEvent dummy; |
|||
OnCancelClick( dummy ); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnSelectItem( wxDataViewEvent& aEvent ) |
|||
{ |
|||
const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() ); |
|||
BOARD_ITEM* item = m_frame->GetBoard()->GetItem( itemID ); |
|||
WINDOW_THAWER thawer( m_frame ); |
|||
|
|||
m_frame->FocusOnItem( item ); |
|||
m_frame->GetCanvas()->Refresh(); |
|||
|
|||
aEvent.Skip(); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem( wxMouseEvent& event ) |
|||
{ |
|||
event.Skip(); |
|||
|
|||
if( m_markersDataView->GetCurrentItem().IsOk() ) |
|||
{ |
|||
if( !IsModal() ) |
|||
Show( false ); |
|||
} |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::OnDeleteAllClick( wxCommandEvent& event ) |
|||
{ |
|||
deleteAllMarkers(); |
|||
|
|||
WINDOW_THAWER thawer( m_frame ); |
|||
|
|||
m_frame->GetCanvas()->Refresh(); |
|||
} |
|||
|
|||
|
|||
void DIALOG_FOOTPRINT_CHECKER::deleteAllMarkers() |
|||
{ |
|||
// Clear current selection list to avoid selection of deleted items
|
|||
m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); |
|||
|
|||
m_markersTreeModel->DeleteItems( false, true, true ); |
|||
} |
|||
|
|||
|
@ -0,0 +1,60 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr |
|||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.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 |
|||
*/ |
|||
|
|||
#ifndef DIALOG_FOOTPRINT_CHECKER_H |
|||
#define DIALOG_FOOTPRINT_CHECKER_H |
|||
|
|||
#include <dialog_footprint_checker_base.h> |
|||
#include <rc_item.h> |
|||
|
|||
class FOOTPRINT_EDIT_FRAME; |
|||
|
|||
|
|||
class DIALOG_FOOTPRINT_CHECKER: public DIALOG_FOOTPRINT_CHECKER_BASE |
|||
{ |
|||
FOOTPRINT_EDIT_FRAME* m_frame; |
|||
RC_TREE_MODEL* m_markersTreeModel; |
|||
|
|||
void runChecks(); |
|||
void deleteAllMarkers(); |
|||
|
|||
void OnRunChecksClick( wxCommandEvent& aEvent ) override; |
|||
void OnCancelClick( wxCommandEvent& aEvent ) override; |
|||
void OnClose( wxCloseEvent& event ) override; |
|||
|
|||
void OnSelectItem( wxDataViewEvent& event ) override; |
|||
void OnLeftDClickItem( wxMouseEvent& event ) override; |
|||
void OnDeleteAllClick( wxCommandEvent& event ) override; |
|||
|
|||
bool TransferDataToWindow() override; |
|||
bool TransferDataFromWindow() override; |
|||
|
|||
public: |
|||
DIALOG_FOOTPRINT_CHECKER( FOOTPRINT_EDIT_FRAME* aParent ); |
|||
~DIALOG_FOOTPRINT_CHECKER(); |
|||
|
|||
void SetMarkersProvider( RC_ITEMS_PROVIDER* aProvider ); |
|||
}; |
|||
|
|||
#endif // DIALOG_FOOTPRINT_CHECKER_H |
@ -0,0 +1,73 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_footprint_checker_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_FOOTPRINT_CHECKER_BASE::DIALOG_FOOTPRINT_CHECKER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bSizerMain; |
|||
bSizerMain = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bUpperSizer; |
|||
bUpperSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
bUpperSizer->SetMinSize( wxSize( 660,250 ) ); |
|||
m_markersDataView = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER ); |
|||
bUpperSizer->Add( m_markersDataView, 1, wxALL|wxEXPAND, 5 ); |
|||
|
|||
|
|||
bSizerMain->Add( bUpperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); |
|||
|
|||
wxBoxSizer* bLowerSizer; |
|||
bLowerSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_DeleteAllMarkersButton = new wxButton( this, wxID_ANY, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bLowerSizer->Add( m_DeleteAllMarkersButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_sdbSizer = new wxStdDialogButtonSizer(); |
|||
m_sdbSizerOK = new wxButton( this, wxID_OK ); |
|||
m_sdbSizer->AddButton( m_sdbSizerOK ); |
|||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); |
|||
m_sdbSizer->AddButton( m_sdbSizerCancel ); |
|||
m_sdbSizer->Realize(); |
|||
|
|||
bLowerSizer->Add( m_sdbSizer, 1, wxEXPAND|wxALL, 5 ); |
|||
|
|||
|
|||
bSizerMain->Add( bLowerSizer, 0, wxEXPAND|wxLEFT, 10 ); |
|||
|
|||
|
|||
this->SetSizer( bSizerMain ); |
|||
this->Layout(); |
|||
bSizerMain->Fit( this ); |
|||
|
|||
this->Centre( wxBOTH ); |
|||
|
|||
// Connect Events
|
|||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnClose ) ); |
|||
m_markersDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnSelectItem ), NULL, this ); |
|||
m_markersDataView->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnLeftDClickItem ), NULL, this ); |
|||
m_DeleteAllMarkersButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnDeleteAllClick ), NULL, this ); |
|||
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnCancelClick ), NULL, this ); |
|||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnRunChecksClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_FOOTPRINT_CHECKER_BASE::~DIALOG_FOOTPRINT_CHECKER_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnClose ) ); |
|||
m_markersDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnSelectItem ), NULL, this ); |
|||
m_markersDataView->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnLeftDClickItem ), NULL, this ); |
|||
m_DeleteAllMarkersButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnDeleteAllClick ), NULL, this ); |
|||
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnCancelClick ), NULL, this ); |
|||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_CHECKER_BASE::OnRunChecksClick ), NULL, this ); |
|||
|
|||
} |
@ -0,0 +1,209 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> |
|||
<wxFormBuilder_Project> |
|||
<FileVersion major="1" minor="15" /> |
|||
<object class="Project" expanded="1"> |
|||
<property name="class_decoration"></property> |
|||
<property name="code_generation">C++</property> |
|||
<property name="disconnect_events">1</property> |
|||
<property name="disconnect_mode">source_name</property> |
|||
<property name="disconnect_php_events">0</property> |
|||
<property name="disconnect_python_events">0</property> |
|||
<property name="embedded_files_path">res</property> |
|||
<property name="encoding">UTF-8</property> |
|||
<property name="event_generation">connect</property> |
|||
<property name="file">dialog_footprint_checker_base</property> |
|||
<property name="first_id">1000</property> |
|||
<property name="help_provider">none</property> |
|||
<property name="indent_with_spaces"></property> |
|||
<property name="internationalize">1</property> |
|||
<property name="name">dialog_footprint_checker</property> |
|||
<property name="namespace"></property> |
|||
<property name="path">.</property> |
|||
<property name="precompiled_header"></property> |
|||
<property name="relative_path">1</property> |
|||
<property name="skip_lua_events">1</property> |
|||
<property name="skip_php_events">1</property> |
|||
<property name="skip_python_events">1</property> |
|||
<property name="ui_table">UI</property> |
|||
<property name="use_enum">0</property> |
|||
<property name="use_microsoft_bom">0</property> |
|||
<object class="Dialog" expanded="1"> |
|||
<property name="aui_managed">0</property> |
|||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property> |
|||
<property name="bg"></property> |
|||
<property name="center">wxBOTH</property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="enabled">1</property> |
|||
<property name="event_handler">impl_virtual</property> |
|||
<property name="extra_style"></property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">DIALOG_FOOTPRINT_CHECKER_BASE</property> |
|||
<property name="pos"></property> |
|||
<property name="size">-1,-1</property> |
|||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> |
|||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> |
|||
<property name="title">Footprint Checker</property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnClose">OnClose</event> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">bSizerMain</property> |
|||
<property name="orient">wxVERTICAL</property> |
|||
<property name="permission">none</property> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">10</property> |
|||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size">660,250</property> |
|||
<property name="name">bUpperSizer</property> |
|||
<property name="orient">wxVERTICAL</property> |
|||
<property name="permission">none</property> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxEXPAND</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxDataViewCtrl" expanded="1"> |
|||
<property name="bg"></property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_markersDataView</property> |
|||
<property name="permission">protected</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style">wxDV_NO_HEADER</property> |
|||
<property name="subclass">; ; forward_declare</property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnDataViewCtrlSelectionChanged">OnSelectItem</event> |
|||
<event name="OnLeftDClick">OnLeftDClickItem</event> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">10</property> |
|||
<property name="flag">wxEXPAND|wxLEFT</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxBoxSizer" expanded="1"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">bLowerSizer</property> |
|||
<property name="orient">wxHORIZONTAL</property> |
|||
<property name="permission">none</property> |
|||
<object class="sizeritem" expanded="1"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxButton" expanded="1"> |
|||
<property name="BottomDockable">1</property> |
|||
<property name="LeftDockable">1</property> |
|||
<property name="RightDockable">1</property> |
|||
<property name="TopDockable">1</property> |
|||
<property name="aui_layer"></property> |
|||
<property name="aui_name"></property> |
|||
<property name="aui_position"></property> |
|||
<property name="aui_row"></property> |
|||
<property name="best_size"></property> |
|||
<property name="bg"></property> |
|||
<property name="bitmap"></property> |
|||
<property name="caption"></property> |
|||
<property name="caption_visible">1</property> |
|||
<property name="center_pane">0</property> |
|||
<property name="close_button">1</property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="current"></property> |
|||
<property name="default">0</property> |
|||
<property name="default_pane">0</property> |
|||
<property name="disabled"></property> |
|||
<property name="dock">Dock</property> |
|||
<property name="dock_fixed">0</property> |
|||
<property name="docking">Left</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="floatable">1</property> |
|||
<property name="focus"></property> |
|||
<property name="font"></property> |
|||
<property name="gripper">0</property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="label">Delete All Markers</property> |
|||
<property name="margins"></property> |
|||
<property name="markup">0</property> |
|||
<property name="max_size"></property> |
|||
<property name="maximize_button">0</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="min_size"></property> |
|||
<property name="minimize_button">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="moveable">1</property> |
|||
<property name="name">m_DeleteAllMarkersButton</property> |
|||
<property name="pane_border">1</property> |
|||
<property name="pane_position"></property> |
|||
<property name="pane_size"></property> |
|||
<property name="permission">protected</property> |
|||
<property name="pin_button">1</property> |
|||
<property name="pos"></property> |
|||
<property name="position"></property> |
|||
<property name="pressed"></property> |
|||
<property name="resize">Resizable</property> |
|||
<property name="show">1</property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass">; forward_declare</property> |
|||
<property name="toolbar_pane">0</property> |
|||
<property name="tooltip"></property> |
|||
<property name="validator_data_type"></property> |
|||
<property name="validator_style">wxFILTER_NONE</property> |
|||
<property name="validator_type">wxDefaultValidator</property> |
|||
<property name="validator_variable"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<event name="OnButtonClick">OnDeleteAllClick</event> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="0"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxEXPAND|wxALL</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxStdDialogButtonSizer" expanded="0"> |
|||
<property name="Apply">0</property> |
|||
<property name="Cancel">1</property> |
|||
<property name="ContextHelp">0</property> |
|||
<property name="Help">0</property> |
|||
<property name="No">0</property> |
|||
<property name="OK">1</property> |
|||
<property name="Save">0</property> |
|||
<property name="Yes">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_sdbSizer</property> |
|||
<property name="permission">protected</property> |
|||
<event name="OnCancelButtonClick">OnCancelClick</event> |
|||
<event name="OnOKButtonClick">OnRunChecksClick</event> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</wxFormBuilder_Project> |
@ -0,0 +1,59 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Oct 26 2018) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO *NOT* EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#pragma once |
|||
|
|||
#include <wx/artprov.h> |
|||
#include <wx/xrc/xmlres.h> |
|||
#include <wx/intl.h> |
|||
#include "dialog_shim.h" |
|||
#include <wx/dataview.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/string.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_FOOTPRINT_CHECKER_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_FOOTPRINT_CHECKER_BASE : public DIALOG_SHIM |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxDataViewCtrl* m_markersDataView; |
|||
wxButton* m_DeleteAllMarkersButton; |
|||
wxStdDialogButtonSizer* m_sdbSizer; |
|||
wxButton* m_sdbSizerOK; |
|||
wxButton* m_sdbSizerCancel; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } |
|||
virtual void OnSelectItem( wxDataViewEvent& event ) { event.Skip(); } |
|||
virtual void OnLeftDClickItem( wxMouseEvent& event ) { event.Skip(); } |
|||
virtual void OnDeleteAllClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnRunChecksClick( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
|
|||
DIALOG_FOOTPRINT_CHECKER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Checker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_FOOTPRINT_CHECKER_BASE(); |
|||
|
|||
}; |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue