27using namespace std::placeholders;
 
   84    if( frame == 
nullptr )     
 
   87    if( aFootprint == 
nullptr )
 
   95    if( aFootprint == 
nullptr )
 
  112    auto recordAndUpdateUuid =
 
  117                const_cast<KIID&
>( aItem->m_Uuid ) = newId;
 
  126    recordAndUpdateUuid( newFootprint );
 
  134                recordAndUpdateUuid( aItem );
 
  170    if( !is_last_fp_from_brd )
 
 
  194    static wxString lastComponentName;
 
  198        if( frame->ShowModal( &footprintName, 
this ) )
 
  217        lastComponentName = footprintName;
 
 
  245    wxCHECK_MSG( fptbl, 
nullptr, wxT( 
"Cannot look up LIB_ID in NULL FP_LIB_TABLE." ) );
 
 
  283    static wxString oldName;       
 
  287    wxArrayString   listnames;
 
  290        listnames.
Add( footprint->GetReference() );
 
  292    msg.Printf( 
_( 
"Footprints [%u items]" ), (
unsigned) listnames.GetCount() );
 
  294    wxArrayString headers;
 
  296    headers.Add( 
_( 
"Footprint" ) );
 
  298    std::vector<wxArrayString> itemsToDisplay;
 
  301    for( 
unsigned i = 0; i < listnames.GetCount(); i++ )
 
  305        item.Add( listnames[i] );
 
  306        itemsToDisplay.push_back( item );
 
  309    EDA_LIST_DIALOG dlg( 
this, msg, headers, itemsToDisplay, wxEmptyString );
 
  320        if( fpname == fp->GetReference() )
 
 
  330    const wxString& curLibPath = aLibraryPath;
 
  331    wxString        dstLibPath = 
CreateNewLibrary( 
_( 
"Save Footprint Library As" ), aLibraryPath );
 
  353            msg = wxString::Format( 
_( 
"Unable to find a reader for '%s'." ), curLibPath );
 
  360            msg = wxString::Format( 
_( 
"Unable to find a writer for '%s'." ), dstLibPath );
 
  365        wxArrayString footprints;
 
  367        cur->FootprintEnumerate( footprints, curLibPath, 
false );
 
  369        for( 
const wxString& fp : footprints )
 
  371            const FOOTPRINT* footprint = cur->GetEnumeratedFootprint( curLibPath, fp );
 
  372            dst->FootprintSave( dstLibPath, footprint );
 
  374            msg = wxString::Format( 
_( 
"Footprint '%s' saved." ), fp );
 
  375            SetStatusText( msg );
 
  384    msg = wxString::Format( 
_( 
"Footprint library '%s' saved as '%s'." ),
 
  390    SetStatusText( wxEmptyString );
 
 
  402    if( aFootprint == 
nullptr )
 
  407    if( aFootprint->
IsNew() )
 
  434    if( aRecreateRatsnest )
 
  435        m_pcb->GetConnectivity()->Update( aFootprint );
 
  437    if( aRecreateRatsnest )
 
 
void SetContentModified(bool aModified=true)
 
Container for design settings for a BOARD object.
 
std::map< int, SEVERITY > m_DRCSeverities
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
void SetLocked(bool aLocked) override
 
Information pertinent to a Pcbnew printed circuit board.
 
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
 
const FOOTPRINTS & Footprints() const
 
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
 
virtual void ClearUndoRedoList()
Clear the undo and redo list using ClearUndoORRedoList()
 
bool IsType(FRAME_T aType) const
 
void ReCreateMenuBar()
Recreate 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 ReCreateHToolbar()
 
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
 
KICAD_T Type() const
Returns the type of object.
 
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
 
virtual void SetParentGroup(EDA_GROUP *aGroup)
 
virtual void SetParent(EDA_ITEM *aParent)
 
wxString GetTextSelection(int aColumn=0)
Return the selected text from aColumn in the wxListCtrl in the dialog.
 
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.
 
virtual const wxString What() const
A composite of Problem() and Where()
 
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.
 
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
 
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
 
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
 
A logical library item identifier and consists of various portions much like a URI.
 
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
 
bool IsValid() const
Check if this LID_ID is valid.
 
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
 
FLIP_DIRECTION m_FlipDirection
 
wxString CreateNewLibrary(const wxString &aDialogTitle, const wxString &aInitialPath=wxEmptyString)
If a library name is given, creates a new footprint library in the project folder with the given name...
 
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)
Attempt 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.
 
void PlaceFootprint(FOOTPRINT *aFootprint, bool aRecreateRatsnest=true)
Place aFootprint at the current cursor position and updates footprint coordinates with the new positi...
 
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
 
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.
 
static PCB_IO * PluginFind(PCB_FILE_T aFileType)
Return a #PLUGIN which the caller can use to import, export, save, or load design documents.
 
PCB_FILE_T
The set of file types that the PCB_IO_MGR knows about, and for which there has been a plugin written,...
 
@ KICAD_SEXP
S-expression Pcbnew file format.
 
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
 
A holder to handle information on schematic or board items.
 
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
 
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
 
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
 
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
 
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
 
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.
 
static constexpr EDA_ANGLE ANGLE_0
 
@ FRAME_FOOTPRINT_CHOOSER
 
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
 
This file contains miscellaneous commonly used macros and functions.
 
KIWAY Kiway(KFCTL_STANDALONE)
 
std::vector< FAB_LAYER_COLOR > dummy
 
@ PCB_PAD_T
class PAD, a pad in a footprint
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D