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>
32#include <tools/ee_actions.h>
35#include <tools/ee_selection.h>
36#include <sim/simulator_frame.h>
37#include <sch_edit_frame.h>
38#include <symbol_edit_frame.h>
39#include <symbol_viewer_frame.h>
40#include <eda_doc.h>
41#include <sch_marker.h>
42#include <project.h>
44#include <dialogs/dialog_erc.h>
48#include <math/util.h> // for KiROUND
49
50
52 EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" )
53{
54}
55
56
58{
60
61 // Add inspection actions to the selection tool menu
62 //
64
66
69
70 return true;
71}
72
73
75{
76 EE_TOOL_BASE::Reset( aReason );
77
78 if( aReason == SUPERMODEL_RELOAD )
79 {
80 wxCommandEvent* evt = new wxCommandEvent( EDA_EVT_CLOSE_ERC_DIALOG, wxID_ANY );
81
82 wxQueueEvent( m_frame, evt );
83 }
84}
85
86
88{
90 return 0;
91}
92
93
95{
96 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
97
98 wxCHECK( frame, /* void */ );
99
100 DIALOG_ERC* dlg = frame->GetErcDialog();
101
102 wxCHECK( dlg, /* void */ );
103
104 // Needed at least on Windows. Raise() is not enough
105 dlg->Show( true );
106
107 // Bring it to the top if already open. Dual monitor users need this.
108 dlg->Raise();
109}
110
111
113{
114 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
115
116 wxCHECK( frame, 0 );
117
118 DIALOG_ERC* dlg = frame->GetErcDialog();
119
120 if( dlg )
121 {
122 dlg->Show( true );
123 dlg->Raise();
124 dlg->PrevMarker();
125 }
126
127 return 0;
128}
129
130
132{
133 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
134
135 wxCHECK( frame, 0 );
136
137 DIALOG_ERC* dlg = frame->GetErcDialog();
138
139 wxCHECK( dlg, 0 );
140
141 dlg->Show( true );
142 dlg->Raise();
143 dlg->NextMarker();
144
145 return 0;
146}
147
148
150{
152
153 wxCHECK( selectionTool, 0 );
154
155 EE_SELECTION& selection = selectionTool->GetSelection();
156
157 if( selection.GetSize() == 1 && selection.Front()->Type() == SCH_MARKER_T )
158 {
159 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
160 DIALOG_ERC* dlg = frame ? frame->GetErcDialog() : nullptr;
161
162 if( dlg )
163 {
164 if( !dlg->IsShown() )
165 {
166 dlg->Show( true );
167 dlg->Raise();
168 }
169
170 dlg->SelectMarker( static_cast<SCH_MARKER*>( selection.Front() ) );
171 }
172 }
173
174 // Show the item info on a left click on this item
175 UpdateMessagePanel( aEvent );
176
177 return 0;
178}
179
180
182{
184 EE_SELECTION& selection = selTool->GetSelection();
185 SCH_MARKER* marker = nullptr;
186
187 if( selection.GetSize() == 1 && selection.Front()->Type() == SCH_MARKER_T )
188 marker = static_cast<SCH_MARKER*>( selection.Front() );
189
190 SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
191
192 wxCHECK( frame, 0 );
193
194 DIALOG_ERC* dlg = frame->GetErcDialog();
195
196 wxCHECK( dlg, 0 );
197
198 // Let the ERC dialog handle it since it has more update hassles to worry about
199 // Note that if marker is nullptr the dialog will exclude whichever marker is selected
200 // in the dialog itself
201 dlg->ExcludeMarker( marker );
202
203 if( marker != nullptr )
204 {
205 marker->SetExcluded( true );
206 m_frame->GetCanvas()->GetView()->Update( marker );
208 m_frame->OnModify();
209 }
210
211 return 0;
212}
213
214
215extern void CheckLibSymbol( LIB_SYMBOL* aSymbol, std::vector<wxString>& aMessages,
216 int aGridForPins, EDA_DRAW_FRAME* aUnitsProvider );
217
219{
220 LIB_SYMBOL* symbol = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurSymbol();
221
222 if( !symbol )
223 return 0;
224
225 std::vector<wxString> messages;
226 const int grid_size = KiROUND( getView()->GetGAL()->GetGridSize().x );
227
228 CheckLibSymbol( symbol, messages, grid_size, m_frame );
229
230 if( messages.empty() )
231 {
232 DisplayInfoMessage( m_frame, _( "No symbol issues found." ) );
233 }
234 else
235 {
236 HTML_MESSAGE_BOX dlg( m_frame, _( "Symbol Warnings" ) );
237
238 for( const wxString& single_msg : messages )
239 dlg.AddHTML_Text( single_msg );
240
241 dlg.ShowModal();
242 }
243
244 return 0;
245}
246
247
249{
250 SCH_EDIT_FRAME* schEditorFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
251
252 wxCHECK( schEditorFrame, 0 );
253
255
256 if( selection.Empty() )
257 {
258 m_frame->ShowInfoBarError( _( "Select a symbol to diff against its library equivalent." ) );
259 return 0;
260 }
261
262 DIALOG_BOOK_REPORTER* dialog = schEditorFrame->GetSymbolDiffDialog();
263
264 wxCHECK( dialog, 0 );
265
266 dialog->DeleteAllPages();
267
268 SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
269 wxString symbolDesc = wxString::Format( _( "Symbol %s" ),
270 symbol->GetField( REFERENCE_FIELD )->GetText() );
271 LIB_ID libId = symbol->GetLibId();
272 wxString libName = libId.GetLibNickname();
273 wxString symbolName = libId.GetLibItemName();
274
275 WX_HTML_REPORT_BOX* r = dialog->AddHTMLPage( _( "Summary" ) );
276
277 r->Report( wxS( "<h7>" ) + _( "Schematic vs library diff for:" ) + wxS( "</h7>" ) );
278 r->Report( wxS( "<ul><li>" ) + EscapeHTML( symbolDesc ) + wxS( "</li>" )
279 + wxS( "<li>" ) + _( "Library: " ) + EscapeHTML( libName ) + wxS( "</li>" )
280 + wxS( "<li>" ) + _( "Library item: " ) + EscapeHTML( symbolName )
281 + wxS( "</li></ul>" ) );
282
283 r->Report( "" );
284
285 SYMBOL_LIB_TABLE* libTable = m_frame->Prj().SchSymbolLibTable();
286 const LIB_TABLE_ROW* libTableRow = libTable->FindRow( libName );
287
288 if( !libTableRow )
289 {
290 r->Report( _( "The library is not included in the current configuration." )
291 + wxS( "&nbsp;&nbsp;&nbsp" )
292 + wxS( "<a href='$CONFIG'>" ) + _( "Manage Symbol Libraries" ) + wxS( "</a>" ) );
293 }
294 else if( !libTable->HasLibrary( libName, true ) )
295 {
296 r->Report( _( "The library is not enabled in the current configuration." )
297 + wxS( "&nbsp;&nbsp;&nbsp" )
298 + wxS( "<a href='$CONFIG'>" ) + _( "Manage Symbol Libraries" ) + wxS( "</a>" ) );
299 }
300 else
301 {
302 std::unique_ptr<LIB_SYMBOL> flattenedLibSymbol;
303 std::unique_ptr<LIB_SYMBOL> flattenedSchSymbol = symbol->GetLibSymbolRef()->Flatten();
304
305 try
306 {
307 if( LIB_SYMBOL* libAlias = libTable->LoadSymbol( libName, symbolName ) )
308 flattenedLibSymbol = libAlias->Flatten();
309 }
310 catch( const IO_ERROR& )
311 {
312 }
313
314 if( !flattenedLibSymbol )
315 {
316 r->Report( wxString::Format( _( "The library no longer contains the item %s." ),
317 symbolName ) );
318 }
319 else
320 {
321 std::vector<LIB_FIELD> fields;
322
323 for( SCH_FIELD& field : symbol->GetFields() )
324 {
325 fields.emplace_back( LIB_FIELD( flattenedLibSymbol.get(), field.GetId(),
326 field.GetName( false ) ) );
327 fields.back().CopyText( field );
328 fields.back().SetAttributes( field );
329 fields.back().Offset( -symbol->GetPosition() );
330 }
331
332 flattenedSchSymbol->SetFields( fields );
333
335
336 if( flattenedSchSymbol->Compare( *flattenedLibSymbol, flags, r ) == 0 )
337 r->Report( _( "No relevant differences detected." ) );
338
339 wxPanel* panel = dialog->AddBlankPage( _( "Visual" ) );
340 SYMBOL_DIFF_WIDGET* diff = constructDiffPanel( panel );
341
342 diff->DisplayDiff( flattenedSchSymbol.release(), flattenedLibSymbol.release(),
343 symbol->GetUnit(), symbol->GetConvert() );
344 }
345 }
346
347 r->Flush();
348
349 dialog->Raise();
350 dialog->Show( true );
351 return 0;
352}
353
354
356{
357 wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
358
360 SYMBOL_DIFF_WIDGET* diffWidget = new SYMBOL_DIFF_WIDGET( aParentPanel, backend );
361
362 sizer->Add( diffWidget, 1, wxEXPAND | wxALL, 5 );
363 aParentPanel->SetSizer( sizer );
364 aParentPanel->Layout();
365
366 return diffWidget;
367}
368
369
371{
373
374 if( !simFrame )
375 return -1;
376
377 if( wxWindow* blocking_win = simFrame->Kiway().GetBlockingDialog() )
378 blocking_win->Close( true );
379
380 simFrame->Show( true );
381
382 // On Windows, Raise() does not bring the window on screen, when iconized
383 if( simFrame->IsIconized() )
384 simFrame->Iconize( false );
385
386 simFrame->Raise();
387
388 return 0;
389}
390
391
393{
394 wxString datasheet;
395
397 {
398 LIB_SYMBOL* symbol = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurSymbol();
399
400 if( !symbol )
401 return 0;
402
403 datasheet = symbol->GetDatasheetField().GetText();
404 }
406 {
407 LIB_SYMBOL* entry = static_cast<SYMBOL_VIEWER_FRAME*>( m_frame )->GetSelectedSymbol();
408
409 if( !entry )
410 return 0;
411
413 }
414 else if( m_frame->IsType( FRAME_SCH ) )
415 {
417
418 if( selection.Empty() )
419 return 0;
420
421 SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
422
423 // Use GetShownText() to resolve any text variables, but don't allow adding extra text
424 // (ie: the field name)
425 datasheet = symbol->GetField( DATASHEET_FIELD )->GetShownText( false );
426 }
427
428 if( datasheet.IsEmpty() || datasheet == wxS( "~" ) )
429 {
430 m_frame->ShowInfoBarError( _( "No datasheet defined." ) );
431 }
432 else
433 {
434 GetAssociatedDocument( m_frame, datasheet, &m_frame->Prj(), m_frame->Prj().SchSearchS() );
435 }
436
437 return 0;
438}
439
440
442{
443 SYMBOL_EDIT_FRAME* symbolEditFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
444 SCH_EDIT_FRAME* schEditFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
446 EE_SELECTION& selection = selTool->GetSelection();
447
448 // Note: the symbol viewer manages its own message panel
449
450 if( symbolEditFrame || schEditFrame )
451 {
452 if( selection.GetSize() == 1 )
453 {
454 EDA_ITEM* item = (EDA_ITEM*) selection.Front();
455
456 std::vector<MSG_PANEL_ITEM> msgItems;
457 item->GetMsgPanelInfo( m_frame, msgItems );
458 m_frame->SetMsgPanel( msgItems );
459 }
460 else
461 {
463 }
464 }
465
466 if( schEditFrame )
467 {
468 schEditFrame->UpdateNetHighlightStatus();
469 schEditFrame->UpdateHierarchySelection();
470 }
471
472 return 0;
473}
474
475
477{
481 // See note 1:
485
489
491
492 // Note 1: tUpdateMessagePanel is called by CrossProbe. So uncomment this line if
493 // call to CrossProbe is modifiied
494 // Go( &EE_INSPECTION_TOOL::UpdateMessagePanel, EVENTS::SelectedEvent );
498}
499
500
static TOOL_ACTION excludeMarker
Definition: actions.h:90
static TOOL_ACTION nextMarker
Definition: actions.h:89
static TOOL_ACTION prevMarker
Definition: actions.h:88
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:881
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:858
void PrevMarker()
Definition: dialog_erc.cpp:834
void NextMarker()
Definition: dialog_erc.cpp:846
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:192
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:87
static TOOL_ACTION runERC
Definition: ee_actions.h:151
static TOOL_ACTION showSimulator
Definition: ee_actions.h:270
static TOOL_ACTION diffSymbol
Definition: ee_actions.h:166
static TOOL_ACTION showDatasheet
Inspection and Editing.
Definition: ee_actions.h:150
static TOOL_ACTION checkSymbol
Definition: ee_actions.h:165
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:50
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
Definition: ee_tool_base.h:86
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:202
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:66
static const TOOL_EVENT ClearedEvent
Definition: actions.h:209
static const TOOL_EVENT SelectedEvent
Definition: actions.h:207
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Definition: actions.h:214
static const TOOL_EVENT PointSelectedEvent
Definition: actions.h:206
static const TOOL_EVENT UnselectedEvent
Definition: actions.h:208
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:1608
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:685
Field object used in symbol libraries.
Definition: lib_field.h:61
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:85
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
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:51
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
Definition: sch_field.cpp:175
Schematic symbol object.
Definition: sch_symbol.h:81
int GetUnit() const
Definition: sch_symbol.h:231
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:891
int GetConvert() const
Definition: sch_symbol.h:273
VECTOR2I GetPosition() const override
Definition: sch_symbol.h:726
const LIB_ID & GetLibId() const
Definition: sch_symbol.h:178
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populate a std::vector with SCH_FIELDs.
Definition: sch_symbol.cpp:939
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
Definition: sch_symbol.h:195
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:156
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:335
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_SCH_VIEWER_MODAL
Definition: frame_type.h:37
@ 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:146
@ SCH_MARKER_T
Definition: typeinfo.h:131
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