KiCad PCB EDA Suite
DIALOG_DRC Class Reference

#include <dialog_drc.h>

Inheritance diagram for DIALOG_DRC:
DIALOG_DRC_BASE PROGRESS_REPORTER DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG, FRAME, PANEL }
 

Public Member Functions

 DIALOG_DRC (PCB_EDIT_FRAME *aEditorFrame, wxWindow *aParent)
 Constructors. More...
 
 ~DIALOG_DRC ()
 
void SetDrcRun ()
 
void SetFootprintTestsRun ()
 
void SetMarkersProvider (RC_ITEMS_PROVIDER *aProvider)
 
void SetUnconnectedProvider (RC_ITEMS_PROVIDER *aProvider)
 
void SetFootprintsProvider (RC_ITEMS_PROVIDER *aProvider)
 
void PrevMarker ()
 
void NextMarker ()
 
void ExcludeMarker ()
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal () const
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
void SetPosition (const wxPoint &aNewPosition)
 Force the position of the dialog to a new position. More...
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Return a reference to the PROJECT associated with this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 It is only used for debugging, since "this" is not a wxWindow*. More...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 

Protected Member Functions

void finishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void setSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int horizPixelsFromDU (int x) const
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int vertPixelsFromDU (int y) const
 Convert an integer number of dialog units to pixels, vertically. More...
 
void resetSize ()
 Clear the existing dialog size and position. More...
 
virtual void OnCharHook (wxKeyEvent &aEvt)
 

Protected Attributes

wxCheckBox * m_cbRefillZones
 
wxCheckBox * m_cbReportAllTrackErrors
 
wxCheckBox * m_cbTestFootprints
 
wxSimplebook * m_runningResultsBook
 
wxPanel * running
 
wxNotebook * m_runningNotebook
 
wxPanel * m_panelMessages
 
WX_HTML_REPORT_BOXm_messages
 
wxGauge * m_gauge
 
wxPanel * results
 
wxNotebook * m_Notebook
 
wxPanel * m_panelViolations
 
wxDataViewCtrl * m_markerDataView
 
wxDataViewCtrl * m_unconnectedDataView
 
wxPanel * m_panelFootprintWarnings
 
wxDataViewCtrl * m_footprintsDataView
 
wxStaticText * m_showLabel
 
wxCheckBox * m_showAll
 
wxCheckBox * m_showErrors
 
NUMBER_BADGEm_errorsBadge
 
wxCheckBox * m_showWarnings
 
NUMBER_BADGEm_warningsBadge
 
wxCheckBox * m_showExclusions
 
NUMBER_BADGEm_exclusionsBadge
 
wxButton * m_saveReport
 
wxStaticLine * m_staticline1
 
wxBoxSizer * m_sizerButtons
 
wxButton * m_DeleteCurrentMarkerButton
 
wxButton * m_DeleteAllMarkersButton
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
wxButton * m_sdbSizerCancel
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_useCalculatedSize
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 
wxSize m_initialSize
 

Private Member Functions

bool writeReport (const wxString &aFullFileName)
 Function writeReport outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an open text file. More...
 
void initValues ()
 
void syncCheckboxes ()
 
void updateDisplayedCounts ()
 
void OnDRCItemSelected (wxDataViewEvent &aEvent) override
 
void OnDRCItemDClick (wxDataViewEvent &aEvent) override
 
void OnDRCItemRClick (wxDataViewEvent &aEvent) override
 
void OnSeverity (wxCommandEvent &aEvent) override
 
void OnSaveReport (wxCommandEvent &aEvent) override
 
void OnDeleteOneClick (wxCommandEvent &aEvent) override
 
void OnDeleteAllClick (wxCommandEvent &aEvent) override
 
void OnRunDRCClick (wxCommandEvent &aEvent) override
 
void OnErrorLinkClicked (wxHtmlLinkEvent &event) override
 
void OnCancelClick (wxCommandEvent &aEvent) override
 
void OnClose (wxCloseEvent &event) override
 
void OnActivateDlg (wxActivateEvent &aEvent) override
 
void OnChangingNotebookPage (wxNotebookEvent &aEvent) override
 
void deleteAllMarkers (bool aIncludeExclusions)
 
void refreshEditor ()
 
bool updateUI () override
 
void AdvancePhase (const wxString &aMessage) override
 Use the next available virtual zone of the dialog progress bar and updates the message. More...
 
BOARD_DESIGN_SETTINGSbds ()
 
void SetNumPhases (int aNumPhases)
 Set the number of phases. More...
 
void AddPhases (int aNumPhases)
 
virtual void BeginPhase (int aPhase)
 Initialize the aPhase virtual zone of the dialog progress bar. More...
 
virtual void AdvancePhase ()
 Use the next available virtual zone of the dialog progress bar. More...
 
virtual void Report (const wxString &aMessage)
 Display aMessage in the progress bar dialog. More...
 
virtual void SetCurrentProgress (double aProgress)
 Set the progress value to aProgress (0..1). More...
 
void SetMaxProgress (int aMaxProgress)
 Fix the value that gives the 100 percent progress bar length (inside the current virtual zone). More...
 
void AdvanceProgress ()
 Increment the progress bar length (inside the current virtual zone). More...
 
bool KeepRefreshing (bool aWait=false)
 Update the UI dialog. More...
 
virtual void SetTitle (const wxString &aTitle)
 Change the title displayed on the window caption. More...
 
bool IsCancelled () const
 
int currentProgress () const
 

Private Attributes

BOARDm_currentBoard
 
PCB_EDIT_FRAMEm_frame
 
bool m_running
 
std::atomic< bool > m_cancelled
 
bool m_drcRun
 
bool m_footprintTestsRun
 
wxString m_markersTitleTemplate
 
wxString m_unconnectedTitleTemplate
 
wxString m_footprintsTitleTemplate
 
RC_ITEMS_PROVIDERm_markersProvider
 
RC_TREE_MODELm_markersTreeModel
 
RC_ITEMS_PROVIDERm_unconnectedItemsProvider
 
RC_TREE_MODELm_unconnectedTreeModel
 
RC_ITEMS_PROVIDERm_footprintWarningsProvider
 
RC_TREE_MODELm_footprintWarningsTreeModel
 
int m_severities
 
wxString m_rptMessage
 
bool m_msgChanged
 
std::mutex m_mutex
 
std::atomic_int m_phase
 
std::atomic_int m_numPhases
 
std::atomic_int m_progress
 
std::atomic_int m_maxProgress
 

Detailed Description

Definition at line 43 of file dialog_drc.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_DRC()

DIALOG_DRC::DIALOG_DRC ( PCB_EDIT_FRAME aEditorFrame,
wxWindow *  aParent 
)

Constructors.

Definition at line 50 of file dialog_drc.cpp.

50  :
51  DIALOG_DRC_BASE( aParent ),
52  PROGRESS_REPORTER( 1 ),
53  m_running( false ),
54  m_cancelled( false ),
55  m_drcRun( false ),
56  m_footprintTestsRun( false ),
57  m_markersProvider( nullptr ),
58  m_markersTreeModel( nullptr ),
59  m_unconnectedItemsProvider( nullptr ),
60  m_unconnectedTreeModel( nullptr ),
61  m_footprintWarningsProvider( nullptr ),
64 {
65  SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
66 
67  m_frame = aEditorFrame;
69 
71 
73  m_markerDataView->AssociateModel( m_markersTreeModel );
74 
77 
80 
81  if( Kiface().IsSingle() )
82  m_cbTestFootprints->Hide();
83 
84  // We use a sdbSizer here to get the order right, which is platform-dependent
85  m_sdbSizerOK->SetLabel( _( "Run DRC" ) );
86  m_sdbSizerCancel->SetLabel( _( "Close" ) );
87  m_sizerButtons->Layout();
88 
89  m_sdbSizerOK->SetDefault();
90 
91  initValues();
93 
95 }
void initValues()
Definition: dialog_drc.cpp:130
void syncCheckboxes()
Definition: dialog_drc.cpp:181
wxCheckBox * m_cbTestFootprints
bool m_footprintTestsRun
Definition: dialog_drc.h:112
wxButton * m_sdbSizerCancel
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
BOARD * m_currentBoard
Definition: dialog_drc.h:107
PROGRESS_REPORTER(int aNumPhases)
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:121
void SetImmediateMode()
In immediate mode, messages are flushed as they are added.
wxDataViewCtrl * m_footprintsDataView
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:124
wxBoxSizer * m_sizerButtons
wxButton * m_sdbSizerOK
DIALOG_DRC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("DRC Control"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:110
#define DIALOG_DRC_WINDOW_NAME
Definition: dialog_drc.h:41
#define _(s)
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
wxDataViewCtrl * m_unconnectedDataView
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
wxDataViewCtrl * m_markerDataView
WX_HTML_REPORT_BOX * m_messages
bool m_drcRun
Definition: dialog_drc.h:111
int m_severities
Definition: dialog_drc.h:127
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
BOARD * GetBoard() const
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
bool m_running
Definition: dialog_drc.h:109

References _, DIALOG_DRC_WINDOW_NAME, DIALOG_SHIM::finishDialogSettings(), PCB_BASE_FRAME::GetBoard(), initValues(), Kiface(), DIALOG_DRC_BASE::m_cbTestFootprints, m_currentBoard, DIALOG_DRC_BASE::m_footprintsDataView, m_footprintWarningsTreeModel, m_frame, DIALOG_DRC_BASE::m_markerDataView, m_markersTreeModel, DIALOG_DRC_BASE::m_messages, DIALOG_DRC_BASE::m_sdbSizerCancel, DIALOG_DRC_BASE::m_sdbSizerOK, DIALOG_DRC_BASE::m_sizerButtons, DIALOG_DRC_BASE::m_unconnectedDataView, m_unconnectedTreeModel, WX_HTML_REPORT_BOX::SetImmediateMode(), and syncCheckboxes().

◆ ~DIALOG_DRC()

DIALOG_DRC::~DIALOG_DRC ( )

Definition at line 98 of file dialog_drc.cpp.

99 {
100  m_frame->FocusOnItem( nullptr );
101 
103  settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
105 
106  if( !Kiface().IsSingle() )
107  settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
108 
109  settings->m_DrcDialog.severities = m_severities;
110 
111  m_markersTreeModel->DecRef();
112 }
wxCheckBox * m_cbTestFootprints
wxCheckBox * m_cbReportAllTrackErrors
wxCheckBox * m_cbRefillZones
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
PCBNEW_SETTINGS * GetPcbNewSettings() const
int m_severities
Definition: dialog_drc.h:127
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
DIALOG_DRC m_DrcDialog
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
void FocusOnItem(BOARD_ITEM *aItem)

References PCB_BASE_FRAME::FocusOnItem(), PCB_BASE_FRAME::GetPcbNewSettings(), Kiface(), DIALOG_DRC_BASE::m_cbRefillZones, DIALOG_DRC_BASE::m_cbReportAllTrackErrors, DIALOG_DRC_BASE::m_cbTestFootprints, PCBNEW_SETTINGS::m_DrcDialog, m_frame, m_markersTreeModel, m_severities, PCBNEW_SETTINGS::DIALOG_DRC::refill_zones, PCBNEW_SETTINGS::DIALOG_DRC::severities, PCBNEW_SETTINGS::DIALOG_DRC::test_all_track_errors, and PCBNEW_SETTINGS::DIALOG_DRC::test_footprints.

Member Function Documentation

◆ AddPhases()

void PROGRESS_REPORTER::AddPhases ( int  aNumPhases)
inherited

Definition at line 95 of file progress_reporter.cpp.

96 {
97  m_numPhases += aNumPhases;
98 }
std::atomic_int m_numPhases

References PROGRESS_REPORTER::m_numPhases.

◆ AdvancePhase() [1/2]

void PROGRESS_REPORTER::AdvancePhase ( )
virtualinherited

◆ AdvancePhase() [2/2]

void DIALOG_DRC::AdvancePhase ( const wxString &  aMessage)
overrideprivatevirtual

Use the next available virtual zone of the dialog progress bar and updates the message.

Reimplemented from PROGRESS_REPORTER.

Definition at line 168 of file dialog_drc.cpp.

169 {
171  SetCurrentProgress( 0.0 );
172 
173  m_messages->Report( aMessage );
174 }
virtual void AdvancePhase()
Use the next available virtual zone of the dialog progress bar.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
virtual void SetCurrentProgress(double aProgress)
Set the progress value to aProgress (0..1).
WX_HTML_REPORT_BOX * m_messages

References PROGRESS_REPORTER::AdvancePhase(), DIALOG_DRC_BASE::m_messages, WX_HTML_REPORT_BOX::Report(), and PROGRESS_REPORTER::SetCurrentProgress().

◆ AdvanceProgress()

void PROGRESS_REPORTER::AdvanceProgress ( )
inherited

Increment the progress bar length (inside the current virtual zone).

Definition at line 83 of file progress_reporter.cpp.

84 {
85  m_progress.fetch_add( 1 );
86 }
std::atomic_int m_progress

References PROGRESS_REPORTER::m_progress.

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::joinWorkers(), and FOOTPRINT_LIST_IMPL::loader_job().

◆ bds()

BOARD_DESIGN_SETTINGS& DIALOG_DRC::bds ( )
inlineprivate

Definition at line 105 of file dialog_drc.h.

105 { return m_currentBoard->GetDesignSettings(); }
BOARD * m_currentBoard
Definition: dialog_drc.h:107
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:588

Referenced by OnDRCItemRClick(), and writeReport().

◆ BeginPhase()

void PROGRESS_REPORTER::BeginPhase ( int  aPhase)
virtualinherited

Initialize the aPhase virtual zone of the dialog progress bar.

Definition at line 42 of file progress_reporter.cpp.

43 {
44  m_phase.store( aPhase );
45  m_progress.store( 0 );
46 }
std::atomic_int m_phase
std::atomic_int m_progress

References PROGRESS_REPORTER::m_phase, and PROGRESS_REPORTER::m_progress.

◆ currentProgress()

int PROGRESS_REPORTER::currentProgress ( ) const
protectedinherited

Definition at line 101 of file progress_reporter.cpp.

102 {
103  double current = ( 1.0 / (double) m_numPhases ) *
104  ( (double) m_phase + ( (double) m_progress.load() / (double) m_maxProgress ) );
105 
106  return (int)( current * 1000 );
107 }
std::atomic_int m_phase
std::atomic_int m_progress
std::atomic_int m_numPhases
std::atomic_int m_maxProgress

References PROGRESS_REPORTER::m_maxProgress, PROGRESS_REPORTER::m_numPhases, PROGRESS_REPORTER::m_phase, and PROGRESS_REPORTER::m_progress.

Referenced by WX_PROGRESS_REPORTER::updateUI(), and GAUGE_PROGRESS_REPORTER::updateUI().

◆ deleteAllMarkers()

void DIALOG_DRC::deleteAllMarkers ( bool  aIncludeExclusions)
private

Definition at line 776 of file dialog_drc.cpp.

777 {
778  // Clear current selection list to avoid selection of deleted items
780 
781  m_markersTreeModel->DeleteItems( false, aIncludeExclusions, true );
782 }
static TOOL_ACTION selectionClear
Clear the current selection.
Definition: pcb_actions.h:59
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
Definition: rc_item.cpp:456
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:143
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References RC_TREE_MODEL::DeleteItems(), TOOLS_HOLDER::GetToolManager(), m_frame, m_markersTreeModel, TOOL_MANAGER::RunAction(), and PCB_ACTIONS::selectionClear.

Referenced by OnDeleteAllClick(), and OnRunDRCClick().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 311 of file dialog_shim.cpp.

312 {
313  // so we can do logging of this state change:
314  return wxDialog::Enable( enable );
315 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 470 of file dialog_shim.cpp.

471 {
472  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
473  // handle validation in the same way as other dialogs.
474  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
475  return;
476 
477  SetReturnCode( retCode );
478 
479  if( !IsQuasiModal() )
480  {
481  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
482  "wasn't called" );
483  return;
484  }
485 
486  if( m_qmodal_loop )
487  {
488  if( m_qmodal_loop->IsRunning() )
489  m_qmodal_loop->Exit( 0 );
490  else
491  m_qmodal_loop->ScheduleExit( 0 );
492 
493  m_qmodal_loop = nullptr;
494  }
495 
497  m_qmodal_parent_disabler = nullptr;
498 
499  Show( false );
500 }
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:211
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:214

References DIALOG_SHIM::IsQuasiModal(), DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, and DIALOG_SHIM::Show().

Referenced by NETLIST_DIALOG::OnAddGenerator(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_SYMBOLS_LIBID::onCancel(), DIALOG_LIB_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), NETLIST_DIALOG::OnDelGenerator(), DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol(), DIALOG_SYMBOL_PROPERTIES::OnEditSymbol(), DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol(), PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick(), PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick(), DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_PUSH_PAD_PROPERTIES::PadPropertiesAccept(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ ExcludeMarker()

void DIALOG_DRC::ExcludeMarker ( )

Definition at line 750 of file dialog_drc.cpp.

751 {
752  if( !m_Notebook->IsShown() || m_Notebook->GetSelection() != 0 )
753  return;
754 
755  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( m_markerDataView->GetCurrentItem() );
756  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
757 
758  if( marker && !marker->IsExcluded() )
759  {
760  marker->SetExcluded( true );
761  m_frame->GetCanvas()->GetView()->Update( marker );
762 
763  // Update view
766  else
768 
770  refreshEditor();
771  m_frame->OnModify();
772  }
773 }
void OnModify() override
Must be called after a board change to set the modified flag.
wxNotebook * m_Notebook
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:450
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: pcb_view.cpp:92
void SetExcluded(bool aExcluded)
Definition: marker_base.h:95
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:190
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:205
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
wxDataViewCtrl * m_markerDataView
void refreshEditor()
Definition: dialog_drc.cpp:714
int m_severities
Definition: dialog_drc.h:127
void ValueChanged(const RC_TREE_NODE *aNode)
Definition: rc_item.cpp:433
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References RC_TREE_MODEL::DeleteCurrentItem(), PCB_BASE_FRAME::GetCanvas(), PCB_DRAW_PANEL_GAL::GetView(), m_frame, DIALOG_DRC_BASE::m_markerDataView, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, RC_TREE_NODE::m_RcItem, m_severities, PCB_EDIT_FRAME::OnModify(), refreshEditor(), RPT_SEVERITY_EXCLUSION, MARKER_BASE::SetExcluded(), RC_TREE_MODEL::ToNode(), KIGFX::PCB_VIEW::Update(), updateDisplayedCounts(), and RC_TREE_MODEL::ValueChanged().

Referenced by DRC_TOOL::ExcludeMarker().

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls.

finishDialogSettings must be called from derived classes after all widgets have been initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at the end of TransferDataToWindow, or better yet, at end of a wxInitDialogEvent handler.

Definition at line 150 of file dialog_shim.cpp.

151 {
152  // must be called from the constructor of derived classes,
153  // when all widgets are initialized, and therefore their size fixed
154 
155  // SetSizeHints fixes the minimal size of sizers in the dialog
156  // (SetSizeHints calls Fit(), so no need to call it)
157  GetSizer()->SetSizeHints( this );
158 }

Referenced by DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), PAGED_DIALOG::finishInitialization(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_BOARD_STATISTICS::TransferDataToWindow(), and DIALOG_COLOR_PICKER::TransferDataToWindow().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

46 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:76

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

Convert an integer number of dialog units to pixels, horizontally.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 168 of file dialog_shim.cpp.

169 {
170  wxSize sz( x, 0 );
171  return ConvertDialogToPixels( sz ).x;
172 }

Referenced by DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), and DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ initValues()

void DIALOG_DRC::initValues ( )
private

Definition at line 130 of file dialog_drc.cpp.

131 {
132  m_markersTitleTemplate = m_Notebook->GetPageText( 0 );
133  m_unconnectedTitleTemplate = m_Notebook->GetPageText( 1 );
134  m_footprintsTitleTemplate = m_Notebook->GetPageText( 2 );
135 
136  auto cfg = m_frame->GetPcbNewSettings();
137 
138  m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
139  m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_all_track_errors );
140 
141 
142  if( !Kiface().IsSingle() )
143  m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints );
144 
145  m_severities = cfg->m_DrcDialog.severities;
149 
150  Layout(); // adding the units above expanded Clearance text, now resize.
151 
152  SetFocus();
153 }
wxCheckBox * m_cbTestFootprints
wxNotebook * m_Notebook
wxCheckBox * m_cbReportAllTrackErrors
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:116
void SetSeverities(int aSeverities)
Definition: rc_item.cpp:295
wxString m_markersTitleTemplate
Definition: dialog_drc.h:114
wxCheckBox * m_cbRefillZones
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
PCBNEW_SETTINGS * GetPcbNewSettings() const
int m_severities
Definition: dialog_drc.h:127
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:115

References PCB_BASE_FRAME::GetPcbNewSettings(), Kiface(), DIALOG_DRC_BASE::m_cbRefillZones, DIALOG_DRC_BASE::m_cbReportAllTrackErrors, DIALOG_DRC_BASE::m_cbTestFootprints, m_footprintsTitleTemplate, m_footprintWarningsTreeModel, m_frame, m_markersTitleTemplate, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, m_severities, m_unconnectedTitleTemplate, m_unconnectedTreeModel, and RC_TREE_MODEL::SetSeverities().

Referenced by DIALOG_DRC().

◆ IsCancelled()

bool PROGRESS_REPORTER::IsCancelled ( ) const
inlineinherited

◆ IsCtrl()

static bool DIALOG_SHIM::IsCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 124 of file dialog_shim.h.

125  {
126  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
127  !e.ShiftDown() && !e.MetaDown();
128  }

◆ IsQuasiModal()

◆ IsShiftCtrl()

static bool DIALOG_SHIM::IsShiftCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 130 of file dialog_shim.h.

131  {
132  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
133  e.ShiftDown() && !e.MetaDown();
134  }

◆ KeepRefreshing()

bool PROGRESS_REPORTER::KeepRefreshing ( bool  aWait = false)
inherited

Update the UI dialog.

Warning
This should only be called from the main thread.
Returns
false if the user clicked Cancel.

Definition at line 110 of file progress_reporter.cpp.

111 {
112  if( aWait )
113  {
114  while( m_progress.load() < m_maxProgress && m_maxProgress > 0 )
115  {
116  if( !updateUI() )
117  {
118  m_cancelled.store( true );
119  return false;
120  }
121 
122  wxMilliSleep( 20 );
123  }
124 
125  return true;
126  }
127  else
128  {
129  if( !updateUI() )
130  {
131  m_cancelled.store( true );
132  return false;
133  }
134 
135  return true;
136  }
137 }
std::atomic_int m_progress
std::atomic_bool m_cancelled
virtual bool updateUI()=0
std::atomic_int m_maxProgress

References PROGRESS_REPORTER::m_cancelled, PROGRESS_REPORTER::m_maxProgress, PROGRESS_REPORTER::m_progress, and PROGRESS_REPORTER::updateUI().

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), SCH_SEXPR_PARSER::checkpoint(), LEGACY_PLUGIN::checkpoint(), SCH_EAGLE_PLUGIN::checkpoint(), ALTIUM_PCB::checkpoint(), SCH_LEGACY_PLUGIN::checkpoint(), EAGLE_PLUGIN::checkpoint(), FABMASTER::checkpoint(), ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::joinWorkers(), FABMASTER_PLUGIN::Load(), LEGACY_PLUGIN::Load(), SCH_EAGLE_PLUGIN::Load(), EAGLE_PLUGIN::Load(), PCB_IO::Load(), SCH_SEXPR_PLUGIN::loadFile(), SCH_LEGACY_PLUGIN::loadFile(), SYMBOL_LIBRARY_MANAGER::Preload(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), DRC_ENGINE::ReportPhase(), DRC_ENGINE::ReportProgress(), reportProgress(), and CN_CONNECTIVITY_ALGO::searchConnections().

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Return a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

54  {
55  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
56  return *m_kiway;
57  }
KIWAY * m_kiway
Definition: kiway_holder.h:75

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SYMBOL_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SCH_EDITOR_CONTROL::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ NextMarker()

void DIALOG_DRC::NextMarker ( )

Definition at line 736 of file dialog_drc.cpp.

737 {
738  if( m_Notebook->IsShown() )
739  {
740  switch( m_Notebook->GetSelection() )
741  {
742  case 0: m_markersTreeModel->NextMarker(); break;
743  case 1: m_unconnectedTreeModel->NextMarker(); break;
744  case 2: m_footprintWarningsTreeModel->NextMarker(); break;
745  }
746  }
747 }
void NextMarker()
Definition: rc_item.cpp:566
wxNotebook * m_Notebook
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119

References m_footprintWarningsTreeModel, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, m_unconnectedTreeModel, and RC_TREE_MODEL::NextMarker().

Referenced by DRC_TOOL::NextMarker().

◆ OnActivateDlg()

void DIALOG_DRC::OnActivateDlg ( wxActivateEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 115 of file dialog_drc.cpp.

116 {
117  if( m_currentBoard != m_frame->GetBoard() )
118  {
119  // If m_currentBoard is not the current board, (for instance because a new board
120  // was loaded), close the dialog, because many pointers are now invalid in lists
121  SetReturnCode( wxID_CANCEL );
122  Close();
123 
124  DRC_TOOL* drcTool = m_frame->GetToolManager()->GetTool<DRC_TOOL>();
125  drcTool->DestroyDRCDialog();
126  }
127 }
BOARD * m_currentBoard
Definition: dialog_drc.h:107
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
BOARD * GetBoard() const
void DestroyDRCDialog()
Close and free the DRC dialog.
Definition: drc_tool.cpp:121
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References DRC_TOOL::DestroyDRCDialog(), PCB_BASE_FRAME::GetBoard(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), m_currentBoard, and m_frame.

◆ OnCancelClick()

void DIALOG_DRC::OnCancelClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 683 of file dialog_drc.cpp.

684 {
685  if( m_running )
686  {
687  m_cancelled = true;
688  return;
689  }
690 
691  m_frame->FocusOnItem( nullptr );
692 
693  SetReturnCode( wxID_CANCEL );
694 
695  // The dialog can be modal or not modal.
696  // Leave the DRC caller destroy (or not) the dialog
697  DRC_TOOL* drcTool = m_frame->GetToolManager()->GetTool<DRC_TOOL>();
698  drcTool->DestroyDRCDialog();
699 }
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:110
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
void DestroyDRCDialog()
Close and free the DRC dialog.
Definition: drc_tool.cpp:121
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
bool m_running
Definition: dialog_drc.h:109
void FocusOnItem(BOARD_ITEM *aItem)

References DRC_TOOL::DestroyDRCDialog(), PCB_BASE_FRAME::FocusOnItem(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), m_cancelled, m_frame, and m_running.

Referenced by OnClose().

◆ OnChangingNotebookPage()

void DIALOG_DRC::OnChangingNotebookPage ( wxNotebookEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 702 of file dialog_drc.cpp.

703 {
704  // Shouldn't be necessary, but is on at least OSX
705  if( aEvent.GetSelection() >= 0 )
706  m_Notebook->ChangeSelection( (unsigned) aEvent.GetSelection() );
707 
708  m_markerDataView->UnselectAll();
709  m_unconnectedDataView->UnselectAll();
710  m_footprintsDataView->UnselectAll();
711 }
wxNotebook * m_Notebook
wxDataViewCtrl * m_footprintsDataView
wxDataViewCtrl * m_unconnectedDataView
wxDataViewCtrl * m_markerDataView

References DIALOG_DRC_BASE::m_footprintsDataView, DIALOG_DRC_BASE::m_markerDataView, DIALOG_DRC_BASE::m_Notebook, and DIALOG_DRC_BASE::m_unconnectedDataView.

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in DIALOG_CHOOSE_SYMBOL, HK_PROMPT_DIALOG, and HTML_MESSAGE_BOX.

Definition at line 561 of file dialog_shim.cpp.

562 {
563  if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
564  {
565  if( m_parentFrame )
566  {
568  return;
569  }
570  }
571  // shift-return (Mac default) or Ctrl-Return (GTK) for OK
572  else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
573  {
574  wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
575  return;
576  }
577  else if( aEvt.GetKeyCode() == WXK_TAB && !aEvt.ControlDown() )
578  {
579  wxWindow* currentWindow = wxWindow::FindFocus();
580  int currentIdx = -1;
581  int delta = aEvt.ShiftDown() ? -1 : 1;
582 
583  auto advance = [&]( int& idx )
584  {
585  // Wrap-around modulus
586  int size = m_tabOrder.size();
587  idx = ( ( idx + delta ) % size + size ) % size;
588  };
589 
590  for( size_t i = 0; i < m_tabOrder.size(); ++i )
591  {
592  if( m_tabOrder[i] == currentWindow )
593  {
594  currentIdx = (int) i;
595  break;
596  }
597  }
598 
599  if( currentIdx >= 0 )
600  {
601  advance( currentIdx );
602 
603  //todo: We don't currently have non-textentry dialog boxes but this will break if
604  // we add them.
605 #ifdef __APPLE__
606  while( dynamic_cast<wxTextEntry*>( m_tabOrder[ currentIdx ] ) == nullptr )
607  advance( currentIdx );
608 #endif
609 
610  m_tabOrder[ currentIdx ]->SetFocus();
611  return;
612  }
613  }
614 
615  aEvt.Skip();
616 }
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:218
EDA_BASE_FRAME * m_parentFrame
Definition: dialog_shim.h:216
virtual void ToggleUserUnits()
constexpr int delta

References delta, DIALOG_SHIM::m_parentFrame, DIALOG_SHIM::m_tabOrder, and EDA_BASE_FRAME::ToggleUserUnits().

Referenced by DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), and DIALOG_TEXT_PROPERTIES::~DIALOG_TEXT_PROPERTIES().

◆ OnClose()

void DIALOG_DRC::OnClose ( wxCloseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 672 of file dialog_drc.cpp.

673 {
674  if( m_running )
675  aEvent.Veto();
676 
677  wxCommandEvent dummy;
678 
679  OnCancelClick( dummy );
680 }
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
Definition: sch_symbol.cpp:71
void OnCancelClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:683
bool m_running
Definition: dialog_drc.h:109

References dummy(), m_running, and OnCancelClick().

◆ OnDeleteAllClick()

void DIALOG_DRC::OnDeleteAllClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 875 of file dialog_drc.cpp.

876 {
877  static bool s_includeExclusions = false;
878 
879  int numExcluded = 0;
880 
881  if( m_markersProvider )
883 
886 
889 
890  if( numExcluded > 0 )
891  {
892  wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ),
893  _( "Delete All Markers" ),
894  wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION );
895  dlg.ShowCheckBox( _( "Delete exclusions" ), s_includeExclusions );
896 
897  int ret = dlg.ShowModal();
898 
899  if( ret == wxID_CANCEL )
900  return;
901  else
902  s_includeExclusions = dlg.IsCheckBoxChecked();
903  }
904 
905  deleteAllMarkers( s_includeExclusions );
906 
907  m_drcRun = false;
908  refreshEditor();
910 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_drc.cpp:776
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
virtual int GetCount(int aSeverity=-1) const =0
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:121
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:124
#define _(s)
void refreshEditor()
Definition: dialog_drc.cpp:714
bool m_drcRun
Definition: dialog_drc.h:111

References _, deleteAllMarkers(), RC_ITEMS_PROVIDER::GetCount(), m_drcRun, m_footprintWarningsProvider, m_markersProvider, m_unconnectedItemsProvider, refreshEditor(), RPT_SEVERITY_EXCLUSION, and updateDisplayedCounts().

◆ OnDeleteOneClick()

void DIALOG_DRC::OnDeleteOneClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 850 of file dialog_drc.cpp.

851 {
852  if( m_Notebook->GetSelection() == 0 )
853  {
854  // Clear the selection. It may be the selected DRC marker.
856 
858 
859  // redraw the pcb
860  refreshEditor();
861  }
862  else if( m_Notebook->GetSelection() == 1 )
863  {
865  }
866  else if( m_Notebook->GetSelection() == 2 )
867  {
869  }
870 
872 }
static TOOL_ACTION selectionClear
Clear the current selection.
Definition: pcb_actions.h:59
wxNotebook * m_Notebook
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:143
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:450
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
void refreshEditor()
Definition: dialog_drc.cpp:714
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References RC_TREE_MODEL::DeleteCurrentItem(), TOOLS_HOLDER::GetToolManager(), m_footprintWarningsTreeModel, m_frame, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, m_unconnectedTreeModel, refreshEditor(), TOOL_MANAGER::RunAction(), PCB_ACTIONS::selectionClear, and updateDisplayedCounts().

◆ OnDRCItemDClick()

void DIALOG_DRC::OnDRCItemDClick ( wxDataViewEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 409 of file dialog_drc.cpp.

410 {
411  if( aEvent.GetItem().IsOk() )
412  {
413  // turn control over to m_frame, hide this DIALOG_DRC window,
414  // no destruction so we can preserve listbox cursor
415  if( !IsModal() )
416  Show( false );
417  }
418 
419  // Do not skip aVent here: this is not useful, and Pcbnew crashes
420  // if skipped (at least on Windows)
421 }
bool Show(bool show) override

References DIALOG_SHIM::Show().

◆ OnDRCItemRClick()

void DIALOG_DRC::OnDRCItemRClick ( wxDataViewEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 424 of file dialog_drc.cpp.

425 {
426  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
427 
428  if( !node )
429  return;
430 
431  std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
432  wxString listName;
433  wxMenu menu;
434  wxString msg;
435 
436  switch( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] )
437  {
438  case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
439  case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
440  default: listName = _( "appropriate" ); break;
441  }
442 
443  if( rcItem->GetParent()->IsExcluded() )
444  {
445  menu.Append( 1, _( "Remove exclusion for this violation" ),
446  wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
447  }
448  else
449  {
450  menu.Append( 2, _( "Exclude this violation" ),
451  wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
452  }
453 
454  if( rcItem->GetErrorCode() == DRCE_CLEARANCE
455  || rcItem->GetErrorCode() == DRCE_COPPER_EDGE_CLEARANCE )
456  {
457  menu.Append( 3, _( "Run clearance resolution tool..." ) );
458  }
459 
460  menu.AppendSeparator();
461 
462  if( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] == RPT_SEVERITY_WARNING )
463  {
464  msg.Printf( _( "Change severity to Error for all '%s' violations" ),
465  rcItem->GetErrorText(),
466  _( "Violation severities can also be edited in the Board Setup... dialog" ) );
467  menu.Append( 4, msg );
468  }
469  else
470  {
471  msg.Printf( _( "Change severity to Warning for all '%s' violations" ),
472  rcItem->GetErrorText(),
473  _( "Violation severities can also be edited in the Board Setup... dialog" ) );
474  menu.Append( 5, msg );
475  }
476 
477  msg.Printf( _( "Ignore all '%s' violations" ),
478  rcItem->GetErrorText(),
479  _( "Violations will not be checked or reported" ) );
480  menu.Append( 6, msg );
481 
482  menu.AppendSeparator();
483 
484  menu.Append( 7, _( "Edit violation severities..." ), _( "Open the Board Setup... dialog" ) );
485 
486  bool modified = false;
487 
488  switch( GetPopupMenuSelectionFromUser( menu ) )
489  {
490  case 1:
491  {
492  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
493 
494  if( marker )
495  {
496  marker->SetExcluded( false );
497  m_frame->GetCanvas()->GetView()->Update( marker );
498 
499  // Update view
500  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
501  modified = true;
502  }
503 
504  break;
505  }
506 
507  case 2:
508  {
509  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
510 
511  if( marker )
512  {
513  marker->SetExcluded( true );
514  m_frame->GetCanvas()->GetView()->Update( marker );
515 
516  // Update view
518  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
519  else
520  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
521 
522  modified = true;
523  }
524 
525  break;
526  }
527 
528  case 3:
529  {
530  TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
531  BOARD_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<BOARD_INSPECTION_TOOL>();
532 
533  inspectionTool->InspectDRCError( node->m_RcItem );
534  break;
535  }
536 
537  case 4:
538  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR;
539 
540  for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
541  {
542  if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
543  m_frame->GetCanvas()->GetView()->Update( marker );
544  }
545 
546  // Rebuild model and view
547  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
548  modified = true;
549  break;
550 
551  case 5:
552  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING;
553 
554  for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
555  {
556  if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
557  m_frame->GetCanvas()->GetView()->Update( marker );
558  }
559 
560  // Rebuild model and view
561  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
562  modified = true;
563  break;
564 
565  case 6:
566  {
567  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
568 
569  std::vector<PCB_MARKER*>& markers = m_frame->GetBoard()->Markers();
570 
571  for( unsigned i = 0; i < markers.size(); )
572  {
573  if( markers[i]->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
574  {
575  m_frame->GetCanvas()->GetView()->Remove( markers.at( i ) );
576  markers.erase( markers.begin() + i );
577  }
578  else
579  ++i;
580  }
581 
582  // Rebuild model and view
583  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
584  modified = true;
585  break;
586  }
587 
588  case 7:
589  m_frame->ShowBoardSetupDialog( _( "Violation Severity" ) );
590  break;
591  }
592 
593  if( modified )
594  {
596  refreshEditor();
597  m_frame->OnModify();
598  }
599 }
void OnModify() override
Must be called after a board change to set the modified flag.
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:105
MARKERS & Markers()
Definition: board.h:242
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void InspectDRCError(const std::shared_ptr< RC_ITEM > &aDRCItem)
Show the clearance resolution for two selected items.
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
Definition: pcb_view.cpp:75
Master controller class:
Definition: tool_manager.h:54
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: pcb_view.cpp:92
void SetExcluded(bool aExcluded)
Definition: marker_base.h:95
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:190
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:205
#define _(s)
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
void refreshEditor()
Definition: dialog_drc.cpp:714
std::map< int, SEVERITY > m_DRCSeverities
int m_severities
Definition: dialog_drc.h:127
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
BOARD * GetBoard() const
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
std::shared_ptr< RC_ITEM > GetRCItem() const
Definition: marker_base.h:100
Tool for pcb inspection.

References _, bds(), DRCE_CLEARANCE, DRCE_COPPER_EDGE_CLEARANCE, Format(), PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetCanvas(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), PCB_DRAW_PANEL_GAL::GetView(), BOARD_INSPECTION_TOOL::InspectDRCError(), BOARD_DESIGN_SETTINGS::m_DRCSeverities, m_frame, m_markersProvider, RC_TREE_NODE::m_RcItem, m_severities, BOARD::Markers(), PCB_EDIT_FRAME::OnModify(), refreshEditor(), KIGFX::PCB_VIEW::Remove(), RPT_SEVERITY_ERROR, RPT_SEVERITY_EXCLUSION, RPT_SEVERITY_IGNORE, RPT_SEVERITY_WARNING, MARKER_BASE::SetExcluded(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), RC_TREE_MODEL::ToNode(), KIGFX::PCB_VIEW::Update(), and updateDisplayedCounts().

◆ OnDRCItemSelected()

void DIALOG_DRC::OnDRCItemSelected ( wxDataViewEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 309 of file dialog_drc.cpp.

310 {
311  BOARD* board = m_frame->GetBoard();
312  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
313  const KIID& itemID = node ? RC_TREE_MODEL::ToUUID( aEvent.GetItem() ) : niluuid;
314  BOARD_ITEM* item = board->GetItem( itemID );
315 
316  auto getActiveLayers =
317  []( BOARD_ITEM* aItem ) -> LSET
318  {
319  if( aItem->Type() == PCB_PAD_T )
320  {
321  PAD* pad = static_cast<PAD*>( aItem );
322  LSET layers;
323 
324  for( int layer : aItem->GetLayerSet().Seq() )
325  {
326  if( pad->FlashLayer( layer ) )
327  layers.set( layer );
328  }
329 
330  return layers;
331  }
332  else
333  {
334  return aItem->GetLayerSet();
335  }
336  };
337 
338  if( node && item )
339  {
340  PCB_LAYER_ID principalLayer = item->GetLayer();
341  LSET violationLayers;
342  std::shared_ptr<RC_ITEM> rc_item = node->m_RcItem;
343 
344  if( rc_item->GetErrorCode() == DRCE_MALFORMED_COURTYARD )
345  {
346  BOARD_ITEM* a = board->GetItem( rc_item->GetMainItemID() );
347 
348  if( a && ( a->GetFlags() & MALFORMED_B_COURTYARD ) > 0
349  && ( a->GetFlags() & MALFORMED_F_COURTYARD ) == 0 )
350  {
351  principalLayer = B_CrtYd;
352  }
353  else
354  {
355  principalLayer = F_CrtYd;
356  }
357  }
358  else if (rc_item->GetErrorCode() == DRCE_INVALID_OUTLINE )
359  {
360  principalLayer = Edge_Cuts;
361  }
362  else
363  {
364  BOARD_ITEM* a = board->GetItem( rc_item->GetMainItemID() );
365  BOARD_ITEM* b = board->GetItem( rc_item->GetAuxItemID() );
366  BOARD_ITEM* c = board->GetItem( rc_item->GetAuxItem2ID() );
367  BOARD_ITEM* d = board->GetItem( rc_item->GetAuxItem3ID() );
368 
369  if( a || b || c || d )
370  violationLayers = LSET::AllLayersMask();
371 
372  if( a )
373  violationLayers &= getActiveLayers( a );
374 
375  if( b )
376  violationLayers &= getActiveLayers( b );
377 
378  if( c )
379  violationLayers &= getActiveLayers( c );
380 
381  if( d )
382  violationLayers &= getActiveLayers( d );
383  }
384 
385  if( violationLayers.count() )
386  principalLayer = violationLayers.Seq().front();
387  else
388  violationLayers.set( principalLayer );
389 
390  WINDOW_THAWER thawer( m_frame );
391 
392  m_frame->FocusOnItem( item );
393  m_frame->GetCanvas()->Refresh();
394 
395  if( ( violationLayers & board->GetVisibleLayers() ) == 0 )
396  {
397  m_frame->GetAppearancePanel()->SetLayerVisible( principalLayer, true );
398  m_frame->GetCanvas()->Refresh();
399  }
400 
401  if( board->GetVisibleLayers().test( principalLayer ) )
402  m_frame->SetActiveLayer( principalLayer );
403  }
404 
405  aEvent.Skip();
406 }
BOARD_ITEM * GetItem(const KIID &aID) const
Definition: board.cpp:867
KIID niluuid(0)
#define MALFORMED_B_COURTYARD
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:80
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
#define MALFORMED_F_COURTYARD
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:479
class PAD, a pad in a footprint
Definition: typeinfo.h:89
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:144
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
Definition: lset.cpp:411
APPEARANCE_CONTROLS * GetAppearancePanel()
Definition: kiid.h:44
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:502
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:190
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:205
static LSET AllLayersMask()
Definition: lset.cpp:787
EDA_ITEM_FLAGS GetFlags() const
Definition: eda_item.h:155
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:64
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void SetLayerVisible(LAYER_NUM aLayer, bool isVisible)
BOARD * GetBoard() const
Definition: pad.h:57
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.
void FocusOnItem(BOARD_ITEM *aItem)

References LSET::AllLayersMask(), B_CrtYd, DRCE_INVALID_OUTLINE, DRCE_MALFORMED_COURTYARD, Edge_Cuts, F_CrtYd, PCB_BASE_FRAME::FocusOnItem(), PCB_BASE_EDIT_FRAME::GetAppearancePanel(), PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetCanvas(), EDA_ITEM::GetFlags(), BOARD::GetItem(), BOARD::GetVisibleLayers(), m_frame, RC_TREE_NODE::m_RcItem, MALFORMED_B_COURTYARD, MALFORMED_F_COURTYARD, niluuid, pad, PCB_PAD_T, EDA_DRAW_PANEL_GAL::Refresh(), LSET::Seq(), PCB_EDIT_FRAME::SetActiveLayer(), APPEARANCE_CONTROLS::SetLayerVisible(), RC_TREE_MODEL::ToNode(), and RC_TREE_MODEL::ToUUID().

◆ OnErrorLinkClicked()

void DIALOG_DRC::OnErrorLinkClicked ( wxHtmlLinkEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 190 of file dialog_drc.cpp.

191 {
192  m_frame->ShowBoardSetupDialog( _( "Rules" ) );
193 }
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
#define _(s)
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References _, m_frame, and PCB_EDIT_FRAME::ShowBoardSetupDialog().

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 377 of file dialog_shim.cpp.

378 {
379  if( m_firstPaintEvent )
380  {
382 
383  selectAllInTextCtrls( GetChildren() );
384 
387  else
388  KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
389 
390  m_firstPaintEvent = false;
391  }
392 
393  event.Skip();
394 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:209
bool m_firstPaintEvent
Definition: dialog_shim.h:208
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
static void selectAllInTextCtrls(wxWindowList &children)

References KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision(), KIPLATFORM::UI::ForceFocus(), DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnRunDRCClick()

void DIALOG_DRC::OnRunDRCClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 196 of file dialog_drc.cpp.

197 {
198  TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
199  DRC_TOOL* drcTool = toolMgr->GetTool<DRC_TOOL>();
200  ZONE_FILLER_TOOL* zoneFillerTool = toolMgr->GetTool<ZONE_FILLER_TOOL>();
201  bool refillZones = m_cbRefillZones->GetValue();
202  bool reportAllTrackErrors = m_cbReportAllTrackErrors->GetValue();
203  bool testFootprints = m_cbTestFootprints->GetValue();
204 
205  if( zoneFillerTool->IsBusy() )
206  {
207  wxBell();
208  return;
209  }
210 
211  // This is not the time to have stale or buggy rules. Ensure they're up-to-date
212  // and that they at least parse.
213  try
214  {
215  drcTool->GetDRCEngine()->InitEngine( m_frame->GetDesignRulesPath() );
216  }
217  catch( PARSE_ERROR& )
218  {
219  m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
220  m_DeleteCurrentMarkerButton->Enable( false );
221  m_DeleteAllMarkersButton->Enable( false );
222  m_saveReport->Enable( false );
223 
224  m_messages->Clear();
225  m_messages->Report( _( "DRC incomplete: could not compile custom design rules. " )
226  + wxT( "<a href='boardsetup'>" )
227  + _( "Show design rules." )
228  + wxT( "</a>" ) );
229  m_messages->Flush();
230 
231  Raise();
232  return;
233  }
234 
235  m_drcRun = false;
236  m_footprintTestsRun = false;
237  m_cancelled = false;
238 
240  deleteAllMarkers( true );
241  m_unconnectedTreeModel->DeleteItems( false, true, true );
242  m_footprintWarningsTreeModel->DeleteItems( false, true, true );
243 
244  Raise();
245 
246  m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
247  m_messages->Clear();
248  wxYield(); // Allow time slice to refresh Messages
249 
250  m_running = true;
251  m_sdbSizerCancel->SetLabel( _( "Cancel" ) );
252  m_sdbSizerOK->Enable( false );
253  m_DeleteCurrentMarkerButton->Enable( false );
254  m_DeleteAllMarkersButton->Enable( false );
255  m_saveReport->Enable( false );
256 
257  drcTool->RunTests( this, refillZones, reportAllTrackErrors, testFootprints );
258 
259  if( m_cancelled )
260  m_messages->Report( _( "-------- DRC cancelled by user.<br><br>" ) );
261  else
262  m_messages->Report( _( "Done.<br><br>" ) );
263 
264  Raise();
265  wxYield(); // Allow time slice to refresh Messages
266 
267  m_running = false;
268  m_sdbSizerCancel->SetLabel( _( "Close" ) );
269  m_sdbSizerOK->Enable( true );
270  m_DeleteCurrentMarkerButton->Enable( true );
271  m_DeleteAllMarkersButton->Enable( true );
272  m_saveReport->Enable( true );
273 
274  if( !m_cancelled )
275  {
276  wxMilliSleep( 500 );
277  m_runningResultsBook->ChangeSelection( 1 );
279  }
280 
281  refreshEditor();
282 }
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
Definition: rc_item.cpp:456
wxCheckBox * m_cbTestFootprints
wxCheckBox * m_cbReportAllTrackErrors
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_drc.cpp:776
wxButton * m_DeleteCurrentMarkerButton
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
void Clear()
Delete the stored messages.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
wxSimplebook * m_runningResultsBook
void Flush()
Build the HTML messages page.
bool m_footprintTestsRun
Definition: dialog_drc.h:112
wxButton * m_sdbSizerCancel
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
Master controller class:
Definition: tool_manager.h:54
wxCheckBox * m_cbRefillZones
Handle actions specific to filling copper zones.
wxButton * m_DeleteAllMarkersButton
wxButton * m_sdbSizerOK
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:110
#define _(s)
std::shared_ptr< DRC_ENGINE > GetDRCEngine()
Definition: drc_tool.h:89
void RunTests(PROGRESS_REPORTER *aProgressReporter, bool aRefillZones, bool aReportAllTrackErrors, bool aTestFootprints)
Run the DRC tests.
Definition: drc_tool.cpp:131
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
wxButton * m_saveReport
wxDataViewCtrl * m_markerDataView
A filename or source description, a problem input line, a line number, a byte offset,...
Definition: ki_exception.h:118
WX_HTML_REPORT_BOX * m_messages
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void refreshEditor()
Definition: dialog_drc.cpp:714
bool m_drcRun
Definition: dialog_drc.h:111
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
bool m_running
Definition: dialog_drc.h:109

References _, WX_HTML_REPORT_BOX::Clear(), deleteAllMarkers(), RC_TREE_MODEL::DeleteItems(), WX_HTML_REPORT_BOX::Flush(), KIPLATFORM::UI::ForceFocus(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DRC_TOOL::GetDRCEngine(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), m_cancelled, DIALOG_DRC_BASE::m_cbRefillZones, DIALOG_DRC_BASE::m_cbReportAllTrackErrors, DIALOG_DRC_BASE::m_cbTestFootprints, DIALOG_DRC_BASE::m_DeleteAllMarkersButton, DIALOG_DRC_BASE::m_DeleteCurrentMarkerButton, m_drcRun, m_footprintTestsRun, m_footprintWarningsTreeModel, m_frame, DIALOG_DRC_BASE::m_markerDataView, DIALOG_DRC_BASE::m_messages, m_running, DIALOG_DRC_BASE::m_runningResultsBook, DIALOG_DRC_BASE::m_saveReport, DIALOG_DRC_BASE::m_sdbSizerCancel, DIALOG_DRC_BASE::m_sdbSizerOK, m_unconnectedTreeModel, PCB_EDIT_FRAME::RecordDRCExclusions(), refreshEditor(), WX_HTML_REPORT_BOX::Report(), and DRC_TOOL::RunTests().

◆ OnSaveReport()

void DIALOG_DRC::OnSaveReport ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 638 of file dialog_drc.cpp.

639 {
640  wxFileName fn( "./DRC." + ReportFileExtension );
641 
642  wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(),
643  ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
644 
645  if( dlg.ShowModal() != wxID_OK )
646  return;
647 
648  fn = dlg.GetPath();
649 
650  if( fn.GetExt().IsEmpty() )
651  fn.SetExt( ReportFileExtension );
652 
653  if( !fn.IsAbsolute() )
654  {
655  wxString prj_path = Prj().GetProjectPath();
656  fn.MakeAbsolute( prj_path );
657  }
658 
659  if( writeReport( fn.GetFullPath() ) )
660  {
661  m_messages->Report( wxString::Format( _( "Report file '%s' created<br>" ),
662  fn.GetFullPath() ) );
663  }
664  else
665  {
666  DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ),
667  fn.GetFullPath() ) );
668  }
669 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:247
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
bool writeReport(const wxString &aFullFileName)
Function writeReport outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an open tex...
Definition: dialog_drc.cpp:785
virtual const wxString GetProjectPath() const
Return the full path of the project.
Definition: project.cpp:122
wxString ReportFileWildcard()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
WX_HTML_REPORT_BOX * m_messages
const std::string ReportFileExtension

References _, DisplayError(), Format(), PROJECT::GetProjectPath(), DIALOG_DRC_BASE::m_messages, KIWAY_HOLDER::Prj(), WX_HTML_REPORT_BOX::Report(), ReportFileExtension, ReportFileWildcard(), and writeReport().

◆ OnSeverity()

void DIALOG_DRC::OnSeverity ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 602 of file dialog_drc.cpp.

603 {
604  int flag = 0;
605 
606  if( aEvent.GetEventObject() == m_showAll )
608  else if( aEvent.GetEventObject() == m_showErrors )
610  else if( aEvent.GetEventObject() == m_showWarnings )
612  else if( aEvent.GetEventObject() == m_showExclusions )
614 
615  if( aEvent.IsChecked() )
616  m_severities |= flag;
617  else if( aEvent.GetEventObject() == m_showAll )
619  else
620  m_severities &= ~flag;
621 
622  syncCheckboxes();
623 
624  // Set the provider's severity levels through the TreeModel so that the old tree
625  // can be torn down before the severity changes.
626  //
627  // It's not clear this is required, but we've had a lot of issues with wxDataView
628  // being cranky on various platforms.
629 
633 
635 }
wxCheckBox * m_showWarnings
void syncCheckboxes()
Definition: dialog_drc.cpp:181
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
static int RPT_SEVERITY_ALL
Definition: dialog_drc.cpp:178
void SetSeverities(int aSeverities)
Definition: rc_item.cpp:295
wxCheckBox * m_showExclusions
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
wxCheckBox * m_showErrors
wxCheckBox * m_showAll
int m_severities
Definition: dialog_drc.h:127
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119

References flag, m_footprintWarningsTreeModel, m_markersTreeModel, m_severities, DIALOG_DRC_BASE::m_showAll, DIALOG_DRC_BASE::m_showErrors, DIALOG_DRC_BASE::m_showExclusions, DIALOG_DRC_BASE::m_showWarnings, m_unconnectedTreeModel, RPT_SEVERITY_ALL, RPT_SEVERITY_ERROR, RPT_SEVERITY_EXCLUSION, RPT_SEVERITY_WARNING, RC_TREE_MODEL::SetSeverities(), syncCheckboxes(), and updateDisplayedCounts().

◆ PrevMarker()

void DIALOG_DRC::PrevMarker ( )

Definition at line 722 of file dialog_drc.cpp.

723 {
724  if( m_Notebook->IsShown() )
725  {
726  switch( m_Notebook->GetSelection() )
727  {
728  case 0: m_markersTreeModel->PrevMarker(); break;
729  case 1: m_unconnectedTreeModel->PrevMarker(); break;
730  case 2: m_footprintWarningsTreeModel->PrevMarker(); break;
731  }
732  }
733 }
wxNotebook * m_Notebook
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125
void PrevMarker()
Definition: rc_item.cpp:545
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119

References m_footprintWarningsTreeModel, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, m_unconnectedTreeModel, and RC_TREE_MODEL::PrevMarker().

Referenced by DRC_TOOL::PrevMarker().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 35 of file kiway_holder.cpp.

36 {
37  return Kiway().Prj();
38 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:189

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_LIBRARY_MANAGER::addLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), KICAD_MANAGER_FRAME::CloseProject(), DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doAutoSave(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), DIALOG_EXPORT_SVG::ExportSVGFile(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), DIALOG_PLOT_SCHEMATIC::getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_BOARD_SETUP::OnPageChange(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), OnSaveReport(), DIALOG_LABEL_EDITOR::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded(), DIALOG_SPICE_MODEL::onSelectLibrary(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), DIALOG_PLOT::Plot(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDxf(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::Save_File(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SIM_PLOT_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::saveSymbolAs(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectLibrary(), SYMBOL_EDIT_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SYMBOL_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), SYMBOL_VIEWER_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), SYMBOL_LIBRARY_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), SCH_EDIT_FRAME::UpdateTitle(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ refreshEditor()

void DIALOG_DRC::refreshEditor ( )
private

Definition at line 714 of file dialog_drc.cpp.

715 {
716  WINDOW_THAWER thawer( m_frame );
717 
718  m_frame->GetCanvas()->Refresh();
719 }
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108

References PCB_BASE_FRAME::GetCanvas(), m_frame, and EDA_DRAW_PANEL_GAL::Refresh().

Referenced by ExcludeMarker(), OnDeleteAllClick(), OnDeleteOneClick(), OnDRCItemRClick(), and OnRunDRCClick().

◆ Report()

void PROGRESS_REPORTER::Report ( const wxString &  aMessage)
virtualinherited

Display aMessage in the progress bar dialog.

Reimplemented in DIALOG_ERC.

Definition at line 63 of file progress_reporter.cpp.

64 {
65  std::lock_guard<std::mutex> guard( m_mutex );
66  m_rptMessage = aMessage;
67  m_msgChanged = true;
68 }

References PROGRESS_REPORTER::m_msgChanged, PROGRESS_REPORTER::m_mutex, and PROGRESS_REPORTER::m_rptMessage.

Referenced by PROGRESS_REPORTER::AdvancePhase(), AR_AUTOPLACER::AutoplaceFootprints(), ZONE_FILLER::Fill(), FABMASTER_PLUGIN::Load(), LEGACY_PLUGIN::Load(), SCH_EAGLE_PLUGIN::Load(), EAGLE_PLUGIN::Load(), PCB_IO::Load(), SCH_SEXPR_PLUGIN::loadFile(), SCH_LEGACY_PLUGIN::loadFile(), ALTIUM_PCB::ParseArcs6Data(), ALTIUM_PCB::ParseBoard6Data(), ALTIUM_PCB::ParseBoardRegionsData(), ALTIUM_PCB::ParseClasses6Data(), ALTIUM_PCB::ParseComponents6Data(), ALTIUM_PCB::ParseComponentsBodies6Data(), ALTIUM_PCB::ParseDimensions6Data(), ALTIUM_PCB::ParseFills6Data(), ALTIUM_PCB::ParseModelsData(), ALTIUM_PCB::ParseNets6Data(), ALTIUM_PCB::ParsePads6Data(), ALTIUM_PCB::ParsePolygons6Data(), ALTIUM_PCB::ParseRegions6Data(), ALTIUM_PCB::ParseRules6Data(), ALTIUM_PCB::ParseShapeBasedRegions6Data(), ALTIUM_PCB::ParseTexts6Data(), ALTIUM_PCB::ParseTracks6Data(), ALTIUM_PCB::ParseVias6Data(), and FOOTPRINT_LIST_IMPL::ReadFootprintFiles().

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

This will cause the dialog size to be clear so the next time the dialog is shown the sizers will layout the dialog accordingly. This useful when there are dialog windows that size changes due to layout dependency hidden controls.

Definition at line 286 of file dialog_shim.cpp.

287 {
288  const char* hash_key;
289 
290  if( m_hash_key.size() )
291  {
292  // a special case like EDA_LIST_DIALOG, which has multiple uses.
293  hash_key = m_hash_key.c_str();
294  }
295  else
296  {
297  hash_key = typeid(*this).name();
298  }
299 
300  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
301 
302  if( it == class_map.end() )
303  return;
304 
305  wxRect rect = it->second;
306  rect.SetSize( wxSize( 0, 0 ) );
307  class_map[ hash_key ] = rect;
308 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ SetCurrentProgress()

void PROGRESS_REPORTER::SetCurrentProgress ( double  aProgress)
virtualinherited

◆ SetDrcRun()

void DIALOG_DRC::SetDrcRun ( )
inline

Definition at line 51 of file dialog_drc.h.

51 { m_drcRun = true; }
bool m_drcRun
Definition: dialog_drc.h:111

Referenced by DRC_TOOL::RunTests().

◆ SetFootprintsProvider()

void DIALOG_DRC::SetFootprintsProvider ( RC_ITEMS_PROVIDER aProvider)

Definition at line 301 of file dialog_drc.cpp.

302 {
303  m_footprintWarningsProvider = aProvider;
306 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:289
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:124
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:125

References m_footprintWarningsProvider, m_footprintWarningsTreeModel, RC_TREE_MODEL::SetProvider(), and updateDisplayedCounts().

Referenced by DRC_TOOL::updatePointers().

◆ SetFootprintTestsRun()

void DIALOG_DRC::SetFootprintTestsRun ( )
inline

Definition at line 52 of file dialog_drc.h.

52 { m_footprintTestsRun = true; }
bool m_footprintTestsRun
Definition: dialog_drc.h:112

Referenced by DRC_TOOL::RunTests().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.

Definition at line 97 of file dialog_shim.h.

98  {
99  m_initialFocusTarget = aWindow;
100  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:209

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_INSPECTION_REPORTER::DIALOG_INSPECTION_REPORTER(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), HK_PROMPT_DIALOG::HK_PROMPT_DIALOG(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::saveSymbolAs(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), and WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

It is only used for debugging, since "this" is not a wxWindow*.

"this" is a KIWAY_HOLDER mix-in.

Parameters
aDestis the recipient of aKiway pointer.
aKiwayis often from a parent window or from KIFACE::CreateWindow().

Definition at line 42 of file kiway_holder.cpp.

43 {
44 #if defined(DEBUG)
45  // offer a trap point for debugging most any window
46  wxASSERT( aDest );
47  if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
48  {
49  int breakhere=1;
50  (void) breakhere;
51  }
52 #endif
53 
54  (void) aDest;
55 
56  m_kiway = aKiway;
57 }
KIWAY * m_kiway
Definition: kiway_holder.h:75
const char * name
Definition: DXF_plotter.cpp:59

References KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ SetMarkersProvider()

void DIALOG_DRC::SetMarkersProvider ( RC_ITEMS_PROVIDER aProvider)

Definition at line 285 of file dialog_drc.cpp.

286 {
287  m_markersProvider = aProvider;
290 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:289
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:119

References m_markersProvider, m_markersTreeModel, RC_TREE_MODEL::SetProvider(), and updateDisplayedCounts().

Referenced by DRC_TOOL::updatePointers().

◆ SetMaxProgress()

void PROGRESS_REPORTER::SetMaxProgress ( int  aMaxProgress)
inherited

Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).

Definition at line 71 of file progress_reporter.cpp.

72 {
73  m_maxProgress.store( aMaxProgress );
74 }
std::atomic_int m_maxProgress

References PROGRESS_REPORTER::m_maxProgress.

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), and CN_CONNECTIVITY_ALGO::searchConnections().

◆ SetNumPhases()

void PROGRESS_REPORTER::SetNumPhases ( int  aNumPhases)
inherited

Set the number of phases.

Definition at line 89 of file progress_reporter.cpp.

90 {
91  m_numPhases = aNumPhases;
92 }
std::atomic_int m_numPhases

References PROGRESS_REPORTER::m_numPhases.

◆ SetPosition()

void DIALOG_SHIM::SetPosition ( const wxPoint &  aNewPosition)
inherited

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 189 of file dialog_shim.cpp.

190 {
191  wxDialog::SetPosition( aNewPosition );
192 
193  // Now update the stored position:
194  const char* hash_key;
195 
196  if( m_hash_key.size() )
197  {
198  // a special case like EDA_LIST_DIALOG, which has multiple uses.
199  hash_key = m_hash_key.c_str();
200  }
201  else
202  {
203  hash_key = typeid(*this).name();
204  }
205 
206  std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
207 
208  if( it == class_map.end() )
209  return;
210 
211  wxRect rect = it->second;
212  rect.SetPosition( aNewPosition );
213 
214  class_map[ hash_key ] = rect;
215 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)

References class_map, DIALOG_SHIM::m_hash_key, and PCAD2KICAD::SetPosition().

Referenced by DIALOG_SCH_FIND::DIALOG_SCH_FIND(), and PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

void DIALOG_SHIM::setSizeInDU ( int  x,
int  y 
)
protectedinherited

Set the dialog to the given dimensions in "dialog units".

These are units equivalent to 4* the average character width and 8* the average character height, allowing a dialog to be sized in a way that scales it with the system font.

Definition at line 161 of file dialog_shim.cpp.

162 {
163  wxSize sz( x, y );
164  SetSize( ConvertDialogToPixels( sz ) );
165 }

Referenced by DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

◆ SetTitle()

virtual void PROGRESS_REPORTER::SetTitle ( const wxString &  aTitle)
inlinevirtualinherited

Change the title displayed on the window caption.

Has meaning only for some reporters. Does nothing for others.

Warning
This should only be called from the main thread.

Reimplemented in WX_PROGRESS_REPORTER.

Definition at line 115 of file progress_reporter.h.

115 {}

Referenced by AR_AUTOPLACER::AutoplaceFootprints().

◆ SetUnconnectedProvider()

void DIALOG_DRC::SetUnconnectedProvider ( RC_ITEMS_PROVIDER aProvider)

Definition at line 293 of file dialog_drc.cpp.

294 {
295  m_unconnectedItemsProvider = aProvider;
298 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:913
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:289
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:121
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:122

References m_unconnectedItemsProvider, m_unconnectedTreeModel, RC_TREE_MODEL::SetProvider(), and updateDisplayedCounts().

Referenced by DRC_TOOL::updatePointers().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 218 of file dialog_shim.cpp.

219 {
220  bool ret;
221  const char* hash_key;
222 
223  if( m_hash_key.size() )
224  {
225  // a special case like EDA_LIST_DIALOG, which has multiple uses.
226  hash_key = m_hash_key.c_str();
227  }
228  else
229  {
230  hash_key = typeid(*this).name();
231  }
232 
233  // Show or hide the window. If hiding, save current position and size.
234  // If showing, use previous position and size.
235  if( show )
236  {
237 #ifndef __WINDOWS__
238  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
239 #endif
240  ret = wxDialog::Show( show );
241 
242  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
243  wxRect savedDialogRect = class_map[ hash_key ];
244 
245  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
246  {
247  if( m_useCalculatedSize )
248  {
249  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
250  wxDialog::GetSize().x, wxDialog::GetSize().y, 0 );
251  }
252  else
253  {
254  SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
255  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
256  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
257  0 );
258  }
259  }
260  else if( m_initialSize != wxDefaultSize )
261  SetSize( m_initialSize );
262 
263  // Be sure that the dialog appears in a visible area
264  // (the dialog position might have been stored at the time when it was
265  // shown on another display)
266  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
267  Centre();
268  }
269  else
270  {
271  // Save the dialog's position & size before hiding, using classname as key
272  class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
273 
274 #ifdef __WXMAC__
275  if ( m_eventLoop )
276  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
277 #endif
278 
279  ret = wxDialog::Show( show );
280  }
281 
282  return ret;
283 }
std::string m_hash_key
Definition: dialog_shim.h:199
static std::unordered_map< std::string, wxRect > class_map
bool m_useCalculatedSize
Definition: dialog_shim.h:203
wxSize m_initialSize
Definition: dialog_shim.h:221

References class_map, DIALOG_SHIM::m_hash_key, DIALOG_SHIM::m_initialSize, and DIALOG_SHIM::m_useCalculatedSize.

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), DIALOG_SHIM::EndQuasiModal(), GROUP_TOOL::GroupProperties(), EE_INSPECTION_TOOL::NextMarker(), DRC_TOOL::NextMarker(), SCH_EDIT_FRAME::OnAnnotate(), OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem(), GROUP_TOOL::PickNewMember(), POSITION_RELATIVE_TOOL::PositionRelative(), EE_INSPECTION_TOOL::PrevMarker(), DRC_TOOL::PrevMarker(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), EDA_VIEW_SWITCHER::Show(), DIALOG_PAD_PROPERTIES::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 420 of file dialog_shim.cpp.

421 {
422  // This is an exception safe way to zero a pointer before returning.
423  // Yes, even though DismissModal() clears this first normally, this is
424  // here in case there's an exception before the dialog is dismissed.
425  struct NULLER
426  {
427  void*& m_what;
428  NULLER( void*& aPtr ) : m_what( aPtr ) {}
429  ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
430  } clear_this( (void*&) m_qmodal_loop );
431 
432  // release the mouse if it's currently captured as the window having it
433  // will be disabled when this dialog is shown -- but will still keep the
434  // capture making it impossible to do anything in the modal dialog itself
435  wxWindow* win = wxWindow::GetCapture();
436  if( win )
437  win->ReleaseMouse();
438 
439  // Get the optimal parent
440  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
441 
442  wxASSERT_MSG( !m_qmodal_parent_disabler,
443  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
444 
445  // quasi-modal: disable only my "optimal" parent
447 
448  // Apple in its infinite wisdom will raise a disabled window before even passing
449  // us the event, so we have no way to stop it. Instead, we must set an order on
450  // the windows so that the quasi-modal will be pushed in front of the disabled
451  // window when it is raised.
453 
454  Show( true );
455 
456  m_qmodal_showing = true;
457 
458  WX_EVENT_LOOP event_loop;
459 
460  m_qmodal_loop = &event_loop;
461 
462  event_loop.Run();
463 
464  m_qmodal_showing = false;
465 
466  return GetReturnCode();
467 }
bool m_qmodal_showing
Definition: dialog_shim.h:213
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:211
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:214
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:43
void ReparentQuasiModal(wxNonOwnedWindow *aWindow)
Move a window's parent to be the top-level window and force the window to be on top.
Definition: gtk/ui.cpp:65

References DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, KIPLATFORM::UI::ReparentQuasiModal(), DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), COMMON_CONTROL::ConfigurePaths(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowDimensionPropertiesDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), and PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog().

◆ syncCheckboxes()

◆ updateDisplayedCounts()

void DIALOG_DRC::updateDisplayedCounts ( )
private

Definition at line 913 of file dialog_drc.cpp.

914 {
915  // Collect counts:
916 
917  int numMarkers = 0;
918  int numUnconnected = 0;
919  int numFootprints = 0;
920 
921  int numErrors = 0;
922  int numWarnings = 0;
923  int numExcluded = 0;
924 
925  if( m_markersProvider )
926  {
927  numMarkers += m_markersProvider->GetCount();
931  }
932 
934  {
935  numUnconnected += m_unconnectedItemsProvider->GetCount();
939  }
940 
942  {
943  numFootprints += m_footprintWarningsProvider->GetCount();
947  }
948 
949  wxString msg;
950 
951  // Update tab headers:
952 
953  if( m_drcRun )
954  {
955  msg.sprintf( m_markersTitleTemplate, numMarkers );
956  m_Notebook->SetPageText( 0, msg );
957 
958  msg.sprintf( m_unconnectedTitleTemplate, numUnconnected );
959  m_Notebook->SetPageText( 1, msg );
960 
961  if( m_footprintTestsRun )
962  {
963  msg.sprintf( m_footprintsTitleTemplate, numFootprints );
964  }
965  else
966  {
968  msg.Replace( wxT( "%d" ), _( "not run" ) );
969  }
970  m_Notebook->SetPageText( 2, msg );
971  }
972  else
973  {
975  msg.Replace( wxT( "(%d)" ), wxEmptyString );
976  m_Notebook->SetPageText( 0, msg );
977 
979  msg.Replace( wxT( "(%d)" ), wxEmptyString );
980  m_Notebook->SetPageText( 1, msg );
981 
983  msg.Replace( wxT( "(%d)" ), wxEmptyString );
984  m_Notebook->SetPageText( 2, msg );
985  }
986 
987  // Update badges:
988 
989  if( !m_drcRun && numErrors == 0 )
990  numErrors = -1;
991 
992  if( !m_drcRun && numWarnings == 0 )
993  numWarnings = -1;
994 
995  m_errorsBadge->SetMaximumNumber( numErrors );
997 
998  m_warningsBadge->SetMaximumNumber( numWarnings );
1000 
1001  m_exclusionsBadge->SetMaximumNumber( numExcluded );
1003 }
wxNotebook * m_Notebook
void UpdateNumber(int aNumber, SEVERITY aSeverity)
Update the number displayed on the badge.
bool m_footprintTestsRun
Definition: dialog_drc.h:112
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:116
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
virtual int GetCount(int aSeverity=-1) const =0
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:121
wxString m_markersTitleTemplate
Definition: dialog_drc.h:114
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:124
NUMBER_BADGE * m_exclusionsBadge
#define _(s)
NUMBER_BADGE * m_errorsBadge
NUMBER_BADGE * m_warningsBadge
bool m_drcRun
Definition: dialog_drc.h:111
void SetMaximumNumber(int aMax)
Set the maximum number to be shown on the badge.
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:115

References _, RC_ITEMS_PROVIDER::GetCount(), m_drcRun, DIALOG_DRC_BASE::m_errorsBadge, DIALOG_DRC_BASE::m_exclusionsBadge, m_footprintsTitleTemplate, m_footprintTestsRun, m_footprintWarningsProvider, m_markersProvider, m_markersTitleTemplate, DIALOG_DRC_BASE::m_Notebook, m_unconnectedItemsProvider, m_unconnectedTitleTemplate, DIALOG_DRC_BASE::m_warningsBadge, RPT_SEVERITY_ERROR, RPT_SEVERITY_EXCLUSION, RPT_SEVERITY_WARNING, NUMBER_BADGE::SetMaximumNumber(), and NUMBER_BADGE::UpdateNumber().

Referenced by ExcludeMarker(), OnDeleteAllClick(), OnDeleteOneClick(), OnDRCItemRClick(), OnSeverity(), SetFootprintsProvider(), SetMarkersProvider(), and SetUnconnectedProvider().

◆ updateUI()

bool DIALOG_DRC::updateUI ( )
overrideprivatevirtual

Implements PROGRESS_REPORTER.

Definition at line 156 of file dialog_drc.cpp.

157 {
158  double cur = (double) m_progress.load() / m_maxProgress;
159  cur = std::max( 0.0, std::min( cur, 1.0 ) );
160 
161  m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
162  wxSafeYield( this );
163 
164  return !m_cancelled;
165 }
std::atomic_int m_progress
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:110
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:73
std::atomic_int m_maxProgress

References KiROUND(), m_cancelled, DIALOG_DRC_BASE::m_gauge, PROGRESS_REPORTER::m_maxProgress, and PROGRESS_REPORTER::m_progress.

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

Convert an integer number of dialog units to pixels, vertically.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 175 of file dialog_shim.cpp.

176 {
177  wxSize sz( 0, y );
178  return ConvertDialogToPixels( sz ).y;
179 }

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ writeReport()

bool DIALOG_DRC::writeReport ( const wxString &  aFullFileName)
private

Function writeReport outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an open text file.

Parameters
aFullFileNameThe text filename to write the report to.
Returns
true if OK, false on error

Definition at line 785 of file dialog_drc.cpp.

786 {
787  FILE* fp = wxFopen( aFullFileName, wxT( "w" ) );
788 
789  if( fp == nullptr )
790  return false;
791 
792  std::map<KIID, EDA_ITEM*> itemMap;
793  m_frame->GetBoard()->FillItemMap( itemMap );
794 
795  EDA_UNITS units = GetUserUnits();
797  int count;
798 
799  fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_frame->GetBoard()->GetFileName() ) );
800 
801  wxDateTime now = wxDateTime::Now();
802 
803  fprintf( fp, "** Created on %s **\n", TO_UTF8( now.Format( wxT( "%F %T" ) ) ) );
804 
805  count = m_markersProvider->GetCount();
806 
807  fprintf( fp, "\n** Found %d DRC violations **\n", count );
808 
809  for( int i = 0; i < count; ++i )
810  {
811  const std::shared_ptr<RC_ITEM>& item = m_markersProvider->GetItem( i );
812  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
813 
814  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
815  }
816 
818 
819  fprintf( fp, "\n** Found %d unconnected pads **\n", count );
820 
821  for( int i = 0; i < count; ++i )
822  {
823  const std::shared_ptr<RC_ITEM>& item = m_unconnectedItemsProvider->GetItem( i );
824  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
825 
826  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
827  }
828 
830 
831  fprintf( fp, "\n** Found %d Footprint errors **\n", count );
832 
833  for( int i = 0; i < count; ++i )
834  {
835  const std::shared_ptr<RC_ITEM>& item = m_footprintWarningsProvider->GetItem( i );
836  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
837 
838  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
839  }
840 
841 
842  fprintf( fp, "\n** End of Report **\n" );
843 
844  fclose( fp );
845 
846  return true;
847 }
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:105
SEVERITY
Definition: ui_common.h:100
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:118
virtual int GetCount(int aSeverity=-1) const =0
const wxString & GetFileName() const
Definition: board.h:228
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:588
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:119
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:121
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:96
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:124
SEVERITY GetSeverity(int aDRCErrorCode)
EDA_UNITS
Definition: eda_units.h:38
virtual std::shared_ptr< RC_ITEM > GetItem(int aIndex) const =0
Retrieve a RC_ITEM by index.
BOARD * GetBoard() const
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:108
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Definition: board.cpp:946
Container for design settings for a BOARD object.

References bds(), BOARD::FillItemMap(), PCB_BASE_FRAME::GetBoard(), RC_ITEMS_PROVIDER::GetCount(), BOARD::GetDesignSettings(), BOARD::GetFileName(), RC_ITEMS_PROVIDER::GetItem(), BOARD_DESIGN_SETTINGS::GetSeverity(), DIALOG_SHIM::GetUserUnits(), m_footprintWarningsProvider, m_frame, m_markersProvider, m_unconnectedItemsProvider, and TO_UTF8.

Referenced by OnSaveReport().

Member Data Documentation

◆ m_cancelled

std::atomic<bool> DIALOG_DRC::m_cancelled
private

Definition at line 110 of file dialog_drc.h.

Referenced by OnCancelClick(), OnRunDRCClick(), and updateUI().

◆ m_cbRefillZones

wxCheckBox* DIALOG_DRC_BASE::m_cbRefillZones
protectedinherited

◆ m_cbReportAllTrackErrors

wxCheckBox* DIALOG_DRC_BASE::m_cbReportAllTrackErrors
protectedinherited

◆ m_cbTestFootprints

wxCheckBox* DIALOG_DRC_BASE::m_cbTestFootprints
protectedinherited

◆ m_currentBoard

BOARD* DIALOG_DRC::m_currentBoard
private

Definition at line 107 of file dialog_drc.h.

Referenced by DIALOG_DRC(), and OnActivateDlg().

◆ m_DeleteAllMarkersButton

wxButton* DIALOG_DRC_BASE::m_DeleteAllMarkersButton
protectedinherited

◆ m_DeleteCurrentMarkerButton

wxButton* DIALOG_DRC_BASE::m_DeleteCurrentMarkerButton
protectedinherited

◆ m_drcRun

bool DIALOG_DRC::m_drcRun
private

Definition at line 111 of file dialog_drc.h.

Referenced by OnDeleteAllClick(), OnRunDRCClick(), and updateDisplayedCounts().

◆ m_errorsBadge

NUMBER_BADGE* DIALOG_DRC_BASE::m_errorsBadge
protectedinherited

Definition at line 70 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE(), and updateDisplayedCounts().

◆ m_exclusionsBadge

NUMBER_BADGE* DIALOG_DRC_BASE::m_exclusionsBadge
protectedinherited

Definition at line 74 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE(), and updateDisplayedCounts().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 208 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_footprintsDataView

wxDataViewCtrl* DIALOG_DRC_BASE::m_footprintsDataView
protectedinherited

◆ m_footprintsTitleTemplate

wxString DIALOG_DRC::m_footprintsTitleTemplate
private

Definition at line 116 of file dialog_drc.h.

Referenced by initValues(), and updateDisplayedCounts().

◆ m_footprintTestsRun

bool DIALOG_DRC::m_footprintTestsRun
private

Definition at line 112 of file dialog_drc.h.

Referenced by OnRunDRCClick(), and updateDisplayedCounts().

◆ m_footprintWarningsProvider

RC_ITEMS_PROVIDER* DIALOG_DRC::m_footprintWarningsProvider
private

◆ m_footprintWarningsTreeModel

RC_TREE_MODEL* DIALOG_DRC::m_footprintWarningsTreeModel
private

◆ m_frame

◆ m_gauge

wxGauge* DIALOG_DRC_BASE::m_gauge
protectedinherited

Definition at line 59 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE(), and updateUI().

◆ m_hash_key

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 209 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint(), and DIALOG_SHIM::SetInitialFocus().

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 221 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_markerDataView

wxDataViewCtrl* DIALOG_DRC_BASE::m_markerDataView
protectedinherited

◆ m_markersProvider

RC_ITEMS_PROVIDER* DIALOG_DRC::m_markersProvider
private

◆ m_markersTitleTemplate

wxString DIALOG_DRC::m_markersTitleTemplate
private

Definition at line 114 of file dialog_drc.h.

Referenced by initValues(), and updateDisplayedCounts().

◆ m_markersTreeModel

◆ m_maxProgress

◆ m_messages

WX_HTML_REPORT_BOX* DIALOG_DRC_BASE::m_messages
protectedinherited

◆ m_msgChanged

bool PROGRESS_REPORTER::m_msgChanged
protectedinherited

◆ m_mutex

std::mutex PROGRESS_REPORTER::m_mutex
mutableprotectedinherited

◆ m_Notebook

◆ m_numPhases

std::atomic_int PROGRESS_REPORTER::m_numPhases
protectedinherited

◆ m_panelFootprintWarnings

wxPanel* DIALOG_DRC_BASE::m_panelFootprintWarnings
protectedinherited

Definition at line 65 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_panelMessages

wxPanel* DIALOG_DRC_BASE::m_panelMessages
protectedinherited

Definition at line 57 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_panelViolations

wxPanel* DIALOG_DRC_BASE::m_panelViolations
protectedinherited

Definition at line 62 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

◆ m_phase

std::atomic_int PROGRESS_REPORTER::m_phase
protectedinherited

◆ m_progress

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 211 of file dialog_shim.h.

Referenced by DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 213 of file dialog_shim.h.

Referenced by DIALOG_SHIM::IsQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_rptMessage

wxString PROGRESS_REPORTER::m_rptMessage
protectedinherited

◆ m_running

bool DIALOG_DRC::m_running
private

Definition at line 109 of file dialog_drc.h.

Referenced by OnCancelClick(), OnClose(), and OnRunDRCClick().

◆ m_runningNotebook

wxNotebook* DIALOG_DRC_BASE::m_runningNotebook
protectedinherited

Definition at line 56 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_runningResultsBook

wxSimplebook* DIALOG_DRC_BASE::m_runningResultsBook
protectedinherited

Definition at line 54 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE(), and OnRunDRCClick().

◆ m_saveReport

wxButton* DIALOG_DRC_BASE::m_saveReport
protectedinherited

◆ m_sdbSizer

wxStdDialogButtonSizer* DIALOG_DRC_BASE::m_sdbSizer
protectedinherited

Definition at line 80 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_sdbSizerCancel

wxButton* DIALOG_DRC_BASE::m_sdbSizerCancel
protectedinherited

◆ m_sdbSizerOK

wxButton* DIALOG_DRC_BASE::m_sdbSizerOK
protectedinherited

◆ m_severities

int DIALOG_DRC::m_severities
private

◆ m_showAll

wxCheckBox* DIALOG_DRC_BASE::m_showAll
protectedinherited

◆ m_showErrors

wxCheckBox* DIALOG_DRC_BASE::m_showErrors
protectedinherited

◆ m_showExclusions

wxCheckBox* DIALOG_DRC_BASE::m_showExclusions
protectedinherited

◆ m_showLabel

wxStaticText* DIALOG_DRC_BASE::m_showLabel
protectedinherited

Definition at line 67 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_showWarnings

wxCheckBox* DIALOG_DRC_BASE::m_showWarnings
protectedinherited

◆ m_sizerButtons

wxBoxSizer* DIALOG_DRC_BASE::m_sizerButtons
protectedinherited

Definition at line 77 of file dialog_drc_base.h.

Referenced by DIALOG_DRC(), and DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_staticline1

wxStaticLine* DIALOG_DRC_BASE::m_staticline1
protectedinherited

Definition at line 76 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_tabOrder

◆ m_unconnectedDataView

wxDataViewCtrl* DIALOG_DRC_BASE::m_unconnectedDataView
protectedinherited

◆ m_unconnectedItemsProvider

RC_ITEMS_PROVIDER* DIALOG_DRC::m_unconnectedItemsProvider
private

◆ m_unconnectedTitleTemplate

wxString DIALOG_DRC::m_unconnectedTitleTemplate
private

Definition at line 115 of file dialog_drc.h.

Referenced by initValues(), and updateDisplayedCounts().

◆ m_unconnectedTreeModel

RC_TREE_MODEL* DIALOG_DRC::m_unconnectedTreeModel
private

◆ m_units

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

◆ m_warningsBadge

NUMBER_BADGE* DIALOG_DRC_BASE::m_warningsBadge
protectedinherited

Definition at line 72 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE(), and updateDisplayedCounts().

◆ results

wxPanel* DIALOG_DRC_BASE::results
protectedinherited

Definition at line 60 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ running

wxPanel* DIALOG_DRC_BASE::running
protectedinherited

Definition at line 55 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().


The documentation for this class was generated from the following files: