KiCad PCB EDA Suite
load_select_footprint.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) 2018 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <functional>
27 using namespace std::placeholders;
28 
29 #include <board.h>
30 #include <footprint.h>
31 #include <confirm.h>
35 #include <dialog_helpers.h>
36 #include <footprint_edit_frame.h>
37 #include <footprint_info_impl.h>
38 #include <footprint_tree_pane.h>
39 #include <footprint_viewer_frame.h>
40 #include <fp_lib_table.h>
41 #include <io_mgr.h>
42 #include <kicad_string.h>
43 #include <kiway.h>
44 #include <lib_id.h>
45 #include <macros.h>
46 #include <pcb_draw_panel_gal.h>
47 #include <pcb_edit_frame.h>
48 #include <pcbnew.h>
49 #include <pcbnew_settings.h>
50 #include <pgm_base.h>
51 #include <view/view_controls.h>
52 #include <widgets/lib_tree.h>
54 
55 #include "fp_tree_model_adapter.h"
56 
57 
58 static wxArrayString s_FootprintHistoryList;
59 static unsigned s_FootprintHistoryMaxCount = 8;
60 
61 static void AddFootprintToHistory( const wxString& aName )
62 {
63  // Remove duplicates
64  for( int ii = s_FootprintHistoryList.GetCount() - 1; ii >= 0; --ii )
65  {
66  if( s_FootprintHistoryList[ ii ] == aName )
67  s_FootprintHistoryList.RemoveAt((size_t) ii );
68  }
69 
70  // Add the new name at the beginning of the history list
71  s_FootprintHistoryList.Insert( aName, 0 );
72 
73  // Remove extra names
75  s_FootprintHistoryList.RemoveAt( s_FootprintHistoryList.GetCount() - 1 );
76 }
77 
78 
79 #include <bitmaps.h>
81 {
82  bool is_last_fp_from_brd = IsCurrentFPFromBoard();
83 
84  FOOTPRINT* newFootprint = nullptr;
86 
87  if( frame == NULL ) // happens if no board editor opened
88  return false;
89 
90  if( aFootprint == NULL )
91  {
92  if( !frame->GetBoard() || !frame->GetBoard()->GetFirstFootprint() )
93  return false;
94 
95  aFootprint = SelectFootprintFromBoard( frame->GetBoard() );
96  }
97 
98  if( aFootprint == NULL )
99  return false;
100 
101  if( !Clear_Pcb( true ) )
102  return false;
103 
104  newFootprint = (FOOTPRINT*) aFootprint->Duplicate();
105  newFootprint->SetParent( GetBoard() );
106  newFootprint->SetLink( aFootprint->m_Uuid );
107 
108  newFootprint->ClearFlags();
109  newFootprint->RunOnChildren( []( BOARD_ITEM* aItem )
110  {
111  aItem->ClearFlags();
112  } );
113 
114  AddFootprintToBoard( newFootprint );
115 
116  // Clear references to any net info, because the footprint editor
117  // does know any thing about nets handled by the current edited board.
118  // Morever we do not want to save any reference to an unknown net when
119  // saving the footprint in lib cache
120  // so we force the ORPHANED dummy net info for all pads
121  newFootprint->ClearAllNets();
122 
123  GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false );
124  PlaceFootprint( newFootprint );
125  newFootprint->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment
126 
127  // Put it on FRONT layer,
128  // because this is the default in Footprint Editor, and in libs
129  if( newFootprint->GetLayer() != F_Cu )
130  newFootprint->Flip( newFootprint->GetPosition(), frame->Settings().m_FlipLeftRight );
131 
132  // Put it in orientation 0,
133  // because this is the default orientation in Footprint Editor, and in libs
134  newFootprint->SetOrientation( 0 );
135 
136  Zoom_Automatique( false );
137 
138  m_adapter->SetPreselectNode( newFootprint->GetFPID(), 0 );
139 
140  ClearUndoRedoList();
141  GetScreen()->ClrModify();
142 
143  // Update the save items if needed.
144  if( !is_last_fp_from_brd )
145  {
146  ReCreateMenuBar();
147  ReCreateHToolbar();
148 
149  if( IsSearchTreeShown() )
150  ToggleSearchTree();
151  }
152 
153  Update3DView( true );
154  UpdateView();
155  GetCanvas()->Refresh();
156  m_treePane->GetLibTree()->RefreshLibTree(); // update any previously-highlighted items
157 
158  return true;
159 }
160 
161 
163 {
164  // Close the current non-modal Lib browser if opened, and open a new one, in "modal" mode:
165  FOOTPRINT_VIEWER_FRAME* viewer;
167 
168  if( viewer )
169  {
170  viewer->Destroy();
171  // Destroy() does not immediately delete the viewer, if some events are pending.
172  // (for this reason delete operator cannot be used blindly with "top level" windows)
173  // so gives a slice of time to delete the viewer frame.
174  // This is especially important in OpenGL mode to avoid recreating context before
175  // the old one is deleted
176  wxSafeYield();
177  }
178 
179  SetFocus();
180 
181  // Creates the modal Lib browser:
183 
184  wxString fpid;
185  int ret = viewer->ShowModal( &fpid, this );
186  (void) ret; // make static analyser quiet
187 
188  viewer->Destroy();
189 
190  return fpid;
191 }
192 
193 
195 {
196  FP_LIB_TABLE* fpTable = Prj().PcbFootprintLibs();
197  wxString footprintName;
198  LIB_ID fpid;
199  FOOTPRINT* footprint = nullptr;
200 
201  static wxString lastComponentName;
202 
203  // Load footprint files:
204  WX_PROGRESS_REPORTER* progressReporter = new WX_PROGRESS_REPORTER( this,
205  _( "Loading Footprint Libraries" ), 3 );
206  GFootprintList.ReadFootprintFiles( fpTable, nullptr, progressReporter );
207  bool cancel = progressReporter->WasCancelled();
208  progressReporter->Destroy();
209 
210  if( cancel )
211  return nullptr;
212 
215 
216  wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> ptr = FP_TREE_MODEL_ADAPTER::Create( this, fpTable );
217  FP_TREE_MODEL_ADAPTER* adapter = static_cast<FP_TREE_MODEL_ADAPTER*>( ptr.get() );
218 
219  std::vector<LIB_TREE_ITEM*> historyInfos;
220 
221  for( const wxString& item : s_FootprintHistoryList )
222  {
223  LIB_TREE_ITEM* fp_info = GFootprintList.GetFootprintInfo( item );
224 
225  // this can be null, for example, if the footprint has been deleted from a library.
226  if( fp_info != nullptr )
227  historyInfos.push_back( fp_info );
228  }
229 
230  adapter->DoAddLibrary( "-- " + _( "Recently Used" ) + " --", wxEmptyString, historyInfos, true );
231 
232  if( aPreselect.IsValid() )
233  adapter->SetPreselectNode( aPreselect, 0 );
234  else if( historyInfos.size() )
235  adapter->SetPreselectNode( historyInfos[0]->GetLibId(), 0 );
236 
237  adapter->AddLibraries();
238 
239  wxString title;
240  title.Printf( _( "Choose Footprint (%d items loaded)" ), adapter->GetItemCount() );
241 
242  DIALOG_CHOOSE_FOOTPRINT dialog( this, title, ptr );
243 
244  if( dialog.ShowQuasiModal() == wxID_CANCEL )
245  return NULL;
246 
247  if( dialog.IsExternalBrowserSelected() )
248  {
249  // SelectFootprintFromLibBrowser() returns the "full" footprint name, i.e.
250  // <lib_name>/<footprint name> or LIB_ID format "lib_name:fp_name:rev#"
251  footprintName = SelectFootprintFromLibBrowser();
252 
253  if( footprintName.IsEmpty() ) // Cancel command
254  return NULL;
255  else
256  fpid.Parse( footprintName, LIB_ID::ID_PCB );
257  }
258  else
259  {
260  fpid = dialog.GetSelectedLibId();
261 
262  if( !fpid.IsValid() )
263  return NULL;
264  else
265  footprintName = fpid.Format();
266  }
267 
268  try
269  {
270  footprint = loadFootprint( fpid );
271  }
272  catch( const IO_ERROR& )
273  {
274  }
275 
276  if( footprint )
277  {
278  lastComponentName = footprintName;
279  AddFootprintToHistory( footprintName );
280  }
281 
282  return footprint;
283 }
284 
285 
287 {
288  FOOTPRINT* footprint = NULL;
289 
290  try
291  {
292  footprint = loadFootprint( aFootprintId );
293  }
294  catch( const IO_ERROR& )
295  {
296  }
297 
298  return footprint;
299 }
300 
301 
303 {
304  FP_LIB_TABLE* fptbl = Prj().PcbFootprintLibs();
305 
306  wxCHECK_MSG( fptbl, NULL, wxT( "Cannot look up LIB_ID in NULL FP_LIB_TABLE." ) );
307 
308  FOOTPRINT *footprint = nullptr;
309  try
310  {
311  footprint = fptbl->FootprintLoadWithOptionalNickname( aFootprintId );
312  }
313  catch( const IO_ERROR& )
314  {
315  }
316 
317  // If the footprint is found, clear all net info to be sure there are no broken links to
318  // any netinfo list (should be not needed, but it can be edited from the footprint editor )
319  if( footprint )
320  footprint->ClearAllNets();
321 
322  return footprint;
323 }
324 
325 
327 {
328  static wxString oldName; // Save name of last footprint selected.
329 
330  wxString fpname;
331  wxString msg;
332  wxArrayString listnames;
333 
334  for( FOOTPRINT* footprint : aPcb->Footprints() )
335  listnames.Add( footprint->GetReference() );
336 
337  msg.Printf( _( "Footprints [%u items]" ), (unsigned) listnames.GetCount() );
338 
339  wxArrayString headers;
340 
341  headers.Add( _( "Footprint" ) );
342 
343  std::vector<wxArrayString> itemsToDisplay;
344 
345  // Conversion from wxArrayString to vector of ArrayString
346  for( unsigned i = 0; i < listnames.GetCount(); i++ )
347  {
348  wxArrayString item;
349 
350  item.Add( listnames[i] );
351  itemsToDisplay.push_back( item );
352  }
353 
354  EDA_LIST_DIALOG dlg( this, msg, headers, itemsToDisplay, wxEmptyString );
355 
356  if( dlg.ShowModal() == wxID_OK )
357  fpname = dlg.GetTextSelection();
358  else
359  return NULL;
360 
361  oldName = fpname;
362 
363  for( auto mod : aPcb->Footprints() )
364  {
365  if( fpname == mod->GetReference() )
366  return mod;
367  }
368 
369  return nullptr;
370 }
371 
372 
373 bool FOOTPRINT_EDIT_FRAME::SaveLibraryAs( const wxString& aLibraryPath )
374 {
375  const wxString& curLibPath = aLibraryPath;
376  wxString dstLibPath = CreateNewLibrary( wxEmptyString, aLibraryPath );
377 
378  if( !dstLibPath )
379  return false; // user aborted in CreateNewLibrary()
380 
381  wxBusyCursor dummy;
382  wxString msg;
383 
386 
387  try
388  {
389  PLUGIN::RELEASER cur( IO_MGR::PluginFind( curType ) );
390  PLUGIN::RELEASER dst( IO_MGR::PluginFind( dstType ) );
391 
392  wxArrayString footprints;
393 
394  cur->FootprintEnumerate( footprints, curLibPath, false );
395 
396  for( unsigned i = 0; i < footprints.size(); ++i )
397  {
398  const FOOTPRINT* footprint = cur->GetEnumeratedFootprint( curLibPath, footprints[i] );
399  dst->FootprintSave( dstLibPath, footprint );
400 
401  msg = wxString::Format( _( "Footprint \"%s\" saved" ), footprints[i] );
402  SetStatusText( msg );
403  }
404  }
405  catch( const IO_ERROR& ioe )
406  {
407  DisplayError( this, ioe.What() );
408  return false;
409  }
410 
411  msg = wxString::Format( _( "Footprint library \"%s\" saved as \"%s\"." ),
412  curLibPath,
413  dstLibPath );
414 
415  DisplayInfoMessage( this, msg );
416 
417  SetStatusText( wxEmptyString );
418  return true;
419 }
420 
421 
422 static FOOTPRINT* s_FootprintInitialCopy = NULL; // Copy of footprint for abort/undo command
423 
424 static PICKED_ITEMS_LIST s_PickedList; // A pick-list to save initial footprint
425  // and dragged tracks
426 
427 
429 {
430  wxString footprintName;
431  wxArrayString fplist;
432 
433  // Build list of available fp references, to display them in dialog
434  for( auto fp : GetBoard()->Footprints() )
435  fplist.Add( fp->GetReference() + wxT(" ( ") + fp->GetValue() + wxT(" )") );
436 
437  fplist.Sort();
438 
439  DIALOG_GET_FOOTPRINT_BY_NAME dlg( this, fplist );
440 
441  if( dlg.ShowModal() != wxID_OK ) //Aborted by user
442  return NULL;
443 
444  footprintName = dlg.GetValue();
445  footprintName.Trim( true );
446  footprintName.Trim( false );
447 
448  if( !footprintName.IsEmpty() )
449  {
450  for( auto mod : GetBoard()->Footprints() )
451  {
452  if( mod->GetReference().CmpNoCase( footprintName ) == 0 )
453  return mod;
454  }
455  }
456 
457  return nullptr;
458 }
459 
460 
461 void PCB_BASE_FRAME::PlaceFootprint( FOOTPRINT* aFootprint, bool aRecreateRatsnest )
462 {
463  if( aFootprint == 0 )
464  return;
465 
466  OnModify();
467 
468  if( aFootprint->IsNew() )
469  {
470  SaveCopyInUndoList( aFootprint, UNDO_REDO::NEWITEM );
471  }
472  else if( aFootprint->IsMoving() )
473  {
474  ITEM_PICKER picker( nullptr, aFootprint, UNDO_REDO::CHANGED );
476  s_PickedList.PushItem( picker );
477  s_FootprintInitialCopy = NULL; // the picker is now owner of s_ModuleInitialCopy.
478  }
479 
480  if( s_PickedList.GetCount() )
481  {
482  SaveCopyInUndoList( s_PickedList, UNDO_REDO::UNSPECIFIED );
483 
484  // Clear list, but DO NOT delete items, because they are owned by the saved undo
485  // list and they therefore in use
487  }
488 
489  aFootprint->SetPosition((wxPoint) GetCanvas()->GetViewControls()->GetCursorPosition() );
490  aFootprint->ClearFlags();
491 
492  delete s_FootprintInitialCopy;
494 
495  if( aRecreateRatsnest )
496  m_pcb->GetConnectivity()->Update( aFootprint );
497 
498  if( aRecreateRatsnest )
499  Compile_Ratsnest( true );
500 
501  SetMsgPanel( aFootprint );
502 }
503 
504 
void DoAddLibrary(wxString const &aNodeName, wxString const &aDesc, std::vector< LIB_TREE_ITEM * > const &aItemList, bool presorted)
Add the given list of components by alias.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:240
wxString SelectFootprintFromLibBrowser()
Function SelectFootprintFromLibBrowser launches the footprint viewer to select the name of a footprin...
void ClearAllNets()
Function ClearAllNets Clear (i.e.
Definition: footprint.cpp:433
bool ShowModal(wxString *aFootprint, wxWindow *aParent) override
Function ShowModal.
wxString GetTextSelection(int aColumn=0)
Function GetTextSelection return the selected text from aColumn in the wxListCtrl in the dialog.
bool IsExternalBrowserSelected() const
Function IsExternalBrowserSelected.
FOOTPRINT * SelectFootprintFromLibTree(LIB_ID aPreselect=LIB_ID())
Function SelectFootprintFromLibTree opens a dialog to select a footprint.
This file is part of the common library.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
Definition: board_item.h:86
VIEW_CONTROLS class definition.
A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).
Definition: lib_tree_item.h:39
PROJECT & Prj()
Definition: kicad.cpp:328
void SetPreselectNode(LIB_ID const &aLibId, int aUnit)
Set the component name to be selected if there are no search results.
static PICKED_ITEMS_LIST s_PickedList
bool IsMoving() const
Definition: eda_item.h:188
Component library viewer main window.
void DisplayErrors(wxTopLevelWindow *aCaller=NULL)
static wxArrayString s_FootprintHistoryList
EDA_LIST_DIALOG.
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
Dialog class to select a footprint from the libraries.
FOOTPRINT * FootprintLoadWithOptionalNickname(const LIB_ID &aFootprintId)
Function FootprintLoadWithOptionalNickname loads a footprint having aFootprintId with possibly an emp...
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
bool IsValid() const
Definition: lib_id.h:171
void SetLink(EDA_ITEM *aItem)
unsigned GetCount() const
Function GetCount.
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath)
Function GuessPluginTypeFromLibPath returns a plugin type given a footprint library's libPath.
Definition: io_mgr.cpp:123
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:184
void PlaceFootprint(FOOTPRINT *aFootprint, bool aRecreateRatsnest=true)
Function PlaceFootprint places aFootprint at the current cursor position and updates footprint coordi...
This file contains miscellaneous commonly used macros and functions.
bool IsNew() const
Definition: eda_item.h:187
FOOTPRINT * SelectFootprintFromBoard(BOARD *aPcb)
Display the list of footprints currently existing on the BOARD.
RELEASER releases a PLUGIN in the context of a potential thrown exception, through its destructor.
Definition: io_mgr.h:575
DIALOG_GET_FOOTPRINT_BY_NAME is a helper dialog to select a footprint by its reference One can enter ...
FOOTPRINT_LIST_IMPL GFootprintList
The global footprint info table.
int GetItemCount() const
Return the number of components loaded in the tree.
Multi-thread safe progress reporter dialog, intended for use of tasks that paralleize reporting back ...
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Function loadFootprint attempts to load aFootprintId from the footprint library table.
FOOTPRINT * GetFirstFootprint() const
Gets the first footprint on the board or nullptr.
Definition: board.h:348
#define NULL
VECTOR2< double > VECTOR2D
Definition: vector2d.h:593
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:345
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:29
bool SaveLibraryAs(const wxString &aLibraryPath)
Save a library to a new name and/or library type.
int ShowQuasiModal()
void SetOrientation(double aNewAngle)
Definition: footprint.cpp:1423
FOOTPRINTS & Footprints()
Definition: board.h:283
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
Definition: footprint.cpp:1258
LIB_ID GetSelectedLibId() const
To be called after this dialog returns from ShowModal().
Helper dialog and control classes.
BOARD_ITEM * Duplicate() const override
Function Duplicate creates a copy of a BOARD_ITEM.
Definition: footprint.cpp:1461
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Function LoadFootprint attempts to load aFootprintId from the footprint library table.
FOOTPRINT_INFO * GetFootprintInfo(const wxString &aFootprintName)
Get info for a footprint by id.
const LIB_ID & GetFPID() const
Definition: footprint.h:208
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Factory function: create a model adapter in a reference-counting container.
PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
UTF8 Format() const
Definition: lib_id.cpp:237
static void AddFootprintToHistory(const wxString &aName)
BOARD * GetBoard()
const KIID m_Uuid
Definition: eda_item.h:151
VTBL_ENTRY FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
Definition: project.cpp:284
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
void LoadFootprintFromBoard(wxCommandEvent &event)
Called from the main toolbar to load a footprint from board mainly to edit it.
void SetLink(const KIID &aLink)
Definition: footprint.h:550
see class PGM_BASE
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:186
#define _(s)
Definition: 3d_actions.cpp:33
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Function PluginFind returns a PLUGIN which the caller can use to import, export, save,...
Definition: io_mgr.cpp:57
PCB_EDIT_FRAME is the main frame for Pcbnew.
PCBNEW_SETTINGS & Settings()
unsigned GetErrorCount() const
void ClearItemsList()
Function ClearItemsList deletes only the list of pickers, NOT the picked data itself.
wxPoint GetPosition() const override
Definition: footprint.h:200
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
bool ReadFootprintFiles(FP_LIB_TABLE *aTable, const wxString *aNickname=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr) override
Read all the footprints provided by the combination of aTable and aNickname.
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: eda_item.h:221
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const
Function RunOnChildren.
Definition: footprint.cpp:1066
static FOOTPRINT * s_FootprintInitialCopy
BOARD * GetBoard() const
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Definition: footprint.cpp:442
void SetPosition(const wxPoint &aPos) override
Definition: footprint.cpp:1323
static unsigned s_FootprintHistoryMaxCount
int Parse(const UTF8 &aId, LIB_ID_TYPE aType, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:122
PCB_FILE_T
Enum PCB_FILE_T is a set of file types that the IO_MGR knows about, and for which there has been a pl...
Definition: io_mgr.h:54
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:268
virtual PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
Definition: board_item.h:185
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
FOOTPRINT * GetFootprintFromBoardByReference()
Function GetFootprintFromBoardByReference.
KIWAY Kiway