72#include <wx/filedlg.h>
77using namespace std::placeholders;
134 m_inPlaceFootprint( false ),
135 m_placingFootprint( false ),
136 m_inPlaceTarget( false )
150 m_frame = getEditFrame<PCB_EDIT_FRAME>();
154 m_placeOrigin->SetPosition( getModel<BOARD>()->GetDesignSettings().GetAuxOrigin() );
163 auto activeToolCondition =
169 auto inactiveStateCondition =
175 auto placeModuleCondition =
185 ctxMenu.AddSeparator( 1 );
189 ctxMenu.AddSeparator( 1000 );
192 getEditFrame<PCB_BASE_FRAME>()->AddStandardSubMenus(
m_menu );
194 std::shared_ptr<ZONE_CONTEXT_MENU> zoneMenu = std::make_shared<ZONE_CONTEXT_MENU>();
195 zoneMenu->SetTool(
this );
197 std::shared_ptr<LOCK_CONTEXT_MENU> lockMenu = std::make_shared<LOCK_CONTEXT_MENU>(
this );
231 auto toolActiveFunctor =
293 ITEM_PICKER wrapper(
nullptr, undoItem, UNDO_REDO::PAGESETTINGS );
302 if( dlg.ShowModal() == wxID_OK )
311 text->ClearRenderCache();
312 text->ClearBoundingBoxCache();
360 getEditFrame<PCB_EDIT_FRAME>()->ShowBoardSetupDialog();
367 getEditFrame<PCB_EDIT_FRAME>()->InstallNetlistFrame();
379 wxFileName::SplitPath( fullFileName, &
path, &
name, &ext );
382 fullFileName = wxFileSelector(
_(
"Specctra Session File" ),
path,
name,
387 if( !fullFileName.IsEmpty() )
388 getEditFrame<PCB_EDIT_FRAME>()->ImportSpecctraSession( fullFileName );
399 if( fullFileName.IsEmpty() )
409 fullFileName = wxFileSelector(
_(
"Specctra DSN File" ), fn.GetPath(), fn.GetFullName(),
411 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxFD_CHANGE_DIR,
frame() );
413 if( !fullFileName.IsEmpty() )
416 getEditFrame<PCB_EDIT_FRAME>()->ExportSpecctraFile( fullFileName );
431 fn.SetExt( wxT(
"pcb_net" ) );
433 wxFileDialog dlg(
m_frame,
_(
"Export Board Netlist" ), fn.GetPath(), fn.GetFullName(),
435 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
439 if( dlg.ShowModal() == wxID_CANCEL )
444 if( !fn.IsDirWritable() )
448 msg.Printf(
_(
"Path `%s` is read only." ), fn.GetPath() );
449 wxMessageDialog(
m_frame, msg,
_(
"I/O Error" ), wxOK | wxCENTER | wxICON_EXCLAMATION );
463 { footprint->m_Uuid } );
467 const wxString& netname =
pad->GetShortNetname();
469 if( !netname.IsEmpty() )
471 component->
AddNet(
pad->GetNumber(), netname,
pad->GetPinFunction(),
476 netlist.AddComponent( component );
489 wxCommandEvent
dummy;
500 wxFAIL_MSG( wxT(
"GenerateFabFiles(): unexpected request" ) );
519 if( ids.count( aItem->m_Uuid ) )
522 const_cast<KIID&
>( aItem->m_Uuid ) =
KIID();
525 ids.insert( aItem->m_Uuid );
537 details += wxString::Format(
_(
"Orphaned net %s re-parented.\n" ),
560 processItem( track );
576 processItem(
group );
580 processItem( drawing );
586 processItem( marker );
589 processItem(
group );
593 errors += duplicates;
594 details += wxString::Format(
_(
"%d duplicate IDs replaced.\n" ), duplicates );
609 wxString msg = wxString::Format(
_(
"%d potential problems repaired." ), errors );
631 updateDialog.ShowModal();
642 "stand-alone mode. In order to create or update PCBs "
643 "from schematics, you must launch the KiCad project "
644 "manager and create a project." ) );
656 blocking_win->Close(
true );
673 getEditFrame<PCB_EDIT_FRAME>()->ToggleLayersManager();
680 getEditFrame<PCB_EDIT_FRAME>()->ToggleProperties();
687 getEditFrame<PCB_EDIT_FRAME>()->ToggleSearch();
712 if( item->IsType( { PCB_TRACE_T, PCB_ARC_T } ) )
731 commit.
Push( wxT(
"Increase Track Width" ) );
792 if( item->IsType( { PCB_TRACE_T, PCB_ARC_T } ) )
801 if( candidate < track->GetWidth() )
811 commit.
Push( wxT(
"Decrease Track Width" ) );
889 commit.
Push( wxT(
"Increase Via Size" ) );
940 commit.
Push(
"Decrease Via Size" );
974 bool fromOtherCommand = fp !=
nullptr;
996 if( fromOtherCommand )
1019 bool ignorePrimePosition =
false;
1020 bool reselect =
false;
1037 ignorePrimePosition =
true;
1046 if( reselect && fp )
1049 if( evt->IsCancelInteractive() )
1061 else if( evt->IsActivate() )
1066 if( evt->IsMoveTool() )
1077 else if( evt->IsClick(
BUT_LEFT ) )
1090 if( evt->IsPrime() && !ignorePrimePosition )
1092 cursorPos = evt->Position();
1116 pad->SetNetCode( 0 );
1135 commit.
Push(
_(
"Place a footprint" ) );
1162 evt->SetPassEvent();
1222 bool modified =
false;
1228 commit.
Modify( board_item );
1232 modified |= !board_item->
IsLocked();
1237 modified |= board_item->
IsLocked();
1244 commit.
Push( aMode ==
ON ?
_(
"Lock" ) :
_(
"Unlock" ) );
1255 std::vector<ZONE*>& aOriginZones, std::vector<ZONE*>& aMergedZones )
1257 aCommit.
Modify( aOriginZones[0] );
1259 for(
unsigned int i = 1; i < aOriginZones.size(); i++ )
1261 aOriginZones[0]->Outline()->BooleanAdd( *aOriginZones[i]->Outline(),
1270 if( aOriginZones[0]->Outline()->IsSelfIntersecting()
1271 || aOriginZones[0]->Outline()->OutlineCount() > 1 )
1278 for(
unsigned int i = 1; i < aOriginZones.size(); i++ )
1279 aCommit.
Remove( aOriginZones[i] );
1281 aMergedZones.push_back( aOriginZones[0] );
1283 aOriginZones[0]->SetLocalFlags( 1 );
1284 aOriginZones[0]->HatchBorder();
1285 aOriginZones[0]->CacheTriangulation();
1302 ZONE* firstZone =
nullptr;
1303 std::vector<ZONE*> toMerge, merged;
1307 ZONE* curr_area =
dynamic_cast<ZONE*
>( item );
1313 firstZone = curr_area;
1319 wxLogMessage(
_(
"Some zone netcodes did not match and were not merged." ) );
1325 wxLogMessage(
_(
"Some zone priorities did not match and were not merged." ) );
1331 wxLogMessage(
_(
"Some zones were rule areas and were not merged." ) );
1337 wxLogMessage(
_(
"Some zone layer sets did not match and were not merged." ) );
1341 bool intersects = curr_area == firstZone;
1343 for(
ZONE* candidate : toMerge )
1354 wxLogMessage(
_(
"Some zones did not intersect and were not merged." ) );
1358 toMerge.push_back( curr_area );
1363 if( !toMerge.empty() )
1367 commit.
Push( wxT(
"Merge zones" ) );
1394 zoneSettings << *oldZone;
1404 if( dialogResult != wxID_OK )
1410 std::unique_ptr<ZONE> newZone = std::make_unique<ZONE>( *oldZone );
1411 newZone->ClearSelected();
1422 commit.
Add( newZone.release() );
1423 commit.
Push(
_(
"Duplicate zone" ) );
1473 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
1476 aCollector.
Remove( aCollector[ i ] );
1481 intptr_t netCode = -1;
1496 if( netName.IsEmpty() )
1507 [
this](
const std::vector<wxString>& aNetNames )
1512 for(
const wxString& curr_netName : aNetNames )
1516 if( curr_netCode > 0 )
1524 if( dlg.ShowModal() == wxID_OK )
1553 editor->LoadFootprintFromBoard( fp );
1585 [
this] (
const VECTOR2D& pt ) ->
bool
constexpr EDA_IU_SCALE pcbIUScale
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static bool mergeZones(EDA_DRAW_FRAME *aFrame, BOARD_COMMIT &aCommit, std::vector< ZONE * > &aOriginZones, std::vector< ZONE * > &aMergedZones)
static TOOL_ACTION updatePcbFromSchematic
static TOOL_ACTION cancelInteractive
static TOOL_ACTION revert
static TOOL_ACTION saveAs
static TOOL_ACTION pickerTool
static TOOL_ACTION findPrevious
static TOOL_ACTION findNext
static TOOL_ACTION pageSettings
static TOOL_ACTION showSearch
static TOOL_ACTION updateSchematicFromPcb
static TOOL_ACTION saveCopy
static TOOL_ACTION refreshPreview
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
virtual void Revert() override
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
Container for design settings for a BOARD object.
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
void SetDiffPairIndex(unsigned aIndex)
bool m_UseConnectedTrackWidth
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
bool m_TempOverrideTrackWidth
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
void SetAuxOrigin(const VECTOR2I &aOrigin)
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
unsigned GetTrackWidthIndex() const
unsigned GetViaSizeIndex() const
void UseCustomDiffPairDimensions(bool aEnabled)
Enables/disables custom differential pair dimensions.
std::vector< int > m_TrackWidthList
unsigned GetDiffPairIndex() const
std::vector< VIA_DIMENSION > m_ViasDimensionsList
int ExportNetlist(const TOOL_EVENT &aEvent)
int UnlockSelected(const TOOL_EVENT &aEvent)
Run the drill origin tool for setting the origin for drill and pick-and-place files.
int Save(const TOOL_EVENT &aEvent)
int ImportNetlist(const TOOL_EVENT &aEvent)
int GenerateDrillFiles(const TOOL_EVENT &aEvent)
int ZoneMerge(const TOOL_EVENT &aEvent)
Duplicate a zone onto a layer (prompts for new layer)
int CrossProbeToSch(const TOOL_EVENT &aEvent)
Equivalent to the above, but initiated by the user.
int TogglePythonConsole(const TOOL_EVENT &aEvent)
static void DoSetDrillOrigin(KIGFX::VIEW *aView, PCB_BASE_FRAME *aFrame, EDA_ITEM *aItem, const VECTOR2D &aPoint)
int UpdatePCBFromSchematic(const TOOL_EVENT &aEvent)
std::unique_ptr< KIGFX::ORIGIN_VIEWITEM > m_placeOrigin
int ShowEeschema(const TOOL_EVENT &aEvent)
int SaveAs(const TOOL_EVENT &aEvent)
int AssignNetclass(const TOOL_EVENT &aEvent)
int UpdateSchematicFromPCB(const TOOL_EVENT &aEvent)
int ExplicitCrossProbeToSch(const TOOL_EVENT &aEvent)
Assign a netclass to a labelled net.
int ToggleSearch(const TOOL_EVENT &aEvent)
int DrillOrigin(const TOOL_EVENT &aEvent)
Low-level access (below undo) to setting the drill origin.
MODIFY_MODE
< How to modify a property for selected items.
int GenerateFabFiles(const TOOL_EVENT &aEvent)
int ViaSizeDec(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int RepairBoard(const TOOL_EVENT &aEvent)
int ZoneDuplicate(const TOOL_EVENT &aEvent)
int ToggleLayersManager(const TOOL_EVENT &aEvent)
int ImportSpecctraSession(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int PlaceFootprint(const TOOL_EVENT &aEvent)
Display a dialog to select a footprint to be added and allows the user to set its position.
int BoardSetup(const TOOL_EVENT &aEvent)
int modifyLockSelected(MODIFY_MODE aMode)
Set up handlers for various events.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int TrackWidthInc(const TOOL_EVENT &aEvent)
static const int WIDTH_STEP
How does line width change after one -/+ key press.
int ToggleLockSelected(const TOOL_EVENT &aEvent)
Lock selected items.
int LockSelected(const TOOL_EVENT &aEvent)
Unlock selected items.
int PageSettings(const TOOL_EVENT &aEvent)
int ExportSpecctraDSN(const TOOL_EVENT &aEvent)
int FindNext(const TOOL_EVENT &aEvent)
int ViaSizeInc(const TOOL_EVENT &aEvent)
int New(const TOOL_EVENT &aEvent)
int Find(const TOOL_EVENT &aEvent)
void doCrossProbePcbToSch(const TOOL_EVENT &aEvent, bool aForce)
int Plot(const TOOL_EVENT &aEvent)
int TrackWidthDec(const TOOL_EVENT &aEvent)
int Revert(const TOOL_EVENT &aEvent)
int Search(const TOOL_EVENT &aEvent)
int Open(const TOOL_EVENT &aEvent)
int SaveCopy(const TOOL_EVENT &aEvent)
int GeneratePosFile(const TOOL_EVENT &aEvent)
int EditFpInFpEditor(const TOOL_EVENT &aEvent)
Notify Eeschema about selected items.
int ToggleProperties(const TOOL_EVENT &aEvent)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void SetLocked(bool aLocked)
virtual bool IsLocked() const
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
void UpdateUserUnits(BOARD_ITEM *aItem, KIGFX::VIEW *aView)
Update any references within aItem (or its descendants) to the user units.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
const wxString & GetFileName() const
bool TestZoneIntersection(ZONE *aZone1, ZONE *aZone2)
Test for intersection of 2 copper areas.
int GetCount() const
Return the number of objects in the list.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been removed.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
Store all of the related footprint information found in a netlist.
void AddNet(const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
void SetWksFileName(const wxString &aFilename)
virtual PICKED_ITEMS_LIST * PopCommandFromUndoList()
Return the last command to undo and remove it from list, nothing is deleted.
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...
The base class for create windows for drawing purpose.
void ScriptingConsoleEnableDisable()
Toggles the scripting console visibility.
virtual void UpdateMsgPanel()
Redraw the message panel.
void ForceRefresh()
Force a redraw.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual void SetPosition(const VECTOR2I &aPos)
void SetFlags(EDA_ITEM_FLAGS aMask)
virtual void SetParent(EDA_ITEM *aParent)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
static const TOOL_EVENT ClearedEvent
static const TOOL_EVENT SelectedEvent
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
static const TOOL_EVENT PointSelectedEvent
static const TOOL_EVENT UnselectedEvent
Used when the right click button is pressed, or when the select tool is in effect.
A color representation with 4 components: red, green, blue, alpha.
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
virtual void WarpMouseCursor(const VECTOR2D &aPosition, bool aWorldCoordinates=false, bool aWarpView=false)=0
If enabled (.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
virtual void PinCursorInsideNonAutoscrollArea(bool aWarpMouseCursor)=0
An abstract base class for deriving all objects that can be added to a VIEW.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
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...
void MarkDirty()
Force redraw of view on the next rendering.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
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.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)
Send aPayload to aDestination from aSource.
Helper widget to add controls to a wxFileDialog to set netlist configuration options.
int GetNetlistOptions() const
static wxWindow * Create(wxWindow *aParent)
Handle the data for a net.
bool HasAutoGeneratedNetname()
const wxString & GetNetname() const
NETINFO_ITEM * GetNetItem(int aNetCode) const
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
DISPLAY_OPTIONS m_Display
static TOOL_ACTION generateBOM
static TOOL_ACTION zoneFillAll
static TOOL_ACTION showLayersManager
static TOOL_ACTION trackWidthDec
static TOOL_ACTION generateDrillFiles
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
static TOOL_ACTION generateD356File
static TOOL_ACTION trackViaSizeChanged
static TOOL_ACTION exportSpecctraDSN
static TOOL_ACTION trackWidthInc
static TOOL_ACTION getAndPlace
Find an item and start moving.
static TOOL_ACTION drawZoneCutout
static TOOL_ACTION viaSizeDec
static TOOL_ACTION showProperties
static TOOL_ACTION zoneFill
static TOOL_ACTION properties
Activation of the edit tool.
static TOOL_ACTION editFpInFpEditor
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION toggleLock
static TOOL_ACTION viaSizeInc
static TOOL_ACTION zoneUnfill
static TOOL_ACTION generatePosFile
static TOOL_ACTION drillOrigin
static TOOL_ACTION assignNetClass
static TOOL_ACTION repairBoard
static TOOL_ACTION generateGerbers
static TOOL_ACTION generateReportFile
static TOOL_ACTION zoneDuplicate
Duplicate zone onto another layer.
static TOOL_ACTION importNetlist
static TOOL_ACTION drawSimilarZone
static TOOL_ACTION boardSetup
static TOOL_ACTION showEeschema
static TOOL_ACTION zoneUnfillAll
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION selectNet
Select all connections belonging to a single net.
static TOOL_ACTION editLibFpInFpEditor
static TOOL_ACTION zoneMerge
static TOOL_ACTION unlock
static TOOL_ACTION placeFootprint
static TOOL_ACTION showPythonConsole
static TOOL_ACTION importSpecctraSession
static TOOL_ACTION selectOnSchematic
Select symbols/pins on schematic corresponding to selected footprints/pads.
Common, abstract interface for edit frames.
void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand) override
Create a new entry in undo list of commands.
void ClearListAndDeleteItems(PICKED_ITEMS_LIST *aList)
void RollbackFromUndo()
Perform an undo of the last edit without logging a corresponding redo.
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList)
Used in undo or redo command.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
FOOTPRINT * SelectFootprintFromLibTree(LIB_ID aPreselect=LIB_ID())
Open a dialog to select a footprint.
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 ...
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this 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.
void FindNext(bool reverse=false)
Find the next item using our existing search parameters.
TOOL_ACTION * GetExportNetlistAction()
void OnModify() override
Must be called after a board change to set the modified flag.
void RecreateBOMFileFromBoard(wxCommandEvent &aEvent)
Create a BOM file from the current loaded board.
void GenD356File(wxCommandEvent &event)
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
bool Files_io_from_id(int aId)
Read and write board files according to aId.
void ShowFindDialog()
Show the Find dialog.
bool FetchNetlistFromSchematic(NETLIST &aNetlist, const wxString &aAnnotateMessage)
void SendSelectItemsToSch(const std::deque< EDA_ITEM * > &aItems, EDA_ITEM *aFocusItem, bool aForce)
Send a message to the schematic editor to try to find schematic counterparts of specified PCB items a...
void GenFootprintsReport(wxCommandEvent &event)
Call DoGenFootprintsReport to create a footprint report file.
void ToPlotter(int aID)
Open a dialog frame to create plot and drill files relative to the current board.
A set of BOARD_ITEMs (i.e., without duplicates).
static bool HasUnlockedItems(const SELECTION &aSelection)
Test if any selected items are unlocked.
static bool HasLockedItems(const SELECTION &aSelection)
Test if any selected items are locked.
void SetWidth(int aWidth)
A holder to handle information on schematic or board items.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
RouterState GetState() const
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
static SELECTION_CONDITION OnlyTypes(std::vector< KICAD_T > aTypes)
Create a functor that tests if the selected items are only of given types.
const std::deque< EDA_ITEM * > GetItems() const
EDA_ITEM * GetLastAddedItem() const
int Size() const
Returns the number of selected parts.
void SetReferencePoint(const VECTOR2I &aP)
bool Empty() const
Checks if there is anything selected.
ZONE_SETTINGS handles zones parameters.
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
Handle a list of polygons defining a copper zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
virtual PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
bool IsOnCopperLayer() const override
unsigned GetAssignedPriority() const
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.
This file is part of the common library.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aZoneSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
static constexpr EDA_ANGLE & ANGLE_0
#define IS_NEW
New item, just created.
const std::string SpecctraDsnFileExtension
const std::string SpecctraSessionFileExtension
wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
wxString SpecctraDsnFileWildcard()
wxString SpecctraSessionFileWildcard()
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
@ PNS_MODE_ROUTE_DIFF_PAIR
#define MAX_PAGE_SIZE_PCBNEW_MILS
Class to handle a set of BOARD_ITEMs.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy
bool m_ShowGlobalRatsnest
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition of file extensions used in Kicad.