68 #include <wx/filedlg.h> 71 using namespace std::placeholders;
81 SetTitle(
_(
"Zones" ) );
112 SetTitle(
_(
"Locking" ) );
135 m_cbOmitExtras =
new wxCheckBox(
this, wxID_ANY,
_(
"Omit extra information" ) );
136 m_cbOmitNets =
new wxCheckBox(
this, wxID_ANY,
_(
"Omit nets" ) );
137 m_cbOmitFpUuids =
new wxCheckBox(
this, wxID_ANY,
138 _(
"Do not prefix path with footprint UUID." ) );
140 wxBoxSizer* sizer =
new wxBoxSizer( wxHORIZONTAL );
141 sizer->Add( m_cbOmitExtras, 0, wxALL, 5 );
142 sizer->Add( m_cbOmitNets, 0, wxALL, 5 );
143 sizer->Add( m_cbOmitFpUuids, 0, wxALL, 5 );
145 SetSizerAndFit( sizer );
152 if( m_cbOmitExtras->GetValue() )
155 if( m_cbOmitNets->GetValue() )
158 if( m_cbOmitFpUuids->GetValue() )
164 static wxWindow*
Create( wxWindow* aParent )
179 m_inPlaceFootprint( false ),
180 m_placingFootprint( false ),
181 m_inPlaceTarget( false )
195 m_frame = getEditFrame<PCB_EDIT_FRAME>();
199 m_placeOrigin->SetPosition( getModel<BOARD>()->GetDesignSettings().GetAuxOrigin() );
208 auto activeToolCondition =
214 auto inactiveStateCondition =
220 auto placeModuleCondition =
230 ctxMenu.AddSeparator( 1 );
234 ctxMenu.AddSeparator( 1000 );
237 getEditFrame<PCB_BASE_FRAME>()->AddStandardSubMenus(
m_menu );
239 auto zoneMenu = std::make_shared<ZONE_CONTEXT_MENU>();
240 zoneMenu->SetTool(
this );
242 auto lockMenu = std::make_shared<LOCK_CONTEXT_MENU>();
243 lockMenu->SetTool(
this );
252 auto& menu = toolMenu.
GetMenu();
258 toolMenu.AddSubMenu( zoneMenu );
259 toolMenu.AddSubMenu( lockMenu );
271 auto& menu = toolMenu.
GetMenu();
273 toolMenu.AddSubMenu( zoneMenu );
277 auto toolActiveFunctor =
341 if( dlg.ShowModal() == wxID_OK )
346 BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( aItem );
351 switch( item->
Type() )
396 getEditFrame<PCB_EDIT_FRAME>()->ShowBoardSetupDialog();
403 getEditFrame<PCB_EDIT_FRAME>()->InstallNetlistFrame();
415 wxFileName::SplitPath( fullFileName, &
path, &
name, &ext );
418 fullFileName = wxFileSelector(
_(
"Specctra Session File" ),
path,
name,
423 if( !fullFileName.IsEmpty() )
424 getEditFrame<PCB_EDIT_FRAME>()->ImportSpecctraSession( fullFileName );
435 if( fullFileName.IsEmpty() )
445 fullFileName = wxFileSelector(
_(
"Specctra DSN File" ), fn.GetPath(), fn.GetFullName(),
447 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxFD_CHANGE_DIR,
frame() );
449 if( !fullFileName.IsEmpty() )
452 getEditFrame<PCB_EDIT_FRAME>()->ExportSpecctraFile( fullFileName );
467 fn.SetExt( wxT(
"pcb_net" ) );
469 wxFileDialog dlg(
m_frame,
_(
"Export Board Netlist" ), fn.GetPath(), fn.GetFullName(),
471 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
475 if( dlg.ShowModal() == wxID_CANCEL )
480 if( !fn.IsDirWritable() )
484 msg.Printf(
_(
"Path `%s` is read only." ), fn.GetPath() );
485 wxMessageDialog(
m_frame, msg,
_(
"I/O Error" ), wxOK | wxCENTER | wxICON_EXCLAMATION );
490 dynamic_cast<const NETLIST_OPTIONS_HELPER*>( dlg.GetExtraControl() );
503 const wxString& netname =
pad->GetShortNetname();
505 if( !netname.IsEmpty() )
507 component->
AddNet(
pad->GetNumber(), netname,
pad->GetPinFunction(),
512 netlist.AddComponent( component );
525 wxCommandEvent
dummy;
536 wxFAIL_MSG( wxT(
"GenerateFabFiles(): unexpected request" ) );
555 if( ids.count( aItem->m_Uuid ) )
558 const_cast<KIID&>( aItem->m_Uuid ) =
KIID();
561 ids.insert( aItem->m_Uuid );
596 processItem( track );
612 processItem(
group );
616 processItem( drawing );
622 processItem( marker );
625 processItem(
group );
629 errors += duplicates;
645 wxString msg =
wxString::Format(
_(
"%d potential problems repaired." ), errors );
667 updateDialog.ShowModal();
678 "stand-alone mode. In order to create or update PCBs " 679 "from schematics, you must launch the KiCad project " 680 "manager and create a project." ) );
705 getEditFrame<PCB_EDIT_FRAME>()->ToggleLayersManager();
732 PCB_TRACK* track = static_cast<PCB_TRACK*>( item );
749 commit.
Push( wxT(
"Increase Track Width" ) );
774 && routerTool->
Router()->
GetState() == PNS::ROUTER::RouterState::ROUTE_TRACK
812 PCB_TRACK* track = static_cast<PCB_TRACK*>( item );
819 if( candidate < track->GetWidth() )
829 commit.
Push( wxT(
"Decrease Track Width" ) );
854 && routerTool->
Router()->
GetState() == PNS::ROUTER::RouterState::ROUTE_TRACK
907 commit.
Push( wxT(
"Increase Via Size" ) );
958 commit.
Push(
"Decrease Via Size" );
1014 bool reselect =
false;
1015 bool fromOtherCommand = fp !=
nullptr;
1037 if( reselect && fp )
1046 if( fromOtherCommand )
1053 undo->ClearListAndDeleteItems();
1062 if( evt->IsCancelInteractive() )
1074 else if( evt->IsActivate() )
1079 if( evt->IsMoveTool() )
1090 else if( evt->IsClick(
BUT_LEFT ) )
1114 pad->SetNetCode( 0 );
1140 commit.
Push(
_(
"Place a footprint" ) );
1163 evt->SetPassEvent();
1213 BOARD_ITEM* board_item = static_cast<BOARD_ITEM*>( item );
1223 bool modified =
false;
1227 BOARD_ITEM* board_item = static_cast<BOARD_ITEM*>( item );
1229 commit.
Modify( board_item );
1233 modified |= !board_item->
IsLocked();
1238 modified |= board_item->
IsLocked();
1245 commit.
Push( aMode ==
ON ?
_(
"Lock" ) :
_(
"Unlock" ) );
1277 preview.
Add( target );
1301 if( evt->IsCancelInteractive() )
1306 else if( evt->IsActivate() )
1308 if( evt->IsMoveTool() )
1334 else if( evt->IsClick(
BUT_LEFT ) )
1336 assert( target->
GetSize() > 0 );
1340 commit.Add( target );
1341 commit.Push( wxT(
"Place a layer alignment target" ) );
1343 preview.
Remove( target );
1347 preview.
Add( target );
1353 else if( evt->IsMotion() )
1360 evt->SetPassEvent();
1375 std::vector<ZONE*>& aOriginZones, std::vector<ZONE*>& aMergedZones )
1377 aCommit.
Modify( aOriginZones[0] );
1379 for(
unsigned int i = 1; i < aOriginZones.size(); i++ )
1381 aOriginZones[0]->Outline()->BooleanAdd( *aOriginZones[i]->Outline(),
1390 if( aOriginZones[0]->Outline()->IsSelfIntersecting()
1391 || aOriginZones[0]->Outline()->OutlineCount() > 1 )
1398 for(
unsigned int i = 1; i < aOriginZones.size(); i++ )
1399 aCommit.
Remove( aOriginZones[i] );
1401 aMergedZones.push_back( aOriginZones[0] );
1403 aOriginZones[0]->SetLocalFlags( 1 );
1404 aOriginZones[0]->HatchBorder();
1405 aOriginZones[0]->CacheTriangulation();
1422 ZONE* firstZone =
nullptr;
1423 std::vector<ZONE*> toMerge, merged;
1427 ZONE* curr_area = dynamic_cast<ZONE*>( item );
1433 firstZone = curr_area;
1439 wxLogMessage(
_(
"Some zone netcodes did not match and were not merged." ) );
1445 wxLogMessage(
_(
"Some zone priorities did not match and were not merged." ) );
1451 wxLogMessage(
_(
"Some zones were rule areas and were not merged." ) );
1457 wxLogMessage(
_(
"Some zone layer sets did not match and were not merged." ) );
1463 wxLogMessage(
_(
"Some zones did not intersect and were not merged." ) );
1467 toMerge.push_back( curr_area );
1474 commit.
Push( wxT(
"Merge zones" ) );
1500 zoneSettings << *oldZone;
1503 if( oldZone->GetIsRuleArea() )
1505 else if( oldZone->IsOnCopperLayer() )
1510 if( dialogResult != wxID_OK )
1516 std::unique_ptr<ZONE> newZone = std::make_unique<ZONE>( *oldZone );
1517 newZone->ClearSelected();
1523 if( oldZone->GetIsRuleArea() && ( oldZone->GetLayerSet() == zoneSettings.
m_Layers ) )
1525 else if( !oldZone->GetIsRuleArea() && zoneSettings.
m_Layers.test( oldZone->GetLayer() ) )
1528 commit.
Add( newZone.release() );
1529 commit.
Push(
_(
"Duplicate zone" ) );
1553 editor->LoadFootprintFromBoard( fp );
1571 originViewItem->
SetPosition( (wxPoint) aPosition );
1586 [
this] (
const VECTOR2D& pt ) ->
bool int Open(const TOOL_EVENT &aEvent)
int LockSelected(const TOOL_EVENT &aEvent)
Unlock selected items.
static TOOL_ACTION selectionClear
Clear the current selection.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
static TOOL_ACTION toggleLock
void RollbackFromUndo()
Perform an undo of the last edit without logging a corresponding redo.
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
void OnModify() override
Must be called after a board change to set the modified flag.
int Find(const TOOL_EVENT &aEvent)
#define CTL_OMIT_FP_UUID
Don't prefix the footprint UUID to the sheet path.
COMMIT & Modify(EDA_ITEM *aItem)
Create an undo entry for an item that has been already modified.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
static const TOOL_EVENT SelectedEvent
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
int New(const TOOL_EVENT &aEvent)
static TOOL_ACTION unlock
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
class FP_TEXT, text in a footprint
NETLIST_OPTIONS_HELPER(wxWindow *aParent)
void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand) override
Create a new entry in undo list of commands.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
static TOOL_ACTION generateGerbers
int ExportSpecctraDSN(const TOOL_EVENT &aEvent)
static TOOL_ACTION editFpInFpEditor
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
static TOOL_ACTION pageSettings
int TrackWidthInc(const TOOL_EVENT &aEvent)
static TOOL_ACTION incWidth
Increase width of currently drawn line.
unsigned GetPriority() const
static TOOL_ACTION drawSimilarZone
#define IS_NEW
New item, just created.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
static TOOL_ACTION drillOrigin
bool Init() override
Init() is called once upon a registration of the tool.
FOOTPRINT * SelectFootprintFromLibTree(LIB_ID aPreselect=LIB_ID())
Open a dialog to select a footprint.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
This file is part of the common library.
virtual void SetPosition(const wxPoint &aPos)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
static TOOL_ACTION zoneFillAll
static TOOL_ACTION viaSizeInc
std::vector< int > m_TrackWidthList
void ToPlotter(int aID)
Open a dialog frame to create plot and drill files relative to the current board.
static void DoSetDrillOrigin(KIGFX::VIEW *aView, PCB_BASE_FRAME *aFrame, EDA_ITEM *aItem, const VECTOR2D &aPoint)
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
COMMIT & Add(EDA_ITEM *aItem)
Notify observers that aItem has been added.
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
static constexpr double IU_PER_MM
Mock up a conversion function.
GROUPS & Groups()
The groups must maintain the following invariants.
A set of BOARD_ITEMs (i.e., without duplicates).
std::vector< DIFF_PAIR_DIMENSION > m_DiffPairDimensionsList
static SELECTION_CONDITION OnlyTypes(const KICAD_T aTypes[])
Create a functor that tests if the selected items are only of given types.
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
int Plot(const TOOL_EVENT &aEvent)
virtual void Revert() override
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void UseCustomDiffPairDimensions(bool aEnabled)
Enables/disables custom differential pair dimensions.
static bool mergeZones(EDA_DRAW_FRAME *aFrame, BOARD_COMMIT &aCommit, std::vector< ZONE * > &aOriginZones, std::vector< ZONE * > &aMergedZones)
static TOOL_ACTION cancelInteractive
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
static TOOL_ACTION properties
Activation of the edit tool.
void SetWksFileName(const wxString &aFilename)
int GeneratePosFile(const TOOL_EVENT &aEvent)
void RecreateBOMFileFromBoard(wxCommandEvent &aEvent)
Create a BOM file from the current loaded board.
static TOOL_ACTION trackWidthDec
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
void SetFlags(EDA_ITEM_FLAGS aMask)
class PCB_TEXT, text on a layer
static TOOL_ACTION getAndPlace
Find an item and start moving.
static TOOL_ACTION trackViaSizeChanged
static TOOL_ACTION showPythonConsole
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr)
Send aPayload to aDestination from aSource.
virtual void SetCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true, bool aTriggeredByArrows=false, long aArrowCommand=0)=0
Move cursor to the requested position expressed in world coordinates.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
static TOOL_ACTION showLayersManager
static TOOL_ACTION updatePcbFromSchematic
virtual void Clear()
Remove all the stored items from the group.
bool FetchNetlistFromSchematic(NETLIST &aNetlist, const wxString &aAnnotateMessage)
virtual void SetLocked(bool aLocked)
Modify the 'lock' status for of the item.
int ImportNetlist(const TOOL_EVENT &aEvent)
void ScriptingConsoleEnableDisable()
Toggles the scripting console visibility.
An abstract base class for deriving all objects that can be added to a VIEW.
The base class for create windows for drawing purpose.
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList)
Used in undo or redo command.
virtual bool IsLocked() const
const wxString & GetFileName() const
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
bool TestZoneIntersection(ZONE *aZone1, ZONE *aZone2)
Test for intersection of 2 copper areas.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static TOOL_ACTION generateReportFile
bool m_UseConnectedTrackWidth
static TOOL_ACTION zoneFill
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
int PageSettings(const TOOL_EVENT &aEvent)
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
virtual void SetParent(EDA_ITEM *aParent)
static TOOL_ACTION generateD356File
class PCB_TRACK, a track segment (segment on a copper layer)
static TOOL_ACTION decWidth
Decrease width of currently drawn line.
static TOOL_ACTION saveCopyAs
int modifyLockSelected(MODIFY_MODE aMode)
Set up handlers for various events.
std::unique_ptr< KIGFX::ORIGIN_VIEWITEM > m_placeOrigin
static TOOL_ACTION pickerTool
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
static TOOL_ACTION trackWidthInc
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
void SetReferencePoint(const VECTOR2I &aP)
int DrillOrigin(const TOOL_EVENT &aEvent)
Low-level access (below undo) to setting the drill origin.
int ZoneDuplicate(const TOOL_EVENT &aEvent)
void GenFootprintsReport(wxCommandEvent &event)
Call DoGenFootprintsReport to create a footprint report file.
static TOOL_ACTION updateSchematicFromPcb
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
wxString SpecctraSessionFileWildcard()
int EditFpInFpEditor(const TOOL_EVENT &aEvent)
Item needs to be redrawn.
void SetAuxOrigin(const wxPoint &aOrigin)
int ViaSizeInc(const TOOL_EVENT &aEvent)
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
int UpdatePCBFromSchematic(const TOOL_EVENT &aEvent)
static TOOL_ACTION importNetlist
#define MAX_PAGE_SIZE_PCBNEW_MILS
int UnlockSelected(const TOOL_EVENT &aEvent)
Run the drill origin tool for setting the origin for drill and pick-and-place files.
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
unsigned GetViaSizeIndex() const
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
static const int WIDTH_STEP
How does line width change after one -/+ key press.
FOOTPRINTS & Footprints()
void SetPosition(const wxPoint &aPos) override
int BoardSetup(const TOOL_EVENT &aEvent)
wxCheckBox * m_cbOmitExtras
static TOOL_ACTION zoneMerge
unsigned GetTrackWidthIndex() const
int GetNetlistOptions() const
Definition of file extensions used in Kicad.
const wxString & GetNetname() const
virtual PICKED_ITEMS_LIST * PopCommandFromUndoList()
Return the last command to undo and remove it from list, nothing is deleted.
Extend VIEW_ITEM by possibility of grouping items into a single object.
An interface for classes handling user events controlling the view behavior such as zooming,...
int SaveAs(const TOOL_EVENT &aEvent)
virtual void Remove(VIEW_ITEM *aItem)
Remove an item from the group.
int Save(const TOOL_EVENT &aEvent)
Handle a list of polygons defining a copper zone.
class ZONE, a copper pour area
COMMIT & Remove(EDA_ITEM *aItem)
Notify observers that aItem has been removed.
int RepairBoard(const TOOL_EVENT &aEvent)
void SetDiffPairIndex(unsigned aIndex)
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
A holder to handle information on schematic or board items.
static TOOL_ACTION showEeschema
virtual void Add(VIEW_ITEM *aItem)
Add an item to the group.
int FindNext(const TOOL_EVENT &aEvent)
static TOOL_ACTION generatePosFile
static TOOL_ACTION drawZoneCutout
bool m_TempOverrideTrackWidth
MODIFY_MODE
< How to modify a property for selected items.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
static TOOL_ACTION placeTarget
int ShowEeschema(const TOOL_EVENT &aEvent)
const std::string SpecctraSessionFileExtension
const std::string SpecctraDsnFileExtension
static TOOL_ACTION zoneUnfillAll
int InvokeRuleAreaEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings)
Function InvokeRuleAreaEditor invokes up a modal dialog window for copper zone editing.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static TOOL_ACTION boardSetup
bool Empty() const
Checks if there is anything selected.
bool m_ShowGlobalRatsnest
Store all of the related footprint information found in a netlist.
static TOOL_ACTION zoneUnfill
ZONE_SETTINGS handles zones parameters.
static TOOL_ACTION importSpecctraSession
int ExportNetlist(const TOOL_EVENT &aEvent)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
static TOOL_ACTION zoneDuplicate
Duplicate zone onto another layer.
TOOL_ACTION * GetExportNetlistAction()
int ImportSpecctraSession(const TOOL_EVENT &aEvent)
void SetWidth(int aWidth)
static TOOL_ACTION generateBOM
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
virtual void OnModify()
Must be called after a change in order to set the "modify" flag of the current screen and update the ...
Handle the data for a net.
int ZoneMerge(const TOOL_EVENT &aEvent)
Duplicate a zone onto a layer (prompts for new layer)
static TOOL_ACTION placeFootprint
static TOOL_ACTION exportSpecctraDSN
wxCheckBox * m_cbOmitFpUuids
Common, abstract interface for edit frames.
static TOOL_ACTION saveAs
void GenD356File(wxCommandEvent &event)
Information pertinent to a Pcbnew printed circuit board.
wxCheckBox * m_cbOmitNets
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
static TOOL_ACTION repairBoard
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
int PlaceFootprint(const TOOL_EVENT &aEvent)
Display a dialog to select a footprint to be added and allows the user to set its position.
static SELECTION_CONDITION OnlyType(KICAD_T aType)
Create a functor that tests if the selected items are only of given type.
int ToggleLockSelected(const TOOL_EVENT &aEvent)
Lock selected items.
PCBNEW_SETTINGS & Settings()
int Size() const
Returns the number of selected parts.
int TogglePythonConsole(const TOOL_EVENT &aEvent)
A base class for most all the KiCad significant classes used in schematics and boards.
void AddNet(const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
virtual void Push(const wxString &aMessage=wxT("A commit"), bool aCreateUndoEntry=true, bool aSetDirtyBit=true) override
Revert the commit by restoring the modified items state.
static TOOL_ACTION editLibFpInFpEditor
std::vector< VIA_DIMENSION > m_ViasDimensionsList
void SetWidth(int aWidth)
void ShowFindDialog()
Show the Find dialog.
int InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
bool Files_io_from_id(int aId)
Read and write board files according to aId.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
void FindNext()
Find the next item using our existing search parameters.
wxString SpecctraDsnFileWildcard()
class PCB_VIA, a via (like a track segment on a copper layer)
unsigned GetDiffPairIndex() const
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
int GenerateDrillFiles(const TOOL_EVENT &aEvent)
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
int ToggleLayersManager(const TOOL_EVENT &aEvent)
int ViaSizeDec(const TOOL_EVENT &aEvent)
static wxWindow * Create(wxWindow *aParent)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
int GenerateFabFiles(const TOOL_EVENT &aEvent)
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
int TrackWidthDec(const TOOL_EVENT &aEvent)
static constexpr int Millimeter2iu(double mm)
static TOOL_ACTION findNext
int UpdateSchematicFromPCB(const TOOL_EVENT &aEvent)
static TOOL_ACTION viaSizeDec
RouterState GetState() const
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
void MarkDirty()
Force redraw of view on the next rendering.
int PlaceTarget(const TOOL_EVENT &aEvent)
Allow user to place a layer alignment target.
Helper widget to add controls to a wxFileDialog to set netlist configuration options.
static TOOL_ACTION refreshPreview
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
static TOOL_ACTION cursorClick
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 SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
static TOOL_ACTION generateDrillFiles
KICAD_T Type() const
Returns the type of object.
int SaveCopyAs(const TOOL_EVENT &aEvent)
virtual void UpdateMsgPanel()
Redraw the message panel.
wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
Container for design settings for a BOARD object.
A color representation with 4 components: red, green, blue, alpha.