KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ee_inspection_tool.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2019-2023 CERN
5 * Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <sch_symbol.h>
26#include <id.h>
27#include <kiway.h>
28#include <confirm.h>
29#include <string_utils.h>
33#include <tools/ee_actions.h>
36#include <tools/ee_selection.h>
37#include <sim/simulator_frame.h>
38#include <sch_edit_frame.h>
39#include <symbol_edit_frame.h>
40#include <symbol_viewer_frame.h>
41#include <eda_doc.h>
42#include <sch_marker.h>
43#include <project.h>
44#include <project_sch.h>
46#include <dialogs/dialog_erc.h>
50#include <math/util.h> // for KiROUND
51
52
54 EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" )
55{
56}
57
58
60{
62
63 // Add inspection actions to the selection tool menu
64 //
66
68
71
72 return true;
73}
74
75
77{
78 EE_TOOL_BASE::Reset( aReason );
79
80 if( aReason == SUPERMODEL_RELOAD )
81 {
82 wxCommandEvent* evt = new wxCommandEvent( EDA_EVT_CLOSE_ERC_DIALOG, wxID_ANY );
83
84 wxQueueEvent( m_frame, evt );
85 }
86}
87
88
90{
92 return 0;
93}
94
95
97{
98 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
99
100 wxCHECK( frame, /* void */ );
101
102 DIALOG_ERC* dlg = frame->GetErcDialog();
103
104 wxCHECK( dlg, /* void */ );
105
106 // Needed at least on Windows. Raise() is not enough
107 dlg->Show( true );
108
109 // Bring it to the top if already open. Dual monitor users need this.
110 dlg->Raise();
111}
112
113
115{
116 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
117
118 wxCHECK( frame, 0 );
119
120 DIALOG_ERC* dlg = frame->GetErcDialog();
121
122 if( dlg )
123 {
124 dlg->Show( true );
125 dlg->Raise();
126 dlg->PrevMarker();
127 }
128
129 return 0;
130}
131
132
134{
135 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
136
137 wxCHECK( frame, 0 );
138
139 DIALOG_ERC* dlg = frame->GetErcDialog();
140
141 wxCHECK( dlg, 0 );
142
143 dlg->Show( true );
144 dlg->Raise();
145 dlg->NextMarker();
146
147 return 0;
148}
149
150
152{
154
155 wxCHECK( selectionTool, 0 );
156
157 EE_SELECTION& selection = selectionTool->GetSelection();
158
159 if( selection.GetSize() == 1 && selection.Front()->Type() == SCH_MARKER_T )
160 {
161 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
162 DIALOG_ERC* dlg = frame ? frame->GetErcDialog() : nullptr;
163
164 if( dlg )
165 {
166 if( !dlg->IsShown() )
167 {
168 dlg->Show( true );
169 dlg->Raise();
170 }
171
172 dlg->SelectMarker( static_cast<SCH_MARKER*>( selection.Front() ) );
173 }
174 }
175
176 // Show the item info on a left click on this item
177 UpdateMessagePanel( aEvent );
178
179 return 0;
180}
181
182
184{
186 EE_SELECTION& selection = selTool->GetSelection();
187 SCH_MARKER* marker = nullptr;
188
189 if( selection.GetSize() == 1 && selection.Front()->Type() == SCH_MARKER_T )
190 marker = static_cast<SCH_MARKER*>( selection.Front() );
191
192 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
193
194 wxCHECK( frame, 0 );
195
196 DIALOG_ERC* dlg = frame->GetErcDialog();
197
198 wxCHECK( dlg, 0 );
199
200 // Let the ERC dialog handle it since it has more update hassles to worry about
201 // Note that if marker is nullptr the dialog will exclude whichever marker is selected
202 // in the dialog itself
203 dlg->ExcludeMarker( marker );
204
205 if( marker != nullptr )
206 {
207 marker->SetExcluded( true );
208 m_frame->GetCanvas()->GetView()->Update( marker );
210 m_frame->OnModify();
211 }
212
213 return 0;
214}
215
216
217extern void CheckLibSymbol( LIB_SYMBOL* aSymbol, std::vector<wxString>& aMessages,
218 int aGridForPins, EDA_DRAW_FRAME* aUnitsProvider );
219
221{
222 LIB_SYMBOL* symbol = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurSymbol();
223
224 if( !symbol )
225 return 0;
226
227 std::vector<wxString> messages;
228 const int grid_size = KiROUND( getView()->GetGAL()->GetGridSize().x );
229
230 CheckLibSymbol( symbol, messages, grid_size, m_frame );
231
232 if( messages.empty() )
233 {
234 DisplayInfoMessage( m_frame, _( "No symbol issues found." ) );
235 }
236 else
237 {
238 HTML_MESSAGE_BOX dlg( m_frame, _( "Symbol Warnings" ) );
239
240 for( const wxString& single_msg : messages )
241 dlg.AddHTML_Text( single_msg );
242
243 dlg.ShowModal();
244 }
245
246 return 0;
247}
248
249
251{
252 SCH_EDIT_FRAME* schEditorFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
253
254 wxCHECK( schEditorFrame, 0 );
255
257
258 if( selection.Empty() )
259 {
260 m_frame->ShowInfoBarError( _( "Select a symbol to diff against its library equivalent." ) );
261 return 0;
262 }
263
264 DIALOG_BOOK_REPORTER* dialog = schEditorFrame->GetSymbolDiffDialog();
265
266 wxCHECK( dialog, 0 );
267
268 dialog->DeleteAllPages();
269
270 SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
271 wxString symbolDesc = wxString::Format( _( "Symbol %s" ),
272 symbol->GetField( REFERENCE_FIELD )->GetText() );
273 LIB_ID libId = symbol->GetLibId();
274 wxString libName = libId.GetLibNickname();
275 wxString symbolName = libId.GetLibItemName();
276
277 WX_HTML_REPORT_BOX* r = dialog->AddHTMLPage( _( "Summary" ) );
278
279 r->Report( wxS( "<h7>" ) + _( "Schematic vs library diff for:" ) + wxS( "</h7>" ) );
280 r->Report( wxS( "<ul><li>" ) + EscapeHTML( symbolDesc ) + wxS( "</li>" )
281 + wxS( "<li>" ) + _( "Library: " ) + EscapeHTML( libName ) + wxS( "</li>" )
282 + wxS( "<li>" ) + _( "Library item: " ) + EscapeHTML( symbolName )
283 + wxS( "</li></ul>" ) );
284
285 r->Report( "" );
286
288 const LIB_TABLE_ROW* libTableRow = libTable->FindRow( libName );
289
290 if( !libTableRow )
291 {
292 r->Report( _( "The library is not included in the current configuration." )
293 + wxS( "&nbsp;&nbsp;&nbsp" )
294 + wxS( "<a href='$CONFIG'>" ) + _( "Manage Symbol Libraries" ) + wxS( "</a>" ) );
295 }
296 else if( !libTable->HasLibrary( libName, true ) )
297 {
298 r->Report( _( "The library is not enabled in the current configuration." )
299 + wxS( "&nbsp;&nbsp;&nbsp" )
300 + wxS( "<a href='$CONFIG'>" ) + _( "Manage Symbol Libraries" ) + wxS( "</a>" ) );
301 }
302 else
303 {
304 std::unique_ptr<LIB_SYMBOL> flattenedLibSymbol;
305 std::unique_ptr<LIB_SYMBOL> flattenedSchSymbol = symbol->GetLibSymbolRef()->Flatten();
306
307 try
308 {
309 if( LIB_SYMBOL* libAlias = libTable->LoadSymbol( libName, symbolName ) )
310 flattenedLibSymbol = libAlias->Flatten();
311 }
312 catch( const IO_ERROR& )
313 {
314 }
315
316 if( !flattenedLibSymbol )
317 {
318 r->Report( wxString::Format( _( "The library no longer contains the item %s." ),
319 symbolName ) );
320 }
321 else
322 {
323 std::vector<LIB_FIELD> fields;
324
325 for( SCH_FIELD& field : symbol->GetFields() )
326 {
327 fields.emplace_back( LIB_FIELD( flattenedLibSymbol.get(), field.GetId(),
328 field.GetName( false ) ) );
329 fields.back().CopyText( field );
330 fields.back().SetAttributes( field );
331 fields.back().Offset( -symbol->GetPosition() );
332 }
333
334 flattenedSchSymbol->SetFields( fields );
335
337
338 if( flattenedSchSymbol->Compare( *flattenedLibSymbol, flags, r ) == 0 )
339 r->Report( _( "No relevant differences detected." ) );
340
341 wxPanel* panel = dialog->AddBlankPage( _( "Visual" ) );
342 SYMBOL_DIFF_WIDGET* diff = constructDiffPanel( panel );
343
344 diff->DisplayDiff( flattenedSchSymbol.release(), flattenedLibSymbol.release(),
345 symbol->GetUnit(), symbol->GetConvert() );
346 }
347 }
348
349 r->Flush();
350
351 dialog->Raise();
352 dialog->Show( true );
353 return 0;
354}
355
356
358{
359 wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
360
362 SYMBOL_DIFF_WIDGET* diffWidget = new SYMBOL_DIFF_WIDGET( aParentPanel, backend );
363
364 sizer->Add( diffWidget, 1, wxEXPAND | wxALL, 5 );
365 aParentPanel->SetSizer( sizer );
366 aParentPanel->Layout();
367
368 return diffWidget;
369}
370
371
373{
375
376 if( !simFrame )
377 return -1;
378
379 if( wxWindow* blocking_win = simFrame->Kiway().GetBlockingDialog() )
380 blocking_win->Close( true );
381
382 simFrame->Show( true );
383
384 // On Windows, Raise() does not bring the window on screen, when iconized
385 if( simFrame->IsIconized() )
386 simFrame->Iconize( false );
387
388 simFrame->Raise();
389
390 return 0;
391}
392
393
395{
396 wxString datasheet;
397
399 {
400 LIB_SYMBOL* symbol = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurSymbol();
401
402 if( !symbol )
403 return 0;
404
405 datasheet = symbol->GetDatasheetField().GetText();
406 }
407 else if( m_frame->IsType( FRAME_SCH_VIEWER ) )
408 {
409 LIB_SYMBOL* entry = static_cast<SYMBOL_VIEWER_FRAME*>( m_frame )->GetSelectedSymbol();
410
411 if( !entry )
412 return 0;
413
415 }
416 else if( m_frame->IsType( FRAME_SCH ) )
417 {
419
420 if( selection.Empty() )
421 return 0;
422
423 SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
424
425 // Use GetShownText() to resolve any text variables, but don't allow adding extra text
426 // (ie: the field name)
427 datasheet = symbol->GetField( DATASHEET_FIELD )->GetShownText( false );
428 }
429
430 if( datasheet.IsEmpty() || datasheet == wxS( "~" ) )
431 {
432 m_frame->ShowInfoBarError( _( "No datasheet defined." ) );
433 }
434 else
435 {
438 }
439
440 return 0;
441}
442
443
445{
446 SYMBOL_EDIT_FRAME* symbolEditFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
447 SCH_EDIT_FRAME* schEditFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
449 EE_SELECTION& selection = selTool->GetSelection();
450
451 // Note: the symbol viewer manages its own message panel
452
453 if( symbolEditFrame || schEditFrame )
454 {
455 if( selection.GetSize() == 1 )
456 {
457 EDA_ITEM* item = (EDA_ITEM*) selection.Front();
458
459 std::vector<MSG_PANEL_ITEM> msgItems;
460 item->GetMsgPanelInfo( m_frame, msgItems );
461 m_frame->SetMsgPanel( msgItems );
462 }
463 else
464 {
466 }
467 }
468
469 if( schEditFrame )
470 {
471 schEditFrame->UpdateNetHighlightStatus();
472 schEditFrame->UpdateHierarchySelection();
473 }
474
475 return 0;
476}
477
478
480{
484 // See note 1:
488
492
494
495 // Note 1: tUpdateMessagePanel is called by CrossProbe. So uncomment this line if
496 // call to CrossProbe is modifiied
497 // Go( &EE_INSPECTION_TOOL::UpdateMessagePanel, EVENTS::SelectedEvent );
501}
502
503
static TOOL_ACTION excludeMarker
Definition: actions.h:91
static TOOL_ACTION nextMarker
Definition: actions.h:90
static TOOL_ACTION prevMarker
Definition: actions.h:89
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Add a menu entry to run a TOOL_ACTION on selected items.
wxPanel * AddBlankPage(const wxString &aTitle)
WX_HTML_REPORT_BOX * AddHTMLPage(const wxString &aTitle)
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:793
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:770
void PrevMarker()
Definition: dialog_erc.cpp:746
void NextMarker()
Definition: dialog_erc.cpp:758
bool Show(bool show) override
virtual void OnModify()
Must be called after a model change in order to set the "modify" flag and do other frame-specific pro...
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
bool IsType(FRAME_T aType) const
The base class for create windows for drawing purpose.
virtual void ClearMsgPanel()
Clear all messages from the message panel.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
GAL_TYPE GetBackend() const
Return the type of backend currently used by GAL canvas.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
virtual void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: eda_item.h:199
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:95
static TOOL_ACTION runERC
Definition: ee_actions.h:149
static TOOL_ACTION showSimulator
Definition: ee_actions.h:269
static TOOL_ACTION diffSymbol
Definition: ee_actions.h:164
static TOOL_ACTION showDatasheet
Inspection and Editing.
Definition: ee_actions.h:148
static TOOL_ACTION checkSymbol
Definition: ee_actions.h:163
static SELECTION_CONDITION SingleSymbol
static SELECTION_CONDITION SingleNonExcludedMarker
int RunSimulation(const TOOL_EVENT &aEvent)
int NextMarker(const TOOL_EVENT &aEvent)
int DiffSymbol(const TOOL_EVENT &aEvent)
int PrevMarker(const TOOL_EVENT &aEvent)
int ShowDatasheet(const TOOL_EVENT &aEvent)
SYMBOL_DIFF_WIDGET * constructDiffPanel(wxPanel *aParentPanel)
This method is meant to be overridden in order to specify handlers for events.
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int ExcludeMarker(const TOOL_EVENT &aEvent)
int UpdateMessagePanel(const TOOL_EVENT &aEvent)
Display the selected item info (when clicking on a item)
bool Init() override
Init() is called once upon a registration of the tool.
int RunERC(const TOOL_EVENT &aEvent)
int CheckSymbol(const TOOL_EVENT &aEvent)
int CrossProbe(const TOOL_EVENT &aEvent)
Called when clicking on a item:
EE_SELECTION & RequestSelection(const std::vector< KICAD_T > &aScanTypes={ SCH_LOCATE_ANY_T })
Return either an existing selection (filtered), or the selection at the current cursor position if th...
EE_SELECTION & GetSelection()
A foundation class for a tool operating on a schematic or symbol.
Definition: ee_tool_base.h:48
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
Definition: ee_tool_base.h:84
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:197
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:64
static const TOOL_EVENT ClearedEvent
Definition: actions.h:234
static const TOOL_EVENT SelectedEvent
Definition: actions.h:232
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Definition: actions.h:239
static const TOOL_EVENT PointSelectedEvent
Definition: actions.h:231
static const TOOL_EVENT UnselectedEvent
Definition: actions.h:233
void AddHTML_Text(const wxString &message)
Add HTML text (without any change) to message list.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:76
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: view.cpp:1607
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:432
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
Definition: kiway.cpp:689
Field object used in symbol libraries.
Definition: lib_field.h:62
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
const UTF8 & GetLibItemName() const
Definition: lib_id.h:102
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:87
@ EQUALITY
Definition: lib_item.h:92
Define a library symbol object.
Definition: lib_symbol.h:99
LIB_FIELD & GetDatasheetField()
Return reference to the datasheet field.
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library table.
void SetExcluded(bool aExcluded)
Definition: marker_base.h:98
static SYMBOL_LIB_TABLE * SchSymbolLibTable(PROJECT *aProject)
Accessor for project symbol library table.
static SEARCH_STACK * SchSearchS(PROJECT *aProject)
Accessor for Eeschema search stack.
Definition: project_sch.cpp:41
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
Schematic editor (Eeschema) main window.
void UpdateHierarchySelection()
Update the hierarchy navigation tree selection (cross-probe from schematic to hierarchy pane).
DIALOG_BOOK_REPORTER * GetSymbolDiffDialog()
DIALOG_ERC * GetErcDialog()
void UpdateNetHighlightStatus()
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:52
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
Definition: sch_field.cpp:188
Schematic symbol object.
Definition: sch_symbol.h:81
int GetUnit() const
Definition: sch_symbol.h:226
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:913
int GetConvert() const
Definition: sch_symbol.h:268
VECTOR2I GetPosition() const override
Definition: sch_symbol.h:703
const LIB_ID & GetLibId() const
Definition: sch_symbol.h:173
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populate a std::vector with SCH_FIELDs.
Definition: sch_symbol.cpp:973
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
Definition: sch_symbol.h:190
static bool Idle(const SELECTION &aSelection)
Test if there no items selected or being edited.
virtual unsigned int GetSize() const override
Return the number of stored items.
Definition: selection.h:99
EDA_ITEM * Front() const
Definition: selection.h:208
bool Empty() const
Checks if there is anything selected.
Definition: selection.h:109
The SIMULATOR_FRAME holds the main user-interface for running simulations.
void DisplayDiff(LIB_SYMBOL *aSchSymbol, LIB_SYMBOL *aLibSymbol, int aUnit, int aConvert)
Set the currently displayed symbol.
The symbol library editor main window.
LIB_SYMBOL * LoadSymbol(const wxString &aNickname, const wxString &aName)
Load a LIB_SYMBOL having aName from the library given by aNickname.
SYMBOL_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an SYMBOL_LIB_TABLE_ROW if aNickName is found in this table or in any chained fallBack table f...
Symbol library viewer main window.
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:216
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:78
@ SUPERMODEL_RELOAD
For schematics, the entire schematic changed, not just the sheet.
Definition: tool_base.h:81
Generic, UI-independent tool event.
Definition: tool_event.h:167
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
TOOL_MENU & GetToolMenu()
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:44
A slimmed down version of WX_HTML_REPORT_PANEL.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
void Flush()
Build the HTML messages page.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:332
This file is part of the common library.
#define _(s)
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, PROJECT *aProject, SEARCH_STACK *aPaths)
Open a document (file) with the suitable browser.
Definition: eda_doc.cpp:74
This file is part of the common library.
void CheckLibSymbol(LIB_SYMBOL *aSymbol, std::vector< wxString > &aMessages, int aGridForPins, EDA_DRAW_FRAME *aUnitsProvider)
Check a lib symbol to find incorrect settings Pins not on a valid grid Pins duplicated Conflict with ...
@ FRAME_SCH_SYMBOL_EDITOR
Definition: frame_type.h:35
@ FRAME_SCH_VIEWER
Definition: frame_type.h:36
@ FRAME_SCH
Definition: frame_type.h:34
@ FRAME_SIMULATOR
Definition: frame_type.h:38
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
void CheckLibSymbol(LIB_SYMBOL *aSymbol, std::vector< wxString > &aMessages, int aGridForPins, EDA_DRAW_FRAME *aUnitsProvider)
Check a lib symbol to find incorrect settings Pins not on a valid grid Pins duplicated Conflict with ...
@ DATASHEET_FIELD
name of datasheet
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".
@ SCH_SYMBOL_T
Definition: typeinfo.h:155
@ SCH_MARKER_T
Definition: typeinfo.h:140
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