KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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, [email protected]
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
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>
27using namespace std::placeholders;
28
29#include <board.h>
30#include <footprint.h>
31#include <confirm.h>
35#include <eda_list_dialog.h>
37#include <footprint_tree_pane.h>
39#include <fp_lib_table.h>
40#include <io_mgr.h>
41#include <string_utils.h>
42#include <kiway.h>
43#include <lib_id.h>
44#include <macros.h>
45#include <pcb_edit_frame.h>
46#include <pcbnew_settings.h>
48#include <view/view_controls.h>
49#include <widgets/lib_tree.h>
52#include <project_pcb.h>
53
54
55static wxArrayString s_FootprintHistoryList;
56static unsigned s_FootprintHistoryMaxCount = 8;
57
58static void AddFootprintToHistory( const wxString& aName )
59{
60 // Remove duplicates
61 for( int ii = s_FootprintHistoryList.GetCount() - 1; ii >= 0; --ii )
62 {
63 if( s_FootprintHistoryList[ ii ] == aName )
64 s_FootprintHistoryList.RemoveAt((size_t) ii );
65 }
66
67 // Add the new name at the beginning of the history list
68 s_FootprintHistoryList.Insert( aName, 0 );
69
70 // Remove extra names
72 s_FootprintHistoryList.RemoveAt( s_FootprintHistoryList.GetCount() - 1 );
73}
74
75
76#include <bitmaps.h>
78{
79 bool is_last_fp_from_brd = IsCurrentFPFromBoard();
80
81 FOOTPRINT* newFootprint = nullptr;
83
84 if( frame == nullptr ) // happens if no board editor opened
85 return false;
86
87 if( aFootprint == nullptr )
88 {
89 if( !frame->GetBoard() || !frame->GetBoard()->GetFirstFootprint() )
90 return false;
91
92 aFootprint = SelectFootprintFromBoard( frame->GetBoard() );
93 }
94
95 if( aFootprint == nullptr )
96 return false;
97
98 // Ensure we do not have the pad editor open (that is apseudo modal dlg).
99 // LoadFootprintFromBoard() can be called from the board editor, and we must ensure
100 // no footprint item is currently in edit
101 if( wxWindow::FindWindowByName( PAD_PROPERTIES_DLG_NAME ) )
102 wxWindow::FindWindowByName( PAD_PROPERTIES_DLG_NAME )->Close();
103
104 if( !Clear_Pcb( true ) )
105 return false;
106
107 m_boardFootprintUuids.clear();
108
109 auto recordAndUpdateUuid =
110 [&]( BOARD_ITEM* aItem )
111 {
112 KIID newId;
113 m_boardFootprintUuids[ newId ] = aItem->m_Uuid;
114 const_cast<KIID&>( aItem->m_Uuid ) = newId;
115 };
116
117 newFootprint = (FOOTPRINT*) aFootprint->Clone(); // Keep existing uuids
118 newFootprint->SetParent( GetBoard() );
119 newFootprint->SetParentGroup( nullptr );
120 newFootprint->SetLink( aFootprint->m_Uuid );
121
122 newFootprint->ClearFlags();
123 recordAndUpdateUuid( newFootprint );
124 newFootprint->RunOnChildren(
125 [&]( BOARD_ITEM* aItem )
126 {
127 if( aItem->Type() == PCB_PAD_T )
128 aItem->SetLocked( false );
129
130 aItem->ClearFlags();
131 recordAndUpdateUuid( aItem );
132 } );
133
134 AddFootprintToBoard( newFootprint );
135
136 // Clear references to any net info, because the footprint editor does know any thing about
137 // nets handled by the current edited board.
138 // Moreover we do not want to save any reference to an unknown net when saving the footprint
139 // in lib cache so we force the ORPHANED dummy net info for all pads.
140 newFootprint->ClearAllNets();
141
143 PlaceFootprint( newFootprint );
144 newFootprint->SetPosition( VECTOR2I( 0, 0 ) ); // cursor in GAL may not yet be initialized
145
146 // Put it on FRONT layer,
147 // because this is the default in Footprint Editor, and in libs
148 if( newFootprint->GetLayer() != F_Cu )
149 newFootprint->Flip( newFootprint->GetPosition(), frame->GetPcbNewSettings()->m_FlipLeftRight );
150
151 // Put it in orientation 0,
152 // because this is the default orientation in Footprint Editor, and in libs
153 newFootprint->SetOrientation( ANGLE_0 );
154
155 Zoom_Automatique( false );
156
157 m_adapter->SetPreselectNode( newFootprint->GetFPID(), 0 );
158
160 GetScreen()->SetContentModified( false );
161
162 // Update the save items if needed.
163 if( !is_last_fp_from_brd )
164 {
167
168 if( IsSearchTreeShown() )
170 }
171
172 Update3DView( true, true );
173 UpdateView();
174 GetCanvas()->Refresh();
175 m_treePane->GetLibTree()->RefreshLibTree(); // update any previously-highlighted items
176
177 return true;
178}
179
180
182{
183 wxString footprintName;
184 LIB_ID fpid;
185 FOOTPRINT* footprint = nullptr;
186
187 static wxString lastComponentName;
188
189 DIALOG_FOOTPRINT_CHOOSER dialog( this, aPreselect, s_FootprintHistoryList );
190
191 if( dialog.ShowModal() == wxID_CANCEL )
192 return nullptr;
193
194 fpid = dialog.GetSelectedLibId();
195
196 if( !fpid.IsValid() )
197 return nullptr;
198 else
199 footprintName = fpid.Format().wx_str();
200
201 try
202 {
203 footprint = loadFootprint( fpid );
204 }
205 catch( const IO_ERROR& )
206 {
207 }
208
209 if( footprint )
210 {
211 lastComponentName = footprintName;
212 AddFootprintToHistory( footprintName );
213 }
214
215 return footprint;
216}
217
218
220{
221 FOOTPRINT* footprint = nullptr;
222
223 try
224 {
225 footprint = loadFootprint( aFootprintId );
226 }
227 catch( const IO_ERROR& )
228 {
229 }
230
231 return footprint;
232}
233
234
236{
238
239 wxCHECK_MSG( fptbl, nullptr, wxT( "Cannot look up LIB_ID in NULL FP_LIB_TABLE." ) );
240
241 FOOTPRINT *footprint = nullptr;
242
243 // When loading a footprint from a library in the footprint editor
244 // the items UUIDs must be keep and not reinitialized
245 bool keepUUID = IsType( FRAME_FOOTPRINT_EDITOR );
246
247 try
248 {
249 footprint = fptbl->FootprintLoadWithOptionalNickname( aFootprintId, keepUUID );
250 }
251 catch( const IO_ERROR& )
252 {
253 }
254
255 if( footprint )
256 {
257 // If the footprint is found, clear all net info to be sure there are no broken links to
258 // any netinfo list (should be not needed, but it can be edited from the footprint editor )
259 footprint->ClearAllNets();
260
261 if( m_pcb && !m_pcb->IsFootprintHolder() )
262 {
263 footprint->ApplyDefaultSettings( *m_pcb, GetPcbNewSettings()->m_StyleFootprintFields,
264 GetPcbNewSettings()->m_StyleFootprintTextAndGraphics );
265 }
266 }
267
268 return footprint;
269}
270
271
273{
274 static wxString oldName; // Save name of last footprint selected.
275
276 wxString fpname;
277 wxString msg;
278 wxArrayString listnames;
279
280 for( FOOTPRINT* footprint : aPcb->Footprints() )
281 listnames.Add( footprint->GetReference() );
282
283 msg.Printf( _( "Footprints [%u items]" ), (unsigned) listnames.GetCount() );
284
285 wxArrayString headers;
286
287 headers.Add( _( "Footprint" ) );
288
289 std::vector<wxArrayString> itemsToDisplay;
290
291 // Conversion from wxArrayString to vector of ArrayString
292 for( unsigned i = 0; i < listnames.GetCount(); i++ )
293 {
294 wxArrayString item;
295
296 item.Add( listnames[i] );
297 itemsToDisplay.push_back( item );
298 }
299
300 EDA_LIST_DIALOG dlg( this, msg, headers, itemsToDisplay, wxEmptyString );
301
302 if( dlg.ShowModal() == wxID_OK )
303 fpname = dlg.GetTextSelection();
304 else
305 return nullptr;
306
307 oldName = fpname;
308
309 for( FOOTPRINT* fp : aPcb->Footprints() )
310 {
311 if( fpname == fp->GetReference() )
312 return fp;
313 }
314
315 return nullptr;
316}
317
318
319bool FOOTPRINT_EDIT_FRAME::SaveLibraryAs( const wxString& aLibraryPath )
320{
321 const wxString& curLibPath = aLibraryPath;
322 wxString dstLibPath = CreateNewLibrary( wxEmptyString, aLibraryPath );
323
324 if( !dstLibPath )
325 return false; // user aborted in CreateNewLibrary()
326
327 wxBusyCursor dummy;
328 wxString msg;
329
332
333 if( dstType == IO_MGR::FILE_TYPE_NONE )
334 dstType = IO_MGR::KICAD_SEXP;
335
336 try
337 {
338 PLUGIN::RELEASER cur( IO_MGR::PluginFind( curType ) );
339 PLUGIN::RELEASER dst( IO_MGR::PluginFind( dstType ) );
340
341 if( !cur )
342 {
343 msg = wxString::Format( _( "Unable to find a reader for '%s'." ), curLibPath );
344 DisplayError( this, msg );
345 return false;
346 }
347
348 if( !dst )
349 {
350 msg = wxString::Format( _( "Unable to find a writer for '%s'." ), dstLibPath );
351 DisplayError( this, msg );
352 return false;
353 }
354
355 wxArrayString footprints;
356
357 cur->FootprintEnumerate( footprints, curLibPath, false );
358
359 for( unsigned i = 0; i < footprints.size(); ++i )
360 {
361 const FOOTPRINT* footprint = cur->GetEnumeratedFootprint( curLibPath, footprints[i] );
362 dst->FootprintSave( dstLibPath, footprint );
363
364 msg = wxString::Format( _( "Footprint '%s' saved." ), footprints[i] );
365 SetStatusText( msg );
366 }
367 }
368 catch( const IO_ERROR& ioe )
369 {
370 DisplayError( this, ioe.What() );
371 return false;
372 }
373
374 msg = wxString::Format( _( "Footprint library '%s' saved as '%s'." ),
375 curLibPath,
376 dstLibPath );
377
378 DisplayInfoMessage( this, msg );
379
380 SetStatusText( wxEmptyString );
381 return true;
382}
383
384
385static FOOTPRINT* s_FootprintInitialCopy = nullptr; // Copy of footprint for abort/undo command
386
387static PICKED_ITEMS_LIST s_PickedList; // A pick-list to save initial footprint
388 // and dragged tracks
389
390
392{
393 wxString footprintName;
394 wxArrayString fplist;
395
396 // Build list of available fp references, to display them in dialog
397 for( FOOTPRINT* fp : GetBoard()->Footprints() )
398 fplist.Add( fp->GetReference() + wxT( " ( " ) + fp->GetValue() + wxT( " )" ) );
399
400 fplist.Sort();
401
402 DIALOG_GET_FOOTPRINT_BY_NAME dlg( this, fplist );
403
404 if( dlg.ShowModal() != wxID_OK ) //Aborted by user
405 return nullptr;
406
407 footprintName = dlg.GetValue();
408 footprintName.Trim( true );
409 footprintName.Trim( false );
410
411 if( !footprintName.IsEmpty() )
412 {
413 for( FOOTPRINT* fp : GetBoard()->Footprints() )
414 {
415 if( fp->GetReference().CmpNoCase( footprintName ) == 0 )
416 return fp;
417 }
418 }
419
420 return nullptr;
421}
422
423
424void PCB_BASE_FRAME::PlaceFootprint( FOOTPRINT* aFootprint, bool aRecreateRatsnest )
425{
426 if( aFootprint == nullptr )
427 return;
428
429 OnModify();
430
431 if( aFootprint->IsNew() )
432 {
433 SaveCopyInUndoList( aFootprint, UNDO_REDO::NEWITEM );
434 }
435 else if( aFootprint->IsMoving() )
436 {
437 ITEM_PICKER picker( nullptr, aFootprint, UNDO_REDO::CHANGED );
439 s_PickedList.PushItem( picker );
440 s_FootprintInitialCopy = nullptr; // the picker is now owner of s_ModuleInitialCopy.
441 }
442
443 if( s_PickedList.GetCount() )
444 {
445 SaveCopyInUndoList( s_PickedList, UNDO_REDO::UNSPECIFIED );
446
447 // Clear list, but DO NOT delete items, because they are owned by the saved undo
448 // list and they therefore in use
450 }
451
452 aFootprint->SetPosition( GetCanvas()->GetViewControls()->GetCursorPosition() );
453 aFootprint->ClearFlags();
454
456 s_FootprintInitialCopy = nullptr;
457
458 if( aRecreateRatsnest )
459 m_pcb->GetConnectivity()->Update( aFootprint );
460
461 if( aRecreateRatsnest )
462 Compile_Ratsnest( true );
463
464 SetMsgPanel( aFootprint );
465}
466
467
void SetContentModified(bool aModified=true)
Definition: base_screen.h:59
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:77
void SetParentGroup(PCB_GROUP *aGroup)
Definition: board_item.h:90
virtual void SetLocked(bool aLocked)
Definition: board_item.h:278
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:271
bool IsFootprintHolder() const
Find out if the board is being used to hold a single footprint for editing/viewing.
Definition: board.h:301
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Definition: board.h:406
FOOTPRINTS & Footprints()
Definition: board.h:313
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
Definition: board.h:433
LIB_ID GetSelectedLibId() const
To be called after this dialog returns from ShowModal().
DIALOG_GET_FOOTPRINT_BY_NAME is a helper dialog to select a footprint by its reference One can enter ...
virtual void ClearUndoRedoList()
Clear the undo and redo list using ClearUndoORRedoList()
bool IsType(FRAME_T aType) const
void ReCreateMenuBar()
Recreates the menu bar.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void Zoom_Automatique(bool aWarpPointer)
Redraw the screen with best zoom level and the best centering that shows all the page or the board.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
const KIID m_Uuid
Definition: eda_item.h:482
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: eda_item.h:125
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:100
bool IsMoving() const
Definition: eda_item.h:104
bool IsNew() const
Definition: eda_item.h:103
A dialog which shows:
wxString GetTextSelection(int aColumn=0)
Return the selected text from aColumn in the wxListCtrl in the dialog.
bool SaveLibraryAs(const wxString &aLibraryPath)
Save a library to a new name and/or library type.
std::map< KIID, KIID > m_boardFootprintUuids
FOOTPRINT * SelectFootprintFromBoard(BOARD *aPcb)
Display the list of footprints currently existing on the BOARD.
void ReCreateHToolbar() override
Create the main horizontal toolbar for the footprint editor.
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
bool Clear_Pcb(bool doAskAboutUnsavedChanges)
Delete all and reinitialize the current board.
Definition: initpcb.cpp:103
void AddFootprintToBoard(FOOTPRINT *aFootprint) override
Override from PCB_BASE_EDIT_FRAME which adds a footprint to the editor's dummy board,...
FOOTPRINT_TREE_PANE * m_treePane
bool LoadFootprintFromBoard(FOOTPRINT *aFootprint)
Load a footprint from the main board into the Footprint Editor.
LIB_TREE * GetLibTree() const
void SetPosition(const VECTOR2I &aPos) override
Definition: footprint.cpp:1946
void SetLink(const KIID &aLink)
Definition: footprint.h:795
void SetOrientation(const EDA_ANGLE &aNewAngle)
Definition: footprint.cpp:2018
void ApplyDefaultSettings(const BOARD &board, bool aStyleFields, bool aStyleTextAndGraphics)
Apply default board settings to the footprint field text properties.
Definition: footprint.cpp:355
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: footprint.cpp:1676
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
Definition: footprint.h:218
const LIB_ID & GetFPID() const
Definition: footprint.h:230
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
Definition: footprint.cpp:705
void ClearAllNets()
Clear (i.e.
Definition: footprint.cpp:696
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const
Invoke a function on all BOARD_ITEMs that belong to the footprint (pads, drawings,...
Definition: footprint.cpp:1682
void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
Definition: footprint.cpp:1886
VECTOR2I GetPosition() const override
Definition: footprint.h:206
FOOTPRINT * FootprintLoadWithOptionalNickname(const LIB_ID &aFootprintId, bool aKeepUUID=false)
Load a footprint having aFootprintId with possibly an empty nickname.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:76
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:30
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
Definition: io_mgr.cpp:140
PCB_FILE_T
The set of file types that the IO_MGR knows about, and for which there has been a plugin written,...
Definition: io_mgr.h:54
@ KICAD_SEXP
S-expression Pcbnew file format.
Definition: io_mgr.h:55
@ FILE_TYPE_NONE
Definition: io_mgr.h:72
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Return a PLUGIN which the caller can use to import, export, save, or load design documents.
Definition: io_mgr.cpp:63
void SetLink(EDA_ITEM *aItem)
virtual void SetCrossHairCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true)=0
Move the graphic crosshair cursor to the requested position expressed in world coordinates.
Definition: kiid.h:49
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
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
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
bool IsValid() const
Check if this LID_ID is valid.
Definition: lib_id.h:172
UTF8 Format() const
Definition: lib_id.cpp:118
void RefreshLibTree()
Refreshes the tree (mainly to update highlighting and asterisking)
Definition: lib_tree.cpp:365
wxString CreateNewLibrary(const wxString &aLibName=wxEmptyString, const wxString &aProposedName=wxEmptyString)
If a library name is given, creates a new footprint library in the project folder with the given name...
FOOTPRINT * GetFootprintFromBoardByReference()
PCBNEW_SETTINGS * GetPcbNewSettings() const
void OnModify() override
Must be called after a change in order to set the "modify" flag and update other data structures and ...
virtual void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand)
Create a new entry in undo list of commands.
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Attempts to load aFootprintId from the footprint library table.
FOOTPRINT * SelectFootprintFromLibrary(LIB_ID aPreselect=LIB_ID())
Open a dialog to select a footprint.
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
BOARD * GetBoard() const
void PlaceFootprint(FOOTPRINT *aFootprint, bool aRecreateRatsnest=true)
Places aFootprint at the current cursor position and updates footprint coordinates with the new posit...
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
Definition: ratsnest.cpp:35
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
The main frame for Pcbnew.
A holder to handle information on schematic or board items.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
unsigned GetCount() const
void ClearItemsList()
Delete only the list of pickers NOT the picked data itself.
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
Definition: io_mgr.h:610
virtual const FOOTPRINT * GetEnumeratedFootprint(const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr)
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
Definition: plugin.cpp:200
virtual void FootprintSave(const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const STRING_UTF8_MAP *aProperties=nullptr)
Write aFootprint to an existing library located at aLibraryPath.
Definition: plugin.cpp:225
virtual void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const STRING_UTF8_MAP *aProperties=nullptr)
Return a list of footprint names contained within the library at aLibraryPath.
Definition: plugin.cpp:165
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
Definition: project_pcb.cpp:37
wxString wx_str() const
Definition: utf8.cpp:45
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:280
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 PAD_PROPERTIES_DLG_NAME
DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, created by wxFormBuilder.
#define _(s)
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:437
static wxArrayString s_FootprintHistoryList
static void AddFootprintToHistory(const wxString &aName)
@ FRAME_PCB_EDITOR
Definition: frame_type.h:40
@ FRAME_FOOTPRINT_EDITOR
Definition: frame_type.h:41
KIWAY Kiway
@ F_Cu
Definition: layer_ids.h:65
static wxArrayString s_FootprintHistoryList
static unsigned s_FootprintHistoryMaxCount
static PICKED_ITEMS_LIST s_PickedList
static FOOTPRINT * s_FootprintInitialCopy
static void AddFootprintToHistory(const wxString &aName)
This file contains miscellaneous commonly used macros and functions.
std::vector< FAB_LAYER_COLOR > dummy
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition: typeinfo.h:87
VECTOR2< double > VECTOR2D
Definition: vector2d.h:587
VECTOR2< int > VECTOR2I
Definition: vector2d.h:588