KiCad PCB EDA Suite
DIALOG_DRC Class Reference

#include <dialog_drc.h>

Inheritance diagram for DIALOG_DRC:
DIALOG_DRC_BASE PROGRESS_REPORTER_BASE 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 SelectMarker (const PCB_MARKER *aMarker)
 
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 OnModify ()
 
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 centerMarkerIdleHandler (wxIdleEvent &aEvent)
 
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) override
 Set the number of phases. More...
 
void AddPhases (int aNumPhases) override
 
virtual void BeginPhase (int aPhase) override
 Initialize the aPhase virtual zone of the dialog progress bar. More...
 
virtual void AdvancePhase () override
 Use the next available virtual zone of the dialog progress bar. More...
 
virtual void Report (const wxString &aMessage) override
 Display aMessage in the progress bar dialog. More...
 
virtual void SetCurrentProgress (double aProgress) override
 Set the progress value to aProgress (0..1). More...
 
void SetMaxProgress (int aMaxProgress) override
 Fix the value that gives the 100 percent progress bar length (inside the current virtual zone). More...
 
void AdvanceProgress () override
 Increment the progress bar length (inside the current virtual zone). More...
 
bool KeepRefreshing (bool aWait=false) override
 Update the UI dialog. More...
 
void SetTitle (const wxString &aTitle) override
 Change the title displayed on the window caption. More...
 
bool IsCancelled () const override
 
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
 
const PCB_MARKERm_centerMarkerOnIdle
 
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 ),
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 ),
63  m_centerMarkerOnIdle( nullptr ),
65 {
66  SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
67 
68  m_frame = aEditorFrame;
70 
72 
74  m_markerDataView->AssociateModel( m_markersTreeModel );
75 
78 
81 
82  if( Kiface().IsSingle() )
83  m_cbTestFootprints->Hide();
84 
85  // We use a sdbSizer here to get the order right, which is platform-dependent
86  m_sdbSizerOK->SetLabel( _( "Run DRC" ) );
87  m_sdbSizerCancel->SetLabel( _( "Close" ) );
88  m_sizerButtons->Layout();
89 
90  m_sdbSizerOK->SetDefault();
91 
92  initValues();
94 
96 }
void initValues()
Definition: dialog_drc.cpp:131
void syncCheckboxes()
Definition: dialog_drc.cpp:182
wxCheckBox * m_cbTestFootprints
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
bool m_footprintTestsRun
Definition: dialog_drc.h:116
wxButton * m_sdbSizerCancel
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:122
BOARD * m_currentBoard
Definition: dialog_drc.h:111
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:125
void SetImmediateMode()
In immediate mode, messages are flushed as they are added.
wxDataViewCtrl * m_footprintsDataView
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:128
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)
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:114
#define DIALOG_DRC_WINDOW_NAME
Definition: dialog_drc.h:41
#define _(s)
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
PROGRESS_REPORTER_BASE(int aNumPhases)
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:115
int m_severities
Definition: dialog_drc.h:133
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
BOARD * GetBoard() const
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:131
bool m_running
Definition: dialog_drc.h:113

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 99 of file dialog_drc.cpp.

100 {
101  m_frame->FocusOnItem( nullptr );
102 
104  settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
106 
107  if( !Kiface().IsSingle() )
108  settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
109 
110  settings->m_DrcDialog.severities = m_severities;
111 
112  m_markersTreeModel->DecRef();
113 }
wxCheckBox * m_cbTestFootprints
wxCheckBox * m_cbReportAllTrackErrors
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxCheckBox * m_cbRefillZones
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
PCBNEW_SETTINGS * GetPcbNewSettings() const
int m_severities
Definition: dialog_drc.h:133
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
DIALOG_DRC m_DrcDialog
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112

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_BASE::AddPhases ( int  aNumPhases)
overridevirtualinherited

Implements PROGRESS_REPORTER.

Definition at line 97 of file progress_reporter_base.cpp.

98 {
99  m_numPhases += aNumPhases;
100 }

References PROGRESS_REPORTER_BASE::m_numPhases.

◆ AdvancePhase() [1/2]

void PROGRESS_REPORTER_BASE::AdvancePhase ( )
overridevirtualinherited

Use the next available virtual zone of the dialog progress bar.

Implements PROGRESS_REPORTER.

Reimplemented in DIALOG_PCM_PROGRESS.

Definition at line 50 of file progress_reporter_base.cpp.

51 {
52  m_phase.fetch_add( 1 );
53  m_progress.store( 0 );
54 }

References PROGRESS_REPORTER_BASE::m_phase, and PROGRESS_REPORTER_BASE::m_progress.

Referenced by DIALOG_ERC::AdvancePhase(), DIALOG_PCM_PROGRESS::AdvancePhase(), PROGRESS_REPORTER_BASE::AdvancePhase(), AdvancePhase(), and DIALOG_ERC::testErc().

◆ 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_BASE.

Definition at line 169 of file dialog_drc.cpp.

170 {
172  SetCurrentProgress( 0.0 );
173 
174  m_messages->Report( aMessage );
175 }
virtual void AdvancePhase() override
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.
WX_HTML_REPORT_BOX * m_messages
virtual void SetCurrentProgress(double aProgress) override
Set the progress value to aProgress (0..1).

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

◆ AdvanceProgress()

void PROGRESS_REPORTER_BASE::AdvanceProgress ( )
overridevirtualinherited

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

Implements PROGRESS_REPORTER.

Definition at line 85 of file progress_reporter_base.cpp.

86 {
87  m_progress.fetch_add( 1 );
88 }

References PROGRESS_REPORTER_BASE::m_progress.

◆ bds()

BOARD_DESIGN_SETTINGS& DIALOG_DRC::bds ( )
inlineprivate

Definition at line 109 of file dialog_drc.h.

109 { return m_currentBoard->GetDesignSettings(); }
BOARD * m_currentBoard
Definition: dialog_drc.h:111
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590

Referenced by OnDRCItemRClick(), and writeReport().

◆ BeginPhase()

void PROGRESS_REPORTER_BASE::BeginPhase ( int  aPhase)
overridevirtualinherited

Initialize the aPhase virtual zone of the dialog progress bar.

Implements PROGRESS_REPORTER.

Definition at line 43 of file progress_reporter_base.cpp.

44 {
45  m_phase.store( aPhase );
46  m_progress.store( 0 );
47 }

References PROGRESS_REPORTER_BASE::m_phase, and PROGRESS_REPORTER_BASE::m_progress.

◆ centerMarkerIdleHandler()

void DIALOG_DRC::centerMarkerIdleHandler ( wxIdleEvent &  aEvent)
private

Definition at line 770 of file dialog_drc.cpp.

771 {
773  m_centerMarkerOnIdle = nullptr;
774  Unbind( wxEVT_IDLE, &DIALOG_DRC::centerMarkerIdleHandler, this );
775 }
void CenterMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:616
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_drc.cpp:770
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:131

References RC_TREE_MODEL::CenterMarker(), m_centerMarkerOnIdle, and m_markersTreeModel.

Referenced by SelectMarker().

◆ currentProgress()

int PROGRESS_REPORTER_BASE::currentProgress ( ) const
protectedinherited

Definition at line 103 of file progress_reporter_base.cpp.

104 {
105  double current = ( 1.0 / (double) m_numPhases ) *
106  ( (double) m_phase + ( (double) m_progress.load() / (double) m_maxProgress ) );
107 
108  return (int)( current * 1000 );
109 }

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

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

◆ deleteAllMarkers()

void DIALOG_DRC::deleteAllMarkers ( bool  aIncludeExclusions)
private

Definition at line 804 of file dialog_drc.cpp.

805 {
806  // Clear current selection list to avoid selection of deleted items
808 
809  m_markersTreeModel->DeleteItems( false, aIncludeExclusions, true );
810 }
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:465
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:123
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112

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 312 of file dialog_shim.cpp.

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

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 480 of file dialog_shim.cpp.

481 {
482  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
483  // handle validation in the same way as other dialogs.
484  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
485  return;
486 
487  SetReturnCode( retCode );
488 
489  if( !IsQuasiModal() )
490  {
491  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
492  "wasn't called" );
493  return;
494  }
495 
496  if( m_qmodal_loop )
497  {
498  if( m_qmodal_loop->IsRunning() )
499  m_qmodal_loop->Exit( 0 );
500  else
501  m_qmodal_loop->ScheduleExit( 0 );
502 
503  m_qmodal_loop = nullptr;
504  }
505 
507  m_qmodal_parent_disabler = nullptr;
508 
509  Show( false );
510 }
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216

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 778 of file dialog_drc.cpp.

779 {
780  if( !m_Notebook->IsShown() || m_Notebook->GetSelection() != 0 )
781  return;
782 
783  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( m_markerDataView->GetCurrentItem() );
784  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
785 
786  if( marker && !marker->IsExcluded() )
787  {
788  marker->SetExcluded( true );
789  m_frame->GetCanvas()->GetView()->Update( marker );
790 
791  // Update view
794  else
796 
798  refreshEditor();
799  m_frame->OnModify();
800  }
801 }
void OnModify() override
Must be called after a board change to set the modified flag.
wxNotebook * m_Notebook
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
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:459
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:195
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:210
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:719
int m_severities
Definition: dialog_drc.h:133
void ValueChanged(const RC_TREE_NODE *aNode)
Definition: rc_item.cpp:442
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112

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 151 of file dialog_shim.cpp.

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

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_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_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_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), 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_PCM::DIALOG_PCM(), 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_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_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_FIELD_PROPERTIES::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 169 of file dialog_shim.cpp.

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

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

◆ initValues()

void DIALOG_DRC::initValues ( )
private

Definition at line 131 of file dialog_drc.cpp.

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

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_BASE::IsCancelled ( ) const
inlineoverridevirtualinherited

Implements PROGRESS_REPORTER.

Definition at line 108 of file progress_reporter_base.h.

108 { return m_cancelled; }

References PROGRESS_REPORTER_BASE::m_cancelled.

Referenced by PLUGIN_CONTENT_MANAGER::DownloadToStream().

◆ IsCtrl()

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

Definition at line 126 of file dialog_shim.h.

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

◆ IsQuasiModal()

◆ IsShiftCtrl()

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

Definition at line 132 of file dialog_shim.h.

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

◆ KeepRefreshing()

bool PROGRESS_REPORTER_BASE::KeepRefreshing ( bool  aWait = false)
overridevirtualinherited

Update the UI dialog.

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

Implements PROGRESS_REPORTER.

Definition at line 112 of file progress_reporter_base.cpp.

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

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

Referenced by PLUGIN_CONTENT_MANAGER::DownloadToStream().

◆ 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(), SCH_EDIT_FRAME::AskToSaveChanges(), 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_FIELD_PROPERTIES::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 741 of file dialog_drc.cpp.

742 {
743  if( m_Notebook->IsShown() )
744  {
745  switch( m_Notebook->GetSelection() )
746  {
747  case 0: m_markersTreeModel->NextMarker(); break;
748  case 1: m_unconnectedTreeModel->NextMarker(); break;
749  case 2: m_footprintWarningsTreeModel->NextMarker(); break;
750  }
751  }
752 }
void NextMarker()
Definition: rc_item.cpp:575
wxNotebook * m_Notebook
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123

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 116 of file dialog_drc.cpp.

117 {
118  if( m_currentBoard != m_frame->GetBoard() )
119  {
120  // If m_currentBoard is not the current board, (for instance because a new board
121  // was loaded), close the dialog, because many pointers are now invalid in lists
122  SetReturnCode( wxID_CANCEL );
123  Close();
124 
125  DRC_TOOL* drcTool = m_frame->GetToolManager()->GetTool<DRC_TOOL>();
126  drcTool->DestroyDRCDialog();
127  }
128 }
BOARD * m_currentBoard
Definition: dialog_drc.h:111
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:122
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112

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 688 of file dialog_drc.cpp.

689 {
690  if( m_running )
691  {
692  m_cancelled = true;
693  return;
694  }
695 
696  m_frame->FocusOnItem( nullptr );
697 
698  SetReturnCode( wxID_CANCEL );
699 
700  // The dialog can be modal or not modal.
701  // Leave the DRC caller destroy (or not) the dialog
702  DRC_TOOL* drcTool = m_frame->GetToolManager()->GetTool<DRC_TOOL>();
703  drcTool->DestroyDRCDialog();
704 }
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:114
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
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:122
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112
bool m_running
Definition: dialog_drc.h:113

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 707 of file dialog_drc.cpp.

708 {
709  // Shouldn't be necessary, but is on at least OSX
710  if( aEvent.GetSelection() >= 0 )
711  m_Notebook->ChangeSelection( (unsigned) aEvent.GetSelection() );
712 
713  m_markerDataView->UnselectAll();
714  m_unconnectedDataView->UnselectAll();
715  m_footprintsDataView->UnselectAll();
716 }
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 570 of file dialog_shim.cpp.

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

678 {
679  if( m_running )
680  aEvent.Veto();
681 
682  wxCommandEvent dummy;
683 
684  OnCancelClick( dummy );
685 }
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
Definition: sch_symbol.cpp:72
void OnCancelClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:688
bool m_running
Definition: dialog_drc.h:113

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

◆ OnDeleteAllClick()

void DIALOG_DRC::OnDeleteAllClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 903 of file dialog_drc.cpp.

904 {
905  static bool s_includeExclusions = false;
906 
907  int numExcluded = 0;
908 
909  if( m_markersProvider )
911 
914 
917 
918  if( numExcluded > 0 )
919  {
920  wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ),
921  _( "Delete All Markers" ),
922  wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION );
923  dlg.ShowCheckBox( _( "Delete exclusions" ), s_includeExclusions );
924 
925  int ret = dlg.ShowModal();
926 
927  if( ret == wxID_CANCEL )
928  return;
929  else
930  s_includeExclusions = dlg.IsCheckBoxChecked();
931  }
932 
933  deleteAllMarkers( s_includeExclusions );
934 
935  m_drcRun = false;
936  refreshEditor();
938 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_drc.cpp:804
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:122
virtual int GetCount(int aSeverity=-1) const =0
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:125
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:128
#define _(s)
void refreshEditor()
Definition: dialog_drc.cpp:719
bool m_drcRun
Definition: dialog_drc.h:115

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 878 of file dialog_drc.cpp.

879 {
880  if( m_Notebook->GetSelection() == 0 )
881  {
882  // Clear the selection. It may be the selected DRC marker.
884 
886 
887  // redraw the pcb
888  refreshEditor();
889  }
890  else if( m_Notebook->GetSelection() == 1 )
891  {
893  }
894  else if( m_Notebook->GetSelection() == 2 )
895  {
897  }
898 
900 }
static TOOL_ACTION selectionClear
Clear the current selection.
Definition: pcb_actions.h:59
wxNotebook * m_Notebook
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
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:459
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
void refreshEditor()
Definition: dialog_drc.cpp:719
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112

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 414 of file dialog_drc.cpp.

415 {
416  if( aEvent.GetItem().IsOk() )
417  {
418  // turn control over to m_frame, hide this DIALOG_DRC window,
419  // no destruction so we can preserve listbox cursor
420  if( !IsModal() )
421  Show( false );
422  }
423 
424  // Do not skip aVent here: this is not useful, and Pcbnew crashes
425  // if skipped (at least on Windows)
426 }
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 429 of file dialog_drc.cpp.

430 {
431  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
432 
433  if( !node )
434  return;
435 
436  std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
437  wxString listName;
438  wxMenu menu;
439  wxString msg;
440 
441  switch( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] )
442  {
443  case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
444  case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
445  default: listName = _( "appropriate" ); break;
446  }
447 
448  if( rcItem->GetParent()->IsExcluded() )
449  {
450  menu.Append( 1, _( "Remove exclusion for this violation" ),
451  wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
452  }
453  else
454  {
455  menu.Append( 2, _( "Exclude this violation" ),
456  wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
457  }
458 
459  if( rcItem->GetErrorCode() == DRCE_CLEARANCE
460  || rcItem->GetErrorCode() == DRCE_EDGE_CLEARANCE )
461  {
462  menu.Append( 3, _( "Run clearance resolution tool..." ) );
463  }
464 
465  menu.AppendSeparator();
466 
467  if( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] == RPT_SEVERITY_WARNING )
468  {
469  msg.Printf( _( "Change severity to Error for all '%s' violations" ),
470  rcItem->GetErrorText(),
471  _( "Violation severities can also be edited in the Board Setup... dialog" ) );
472  menu.Append( 4, msg );
473  }
474  else
475  {
476  msg.Printf( _( "Change severity to Warning for all '%s' violations" ),
477  rcItem->GetErrorText(),
478  _( "Violation severities can also be edited in the Board Setup... dialog" ) );
479  menu.Append( 5, msg );
480  }
481 
482  msg.Printf( _( "Ignore all '%s' violations" ),
483  rcItem->GetErrorText(),
484  _( "Violations will not be checked or reported" ) );
485  menu.Append( 6, msg );
486 
487  menu.AppendSeparator();
488 
489  menu.Append( 7, _( "Edit violation severities..." ), _( "Open the Board Setup... dialog" ) );
490 
491  bool modified = false;
492 
493  switch( GetPopupMenuSelectionFromUser( menu ) )
494  {
495  case 1:
496  {
497  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
498 
499  if( marker )
500  {
501  marker->SetExcluded( false );
502  m_frame->GetCanvas()->GetView()->Update( marker );
503 
504  // Update view
505  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
506  modified = true;
507  }
508 
509  break;
510  }
511 
512  case 2:
513  {
514  PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
515 
516  if( marker )
517  {
518  marker->SetExcluded( true );
519  m_frame->GetCanvas()->GetView()->Update( marker );
520 
521  // Update view
523  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
524  else
525  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
526 
527  modified = true;
528  }
529 
530  break;
531  }
532 
533  case 3:
534  {
535  TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
536  BOARD_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<BOARD_INSPECTION_TOOL>();
537 
538  inspectionTool->InspectDRCError( node->m_RcItem );
539  break;
540  }
541 
542  case 4:
543  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR;
544 
545  for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
546  {
547  if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
548  m_frame->GetCanvas()->GetView()->Update( marker );
549  }
550 
551  // Rebuild model and view
552  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
553  modified = true;
554  break;
555 
556  case 5:
557  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING;
558 
559  for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
560  {
561  if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
562  m_frame->GetCanvas()->GetView()->Update( marker );
563  }
564 
565  // Rebuild model and view
566  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
567  modified = true;
568  break;
569 
570  case 6:
571  {
572  bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
573 
574  std::vector<PCB_MARKER*>& markers = m_frame->GetBoard()->Markers();
575 
576  for( unsigned i = 0; i < markers.size(); )
577  {
578  if( markers[i]->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
579  {
580  m_frame->GetCanvas()->GetView()->Remove( markers.at( i ) );
581  markers.erase( markers.begin() + i );
582  }
583  else
584  ++i;
585  }
586 
587  // Rebuild model and view
588  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
589  modified = true;
590  break;
591  }
592 
593  case 7:
594  m_frame->ShowBoardSetupDialog( _( "Violation Severity" ) );
595  break;
596  }
597 
598  if( modified )
599  {
601  refreshEditor();
602  m_frame->OnModify();
603  }
604 }
void OnModify() override
Must be called after a board change to set the modified flag.
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:109
MARKERS & Markers()
Definition: board.h:243
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:122
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:195
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:210
#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:719
std::map< int, SEVERITY > m_DRCSeverities
int m_severities
Definition: dialog_drc.h:133
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:112
std::shared_ptr< RC_ITEM > GetRCItem() const
Definition: marker_base.h:100
Tool for pcb inspection.

References _, bds(), DRCE_CLEARANCE, DRCE_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 310 of file dialog_drc.cpp.

311 {
312  BOARD* board = m_frame->GetBoard();
313  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
314  const KIID& itemID = node ? RC_TREE_MODEL::ToUUID( aEvent.GetItem() ) : niluuid;
315  BOARD_ITEM* item = board->GetItem( itemID );
316 
317  auto getActiveLayers =
318  []( BOARD_ITEM* aItem ) -> LSET
319  {
320  if( aItem->Type() == PCB_PAD_T )
321  {
322  PAD* pad = static_cast<PAD*>( aItem );
323  LSET layers;
324 
325  for( int layer : aItem->GetLayerSet().Seq() )
326  {
327  if( pad->FlashLayer( layer ) )
328  layers.set( layer );
329  }
330 
331  return layers;
332  }
333  else
334  {
335  return aItem->GetLayerSet();
336  }
337  };
338 
339  if( node && item )
340  {
341  PCB_LAYER_ID principalLayer = item->GetLayer();
342  LSET violationLayers;
343  std::shared_ptr<RC_ITEM> rc_item = node->m_RcItem;
344 
345  if( rc_item->GetErrorCode() == DRCE_MALFORMED_COURTYARD )
346  {
347  BOARD_ITEM* a = board->GetItem( rc_item->GetMainItemID() );
348 
349  if( a && ( a->GetFlags() & MALFORMED_B_COURTYARD ) > 0
350  && ( a->GetFlags() & MALFORMED_F_COURTYARD ) == 0 )
351  {
352  principalLayer = B_CrtYd;
353  }
354  else
355  {
356  principalLayer = F_CrtYd;
357  }
358  }
359  else if (rc_item->GetErrorCode() == DRCE_INVALID_OUTLINE )
360  {
361  principalLayer = Edge_Cuts;
362  }
363  else
364  {
365  BOARD_ITEM* a = board->GetItem( rc_item->GetMainItemID() );
366  BOARD_ITEM* b = board->GetItem( rc_item->GetAuxItemID() );
367  BOARD_ITEM* c = board->GetItem( rc_item->GetAuxItem2ID() );
368  BOARD_ITEM* d = board->GetItem( rc_item->GetAuxItem3ID() );
369 
370  if( a || b || c || d )
371  violationLayers = LSET::AllLayersMask();
372 
373  if( a )
374  violationLayers &= getActiveLayers( a );
375 
376  if( b )
377  violationLayers &= getActiveLayers( b );
378 
379  if( c )
380  violationLayers &= getActiveLayers( c );
381 
382  if( d )
383  violationLayers &= getActiveLayers( d );
384  }
385 
386  if( violationLayers.count() )
387  principalLayer = violationLayers.Seq().front();
388  else
389  violationLayers.set( principalLayer );
390 
391  WINDOW_THAWER thawer( m_frame );
392 
393  if( ( violationLayers & board->GetVisibleLayers() ) == 0 )
394  m_frame->GetAppearancePanel()->SetLayerVisible( principalLayer, true );
395 
396  if( board->GetVisibleLayers().test( principalLayer ) )
397  m_frame->SetActiveLayer( principalLayer );
398 
400  {
401  // we already came from a cross-probe of the marker in the document; don't go
402  // around in circles
403  }
404  else
405  {
406  m_frame->FocusOnItem( item, principalLayer );
407  }
408  }
409 
410  aEvent.Skip();
411 }
BOARD_ITEM * GetItem(const KIID &aID) const
Definition: board.cpp:845
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:49
#define MALFORMED_F_COURTYARD
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:481
class PAD, a pad in a footprint
Definition: typeinfo.h:89
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:147
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:504
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:195
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:210
static LSET AllLayersMask()
Definition: lset.cpp:787
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
EDA_ITEM_FLAGS GetFlags() const
Definition: eda_item.h:154
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
void SetLayerVisible(LAYER_NUM aLayer, bool isVisible)
BOARD * GetBoard() const
Definition: pad.h:57
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:131
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.

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(), EDA_ITEM::GetFlags(), BOARD::GetItem(), BOARD::GetVisibleLayers(), m_centerMarkerOnIdle, m_frame, RC_TREE_NODE::m_RcItem, MALFORMED_B_COURTYARD, MALFORMED_F_COURTYARD, niluuid, pad, PCB_PAD_T, 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 191 of file dialog_drc.cpp.

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

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

◆ OnModify()

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 380 of file dialog_shim.cpp.

381 {
382  if( m_firstPaintEvent )
383  {
385 
386  selectAllInTextCtrls( GetChildren() );
387 
390  else
391  KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
392 
393  m_firstPaintEvent = false;
394  }
395 
396  event.Skip();
397 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:211
bool m_firstPaintEvent
Definition: dialog_shim.h:210
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 197 of file dialog_drc.cpp.

198 {
199  TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
200  DRC_TOOL* drcTool = toolMgr->GetTool<DRC_TOOL>();
201  ZONE_FILLER_TOOL* zoneFillerTool = toolMgr->GetTool<ZONE_FILLER_TOOL>();
202  bool refillZones = m_cbRefillZones->GetValue();
203  bool reportAllTrackErrors = m_cbReportAllTrackErrors->GetValue();
204  bool testFootprints = m_cbTestFootprints->GetValue();
205 
206  if( zoneFillerTool->IsBusy() )
207  {
208  wxBell();
209  return;
210  }
211 
212  // This is not the time to have stale or buggy rules. Ensure they're up-to-date
213  // and that they at least parse.
214  try
215  {
216  drcTool->GetDRCEngine()->InitEngine( m_frame->GetDesignRulesPath() );
217  }
218  catch( PARSE_ERROR& )
219  {
220  m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
221  m_DeleteCurrentMarkerButton->Enable( false );
222  m_DeleteAllMarkersButton->Enable( false );
223  m_saveReport->Enable( false );
224 
225  m_messages->Clear();
226  m_messages->Report( _( "DRC incomplete: could not compile custom design rules. " )
227  + wxT( "<a href='boardsetup'>" )
228  + _( "Show design rules." )
229  + wxT( "</a>" ) );
230  m_messages->Flush();
231 
232  Raise();
233  return;
234  }
235 
236  m_drcRun = false;
237  m_footprintTestsRun = false;
238  m_cancelled = false;
239 
241  deleteAllMarkers( true );
242  m_unconnectedTreeModel->DeleteItems( false, true, true );
243  m_footprintWarningsTreeModel->DeleteItems( false, true, true );
244 
245  Raise();
246 
247  m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
248  m_messages->Clear();
249  wxYield(); // Allow time slice to refresh Messages
250 
251  m_running = true;
252  m_sdbSizerCancel->SetLabel( _( "Cancel" ) );
253  m_sdbSizerOK->Enable( false );
254  m_DeleteCurrentMarkerButton->Enable( false );
255  m_DeleteAllMarkersButton->Enable( false );
256  m_saveReport->Enable( false );
257 
258  drcTool->RunTests( this, refillZones, reportAllTrackErrors, testFootprints );
259 
260  if( m_cancelled )
261  m_messages->Report( _( "-------- DRC cancelled by user.<br><br>" ) );
262  else
263  m_messages->Report( _( "Done.<br><br>" ) );
264 
265  Raise();
266  wxYield(); // Allow time slice to refresh Messages
267 
268  m_running = false;
269  m_sdbSizerCancel->SetLabel( _( "Close" ) );
270  m_sdbSizerOK->Enable( true );
271  m_DeleteCurrentMarkerButton->Enable( true );
272  m_DeleteAllMarkersButton->Enable( true );
273  m_saveReport->Enable( true );
274 
275  if( !m_cancelled )
276  {
277  wxMilliSleep( 500 );
278  m_runningResultsBook->ChangeSelection( 1 );
280  }
281 
282  refreshEditor();
283 }
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
Definition: rc_item.cpp:465
wxCheckBox * m_cbTestFootprints
wxCheckBox * m_cbReportAllTrackErrors
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_drc.cpp:804
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:116
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:129
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:114
#define _(s)
std::shared_ptr< DRC_ENGINE > GetDRCEngine()
Definition: drc_tool.h:78
void RunTests(PROGRESS_REPORTER *aProgressReporter, bool aRefillZones, bool aReportAllTrackErrors, bool aTestFootprints)
Run the DRC tests.
Definition: drc_tool.cpp:132
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
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:719
bool m_drcRun
Definition: dialog_drc.h:115
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:112
bool m_running
Definition: dialog_drc.h:113

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 643 of file dialog_drc.cpp.

644 {
645  wxFileName fn( "./DRC." + ReportFileExtension );
646 
647  wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(),
648  ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
649 
650  if( dlg.ShowModal() != wxID_OK )
651  return;
652 
653  fn = dlg.GetPath();
654 
655  if( fn.GetExt().IsEmpty() )
656  fn.SetExt( ReportFileExtension );
657 
658  if( !fn.IsAbsolute() )
659  {
660  wxString prj_path = Prj().GetProjectPath();
661  fn.MakeAbsolute( prj_path );
662  }
663 
664  if( writeReport( fn.GetFullPath() ) )
665  {
666  m_messages->Report( wxString::Format( _( "Report file '%s' created<br>" ),
667  fn.GetFullPath() ) );
668  }
669  else
670  {
671  DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ),
672  fn.GetFullPath() ) );
673  }
674 }
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:279
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:813
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 607 of file dialog_drc.cpp.

608 {
609  int flag = 0;
610 
611  if( aEvent.GetEventObject() == m_showAll )
613  else if( aEvent.GetEventObject() == m_showErrors )
615  else if( aEvent.GetEventObject() == m_showWarnings )
617  else if( aEvent.GetEventObject() == m_showExclusions )
619 
620  if( aEvent.IsChecked() )
621  m_severities |= flag;
622  else if( aEvent.GetEventObject() == m_showAll )
624  else
625  m_severities &= ~flag;
626 
627  syncCheckboxes();
628 
629  // Set the provider's severity levels through the TreeModel so that the old tree
630  // can be torn down before the severity changes.
631  //
632  // It's not clear this is required, but we've had a lot of issues with wxDataView
633  // being cranky on various platforms.
634 
638 
640 }
wxCheckBox * m_showWarnings
void syncCheckboxes()
Definition: dialog_drc.cpp:182
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
static int RPT_SEVERITY_ALL
Definition: dialog_drc.cpp:179
void SetSeverities(int aSeverities)
Definition: rc_item.cpp:298
wxCheckBox * m_showExclusions
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
wxCheckBox * m_showErrors
wxCheckBox * m_showAll
int m_severities
Definition: dialog_drc.h:133
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123

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 727 of file dialog_drc.cpp.

728 {
729  if( m_Notebook->IsShown() )
730  {
731  switch( m_Notebook->GetSelection() )
732  {
733  case 0: m_markersTreeModel->PrevMarker(); break;
734  case 1: m_unconnectedTreeModel->PrevMarker(); break;
735  case 2: m_footprintWarningsTreeModel->PrevMarker(); break;
736  }
737  }
738 }
wxNotebook * m_Notebook
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129
void PrevMarker()
Definition: rc_item.cpp:554
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123

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 36 of file kiway_holder.cpp.

37 {
38  return Kiway().Prj();
39 }
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:190

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(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), 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(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), 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::loadWorkbook(), 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_SCHEMATIC_SETUP::OnPageChange(), DIALOG_BOARD_SETUP::OnPageChange(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), OnSaveReport(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), DIALOG_SCH_FIELD_PROPERTIES::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(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), 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(), SCH_EDIT_FRAME::saveSchematicFile(), SIM_PLOT_FRAME::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::saveSymbolAs(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), 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(), 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(), SCH_EDIT_FRAME::updateAutoSaveFile(), 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 719 of file dialog_drc.cpp.

720 {
721  WINDOW_THAWER thawer( m_frame );
722 
723  m_frame->GetCanvas()->Refresh();
724 }
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:112

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_BASE::Report ( const wxString &  aMessage)
overridevirtualinherited

Display aMessage in the progress bar dialog.

Implements PROGRESS_REPORTER.

Reimplemented in DIALOG_ERC.

Definition at line 64 of file progress_reporter_base.cpp.

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

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

Referenced by PROGRESS_REPORTER_BASE::AdvancePhase(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), and PCB_EDIT_FRAME::OpenProjectFiles().

◆ 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 287 of file dialog_shim.cpp.

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

◆ SelectMarker()

void DIALOG_DRC::SelectMarker ( const PCB_MARKER aMarker)

Definition at line 755 of file dialog_drc.cpp.

756 {
757  if( m_Notebook->IsShown() )
758  {
759  m_Notebook->SetSelection( 0 );
760  m_markersTreeModel->SelectMarker( aMarker );
761 
762  // wxWidgets on some platforms fails to correctly ensure that a selected item is
763  // visible, so we have to do it in a separate idle event.
764  m_centerMarkerOnIdle = aMarker;
765  Bind( wxEVT_IDLE, &DIALOG_DRC::centerMarkerIdleHandler, this );
766  }
767 }
wxNotebook * m_Notebook
void SelectMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:603
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_drc.cpp:770
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:131

References centerMarkerIdleHandler(), m_centerMarkerOnIdle, m_markersTreeModel, DIALOG_DRC_BASE::m_Notebook, and RC_TREE_MODEL::SelectMarker().

Referenced by DRC_TOOL::CrossProbe().

◆ SetCurrentProgress()

void PROGRESS_REPORTER_BASE::SetCurrentProgress ( double  aProgress)
overridevirtualinherited

Set the progress value to aProgress (0..1).

Implements PROGRESS_REPORTER.

Reimplemented in CONSOLE_PROGRESS_REPORTER.

Definition at line 78 of file progress_reporter_base.cpp.

79 {
80  m_maxProgress.store( 1000 );
81  m_progress.store( (int) ( aProgress * 1000.0 ) );
82 }

References PROGRESS_REPORTER_BASE::m_maxProgress, and PROGRESS_REPORTER_BASE::m_progress.

Referenced by DIALOG_ERC::AdvancePhase(), AdvancePhase(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), and CONSOLE_PROGRESS_REPORTER::SetCurrentProgress().

◆ 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:115

Referenced by DRC_TOOL::RunTests().

◆ SetFootprintsProvider()

void DIALOG_DRC::SetFootprintsProvider ( RC_ITEMS_PROVIDER aProvider)

Definition at line 302 of file dialog_drc.cpp.

303 {
304  m_footprintWarningsProvider = aProvider;
307 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:292
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:128
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:129

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:116

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:211

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_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), 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_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_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_FIELD_PROPERTIES::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_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::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 43 of file kiway_holder.cpp.

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

References ignore_unused(), 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 286 of file dialog_drc.cpp.

287 {
288  m_markersProvider = aProvider;
291 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:292
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:122
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:123

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

Referenced by DRC_TOOL::updatePointers().

◆ SetMaxProgress()

void PROGRESS_REPORTER_BASE::SetMaxProgress ( int  aMaxProgress)
overridevirtualinherited

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

Implements PROGRESS_REPORTER.

Definition at line 72 of file progress_reporter_base.cpp.

73 {
74  m_maxProgress.store( aMaxProgress );
75 }

References PROGRESS_REPORTER_BASE::m_maxProgress.

◆ SetNumPhases()

void PROGRESS_REPORTER_BASE::SetNumPhases ( int  aNumPhases)
overridevirtualinherited

Set the number of phases.

Implements PROGRESS_REPORTER.

Definition at line 91 of file progress_reporter_base.cpp.

92 {
93  m_numPhases = aNumPhases;
94 }

References PROGRESS_REPORTER_BASE::m_numPhases.

Referenced by DIALOG_PCM_PROGRESS::OnCancelClicked().

◆ 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 190 of file dialog_shim.cpp.

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

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

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

◆ SetTitle()

void PROGRESS_REPORTER_BASE::SetTitle ( const wxString &  aTitle)
inlineoverridevirtualinherited

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.

Implements PROGRESS_REPORTER.

Reimplemented in WX_PROGRESS_REPORTER.

Definition at line 106 of file progress_reporter_base.h.

106 { }

◆ SetUnconnectedProvider()

void DIALOG_DRC::SetUnconnectedProvider ( RC_ITEMS_PROVIDER aProvider)

Definition at line 294 of file dialog_drc.cpp.

295 {
296  m_unconnectedItemsProvider = aProvider;
299 }
void updateDisplayedCounts()
Definition: dialog_drc.cpp:941
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:292
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:125
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:126

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 219 of file dialog_shim.cpp.

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

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

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), DRC_TOOL::CrossProbe(), 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 430 of file dialog_shim.cpp.

431 {
432  // This is an exception safe way to zero a pointer before returning.
433  // Yes, even though DismissModal() clears this first normally, this is
434  // here in case there's an exception before the dialog is dismissed.
435  struct NULLER
436  {
437  void*& m_what;
438  NULLER( void*& aPtr ) : m_what( aPtr ) {}
439  ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
440  } clear_this( (void*&) m_qmodal_loop );
441 
442  // release the mouse if it's currently captured as the window having it
443  // will be disabled when this dialog is shown -- but will still keep the
444  // capture making it impossible to do anything in the modal dialog itself
445  wxWindow* win = wxWindow::GetCapture();
446  if( win )
447  win->ReleaseMouse();
448 
449  // Get the optimal parent
450  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
451 
452  wxASSERT_MSG( !m_qmodal_parent_disabler,
453  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
454 
455  // quasi-modal: disable only my "optimal" parent
457 
458  // Apple in its infinite wisdom will raise a disabled window before even passing
459  // us the event, so we have no way to stop it. Instead, we must set an order on
460  // the windows so that the quasi-modal will be pushed in front of the disabled
461  // window when it is raised.
463 
464  Show( true );
465 
466  m_qmodal_showing = true;
467 
468  WX_EVENT_LOOP event_loop;
469 
470  m_qmodal_loop = &event_loop;
471 
472  event_loop.Run();
473 
474  m_qmodal_showing = false;
475 
476  return GetReturnCode();
477 }
bool m_qmodal_showing
Definition: dialog_shim.h:215
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:213
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:216
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:44
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 941 of file dialog_drc.cpp.

942 {
943  // Collect counts:
944 
945  int numMarkers = 0;
946  int numUnconnected = 0;
947  int numFootprints = 0;
948 
949  int numErrors = 0;
950  int numWarnings = 0;
951  int numExcluded = 0;
952 
953  if( m_markersProvider )
954  {
955  numMarkers += m_markersProvider->GetCount();
959  }
960 
962  {
963  numUnconnected += m_unconnectedItemsProvider->GetCount();
967  }
968 
970  {
971  numFootprints += m_footprintWarningsProvider->GetCount();
975  }
976 
977  wxString msg;
978 
979  // Update tab headers:
980 
981  if( m_drcRun )
982  {
983  msg.sprintf( m_markersTitleTemplate, numMarkers );
984  m_Notebook->SetPageText( 0, msg );
985 
986  msg.sprintf( m_unconnectedTitleTemplate, numUnconnected );
987  m_Notebook->SetPageText( 1, msg );
988 
989  if( m_footprintTestsRun )
990  {
991  msg.sprintf( m_footprintsTitleTemplate, numFootprints );
992  }
993  else
994  {
996  msg.Replace( wxT( "%d" ), _( "not run" ) );
997  }
998  m_Notebook->SetPageText( 2, msg );
999  }
1000  else
1001  {
1002  msg = m_markersTitleTemplate;
1003  msg.Replace( wxT( "(%d)" ), wxEmptyString );
1004  m_Notebook->SetPageText( 0, msg );
1005 
1007  msg.Replace( wxT( "(%d)" ), wxEmptyString );
1008  m_Notebook->SetPageText( 1, msg );
1009 
1011  msg.Replace( wxT( "(%d)" ), wxEmptyString );
1012  m_Notebook->SetPageText( 2, msg );
1013  }
1014 
1015  // Update badges:
1016 
1017  if( !m_drcRun && numErrors == 0 )
1018  numErrors = -1;
1019 
1020  if( !m_drcRun && numWarnings == 0 )
1021  numWarnings = -1;
1022 
1023  m_errorsBadge->SetMaximumNumber( numErrors );
1025 
1026  m_warningsBadge->SetMaximumNumber( numWarnings );
1028 
1029  m_exclusionsBadge->SetMaximumNumber( numExcluded );
1031 }
wxNotebook * m_Notebook
void UpdateNumber(int aNumber, SEVERITY aSeverity)
Update the number displayed on the badge.
bool m_footprintTestsRun
Definition: dialog_drc.h:116
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:120
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:122
virtual int GetCount(int aSeverity=-1) const =0
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:125
wxString m_markersTitleTemplate
Definition: dialog_drc.h:118
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:128
NUMBER_BADGE * m_exclusionsBadge
#define _(s)
NUMBER_BADGE * m_errorsBadge
NUMBER_BADGE * m_warningsBadge
bool m_drcRun
Definition: dialog_drc.h:115
void SetMaximumNumber(int aMax)
Set the maximum number to be shown on the badge.
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:119

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_BASE.

Definition at line 157 of file dialog_drc.cpp.

158 {
159  double cur = (double) m_progress.load() / m_maxProgress;
160  cur = std::max( 0.0, std::min( cur, 1.0 ) );
161 
162  m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
163  wxSafeYield( this );
164 
165  return !m_cancelled;
166 }
std::atomic< bool > m_cancelled
Definition: dialog_drc.h:114
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

References KiROUND(), m_cancelled, DIALOG_DRC_BASE::m_gauge, PROGRESS_REPORTER_BASE::m_maxProgress, and PROGRESS_REPORTER_BASE::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 176 of file dialog_shim.cpp.

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

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 813 of file dialog_drc.cpp.

814 {
815  FILE* fp = wxFopen( aFullFileName, wxT( "w" ) );
816 
817  if( fp == nullptr )
818  return false;
819 
820  std::map<KIID, EDA_ITEM*> itemMap;
821  m_frame->GetBoard()->FillItemMap( itemMap );
822 
823  EDA_UNITS units = GetUserUnits();
825  int count;
826 
827  fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_frame->GetBoard()->GetFileName() ) );
828 
829  wxDateTime now = wxDateTime::Now();
830 
831  fprintf( fp, "** Created on %s **\n", TO_UTF8( now.Format( wxT( "%F %T" ) ) ) );
832 
833  count = m_markersProvider->GetCount();
834 
835  fprintf( fp, "\n** Found %d DRC violations **\n", count );
836 
837  for( int i = 0; i < count; ++i )
838  {
839  const std::shared_ptr<RC_ITEM>& item = m_markersProvider->GetItem( i );
840  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
841 
842  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
843  }
844 
846 
847  fprintf( fp, "\n** Found %d unconnected pads **\n", count );
848 
849  for( int i = 0; i < count; ++i )
850  {
851  const std::shared_ptr<RC_ITEM>& item = m_unconnectedItemsProvider->GetItem( i );
852  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
853 
854  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
855  }
856 
858 
859  fprintf( fp, "\n** Found %d Footprint errors **\n", count );
860 
861  for( int i = 0; i < count; ++i )
862  {
863  const std::shared_ptr<RC_ITEM>& item = m_footprintWarningsProvider->GetItem( i );
864  SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
865 
866  fprintf( fp, "%s", TO_UTF8( item->ShowReport( units, severity, itemMap ) ) );
867  }
868 
869 
870  fprintf( fp, "\n** End of Report **\n" );
871 
872  fclose( fp );
873 
874  return true;
875 }
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:109
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:122
virtual int GetCount(int aSeverity=-1) const =0
const wxString & GetFileName() const
Definition: board.h:229
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:590
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:121
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:125
#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:128
SEVERITY GetSeverity(int aDRCErrorCode)
SEVERITY
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:112
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Definition: board.cpp:924
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 114 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_centerMarkerOnIdle

const PCB_MARKER* DIALOG_DRC::m_centerMarkerOnIdle
private

Definition at line 131 of file dialog_drc.h.

Referenced by centerMarkerIdleHandler(), OnDRCItemSelected(), and SelectMarker().

◆ m_currentBoard

BOARD* DIALOG_DRC::m_currentBoard
private

Definition at line 111 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 115 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 210 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 120 of file dialog_drc.h.

Referenced by initValues(), and updateDisplayedCounts().

◆ m_footprintTestsRun

bool DIALOG_DRC::m_footprintTestsRun
private

Definition at line 116 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 211 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 223 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 118 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_BASE::m_msgChanged
protectedinherited

◆ m_mutex

std::mutex PROGRESS_REPORTER_BASE::m_mutex
mutableprotectedinherited

◆ m_Notebook

◆ m_numPhases

std::atomic_int PROGRESS_REPORTER_BASE::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_BASE::m_phase
protectedinherited

◆ m_progress

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 213 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 215 of file dialog_shim.h.

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

◆ m_rptMessage

wxString PROGRESS_REPORTER_BASE::m_rptMessage
protectedinherited

◆ m_running

bool DIALOG_DRC::m_running
private

Definition at line 113 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 119 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: