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 ()
 Called after running DRC. More...
 
void SetFootprintTestsRun ()
 Called after running Footprint Tests. More...
 
void UpdateData ()
 Rebuild the contents of the violation tabs based on the current markers and severties. More...
 
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
 
void SetupStandardButtons (std::map< int, wxString > aLabels={})
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
bool HasKiway () const
 Safety check before asking for the Kiway reference. 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
 
wxPanel * m_panelIgnored
 
wxListCtrl * m_ignoredList
 
wxHyperlinkCtrl * m_violationSeveritiesLink
 
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
 
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 with commentary to an open text file. More...
 
void syncCheckboxes ()
 
void updateDisplayedCounts ()
 
void OnDRCItemSelected (wxDataViewEvent &aEvent) override
 
void OnDRCItemDClick (wxDataViewEvent &aEvent) override
 
void OnDRCItemRClick (wxDataViewEvent &aEvent) override
 
void OnEditViolationSeverities (wxHyperlinkEvent &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 OnCloseWindow (wxCloseEvent &aEvent)
 Properly handle the wxCloseEvent when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM. More...
 
void OnButton (wxCommandEvent &aEvent)
 Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM. More...
 
void OnGridEditorShown (wxGridEvent &event)
 
void OnGridEditorHidden (wxGridEvent &event)
 
 DECLARE_EVENT_TABLE ()
 
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
 
bool m_drcRun
 
bool m_footprintTestsRun
 
wxString m_markersTitleTemplate
 
wxString m_unconnectedTitleTemplate
 
wxString m_footprintsTitleTemplate
 
wxString m_ignoredTitleTemplate
 
std::shared_ptr< RC_ITEMS_PROVIDERm_markersProvider
 
std::shared_ptr< RC_ITEMS_PROVIDERm_ratsnestProvider
 
std::shared_ptr< RC_ITEMS_PROVIDERm_fpWarningsProvider
 
RC_TREE_MODELm_markersTreeModel
 
RC_TREE_MODELm_unconnectedTreeModel
 
RC_TREE_MODELm_fpWarningsTreeModel
 
const PCB_MARKERm_centerMarkerOnIdle
 
int m_severities
 
wxPanel * m_panelUnconnectedItems
 
KIWAYm_kiway
 
HOLDER_TYPE m_type
 
wxString m_rptMessage
 
std::mutex m_mutex
 
std::atomic_int m_phase
 
std::atomic_int m_numPhases
 
std::atomic_int m_progress
 
std::atomic_int m_maxProgress
 
std::atomic_bool m_cancelled
 
std::atomic_bool m_messageChanged
 

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

65 :
66 DIALOG_DRC_BASE( aParent ),
68 m_running( false ),
69 m_drcRun( false ),
70 m_footprintTestsRun( false ),
71 m_markersTreeModel( nullptr ),
72 m_unconnectedTreeModel( nullptr ),
73 m_fpWarningsTreeModel( nullptr ),
74 m_centerMarkerOnIdle( nullptr ),
76{
77 SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
78
79 m_frame = aEditorFrame;
81
83
86
87 m_markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>( m_currentBoard,
90
91 m_ratsnestProvider = std::make_shared<DRC_ITEMS_PROVIDER>( m_currentBoard,
93
94 m_fpWarningsProvider = std::make_shared<DRC_ITEMS_PROVIDER>( m_currentBoard,
96
98 m_markerDataView->AssociateModel( m_markersTreeModel );
100
104
108
109 m_ignoredList->InsertColumn( 0, wxEmptyString, wxLIST_FORMAT_LEFT, DEFAULT_SINGLE_COL_WIDTH );
110
112 {
115
116 for( const wxString& str : g_lastIgnored )
117 m_ignoredList->InsertItem( m_ignoredList->GetItemCount(), str );
118 }
119
120 m_Notebook->SetSelection( 0 );
121
122 if( Kiface().IsSingle() )
123 m_cbTestFootprints->Hide();
124
125 SetupStandardButtons( { { wxID_OK, _( "Run DRC" ) },
126 { wxID_CANCEL, _( "Close" ) } } );
127
128 m_markersTitleTemplate = m_Notebook->GetPageText( 0 );
129 m_unconnectedTitleTemplate = m_Notebook->GetPageText( 1 );
130 m_footprintsTitleTemplate = m_Notebook->GetPageText( 2 );
131 m_ignoredTitleTemplate = m_Notebook->GetPageText( 3 );
132
133 m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
135
136 if( !Kiface().IsSingle() )
138
139 Layout(); // adding the units above expanded Clearance text, now resize.
140
141 SetFocus();
142
144
146}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxCheckBox * m_cbRefillZones
wxNotebook * m_Notebook
wxDataViewCtrl * m_unconnectedDataView
wxDataViewCtrl * m_footprintsDataView
wxCheckBox * m_cbReportAllTrackErrors
wxCheckBox * m_cbTestFootprints
DIALOG_DRC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Design Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxListCtrl * m_ignoredList
WX_HTML_REPORT_BOX * m_messages
wxDataViewCtrl * m_markerDataView
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:128
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:139
std::shared_ptr< RC_ITEMS_PROVIDER > m_ratsnestProvider
Definition: dialog_drc.h:132
wxString m_markersTitleTemplate
Definition: dialog_drc.h:126
int m_severities
Definition: dialog_drc.h:141
bool m_footprintTestsRun
Definition: dialog_drc.h:124
RC_TREE_MODEL * m_fpWarningsTreeModel
Definition: dialog_drc.h:137
bool m_running
Definition: dialog_drc.h:122
void syncCheckboxes()
Definition: dialog_drc.cpp:219
BOARD * m_currentBoard
Definition: dialog_drc.h:120
wxString m_ignoredTitleTemplate
Definition: dialog_drc.h:129
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:136
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:127
std::shared_ptr< RC_ITEMS_PROVIDER > m_fpWarningsProvider
Definition: dialog_drc.h:133
std::shared_ptr< RC_ITEMS_PROVIDER > m_markersProvider
Definition: dialog_drc.h:131
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:121
bool m_drcRun
Definition: dialog_drc.h:123
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:135
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
bool IsSingle() const
Is this KIFACE running under single_top?
Definition: kiface_base.h:105
@ MARKER_DRAWING_SHEET
Definition: marker_base.h:55
DIALOG_DRC m_DrcDialog
PCBNEW_SETTINGS * GetPcbNewSettings() const
BOARD * GetBoard() const
PROGRESS_REPORTER_BASE(int aNumPhases)
void Update(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
Definition: rc_item.cpp:289
void SetImmediateMode()
In immediate mode, messages are flushed as they are added.
static bool g_lastDRCRun
Definition: dialog_drc.cpp:60
static std::vector< wxString > g_lastIgnored
Definition: dialog_drc.cpp:62
static int DEFAULT_SINGLE_COL_WIDTH
Definition: dialog_drc.cpp:57
static BOARD * g_lastDRCBoard
Definition: dialog_drc.cpp:59
static bool g_lastFootprintTestsRun
Definition: dialog_drc.cpp:61
#define DIALOG_DRC_WINDOW_NAME
Definition: dialog_drc.h:41
#define _(s)
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR

References _, DEFAULT_SINGLE_COL_WIDTH, DIALOG_DRC_WINDOW_NAME, DIALOG_SHIM::finishDialogSettings(), g_lastDRCBoard, g_lastDRCRun, g_lastFootprintTestsRun, g_lastIgnored, PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetPcbNewSettings(), KIFACE_BASE::IsSingle(), Kiface(), DIALOG_DRC_BASE::m_cbRefillZones, DIALOG_DRC_BASE::m_cbReportAllTrackErrors, DIALOG_DRC_BASE::m_cbTestFootprints, m_currentBoard, PCBNEW_SETTINGS::m_DrcDialog, m_drcRun, DIALOG_DRC_BASE::m_footprintsDataView, m_footprintsTitleTemplate, m_footprintTestsRun, m_fpWarningsProvider, m_fpWarningsTreeModel, m_frame, DIALOG_DRC_BASE::m_ignoredList, m_ignoredTitleTemplate, DIALOG_DRC_BASE::m_markerDataView, m_markersProvider, m_markersTitleTemplate, m_markersTreeModel, DIALOG_DRC_BASE::m_messages, DIALOG_DRC_BASE::m_Notebook, m_ratsnestProvider, m_severities, DIALOG_DRC_BASE::m_unconnectedDataView, m_unconnectedTitleTemplate, m_unconnectedTreeModel, MARKER_BASE::MARKER_DRAWING_SHEET, MARKER_BASE::MARKER_DRC, MARKER_BASE::MARKER_PARITY, MARKER_BASE::MARKER_RATSNEST, PCBNEW_SETTINGS::DIALOG_DRC::refill_zones, WX_HTML_REPORT_BOX::SetImmediateMode(), DIALOG_SHIM::SetupStandardButtons(), PCBNEW_SETTINGS::DIALOG_DRC::severities, syncCheckboxes(), PCBNEW_SETTINGS::DIALOG_DRC::test_all_track_errors, PCBNEW_SETTINGS::DIALOG_DRC::test_footprints, and RC_TREE_MODEL::Update().

◆ ~DIALOG_DRC()

DIALOG_DRC::~DIALOG_DRC ( )

Definition at line 149 of file dialog_drc.cpp.

150{
151 m_frame->FocusOnItem( nullptr );
152
156
157 g_lastIgnored.clear();
158
159 for( int ii = 0; ii < m_ignoredList->GetItemCount(); ++ii )
160 g_lastIgnored.push_back( m_ignoredList->GetItemText( ii ) );
161
163 settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
165
166 if( !Kiface().IsSingle() )
167 settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
168
170
171 m_markersTreeModel->DecRef();
172 m_unconnectedTreeModel->DecRef();
173 m_fpWarningsTreeModel->DecRef();
174}
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)

References PCB_BASE_FRAME::FocusOnItem(), g_lastDRCBoard, g_lastDRCRun, g_lastFootprintTestsRun, g_lastIgnored, PCB_BASE_FRAME::GetPcbNewSettings(), Kiface(), DIALOG_DRC_BASE::m_cbRefillZones, DIALOG_DRC_BASE::m_cbReportAllTrackErrors, DIALOG_DRC_BASE::m_cbTestFootprints, m_currentBoard, PCBNEW_SETTINGS::m_DrcDialog, m_drcRun, m_footprintTestsRun, m_fpWarningsTreeModel, m_frame, DIALOG_DRC_BASE::m_ignoredList, m_markersTreeModel, m_severities, m_unconnectedTreeModel, 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 98 of file progress_reporter_base.cpp.

99{
100 m_numPhases += aNumPhases;
101}

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_PCM_PROGRESS::AdvancePhase(), DIALOG_ERC::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 206 of file dialog_drc.cpp.

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

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 86 of file progress_reporter_base.cpp.

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

References PROGRESS_REPORTER_BASE::m_progress.

◆ bds()

BOARD_DESIGN_SETTINGS & DIALOG_DRC::bds ( )
inlineprivate

Definition at line 118 of file dialog_drc.h.

BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:682

Referenced by OnDRCItemRClick(), OnRunDRCClick(), updateDisplayedCounts(), 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 975 of file dialog_drc.cpp.

976{
978 m_centerMarkerOnIdle = nullptr;
979 Unbind( wxEVT_IDLE, &DIALOG_DRC::centerMarkerIdleHandler, this );
980}
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_drc.cpp:975
void CenterMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:620

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

Referenced by centerMarkerIdleHandler(), and SelectMarker().

◆ currentProgress()

int PROGRESS_REPORTER_BASE::currentProgress ( ) const
protectedinherited

Definition at line 104 of file progress_reporter_base.cpp.

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

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().

◆ DECLARE_EVENT_TABLE()

DIALOG_SHIM::DECLARE_EVENT_TABLE ( )
privateinherited

◆ deleteAllMarkers()

void DIALOG_DRC::deleteAllMarkers ( bool  aIncludeExclusions)
private

Definition at line 1009 of file dialog_drc.cpp.

1010{
1011 // Clear current selection list to avoid selection of deleted items
1013
1014 m_markersTreeModel->DeleteItems( false, aIncludeExclusions, false );
1015 m_unconnectedTreeModel->DeleteItems( false, aIncludeExclusions, false );
1016 m_fpWarningsTreeModel->DeleteItems( false, aIncludeExclusions, false );
1017
1018 m_frame->GetBoard()->DeleteMARKERs( true, aIncludeExclusions );
1019}
void DeleteMARKERs()
Delete all MARKERS from the board.
Definition: board.cpp:956
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:469
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:142

References RC_TREE_MODEL::DeleteItems(), BOARD::DeleteMARKERs(), PCB_BASE_FRAME::GetBoard(), TOOLS_HOLDER::GetToolManager(), m_fpWarningsTreeModel, m_frame, m_markersTreeModel, m_unconnectedTreeModel, TOOL_MANAGER::RunAction(), and PCB_ACTIONS::selectionClear.

Referenced by OnDeleteAllClick(), and OnRunDRCClick().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 318 of file dialog_shim.cpp.

319{
320 // so we can do logging of this state change:
321 return wxDialog::Enable( enable );
322}

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 486 of file dialog_shim.cpp.

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

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

Referenced by EDA_3D_CONTROLLER::Main(), DIALOG_EXPORT_NETLIST::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(), DIALOG_EXPORT_NETLIST::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 983 of file dialog_drc.cpp.

984{
985 if( !m_Notebook->IsShown() || m_Notebook->GetSelection() != 0 )
986 return;
987
988 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( m_markerDataView->GetCurrentItem() );
989 PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( node->m_RcItem->GetParent() );
990
991 if( marker && marker->GetSeverity() != RPT_SEVERITY_EXCLUSION )
992 {
993 marker->SetExcluded( true );
994 m_frame->GetCanvas()->GetView()->Update( marker );
995
996 // Update view
999 else
1001
1003 refreshEditor();
1004 m_frame->OnModify();
1005 }
1006}
void updateDisplayedCounts()
void refreshEditor()
Definition: dialog_drc.cpp:922
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:98
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void OnModify() override
Must be called after a board change to set the modified flag.
SEVERITY GetSeverity() const override
Definition: pcb_marker.cpp:273
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:209
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:463
void ValueChanged(const RC_TREE_NODE *aNode)
Definition: rc_item.cpp:446
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:194
@ RPT_SEVERITY_EXCLUSION

References RC_TREE_MODEL::DeleteCurrentItem(), PCB_BASE_FRAME::GetCanvas(), PCB_MARKER::GetSeverity(), 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 157 of file dialog_shim.cpp.

158{
159 // must be called from the constructor of derived classes,
160 // when all widgets are initialized, and therefore their size fixed
161
162 // SetSizeHints fixes the minimal size of sizers in the dialog
163 // (SetSizeHints calls Fit(), so no need to call it)
164 GetSizer()->SetSizeHints( this );
165}

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), 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_NETLIST::DIALOG_EXPORT_NETLIST(), 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_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), 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_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_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_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_PNS_SETTINGS::DIALOG_PNS_SETTINGS(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_PCBNEW::DIALOG_PRINT_PCBNEW(), 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_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SIM_MODEL< T_symbol, T_field >::DIALOG_SIM_MODEL(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_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_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), PAGED_DIALOG::finishInitialization(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_VIEW_DIALOG::NETLIST_VIEW_DIALOG(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SIM_COMMAND::onInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), TEARDROP_DIALOG::TEARDROP_DIALOG(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_COLOR_PICKER::TransferDataToWindow(), and DIALOG_BOARD_STATISTICS::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:85

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ HasKiway()

bool KIWAY_HOLDER::HasKiway ( ) const
inlineinherited

Safety check before asking for the Kiway reference.

Returns
true if kiway is non-null

Definition at line 63 of file kiway_holder.h.

64 {
65 return m_kiway != nullptr;
66 }
KIWAY * m_kiway
Definition: kiway_holder.h:84

References KIWAY_HOLDER::m_kiway.

Referenced by DIALOG_SHIM::~DIALOG_SHIM().

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

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

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

◆ 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 SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME().

◆ IsCtrl()

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

Definition at line 128 of file dialog_shim.h.

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

◆ IsQuasiModal()

◆ IsShiftCtrl()

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

Definition at line 134 of file dialog_shim.h.

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

◆ 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 113 of file progress_reporter_base.cpp.

114{
115 if( aWait )
116 {
117 while( m_progress.load() < m_maxProgress && m_maxProgress > 0 )
118 {
119 if( !updateUI() )
120 {
121 m_cancelled.store( true );
122 return false;
123 }
124
125 wxMilliSleep( 33 /* 30 FPS refresh rate */ );
126 }
127
128 return true;
129 }
130 else
131 {
132 if( !updateUI() )
133 {
134 m_cancelled.store( true );
135 return false;
136 }
137
138 return true;
139 }
140}
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().

◆ 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 }

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(), IMPORT_PROJ_HELPER::AssociateFileWithProj(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::CanCloseSymbolFromSchematic(), SCH_EDIT_FRAME::canCloseWindow(), PCB_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), SYMBOL_EDIT_FRAME::DdAddLibrary(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::FetchNetlistFromSchematic(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KIWAY_PLAYER::language_change(), KICAD_MANAGER_FRAME::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), PGM_SINGLE_TOP::MacOpenFile(), SIM_PLOT_FRAME::menuExit(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), KIGFX::WX_VIEW_CONTROLS::onMotion(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), SIM_PLOT_FRAME::onProbe(), PCB_EDIT_FRAME::OnQuit(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), SIM_PLOT_FRAME::onTune(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SCH_EDITOR_CONTROL::rescueProject(), PCB_EDIT_FRAME::RunEeschema(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), SYMBOL_EDIT_FRAME::saveCurrentSymbol(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), PCB_BASE_FRAME::SelectFootprintFromLibBrowser(), PCB_BASE_FRAME::SelectLibrary(), CVPCB_MAINFRAME::SendComponentSelectionToSch(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), PCB_EDIT_FRAME::SendCrossProbeItem(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SendSelectItemsToPcb(), PCB_EDIT_FRAME::SendSelectItemsToSch(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), EDA_BASE_FRAME::ShowPreferences(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), PCB_EDIT_FRAME::TestStandalone(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ NextMarker()

void DIALOG_DRC::NextMarker ( )

Definition at line 945 of file dialog_drc.cpp.

946{
947 if( m_Notebook->IsShown() )
948 {
949 switch( m_Notebook->GetSelection() )
950 {
951 case 0: m_markersTreeModel->NextMarker(); break;
952 case 1: m_unconnectedTreeModel->NextMarker(); break;
953 case 2: m_fpWarningsTreeModel->NextMarker(); break;
954 case 3: break;
955 }
956 }
957}
void NextMarker()
Definition: rc_item.cpp:579

References m_fpWarningsTreeModel, 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 177 of file dialog_drc.cpp.

178{
180 {
181 // If m_currentBoard is not the current board, (for instance because a new board
182 // was loaded), close the dialog, because many pointers are now invalid in lists
183 SetReturnCode( wxID_CANCEL );
184 Close();
185
187 drcTool->DestroyDRCDialog();
188 }
189}
void DestroyDRCDialog()
Close and free the DRC dialog.
Definition: drc_tool.cpp:121

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

◆ OnButton()

void DIALOG_SHIM::OnButton ( wxCommandEvent &  aEvent)
privateinherited

Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM.

Definition at line 532 of file dialog_shim.cpp.

533{
534 const int id = aEvent.GetId();
535
536 // If we are pressing a button to exit, we need to enable the escapeID
537 // otherwise the dialog does not process cancel
538 if( id == wxID_CANCEL )
539 SetEscapeId( wxID_ANY );
540
541 if( IsQuasiModal() )
542 {
543 if( id == GetAffirmativeId() )
544 {
545 EndQuasiModal( id );
546 }
547 else if( id == wxID_APPLY )
548 {
549 // Dialogs that provide Apply buttons should make sure data is valid before
550 // allowing a transfer, as there is no other way to indicate failure
551 // (i.e. the dialog can't refuse to close as it might with OK, because it
552 // isn't closing anyway)
553 if( Validate() )
554 {
555 ignore_unused( TransferDataFromWindow() );
556 }
557 }
558 else if( id == GetEscapeId() || (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
559 {
560 EndQuasiModal( wxID_CANCEL );
561 }
562 else // not a standard button
563 {
564 aEvent.Skip();
565 }
566
567 return;
568 }
569
570 // This is mandatory to allow wxDialogBase::OnButton() to be called.
571 aEvent.Skip();
572}
void EndQuasiModal(int retCode)
void ignore_unused(const T &)
Definition: ignore.h:24

References DIALOG_SHIM::EndQuasiModal(), ignore_unused(), and DIALOG_SHIM::IsQuasiModal().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnCancelClick()

void DIALOG_DRC::OnCancelClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 891 of file dialog_drc.cpp.

892{
893 if( m_running )
894 {
895 m_cancelled = true;
896 return;
897 }
898
899 m_frame->FocusOnItem( nullptr );
900
901 SetReturnCode( wxID_CANCEL );
902
903 // The dialog can be modal or not modal.
904 // Leave the DRC caller destroy (or not) the dialog
906 drcTool->DestroyDRCDialog();
907}

References DRC_TOOL::DestroyDRCDialog(), PCB_BASE_FRAME::FocusOnItem(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), PROGRESS_REPORTER_BASE::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 910 of file dialog_drc.cpp.

911{
912 // Shouldn't be necessary, but is on at least OSX
913 if( aEvent.GetSelection() >= 0 )
914 m_Notebook->ChangeSelection( (unsigned) aEvent.GetSelection() );
915
916 m_markerDataView->UnselectAll();
917 m_unconnectedDataView->UnselectAll();
918 m_footprintsDataView->UnselectAll();
919}

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 HK_PROMPT_DIALOG, DIALOG_CHOOSE_SYMBOL, and HTML_MESSAGE_BOX.

Definition at line 575 of file dialog_shim.cpp.

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

◆ OnClose()

void DIALOG_DRC::OnClose ( wxCloseEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 880 of file dialog_drc.cpp.

881{
882 if( m_running )
883 aEvent.Veto();
884
885 wxCommandEvent dummy;
886
888}
void OnCancelClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:891
std::vector< FAB_LAYER_COLOR > dummy

References dummy, m_running, and OnCancelClick().

◆ OnCloseWindow()

void DIALOG_SHIM::OnCloseWindow ( wxCloseEvent &  aEvent)
privateinherited

Properly handle the wxCloseEvent when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM.

Definition at line 519 of file dialog_shim.cpp.

520{
521 if( IsQuasiModal() )
522 {
523 EndQuasiModal( wxID_CANCEL );
524 return;
525 }
526
527 // This is mandatory to allow wxDialogBase::OnCloseWindow() to be called.
528 aEvent.Skip();
529}

References DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::IsQuasiModal().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnDeleteAllClick()

void DIALOG_DRC::OnDeleteAllClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 1115 of file dialog_drc.cpp.

1116{
1117 static bool s_includeExclusions = false;
1118
1119 int numExcluded = 0;
1120
1121 if( m_markersProvider )
1122 numExcluded += m_markersProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1123
1124 if( m_ratsnestProvider )
1125 numExcluded += m_ratsnestProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1126
1128 numExcluded += m_fpWarningsProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1129
1130 if( numExcluded > 0 )
1131 {
1132 wxRichMessageDialog dlg( this, _( "Do you wish to delete excluded markers as well?" ),
1133 _( "Delete All Markers" ),
1134 wxOK | wxCANCEL | wxCENTER | wxICON_QUESTION );
1135 dlg.ShowCheckBox( _( "Delete exclusions" ), s_includeExclusions );
1136
1137 int ret = dlg.ShowModal();
1138
1139 if( ret == wxID_CANCEL )
1140 return;
1141 else
1142 s_includeExclusions = dlg.IsCheckBoxChecked();
1143 }
1144
1145 deleteAllMarkers( s_includeExclusions );
1146
1147 refreshEditor();
1149}
void deleteAllMarkers(bool aIncludeExclusions)

References _, deleteAllMarkers(), m_fpWarningsProvider, m_markersProvider, m_ratsnestProvider, refreshEditor(), RPT_SEVERITY_EXCLUSION, and updateDisplayedCounts().

◆ OnDeleteOneClick()

void DIALOG_DRC::OnDeleteOneClick ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 1090 of file dialog_drc.cpp.

1091{
1092 if( m_Notebook->GetSelection() == 0 )
1093 {
1094 // Clear the selection. It may be the selected DRC marker.
1096
1098
1099 // redraw the pcb
1100 refreshEditor();
1101 }
1102 else if( m_Notebook->GetSelection() == 1 )
1103 {
1105 }
1106 else if( m_Notebook->GetSelection() == 2 )
1107 {
1109 }
1110
1112}

References RC_TREE_MODEL::DeleteCurrentItem(), TOOLS_HOLDER::GetToolManager(), m_fpWarningsTreeModel, 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 534 of file dialog_drc.cpp.

535{
536 if( aEvent.GetItem().IsOk() )
537 {
538 // turn control over to m_frame, hide this DIALOG_DRC window,
539 // no destruction so we can preserve listbox cursor
540 if( !IsModal() )
541 Show( false );
542 }
543
544 // Do not skip aEvent here: this is not useful, and Pcbnew crashes
545 // if skipped (at least on Windows)
546}

References DIALOG_SHIM::Show().

◆ OnDRCItemRClick()

void DIALOG_DRC::OnDRCItemRClick ( wxDataViewEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 549 of file dialog_drc.cpp.

550{
551 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
552
553 if( !node )
554 return;
555
556 std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
557 DRC_ITEM* drcItem = static_cast<DRC_ITEM*>( rcItem.get() );
558 std::shared_ptr<CONNECTIVITY_DATA> conn = m_currentBoard->GetConnectivity();
559 wxString listName;
560 wxMenu menu;
561 wxString msg;
562
563 switch( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] )
564 {
565 case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
566 case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
567 default: listName = _( "appropriate" ); break;
568 }
569
570 if( rcItem->GetParent()->IsExcluded() )
571 {
572 menu.Append( 1, _( "Remove exclusion for this violation" ),
573 wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
574
575 if( drcItem->GetViolatingRule() && !drcItem->GetViolatingRule()->m_Implicit )
576 {
577 msg.Printf( _( "Remove all exclusions for violations of rule '%s'" ),
578 drcItem->GetViolatingRule()->m_Name );
579 menu.Append( 11, msg );
580 }
581 }
582 else
583 {
584 menu.Append( 2, _( "Exclude this violation" ),
585 wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
586
587 if( drcItem->GetViolatingRule() && !drcItem->GetViolatingRule()->m_Implicit )
588 {
589 msg.Printf( _( "Exclude all violations of rule '%s'" ),
590 drcItem->GetViolatingRule()->m_Name );
591 menu.Append( 21, msg );
592 }
593 }
594
595 if( rcItem->GetErrorCode() == DRCE_CLEARANCE
596 || rcItem->GetErrorCode() == DRCE_EDGE_CLEARANCE
597 || rcItem->GetErrorCode() == DRCE_HOLE_CLEARANCE
598 || rcItem->GetErrorCode() == DRCE_DRILLED_HOLES_TOO_CLOSE )
599 {
600 menu.Append( 3, _( "Run clearance resolution tool..." ) );
601 }
602 else if( rcItem->GetErrorCode() == DRCE_TEXT_HEIGHT
603 || rcItem->GetErrorCode() == DRCE_TEXT_THICKNESS
604 || rcItem->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG
605 || rcItem->GetErrorCode() == DRCE_TRACK_WIDTH
606 || rcItem->GetErrorCode() == DRCE_VIA_DIAMETER
607 || rcItem->GetErrorCode() == DRCE_ANNULAR_WIDTH
608 || rcItem->GetErrorCode() == DRCE_DRILL_OUT_OF_RANGE
609 || rcItem->GetErrorCode() == DRCE_MICROVIA_DRILL_OUT_OF_RANGE
610 || rcItem->GetErrorCode() == DRCE_CONNECTION_WIDTH )
611 {
612 menu.Append( 3, _( "Run constraints resolution tool..." ) );
613 }
614
615 menu.AppendSeparator();
616
617 if( bds().m_DRCSeverities[ rcItem->GetErrorCode() ] == RPT_SEVERITY_WARNING )
618 {
619 msg.Printf( _( "Change severity to Error for all '%s' violations" ),
620 rcItem->GetErrorText(),
621 _( "Violation severities can also be edited in the Board Setup... dialog" ) );
622 menu.Append( 4, msg );
623 }
624 else
625 {
626 msg.Printf( _( "Change severity to Warning for all '%s' violations" ),
627 rcItem->GetErrorText(),
628 _( "Violation severities can also be edited in the Board Setup... dialog" ) );
629 menu.Append( 5, msg );
630 }
631
632 msg.Printf( _( "Ignore all '%s' violations" ),
633 rcItem->GetErrorText(),
634 _( "Violations will not be checked or reported" ) );
635 menu.Append( 6, msg );
636
637 menu.AppendSeparator();
638
639 menu.Append( 7, _( "Edit violation severities..." ), _( "Open the Board Setup... dialog" ) );
640
641 bool modified = false;
642
643 switch( GetPopupMenuSelectionFromUser( menu ) )
644 {
645 case 1:
646 {
647 PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( rcItem->GetParent() );
648
649 if( marker )
650 {
651 marker->SetExcluded( false );
652
653 if( rcItem->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
654 {
657 }
658 else
659 {
660 m_frame->GetCanvas()->GetView()->Update( marker );
661 }
662
663 // Update view
664 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
665 modified = true;
666 }
667
668 break;
669 }
670
671 case 2:
672 {
673 PCB_MARKER* marker = dynamic_cast<PCB_MARKER*>( rcItem->GetParent() );
674
675 if( marker )
676 {
677 marker->SetExcluded( true );
678
679 if( rcItem->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
680 {
683 }
684 else
685 {
686 m_frame->GetCanvas()->GetView()->Update( marker );
687 }
688
689 // Update view
691 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
692 else
693 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
694
695 modified = true;
696 }
697
698 break;
699 }
700
701 case 11:
702 {
703 for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
704 {
705 DRC_ITEM* candidateDrcItem = static_cast<DRC_ITEM*>( marker->GetRCItem().get() );
706
707 if( candidateDrcItem->GetViolatingRule() == drcItem->GetViolatingRule() )
708 marker->SetExcluded( false );
709 }
710
711 // Rebuild model and view
712 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markersProvider, m_severities );
713 modified = true;
714 break;
715 }
716
717 case 21:
718 {
719 for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
720 {
721 DRC_ITEM* candidateDrcItem = static_cast<DRC_ITEM*>( marker->GetRCItem().get() );
722
723 if( candidateDrcItem->GetViolatingRule() == drcItem->GetViolatingRule() )
724 marker->SetExcluded( true );
725 }
726
727 // Rebuild model and view
728 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markersProvider, m_severities );
729 modified = true;
730 break;
731 }
732
733 case 3:
734 {
735 TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
736 BOARD_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<BOARD_INSPECTION_TOOL>();
737
738 inspectionTool->InspectDRCError( node->m_RcItem );
739 break;
740 }
741
742 case 4:
743 bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR;
744
745 for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
746 {
747 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
748 m_frame->GetCanvas()->GetView()->Update( marker );
749 }
750
751 // Rebuild model and view
752 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markersProvider, m_severities );
753 modified = true;
754 break;
755
756 case 5:
757 bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING;
758
759 for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() )
760 {
761 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
762 m_frame->GetCanvas()->GetView()->Update( marker );
763 }
764
765 // Rebuild model and view
766 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markersProvider, m_severities );
767 modified = true;
768 break;
769
770 case 6:
771 {
772 bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
773
774 m_ignoredList->InsertItem( m_ignoredList->GetItemCount(),
775 wxT( " • " ) + rcItem->GetErrorText() );
776
777 std::vector<PCB_MARKER*>& markers = m_frame->GetBoard()->Markers();
778
779 for( unsigned i = 0; i < markers.size(); )
780 {
781 if( markers[i]->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
782 {
783 m_frame->GetCanvas()->GetView()->Remove( markers.at( i ) );
784 markers.erase( markers.begin() + i );
785 }
786 else
787 {
788 ++i;
789 }
790 }
791
792 if( rcItem->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
794
795 // Rebuild model and view
796 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markersProvider, m_severities );
797 modified = true;
798 break;
799 }
800
801 case 7:
802 m_frame->ShowBoardSetupDialog( _( "Violation Severity" ) );
803 break;
804 }
805
806 if( modified )
807 {
810 m_frame->OnModify();
811 }
812}
std::map< int, SEVERITY > m_DRCSeverities
Tool for pcb inspection.
void InspectDRCError(const std::shared_ptr< RC_ITEM > &aDRCItem)
Show the clearance resolution for two selected items.
MARKERS & Markers()
Definition: board.h:316
void UpdateRatsnestExclusions()
Update the visibility flags on the current unconnected ratsnest lines.
Definition: board.cpp:266
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:424
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:118
DRC_RULE * GetViolatingRule() const
Definition: drc_item.h:128
bool m_Implicit
Definition: drc_rule.h:110
wxString m_Name
Definition: drc_rule.h:112
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
Definition: pcb_view.cpp:75
std::shared_ptr< RC_ITEM > GetRCItem() const
Definition: marker_base.h:105
void RedrawRatsnest()
Return the bounding box of the view that should be used if model is not valid.
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
Master controller class:
Definition: tool_manager.h:55
@ DRCE_HOLE_CLEARANCE
Definition: drc_item.h:53
@ DRCE_VIA_DIAMETER
Definition: drc_item.h:58
@ DRCE_UNCONNECTED_ITEMS
Definition: drc_item.h:39
@ DRCE_TRACK_WIDTH
Definition: drc_item.h:54
@ DRCE_DRILL_OUT_OF_RANGE
Definition: drc_item.h:57
@ DRCE_EDGE_CLEARANCE
Definition: drc_item.h:45
@ DRCE_CLEARANCE
Definition: drc_item.h:43
@ DRCE_DRILLED_HOLES_TOO_CLOSE
Definition: drc_item.h:51
@ DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG
Definition: drc_item.h:99
@ DRCE_MICROVIA_DRILL_OUT_OF_RANGE
Definition: drc_item.h:60
@ DRCE_TEXT_HEIGHT
Definition: drc_item.h:91
@ DRCE_TEXT_THICKNESS
Definition: drc_item.h:92
@ DRCE_CONNECTION_WIDTH
Definition: drc_item.h:56
@ DRCE_ANNULAR_WIDTH
Definition: drc_item.h:55
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
@ RPT_SEVERITY_IGNORE

References _, bds(), DRCE_ANNULAR_WIDTH, DRCE_CLEARANCE, DRCE_CONNECTION_WIDTH, DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG, DRCE_DRILL_OUT_OF_RANGE, DRCE_DRILLED_HOLES_TOO_CLOSE, DRCE_EDGE_CLEARANCE, DRCE_HOLE_CLEARANCE, DRCE_MICROVIA_DRILL_OUT_OF_RANGE, DRCE_TEXT_HEIGHT, DRCE_TEXT_THICKNESS, DRCE_TRACK_WIDTH, DRCE_UNCONNECTED_ITEMS, DRCE_VIA_DIAMETER, Format(), PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetCanvas(), BOARD::GetConnectivity(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), PCB_DRAW_PANEL_GAL::GetView(), DRC_ITEM::GetViolatingRule(), BOARD_INSPECTION_TOOL::InspectDRCError(), m_currentBoard, BOARD_DESIGN_SETTINGS::m_DRCSeverities, m_frame, DIALOG_DRC_BASE::m_ignoredList, DRC_RULE::m_Implicit, m_markersProvider, DRC_RULE::m_Name, RC_TREE_NODE::m_RcItem, m_severities, BOARD::Markers(), PCB_EDIT_FRAME::OnModify(), PCB_DRAW_PANEL_GAL::RedrawRatsnest(), 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(), updateDisplayedCounts(), and BOARD::UpdateRatsnestExclusions().

◆ OnDRCItemSelected()

void DIALOG_DRC::OnDRCItemSelected ( wxDataViewEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 345 of file dialog_drc.cpp.

346{
347 BOARD* board = m_frame->GetBoard();
348 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
349
350 auto getActiveLayers =
351 []( BOARD_ITEM* aItem ) -> LSET
352 {
353 if( aItem->Type() == PCB_PAD_T )
354 {
355 PAD* pad = static_cast<PAD*>( aItem );
356 LSET layers;
357
358 for( int layer : aItem->GetLayerSet().Seq() )
359 {
360 if( pad->FlashLayer( layer ) )
361 layers.set( layer );
362 }
363
364 return layers;
365 }
366 else
367 {
368 return aItem->GetLayerSet();
369 }
370 };
371
372 if( !node )
373 {
374 // list is being freed; don't do anything with null ptrs
375
376 aEvent.Skip();
377 return;
378 }
379
381 {
382 // we already came from a cross-probe of the marker in the document; don't go
383 // around in circles
384
385 aEvent.Skip();
386 return;
387 }
388
389 std::shared_ptr<RC_ITEM> rc_item = node->m_RcItem;
390
391 if( rc_item->GetErrorCode() == DRCE_UNRESOLVED_VARIABLE
392 && rc_item->GetParent()->GetMarkerType() == MARKER_BASE::MARKER_DRAWING_SHEET )
393 {
394 m_frame->FocusOnLocation( node->m_RcItem->GetParent()->GetPos() );
395
396 aEvent.Skip();
397 return;
398 }
399
400 const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
401 BOARD_ITEM* item = board->GetItem( itemID );
402
403 if( !item || item == DELETED_BOARD_ITEM::GetInstance() )
404 {
405 // nothing to highlight / focus on
406
407 aEvent.Skip();
408 return;
409 }
410
411 PCB_LAYER_ID principalLayer;
412 LSET violationLayers;
413 BOARD_ITEM* a = board->GetItem( rc_item->GetMainItemID() );
414 BOARD_ITEM* b = board->GetItem( rc_item->GetAuxItemID() );
415 BOARD_ITEM* c = board->GetItem( rc_item->GetAuxItem2ID() );
416 BOARD_ITEM* d = board->GetItem( rc_item->GetAuxItem3ID() );
417
418 if( rc_item->GetErrorCode() == DRCE_MALFORMED_COURTYARD )
419 {
420 if( a && ( a->GetFlags() & MALFORMED_B_COURTYARD ) > 0
421 && ( a->GetFlags() & MALFORMED_F_COURTYARD ) == 0 )
422 {
423 principalLayer = B_CrtYd;
424 }
425 else
426 {
427 principalLayer = F_CrtYd;
428 }
429 }
430 else if (rc_item->GetErrorCode() == DRCE_INVALID_OUTLINE )
431 {
432 principalLayer = Edge_Cuts;
433 }
434 else
435 {
436 principalLayer = UNDEFINED_LAYER;
437
438 if( a || b || c || d )
439 violationLayers = LSET::AllLayersMask();
440
441 // Try to initialize principalLayer to a valid layer. Note that some markers have
442 // a layer set to UNDEFINED_LAYER, so we may need to keep looking.
443
444 for( BOARD_ITEM* it: { a, b, c, d } )
445 {
446 if( !it )
447 continue;
448
449 LSET layersList = getActiveLayers( it );
450 violationLayers &= layersList;
451
452 if( principalLayer <= UNDEFINED_LAYER && layersList.count() )
453 principalLayer = layersList.Seq().front();
454 }
455 }
456
457 if( violationLayers.count() )
458 principalLayer = violationLayers.Seq().front();
459 else if( !(principalLayer <= UNDEFINED_LAYER ) )
460 violationLayers.set( principalLayer );
461
462 WINDOW_THAWER thawer( m_frame );
463
464 if( principalLayer > UNDEFINED_LAYER && ( violationLayers & board->GetVisibleLayers() ) == 0 )
465 m_frame->GetAppearancePanel()->SetLayerVisible( principalLayer, true );
466
467 if( principalLayer > UNDEFINED_LAYER && board->GetVisibleLayers().test( principalLayer ) )
468 m_frame->SetActiveLayer( principalLayer );
469
470 if( rc_item->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
471 {
474
475 if( item->Type() == PCB_ZONE_T )
476 {
477 m_frame->GetBoard()->GetConnectivity()->RunOnUnconnectedEdges(
478 [&]( CN_EDGE& edge )
479 {
480 if( edge.GetSourceNode()->Parent() == a
481 && edge.GetTargetNode()->Parent() == b )
482 {
483 if( item == a )
484 m_frame->FocusOnLocation( edge.GetSourcePos() );
485 else
486 m_frame->FocusOnLocation( edge.GetTargetPos() );
487
488 return false;
489 }
490
491 return true;
492 } );
493 }
494 else
495 {
496 m_frame->FocusOnItem( item, principalLayer );
497 }
498 }
499 else if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG )
500 {
501 BOARD_CONNECTED_ITEM* track = dynamic_cast<PCB_TRACK*>( item );
502 std::vector<BOARD_ITEM*> items;
503
504 if( track )
505 {
506 int net = track->GetNetCode();
507
508 wxASSERT( net > 0 ); // Without a net how can it be a diff-pair?
509
510 for( const KIID& id : rc_item->GetIDs() )
511 {
512 auto* candidate = dynamic_cast<BOARD_CONNECTED_ITEM*>( board->GetItem( id ) );
513
514 if( candidate && candidate->GetNetCode() == net )
515 items.push_back( candidate );
516 }
517 }
518 else
519 {
520 items.push_back( item );
521 }
522
523 m_frame->FocusOnItems( items, principalLayer );
524 }
525 else
526 {
527 m_frame->FocusOnItem( item, principalLayer );
528 }
529
530 aEvent.Skip();
531}
void SetLayerVisible(int aLayer, bool isVisible)
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:58
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
Definition: board.cpp:579
BOARD_ITEM * GetItem(const KIID &aID) const
Definition: board.cpp:997
CN_EDGE represents a point-to-point connection, whether realized or unrealized (ie: tracks etc.
std::shared_ptr< const CN_ANCHOR > GetSourceNode() const
std::shared_ptr< const CN_ANCHOR > GetTargetNode() const
static DELETED_BOARD_ITEM * GetInstance()
Definition: board_item.h:368
void FocusOnLocation(const VECTOR2I &aPos)
Useful to focus on a particular location, in find functions.
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
EDA_ITEM_FLAGS GetFlags() const
Definition: eda_item.h:142
Definition: kiid.h:48
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:530
static LSET AllLayersMask()
Definition: lset.cpp:808
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
Definition: pad.h:59
DISPLAY_OPTIONS m_Display
static TOOL_ACTION showRatsnest
Definition: pcb_actions.h:275
APPEARANCE_CONTROLS * GetAppearancePanel()
void FocusOnItems(std::vector< BOARD_ITEM * > aItems, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
void SetActiveLayer(PCB_LAYER_ID aLayer) override
Change the currently active layer to aLayer and also update the APPEARANCE_CONTROLS.
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:149
@ DRCE_INVALID_OUTLINE
Definition: drc_item.h:68
@ DRCE_MALFORMED_COURTYARD
Definition: drc_item.h:63
@ DRCE_UNRESOLVED_VARIABLE
Definition: drc_item.h:81
#define MALFORMED_F_COURTYARD
#define MALFORMED_B_COURTYARD
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
@ F_CrtYd
Definition: layer_ids.h:117
@ Edge_Cuts
Definition: layer_ids.h:113
@ B_CrtYd
Definition: layer_ids.h:116
@ UNDEFINED_LAYER
Definition: layer_ids.h:60
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition: typeinfo.h:112
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition: typeinfo.h:87

References LSET::AllLayersMask(), B_CrtYd, DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG, DRCE_INVALID_OUTLINE, DRCE_MALFORMED_COURTYARD, DRCE_UNCONNECTED_ITEMS, DRCE_UNRESOLVED_VARIABLE, Edge_Cuts, F_CrtYd, PCB_BASE_FRAME::FocusOnItem(), PCB_BASE_FRAME::FocusOnItems(), EDA_DRAW_FRAME::FocusOnLocation(), PCB_BASE_EDIT_FRAME::GetAppearancePanel(), PCB_BASE_FRAME::GetBoard(), BOARD::GetConnectivity(), EDA_ITEM::GetFlags(), DELETED_BOARD_ITEM::GetInstance(), BOARD::GetItem(), BOARD_CONNECTED_ITEM::GetNetCode(), PCB_BASE_FRAME::GetPcbNewSettings(), CN_EDGE::GetSourceNode(), CN_EDGE::GetTargetNode(), TOOLS_HOLDER::GetToolManager(), BOARD::GetVisibleLayers(), m_centerMarkerOnIdle, PCBNEW_SETTINGS::m_Display, m_frame, RC_TREE_NODE::m_RcItem, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_ShowGlobalRatsnest, MALFORMED_B_COURTYARD, MALFORMED_F_COURTYARD, MARKER_BASE::MARKER_DRAWING_SHEET, pad, PCB_PAD_T, PCB_ZONE_T, TOOL_MANAGER::RunAction(), LSET::Seq(), PCB_EDIT_FRAME::SetActiveLayer(), APPEARANCE_CONTROLS::SetLayerVisible(), PCB_ACTIONS::showRatsnest, RC_TREE_MODEL::ToNode(), RC_TREE_MODEL::ToUUID(), EDA_ITEM::Type(), and UNDEFINED_LAYER.

◆ OnEditViolationSeverities()

void DIALOG_DRC::OnEditViolationSeverities ( wxHyperlinkEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 815 of file dialog_drc.cpp.

816{
817 m_frame->ShowBoardSetupDialog( _( "Violation Severity" ) );
818}

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

◆ OnErrorLinkClicked()

void DIALOG_DRC::OnErrorLinkClicked ( wxHtmlLinkEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 228 of file dialog_drc.cpp.

229{
230 m_frame->ShowBoardSetupDialog( _( "Custom Rules" ) );
231}

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

◆ OnGridEditorHidden()

void DIALOG_SHIM::OnGridEditorHidden ( wxGridEvent &  event)
privateinherited

Definition at line 641 of file dialog_shim.cpp.

642{
643 SetEscapeId( wxID_ANY );
644 event.Skip();
645}

◆ OnGridEditorShown()

void DIALOG_SHIM::OnGridEditorShown ( wxGridEvent &  event)
privateinherited

Definition at line 634 of file dialog_shim.cpp.

635{
636 SetEscapeId( wxID_NONE );
637 event.Skip();
638}

◆ OnModify()

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 386 of file dialog_shim.cpp.

387{
389 {
391
392 selectAllInTextCtrls( GetChildren() );
393
396 else
397 KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
398
399 m_firstPaintEvent = false;
400 }
401
402 event.Skip();
403}
bool m_firstPaintEvent
Definition: dialog_shim.h:212
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:213
static void selectAllInTextCtrls(wxWindowList &children)
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44

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

235{
236 TOOL_MANAGER* toolMgr = m_frame->GetToolManager();
237 DRC_TOOL* drcTool = toolMgr->GetTool<DRC_TOOL>();
238 ZONE_FILLER_TOOL* zoneFillerTool = toolMgr->GetTool<ZONE_FILLER_TOOL>();
239 bool refillZones = m_cbRefillZones->GetValue();
240 bool reportAllTrackErrors = m_cbReportAllTrackErrors->GetValue();
241 bool testFootprints = m_cbTestFootprints->GetValue();
242
243 if( zoneFillerTool->IsBusy() )
244 {
245 wxBell();
246 return;
247 }
248
249 // This is not the time to have stale or buggy rules. Ensure they're up-to-date
250 // and that they at least parse.
251 try
252 {
253 drcTool->GetDRCEngine()->InitEngine( m_frame->GetDesignRulesPath() );
254 }
255 catch( PARSE_ERROR& )
256 {
257 m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
258 m_DeleteCurrentMarkerButton->Enable( false );
259 m_DeleteAllMarkersButton->Enable( false );
260 m_saveReport->Enable( false );
261
262 m_messages->Clear();
263 m_messages->Report( _( "DRC incomplete: could not compile custom design rules. " )
264 + wxT( "<a href='boardsetup'>" )
265 + _( "Show design rules." )
266 + wxT( "</a>" ) );
267 m_messages->Flush();
268
269 Raise();
270 return;
271 }
272
273 m_footprintTestsRun = false;
274 m_cancelled = false;
275
277 deleteAllMarkers( true );
278
279 std::vector<std::reference_wrapper<RC_ITEM>> violations = DRC_ITEM::GetItemsWithSeverities();
280 m_ignoredList->DeleteAllItems();
281
282 for( std::reference_wrapper<RC_ITEM>& item : violations )
283 {
284 if( bds().GetSeverity( item.get().GetErrorCode() ) == RPT_SEVERITY_IGNORE )
285 {
286 m_ignoredList->InsertItem( m_ignoredList->GetItemCount(),
287 wxT( " • " ) + item.get().GetErrorText() );
288 }
289 }
290
291 Raise();
292
293 m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
294 m_messages->Clear();
295 wxYield(); // Allow time slice to refresh Messages
296
297 m_running = true;
298 m_sdbSizerCancel->SetLabel( _( "Cancel" ) );
299 m_sdbSizerOK->Enable( false );
300 m_DeleteCurrentMarkerButton->Enable( false );
301 m_DeleteAllMarkersButton->Enable( false );
302 m_saveReport->Enable( false );
303
304 {
305 wxBusyCursor dummy;
306 drcTool->RunTests( this, refillZones, reportAllTrackErrors, testFootprints );
307 }
308
309 if( m_cancelled )
310 m_messages->Report( _( "-------- DRC cancelled by user.<br><br>" ) );
311 else
312 m_messages->Report( _( "Done.<br><br>" ) );
313
314 Raise();
315 wxYield(); // Allow time slice to refresh Messages
316
317 m_running = false;
318 m_sdbSizerCancel->SetLabel( _( "Close" ) );
319 m_sdbSizerOK->Enable( true );
320 m_DeleteCurrentMarkerButton->Enable( true );
321 m_DeleteAllMarkersButton->Enable( true );
322 m_saveReport->Enable( true );
323
324 if( !m_cancelled )
325 {
326 wxMilliSleep( 500 );
327 m_runningResultsBook->ChangeSelection( 1 );
329 }
330
332}
wxButton * m_DeleteAllMarkersButton
wxSimplebook * m_runningResultsBook
wxButton * m_DeleteCurrentMarkerButton
wxButton * m_sdbSizerCancel
wxButton * m_saveReport
wxButton * m_sdbSizerOK
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
Definition: drc_item.h:122
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:131
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
void Clear()
Delete the stored messages.
void Flush()
Build the HTML messages page.
Handle actions specific to filling copper zones.
A filename or source description, a problem input line, a line number, a byte offset,...
Definition: ki_exception.h:119

References _, bds(), WX_HTML_REPORT_BOX::Clear(), deleteAllMarkers(), dummy, WX_HTML_REPORT_BOX::Flush(), KIPLATFORM::UI::ForceFocus(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DRC_TOOL::GetDRCEngine(), DRC_ITEM::GetItemsWithSeverities(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), PROGRESS_REPORTER_BASE::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_footprintTestsRun, m_frame, DIALOG_DRC_BASE::m_ignoredList, 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, PCB_EDIT_FRAME::RecordDRCExclusions(), refreshEditor(), WX_HTML_REPORT_BOX::Report(), RPT_SEVERITY_IGNORE, and DRC_TOOL::RunTests().

◆ OnSaveReport()

void DIALOG_DRC::OnSaveReport ( wxCommandEvent &  aEvent)
overrideprivatevirtual

Reimplemented from DIALOG_DRC_BASE.

Definition at line 846 of file dialog_drc.cpp.

847{
848 wxFileName fn( "DRC." + ReportFileExtension );
849
850 wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
851 ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
852
853 if( dlg.ShowModal() != wxID_OK )
854 return;
855
856 fn = dlg.GetPath();
857
858 if( fn.GetExt().IsEmpty() )
859 fn.SetExt( ReportFileExtension );
860
861 if( !fn.IsAbsolute() )
862 {
863 wxString prj_path = Prj().GetProjectPath();
864 fn.MakeAbsolute( prj_path );
865 }
866
867 if( writeReport( fn.GetFullPath() ) )
868 {
869 m_messages->Report( wxString::Format( _( "Report file '%s' created<br>" ),
870 fn.GetFullPath() ) );
871 }
872 else
873 {
874 DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ),
875 fn.GetFullPath() ) );
876 }
877}
bool writeReport(const wxString &aFullFileName)
Function writeReport outputs the MARKER items with commentary to an open text file.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
virtual const wxString GetProjectPath() const
Return the full path of the project.
Definition: project.cpp:126
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:300
const std::string ReportFileExtension
wxString ReportFileWildcard()

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

822{
823 int flag = 0;
824
825 if( aEvent.GetEventObject() == m_showAll )
827 else if( aEvent.GetEventObject() == m_showErrors )
829 else if( aEvent.GetEventObject() == m_showWarnings )
831 else if( aEvent.GetEventObject() == m_showExclusions )
833
834 if( aEvent.IsChecked() )
836 else if( aEvent.GetEventObject() == m_showAll )
838 else
839 m_severities &= ~flag;
840
842 UpdateData();
843}
wxCheckBox * m_showAll
wxCheckBox * m_showExclusions
wxCheckBox * m_showErrors
wxCheckBox * m_showWarnings
void UpdateData()
Rebuild the contents of the violation tabs based on the current markers and severties.
Definition: dialog_drc.cpp:335
static int RPT_SEVERITY_ALL
Definition: dialog_drc.cpp:216

References flag, m_severities, DIALOG_DRC_BASE::m_showAll, DIALOG_DRC_BASE::m_showErrors, DIALOG_DRC_BASE::m_showExclusions, DIALOG_DRC_BASE::m_showWarnings, RPT_SEVERITY_ALL, RPT_SEVERITY_ERROR, RPT_SEVERITY_EXCLUSION, RPT_SEVERITY_WARNING, syncCheckboxes(), and UpdateData().

◆ PrevMarker()

void DIALOG_DRC::PrevMarker ( )

Definition at line 930 of file dialog_drc.cpp.

931{
932 if( m_Notebook->IsShown() )
933 {
934 switch( m_Notebook->GetSelection() )
935 {
936 case 0: m_markersTreeModel->PrevMarker(); break;
937 case 1: m_unconnectedTreeModel->PrevMarker(); break;
938 case 2: m_fpWarningsTreeModel->PrevMarker(); break;
939 case 3: break;
940 }
941 }
942}
void PrevMarker()
Definition: rc_item.cpp:558

References m_fpWarningsTreeModel, 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:192

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

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_LIBRARY_MANAGER::addLibrary(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), PCB_BASE_FRAME::canCloseWindow(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), SYMBOL_VIEWER_FRAME::ClickOnLibList(), KICAD_MANAGER_FRAME::CloseProject(), 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_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), 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_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), 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(), SCH_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), 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(), 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(), PCB_EDIT_FRAME::GetLastPath(), 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_NAVIGATE_TOOL::HypertextCommand(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FIELDS_GRID_TABLE< T >::initGrid(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SYMBOL_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), SYMBOL_VIEWER_FRAME::loadAllLibraries(), PCB_BASE_FRAME::loadFootprint(), CVPCB_MAINFRAME::LoadFootprintFiles(), PCB_EDIT_FRAME::LoadFootprints(), SCH_EDIT_FRAME::LoadProject(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbol(), 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(), PCB_EDIT_FRAME::onBoardLoaded(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles(), WX_HTML_REPORT_PANEL::onBtnSaveToFile(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_SYMBOL_FIELDS_TABLE::OnExport(), 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(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::onPageChanged(), DIALOG_BOARD_SETUP::onPageChanged(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), OnSaveReport(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_TEXT_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), DIALOG_PAGES_SETTINGS::OnWksFileSelection(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_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(), SYMBOL_EDITOR_CONTROL::PinLibrary(), FOOTPRINT_EDITOR_CONTROL::PinLibrary(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::readNetListAndFpFiles(), APPEARANCE_CONTROLS::rebuildNets(), 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(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), PCB_EDIT_FRAME::RunEeschema(), 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(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), EDA_BASE_FRAME::SaveSettings(), SIM_PLOT_FRAME::SaveSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SCH_BASE_FRAME::SelectSymLibTable(), PCB_EDIT_FRAME::SetBoard(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::SetLastPath(), GERBVIEW_FRAME::SetPageSettings(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SYMBOL_VIEWER_FRAME::ShowModal(), APPEARANCE_CONTROLS::showNetclass(), SYMBOL_LIBRARY_MANAGER::symTable(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PCB_EDIT_FRAME::TestStandalone(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), DIALOG_EXPORT_NETLIST::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), DIALOG_ASSIGN_NETCLASS::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SYMBOL_EDITOR_CONTROL::UnpinLibrary(), FOOTPRINT_EDITOR_CONTROL::UnpinLibrary(), LIB_TREE_MODEL_ADAPTER::UnpinLibrary(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), SCH_EDIT_FRAME::updateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), SIM_PLOT_FRAME::UpdateTunerValue(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME(), 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 922 of file dialog_drc.cpp.

923{
924 WINDOW_THAWER thawer( m_frame );
925
927}
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...

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, and STATUS_TEXT_REPORTER.

Definition at line 64 of file progress_reporter_base.cpp.

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

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

Referenced by PROGRESS_REPORTER_BASE::AdvancePhase(), 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 293 of file dialog_shim.cpp.

294{
295 const char* hash_key;
296
297 if( m_hash_key.size() )
298 {
299 // a special case like EDA_LIST_DIALOG, which has multiple uses.
300 hash_key = m_hash_key.c_str();
301 }
302 else
303 {
304 hash_key = typeid(*this).name();
305 }
306
307 std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
308
309 if( it == class_map.end() )
310 return;
311
312 wxRect rect = it->second;
313 rect.SetSize( wxSize( 0, 0 ) );
314 class_map[ hash_key ] = rect;
315}
std::string m_hash_key
Definition: dialog_shim.h:203
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 960 of file dialog_drc.cpp.

961{
962 if( m_Notebook->IsShown() )
963 {
964 m_Notebook->SetSelection( 0 );
966
967 // wxWidgets on some platforms fails to correctly ensure that a selected item is
968 // visible, so we have to do it in a separate idle event.
969 m_centerMarkerOnIdle = aMarker;
970 Bind( wxEVT_IDLE, &DIALOG_DRC::centerMarkerIdleHandler, this );
971 }
972}
void SelectMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:607

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, and CONSOLE_PROGRESS_REPORTER.

Definition at line 79 of file progress_reporter_base.cpp.

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

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

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

◆ SetDrcRun()

void DIALOG_DRC::SetDrcRun ( )
inline

Called after running DRC.

It's main function is prevent showing potentially-false-0 counts before DRC has been run.

Definition at line 55 of file dialog_drc.h.

55{ m_drcRun = true; }

Referenced by DRC_TOOL::RunTests().

◆ SetFootprintTestsRun()

void DIALOG_DRC::SetFootprintTestsRun ( )
inline

Called after running Footprint Tests.

It's main function is to update the Footprint Warnings tab title.

Definition at line 61 of file dialog_drc.h.

61{ m_footprintTestsRun = true; }

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 }

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), 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_GET_FOOTPRINT_BY_NAME::DIALOG_GET_FOOTPRINT_BY_NAME(), 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_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), 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_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_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(), DIALOG_COPPER_ZONE::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::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}
const char * name
Definition: DXF_plotter.cpp:56

References ignore_unused(), KIWAY_HOLDER::m_kiway, and name.

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

◆ 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 73 of file progress_reporter_base.cpp.

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

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 92 of file progress_reporter_base.cpp.

93{
94 m_numPhases = aNumPhases;
95}

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

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

169{
170 wxSize sz( x, y );
171 SetSize( ConvertDialogToPixels( sz ) );
172}

Referenced by 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, and STATUS_TEXT_REPORTER.

Definition at line 106 of file progress_reporter_base.h.

106{ }

◆ SetupStandardButtons()

void DIALOG_SHIM::SetupStandardButtons ( std::map< int, wxString >  aLabels = {})
inherited

Definition at line 708 of file dialog_shim.cpp.

709{
710 recursiveDescent( GetSizer(), aLabels );
711}
static void recursiveDescent(wxSizer *aSizer, std::map< int, wxString > &aLabels)

References recursiveDescent().

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOM::DIALOG_BOM(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CLEANUP_GRAPHICS::DIALOG_CLEANUP_GRAPHICS(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY(), DIALOG_DIELECTRIC_MATERIAL::DIALOG_DIELECTRIC_MATERIAL(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_NETLIST::DIALOG_EXPORT_NETLIST(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION(), 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_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_GENDRILL::DIALOG_GENDRILL(), DIALOG_GET_FOOTPRINT_BY_NAME::DIALOG_GET_FOOTPRINT_BY_NAME(), DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION(), 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_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), 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_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), 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_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PCM::DIALOG_PCM(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS(), DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS(), 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_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_COMMAND::DIALOG_SIM_COMMAND(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_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_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), EDA_LIST_DIALOG::EDA_LIST_DIALOG(), EDA_REORDERABLE_LIST_DIALOG::EDA_REORDERABLE_LIST_DIALOG(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG_ADD_GENERATOR::NETLIST_DIALOG_ADD_GENERATOR(), PAGED_DIALOG::PAGED_DIALOG(), DIALOG_CLEANUP_TRACKS_AND_VIAS::setupOKButtonLabel(), WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG(), and WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 225 of file dialog_shim.cpp.

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

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

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), FOOTPRINT_EDITOR_CONTROL::CrossProbe(), EE_INSPECTION_TOOL::CrossProbe(), 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(), DIALOG_PAD_PROPERTIES::Show(), EDA_VIEW_SWITCHER::Show(), EDA_LIST_DIALOG::Show(), DIALOG_FIND::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), and DIALOG_POSITION_RELATIVE::UpdateAnchor().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 436 of file dialog_shim.cpp.

437{
438 // This is an exception safe way to zero a pointer before returning.
439 // Yes, even though DismissModal() clears this first normally, this is
440 // here in case there's an exception before the dialog is dismissed.
441 struct NULLER
442 {
443 void*& m_what;
444 NULLER( void*& aPtr ) : m_what( aPtr ) {}
445 ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
446 } clear_this( (void*&) m_qmodal_loop );
447
448 // release the mouse if it's currently captured as the window having it
449 // will be disabled when this dialog is shown -- but will still keep the
450 // capture making it impossible to do anything in the modal dialog itself
451 wxWindow* win = wxWindow::GetCapture();
452 if( win )
453 win->ReleaseMouse();
454
455 // Get the optimal parent
456 wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
457
458 wxASSERT_MSG( !m_qmodal_parent_disabler, wxT( "Caller using ShowQuasiModal() twice on same "
459 "window?" ) );
460
461 // quasi-modal: disable only my "optimal" parent
463
464 // Apple in its infinite wisdom will raise a disabled window before even passing
465 // us the event, so we have no way to stop it. Instead, we must set an order on
466 // the windows so that the quasi-modal will be pushed in front of the disabled
467 // window when it is raised.
469
470 Show( true );
471
472 m_qmodal_showing = true;
473
474 WX_EVENT_LOOP event_loop;
475
476 m_qmodal_loop = &event_loop;
477
478 event_loop.Run();
479
480 m_qmodal_showing = false;
481
482 return GetReturnCode();
483}
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:46
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
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(), MICROWAVE_TOOL::createFootprint(), PCB::IFACE::CreateKiWindow(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), 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(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), 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::ShowExchangeFootprintsDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), PCB_BASE_EDIT_FRAME::ShowTextBoxPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog(), and PCB_EDIT_FRAME::ToPlotter().

◆ syncCheckboxes()

◆ UpdateData()

◆ updateDisplayedCounts()

void DIALOG_DRC::updateDisplayedCounts ( )
private

Definition at line 1152 of file dialog_drc.cpp.

1153{
1156 DRC_ENGINE* drcEngine = drcTool->GetDRCEngine().get();
1157
1158 // Collect counts:
1159
1160 int numMarkers = 0;
1161 int numUnconnected = 0;
1162 int numFootprints = 0;
1163
1164 int numErrors = 0;
1165 int numWarnings = 0;
1166 int numExcluded = 0;
1167
1168 if( m_markersProvider )
1169 {
1170 numMarkers += m_markersProvider->GetCount();
1171 numErrors += m_markersProvider->GetCount( RPT_SEVERITY_ERROR );
1172 numWarnings += m_markersProvider->GetCount( RPT_SEVERITY_WARNING );
1173 numExcluded += m_markersProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1174 }
1175
1176 if( m_ratsnestProvider )
1177 {
1178 numUnconnected += m_ratsnestProvider->GetCount();
1179 numErrors += m_ratsnestProvider->GetCount( RPT_SEVERITY_ERROR );
1180 numWarnings += m_ratsnestProvider->GetCount( RPT_SEVERITY_WARNING );
1181 numExcluded += m_ratsnestProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1182 }
1183
1185 {
1186 numFootprints += m_fpWarningsProvider->GetCount();
1187 numErrors += m_fpWarningsProvider->GetCount( RPT_SEVERITY_ERROR );
1188 numWarnings += m_fpWarningsProvider->GetCount( RPT_SEVERITY_WARNING );
1189 numExcluded += m_fpWarningsProvider->GetCount( RPT_SEVERITY_EXCLUSION );
1190 }
1191
1192 bool showErrors = m_showErrors->GetValue();
1193 bool showWarnings = m_showWarnings->GetValue();
1194 bool errorsOverflowed = false;
1195 bool warningsOverflowed = false;
1196 bool markersOverflowed = false;
1197 bool unconnectedOverflowed = false;
1198 bool footprintsOverflowed = false;
1199
1200 for( int ii = DRCE_FIRST; ii < DRCE_LAST; ++ii )
1201 {
1202 if( drcEngine->IsErrorLimitExceeded( ii ) )
1203 {
1204 if( bds.GetSeverity( ii ) == RPT_SEVERITY_ERROR )
1205 errorsOverflowed = true;
1206 else if( bds.GetSeverity( ii ) == RPT_SEVERITY_WARNING )
1207 warningsOverflowed = true;
1208
1209 if( ii == DRCE_UNCONNECTED_ITEMS )
1210 {
1211 if( showWarnings && bds.GetSeverity( ii ) == RPT_SEVERITY_WARNING )
1212 unconnectedOverflowed = true;
1213 else if( showErrors && bds.GetSeverity( ii ) == RPT_SEVERITY_ERROR )
1214 unconnectedOverflowed = true;
1215 }
1216 else if( ii == DRCE_MISSING_FOOTPRINT
1218 || ii == DRCE_EXTRA_FOOTPRINT
1219 || ii == DRCE_NET_CONFLICT )
1220 {
1221 if( showWarnings && bds.GetSeverity( ii ) == RPT_SEVERITY_WARNING )
1222 footprintsOverflowed = true;
1223 else if( showErrors && bds.GetSeverity( ii ) == RPT_SEVERITY_ERROR )
1224 footprintsOverflowed = true;
1225 }
1226 else
1227 {
1228 if( showWarnings && bds.GetSeverity( ii ) == RPT_SEVERITY_WARNING )
1229 markersOverflowed = true;
1230 else if( showErrors && bds.GetSeverity( ii ) == RPT_SEVERITY_ERROR )
1231 markersOverflowed = true;
1232 }
1233 }
1234 }
1235
1236 wxString msg;
1237 wxString num;
1238
1239 // Update tab headers:
1240
1241 if( m_drcRun )
1242 {
1243 num.Printf( markersOverflowed ? wxT( "%d+" ) : wxT( "%d" ), numMarkers );
1244 msg.Printf( m_markersTitleTemplate, num );
1245 }
1246 else
1247 {
1249 msg.Replace( wxT( "(%s)" ), wxEmptyString );
1250 }
1251
1252 m_Notebook->SetPageText( 0, msg );
1253
1254 if( m_drcRun )
1255 {
1256 num.Printf( unconnectedOverflowed ? wxT( "%d+" ) : wxT( "%d" ), numUnconnected );
1257 msg.sprintf( m_unconnectedTitleTemplate, num );
1258 }
1259 else
1260 {
1262 msg.Replace( wxT( "(%s)" ), wxEmptyString );
1263 }
1264
1265 m_Notebook->SetPageText( 1, msg );
1266
1268 {
1269 num.Printf( footprintsOverflowed ? wxT( "%d+" ) : wxT( "%d" ), numFootprints );
1270 msg.sprintf( m_footprintsTitleTemplate, num );
1271 }
1272 else if( m_drcRun )
1273 {
1275 msg.Replace( wxT( "%s" ), _( "not run" ) );
1276 }
1277 else
1278 {
1280 msg.Replace( wxT( "(%s)" ), wxEmptyString );
1281 }
1282
1283 m_Notebook->SetPageText( 2, msg );
1284
1285 if( m_drcRun )
1286 {
1287 num.Printf( wxT( "%d" ), m_ignoredList->GetItemCount() );
1288 msg.sprintf( m_ignoredTitleTemplate, num );
1289 }
1290 else
1291 {
1293 msg.Replace( wxT( "(%s)" ), wxEmptyString );
1294 }
1295
1296 m_Notebook->SetPageText( 3, msg );
1297
1298 // Update badges:
1299
1300 if( !m_drcRun && numErrors == 0 )
1301 numErrors = -1;
1302
1303 if( !m_drcRun && numWarnings == 0 )
1304 numWarnings = -1;
1305
1306 m_errorsBadge->SetMaximumNumber( numErrors );
1307 m_errorsBadge->UpdateNumber( errorsOverflowed ? numErrors + 1 : numErrors,
1309
1310 m_warningsBadge->SetMaximumNumber( numWarnings );
1311 m_warningsBadge->UpdateNumber( warningsOverflowed ? numWarnings + 1 : numWarnings,
1313
1314 m_exclusionsBadge->SetMaximumNumber( numExcluded );
1316}
Container for design settings for a BOARD object.
SEVERITY GetSeverity(int aDRCErrorCode)
NUMBER_BADGE * m_warningsBadge
NUMBER_BADGE * m_exclusionsBadge
NUMBER_BADGE * m_errorsBadge
Design Rule Checker object that performs all the DRC tests.
Definition: drc_engine.h:83
void SetMaximumNumber(int aMax)
Set the maximum number to be shown on the badge.
void UpdateNumber(int aNumber, SEVERITY aSeverity)
Update the number displayed on the badge.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
@ DRCE_FIRST
Definition: drc_item.h:38
@ DRCE_DUPLICATE_FOOTPRINT
Definition: drc_item.h:71
@ DRCE_EXTRA_FOOTPRINT
Definition: drc_item.h:72
@ DRCE_LAST
Definition: drc_item.h:101
@ DRCE_NET_CONFLICT
Definition: drc_item.h:73
@ DRCE_MISSING_FOOTPRINT
Definition: drc_item.h:70

References _, bds(), DRCE_DUPLICATE_FOOTPRINT, DRCE_EXTRA_FOOTPRINT, DRCE_FIRST, DRCE_LAST, DRCE_MISSING_FOOTPRINT, DRCE_NET_CONFLICT, DRCE_UNCONNECTED_ITEMS, PCB_BASE_FRAME::GetDesignSettings(), DRC_TOOL::GetDRCEngine(), BOARD_DESIGN_SETTINGS::GetSeverity(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), m_drcRun, DIALOG_DRC_BASE::m_errorsBadge, DIALOG_DRC_BASE::m_exclusionsBadge, m_footprintsTitleTemplate, m_footprintTestsRun, m_fpWarningsProvider, m_frame, DIALOG_DRC_BASE::m_ignoredList, m_ignoredTitleTemplate, m_markersProvider, m_markersTitleTemplate, DIALOG_DRC_BASE::m_Notebook, m_ratsnestProvider, DIALOG_DRC_BASE::m_showErrors, DIALOG_DRC_BASE::m_showWarnings, 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(), and UpdateData().

◆ updateUI()

bool DIALOG_DRC::updateUI ( )
overrideprivatevirtual

Implements PROGRESS_REPORTER_BASE.

Definition at line 194 of file dialog_drc.cpp.

195{
196 double cur = (double) m_progress.load() / m_maxProgress;
197 cur = std::max( 0.0, std::min( cur, 1.0 ) );
198
199 m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
200 wxSafeYield( this );
201
202 return !m_cancelled;
203}
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:85

References KiROUND(), PROGRESS_REPORTER_BASE::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 182 of file dialog_shim.cpp.

183{
184 wxSize sz( 0, y );
185 return ConvertDialogToPixels( sz ).y;
186}

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ writeReport()

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

Function writeReport outputs the MARKER 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 1022 of file dialog_drc.cpp.

1023{
1024 FILE* fp = wxFopen( aFullFileName, wxT( "w" ) );
1025
1026 if( fp == nullptr )
1027 return false;
1028
1029 std::map<KIID, EDA_ITEM*> itemMap;
1030 m_frame->GetBoard()->FillItemMap( itemMap );
1031
1033 UNITS_PROVIDER unitsProvider( pcbIUScale, GetUserUnits() );
1034 int count;
1035
1036 fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_frame->GetBoard()->GetFileName() ) );
1037
1038 wxDateTime now = wxDateTime::Now();
1039
1040 fprintf( fp, "** Created on %s **\n", TO_UTF8( now.Format( wxT( "%F %T" ) ) ) );
1041
1042 count = m_markersProvider->GetCount();
1043
1044 fprintf( fp, "\n** Found %d DRC violations **\n", count );
1045
1046 for( int i = 0; i < count; ++i )
1047 {
1048 const std::shared_ptr<RC_ITEM>& item = m_markersProvider->GetItem( i );
1049 SEVERITY severity = item->GetParent()->GetSeverity();
1050
1051 if( severity == RPT_SEVERITY_EXCLUSION )
1052 severity = bds.GetSeverity( item->GetErrorCode() );
1053
1054 fprintf( fp, "%s", TO_UTF8( item->ShowReport( &unitsProvider, severity, itemMap ) ) );
1055 }
1056
1057 count = m_ratsnestProvider->GetCount();
1058
1059 fprintf( fp, "\n** Found %d unconnected pads **\n", count );
1060
1061 for( int i = 0; i < count; ++i )
1062 {
1063 const std::shared_ptr<RC_ITEM>& item = m_ratsnestProvider->GetItem( i );
1064 SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
1065
1066 fprintf( fp, "%s", TO_UTF8( item->ShowReport( &unitsProvider, severity, itemMap ) ) );
1067 }
1068
1069 count = m_fpWarningsProvider->GetCount();
1070
1071 fprintf( fp, "\n** Found %d Footprint errors **\n", count );
1072
1073 for( int i = 0; i < count; ++i )
1074 {
1075 const std::shared_ptr<RC_ITEM>& item = m_fpWarningsProvider->GetItem( i );
1076 SEVERITY severity = bds.GetSeverity( item->GetErrorCode() );
1077
1078 fprintf( fp, "%s", TO_UTF8( item->ShowReport( &unitsProvider, severity, itemMap ) ) );
1079 }
1080
1081
1082 fprintf( fp, "\n** End of Report **\n" );
1083
1084 fclose( fp );
1085
1086 return true;
1087}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
const wxString & GetFileName() const
Definition: board.h:302
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Definition: board.cpp:1076
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:121
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:96
SEVERITY

References bds(), BOARD::FillItemMap(), PCB_BASE_FRAME::GetBoard(), BOARD::GetDesignSettings(), BOARD::GetFileName(), BOARD_DESIGN_SETTINGS::GetSeverity(), DIALOG_SHIM::GetUserUnits(), m_fpWarningsProvider, m_frame, m_markersProvider, m_ratsnestProvider, pcbIUScale, RPT_SEVERITY_EXCLUSION, and TO_UTF8.

Referenced by OnSaveReport().

Member Data Documentation

◆ m_cancelled

◆ 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 139 of file dialog_drc.h.

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

◆ m_currentBoard

BOARD* DIALOG_DRC::m_currentBoard
private

Definition at line 120 of file dialog_drc.h.

Referenced by DIALOG_DRC(), OnActivateDlg(), OnDRCItemRClick(), and ~DIALOG_DRC().

◆ 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 123 of file dialog_drc.h.

Referenced by DIALOG_DRC(), updateDisplayedCounts(), and ~DIALOG_DRC().

◆ m_errorsBadge

NUMBER_BADGE* DIALOG_DRC_BASE::m_errorsBadge
protectedinherited

Definition at line 74 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 78 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 212 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 128 of file dialog_drc.h.

Referenced by DIALOG_DRC(), and updateDisplayedCounts().

◆ m_footprintTestsRun

bool DIALOG_DRC::m_footprintTestsRun
private

Definition at line 124 of file dialog_drc.h.

Referenced by DIALOG_DRC(), OnRunDRCClick(), updateDisplayedCounts(), and ~DIALOG_DRC().

◆ m_fpWarningsProvider

std::shared_ptr<RC_ITEMS_PROVIDER> DIALOG_DRC::m_fpWarningsProvider
private

◆ m_fpWarningsTreeModel

RC_TREE_MODEL* DIALOG_DRC::m_fpWarningsTreeModel
private

◆ m_frame

◆ m_gauge

wxGauge* DIALOG_DRC_BASE::m_gauge
protectedinherited

Definition at line 60 of file dialog_drc_base.h.

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

◆ m_hash_key

◆ m_ignoredList

wxListCtrl* DIALOG_DRC_BASE::m_ignoredList
protectedinherited

◆ m_ignoredTitleTemplate

wxString DIALOG_DRC::m_ignoredTitleTemplate
private

Definition at line 129 of file dialog_drc.h.

Referenced by DIALOG_DRC(), and updateDisplayedCounts().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

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

Referenced by DIALOG_SHIM::Show().

◆ m_kiway

KIWAY* KIWAY_HOLDER::m_kiway
privateinherited

◆ m_markerDataView

wxDataViewCtrl* DIALOG_DRC_BASE::m_markerDataView
protectedinherited

◆ m_markersProvider

std::shared_ptr<RC_ITEMS_PROVIDER> DIALOG_DRC::m_markersProvider
private

◆ m_markersTitleTemplate

wxString DIALOG_DRC::m_markersTitleTemplate
private

Definition at line 126 of file dialog_drc.h.

Referenced by DIALOG_DRC(), and updateDisplayedCounts().

◆ m_markersTreeModel

◆ m_maxProgress

◆ m_messageChanged

std::atomic_bool PROGRESS_REPORTER_BASE::m_messageChanged
protectedinherited

◆ m_messages

WX_HTML_REPORT_BOX* DIALOG_DRC_BASE::m_messages
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 66 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_panelIgnored

wxPanel* DIALOG_DRC_BASE::m_panelIgnored
protectedinherited

Definition at line 68 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 58 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_panelUnconnectedItems

wxPanel* DIALOG_DRC_BASE::m_panelUnconnectedItems
privateinherited

Definition at line 49 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 63 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_parentFrame

◆ 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 215 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 217 of file dialog_shim.h.

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

◆ m_ratsnestProvider

std::shared_ptr<RC_ITEMS_PROVIDER> DIALOG_DRC::m_ratsnestProvider
private

◆ m_rptMessage

wxString PROGRESS_REPORTER_BASE::m_rptMessage
protectedinherited

◆ m_running

bool DIALOG_DRC::m_running
private

Definition at line 122 of file dialog_drc.h.

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

◆ m_runningNotebook

wxNotebook* DIALOG_DRC_BASE::m_runningNotebook
protectedinherited

Definition at line 57 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 55 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 83 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 71 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 80 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ m_tabOrder

◆ m_type

HOLDER_TYPE KIWAY_HOLDER::m_type
privateinherited

Definition at line 85 of file kiway_holder.h.

Referenced by KIWAY_HOLDER::GetType(), and SIM_PLOT_FRAME::onSimFinished().

◆ m_unconnectedDataView

wxDataViewCtrl* DIALOG_DRC_BASE::m_unconnectedDataView
protectedinherited

◆ m_unconnectedTitleTemplate

wxString DIALOG_DRC::m_unconnectedTitleTemplate
private

Definition at line 127 of file dialog_drc.h.

Referenced by DIALOG_DRC(), and updateDisplayedCounts().

◆ m_unconnectedTreeModel

RC_TREE_MODEL* DIALOG_DRC::m_unconnectedTreeModel
private

◆ m_units

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

◆ m_violationSeveritiesLink

wxHyperlinkCtrl* DIALOG_DRC_BASE::m_violationSeveritiesLink
protectedinherited

◆ m_warningsBadge

NUMBER_BADGE* DIALOG_DRC_BASE::m_warningsBadge
protectedinherited

Definition at line 76 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 61 of file dialog_drc_base.h.

Referenced by DIALOG_DRC_BASE::DIALOG_DRC_BASE().

◆ running

wxPanel* DIALOG_DRC_BASE::running
protectedinherited

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