24using namespace std::placeholders;
31#include <netlist_reader/netlist_reader.h>
56 &aNetlist, aFilename, wxEmptyString ) );
58 if( !netlistReader.get() )
60 msg.Printf(
_(
"Cannot open netlist file '%s'." ), aFilename );
66 netlistReader->LoadNetlist();
71 msg.Printf(
_(
"Error loading netlist.\n%s" ), ioe.
What().GetData() );
115 if( netNamesCfg == 2 || netNamesCfg == 3 )
118 else if(
dynamic_cast<PAD*
>( aItem ) )
120 if( netNamesCfg == 1 || netNamesCfg == 3 )
128 text->ClearRenderCache();
129 text->ClearBoundingBoxCache();
144 if( !newFootprints.empty() )
147 std::copy( newFootprints.begin(), newFootprints.end(), std::back_inserter( items ) );
150 *aRunDragCommand =
true;
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
Update the BOARD with a new netlist.
std::vector< FOOTPRINT * > GetAddedFootprints() const
Information pertinent to a Pcbnew printed circuit board.
void CompileRatsnest()
Rebuild the entire board ratsnest.
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
wxString GetDesignRulesPath() const
Return the absolute path to the design rules file for this board.
COMPONENT_CLASS_MANAGER & GetComponentClassManager()
Gets the component class manager.
void InvalidateComponentClasses()
Invalidates any caches component classes and recomputes caches if required.
void RebuildRequiredCaches(FOOTPRINT *aFootprint=nullptr) const
Rebuilds any caches that may be required by custom assignment rules.
void InitEngine(const wxFileName &aRulePath)
Initialize the DRC engine.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
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()
An abstract base class for deriving all objects that can be added to a VIEW.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
static NETLIST_READER * GetNetlistReader(NETLIST *aNetlist, const wxString &aNetlistFileName, const wxString &aCompFootprintFileName=wxEmptyString)
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_RE...
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
DISPLAY_OPTIONS m_Display
PCBNEW_SETTINGS * GetPcbNewSettings() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
void UpdateVariantSelectionCtrl()
Update the variant selection dropdown with the current board's variant names.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
A pure virtual class used to derive REPORTER objects from.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
void LoadNetlistFootprints(BOARD *aBoard, NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
std::vector< EDA_ITEM * > EDA_ITEMS
A filename or source description, a problem input line, a line number, a byte offset,...