KiCad PCB EDA Suite
pcbnew/cross-probing.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) 2019-2020 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you may find one here:
18  * http://www.gnu.org/licenses/old-licenses/gpl-3.0.html
19  * or you may search the http://www.gnu.org website for the version 2 license,
20  * or you may write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 
34 #include <class_board.h>
35 #include <class_module.h>
36 #include <class_track.h>
37 #include <collectors.h>
38 #include <eda_dde.h>
39 #include <fctsys.h>
40 #include <kiface_i.h>
41 #include <kiway_express.h>
42 #include <macros.h>
45 #include <pcb_edit_frame.h>
46 #include <pcbnew_settings.h>
47 #include <tool/tool_manager.h>
48 #include <tools/pcb_actions.h>
49 #include <tools/selection_tool.h>
51 
52 /* Execute a remote command send by Eeschema via a socket,
53  * port KICAD_PCB_PORT_SERVICE_NUMBER
54  * cmdline = received command from Eeschema
55  * Commands are
56  * $PART: "reference" put cursor on component
57  * $PIN: "pin name" $PART: "reference" put cursor on the footprint pin
58  * $NET: "net name" highlight the given net (if highlight tool is active)
59  * $CLEAR Clear existing highlight
60  * They are a keyword followed by a quoted string.
61  */
62 void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
63 {
64  char line[1024];
65  wxString msg;
66  wxString modName;
67  char* idcmd;
68  char* text;
69  int netcode = -1;
70  bool multiHighlight = false;
71  MODULE* module = NULL;
72  D_PAD* pad = NULL;
73  BOARD* pcb = GetBoard();
74 
75  CROSS_PROBING_SETTINGS& crossProbingSettings = GetPcbNewSettings()->m_CrossProbing;
76 
78  KIGFX::RENDER_SETTINGS* renderSettings = view->GetPainter()->GetSettings();
79 
80  strncpy( line, cmdline, sizeof(line) - 1 );
81  line[sizeof(line) - 1] = 0;
82 
83  idcmd = strtok( line, " \n\r" );
84  text = strtok( NULL, "\"\n\r" );
85 
86  if( idcmd == NULL )
87  return;
88 
89  if( strcmp( idcmd, "$NET:" ) == 0 )
90  {
91  if( !crossProbingSettings.auto_highlight )
92  return;
93 
94  wxString net_name = FROM_UTF8( text );
95 
96  NETINFO_ITEM* netinfo = pcb->FindNet( net_name );
97 
98  if( netinfo )
99  {
100  netcode = netinfo->GetNet();
101 
102  MSG_PANEL_ITEMS items;
103  netinfo->GetMsgPanelInfo( this, items );
104  SetMsgPanel( items );
105  }
106  }
107  if( strcmp( idcmd, "$NETS:" ) == 0 )
108  {
109  if( !crossProbingSettings.auto_highlight )
110  return;
111 
112  wxStringTokenizer netsTok = wxStringTokenizer( FROM_UTF8( text ), "," );
113  bool first = true;
114 
115  while( netsTok.HasMoreTokens() )
116  {
117  NETINFO_ITEM* netinfo = pcb->FindNet( netsTok.GetNextToken() );
118 
119  if( netinfo )
120  {
121  if( first )
122  {
123  // TODO: Once buses are included in netlist, show bus name
124  MSG_PANEL_ITEMS items;
125  netinfo->GetMsgPanelInfo( this, items );
126  SetMsgPanel( items );
127  first = false;
128 
129  pcb->SetHighLightNet( netinfo->GetNet() );
130  renderSettings->SetHighlight( true, netinfo->GetNet() );
131  multiHighlight = true;
132  }
133  else
134  {
135  pcb->SetHighLightNet( netinfo->GetNet(), true );
136  renderSettings->SetHighlight( true, netinfo->GetNet(), true );
137  }
138  }
139  }
140 
141  netcode = -1;
142  }
143  else if( strcmp( idcmd, "$PIN:" ) == 0 )
144  {
145  wxString pinName = FROM_UTF8( text );
146 
147  text = strtok( NULL, " \n\r" );
148 
149  if( text && strcmp( text, "$PART:" ) == 0 )
150  text = strtok( NULL, "\"\n\r" );
151 
152  modName = FROM_UTF8( text );
153 
154  module = pcb->FindModuleByReference( modName );
155 
156  if( module )
157  pad = module->FindPadByName( pinName );
158 
159  if( pad )
160  netcode = pad->GetNetCode();
161 
162  if( module == NULL )
163  msg.Printf( _( "%s not found" ), modName );
164  else if( pad == NULL )
165  msg.Printf( _( "%s pin %s not found" ), modName, pinName );
166  else
167  msg.Printf( _( "%s pin %s found" ), modName, pinName );
168 
169  SetStatusText( msg );
170  }
171  else if( strcmp( idcmd, "$PART:" ) == 0 )
172  {
173  pcb->ResetNetHighLight();
174 
175  modName = FROM_UTF8( text );
176 
177  module = pcb->FindModuleByReference( modName );
178 
179  if( module )
180  msg.Printf( _( "%s found" ), modName );
181  else
182  msg.Printf( _( "%s not found" ), modName );
183 
184  SetStatusText( msg );
185  }
186  else if( strcmp( idcmd, "$SHEET:" ) == 0 )
187  {
188  msg.Printf( _( "Selecting all from sheet \"%s\"" ), FROM_UTF8( text ) );
189  wxString sheetUIID( FROM_UTF8( text ) );
190  SetStatusText( msg );
192  static_cast<void*>( &sheetUIID ) );
193  return;
194  }
195  else if( strcmp( idcmd, "$CLEAR" ) == 0 )
196  {
197  if( renderSettings->IsHighlightEnabled() )
198  {
199  renderSettings->SetHighlight( false );
200  view->UpdateAllLayersColor();
201  }
202 
203  if( pcb->IsHighLightNetON() )
204  {
205  pcb->ResetNetHighLight();
206  SetMsgPanel( pcb );
207  }
208 
209  GetCanvas()->Refresh();
210  return;
211  }
212 
213  BOX2I bbox = { { 0, 0 }, { 0, 0 } };
214 
215  if( module )
216  {
217  bbox = module->GetBoundingBox();
218 
219  if( pad )
220  m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, (void*) pad );
221  else
222  m_toolManager->RunAction( PCB_ACTIONS::highlightItem, true, (void*) module );
223  }
224  else if( netcode > 0 || multiHighlight )
225  {
226  if( !multiHighlight )
227  {
228  renderSettings->SetHighlight( ( netcode >= 0 ), netcode );
229  pcb->SetHighLightNet( netcode );
230  }
231  else
232  {
233  // Just pick the first one for area calculation
234  netcode = *pcb->GetHighLightNetCodes().begin();
235  }
236 
237  pcb->HighLightON();
238 
239  auto merge_area = [netcode, &bbox]( BOARD_CONNECTED_ITEM* aItem )
240  {
241  if( aItem->GetNetCode() == netcode )
242  {
243  if( bbox.GetWidth() == 0 )
244  bbox = aItem->GetBoundingBox();
245  else
246  bbox.Merge( aItem->GetBoundingBox() );
247  }
248  };
249 
250  if( crossProbingSettings.center_on_items )
251  {
252  for( auto zone : pcb->Zones() )
253  merge_area( zone );
254 
255  for( auto track : pcb->Tracks() )
256  merge_area( track );
257 
258  for( auto mod : pcb->Modules() )
259  for( auto mod_pad : mod->Pads() )
260  merge_area( mod_pad );
261  }
262  }
263  else
264  {
265  renderSettings->SetHighlight( false );
266  }
267 
268  if( crossProbingSettings.center_on_items && bbox.GetWidth() > 0 && bbox.GetHeight() > 0 )
269  {
270  auto bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize();
271  auto screenSize = view->ToWorld( GetCanvas()->GetClientSize(), false );
272  screenSize.x = std::max( 10.0, screenSize.x );
273  screenSize.y = std::max( 10.0, screenSize.y );
274  double ratio = std::max( fabs( bbSize.x / screenSize.x ),
275  fabs( bbSize.y / screenSize.y ) );
276 
277  // Try not to zoom on every cross-probe; it gets very noisy
278  if( crossProbingSettings.zoom_to_fit && ( ratio < 0.5 || ratio > 1.0 ) )
279  view->SetScale( view->GetScale() / ratio );
280 
281  view->SetCenter( bbox.Centre() );
282  }
283 
284  view->UpdateAllLayersColor();
285  // Ensure the display is refreshed, because in some installs the refresh is done only
286  // when the gal canvas has the focus, and that is not the case when crossprobing from
287  // Eeschema:
288  GetCanvas()->Refresh();
289 }
290 
291 
292 std::string FormatProbeItem( BOARD_ITEM* aItem )
293 {
294  MODULE* module;
295 
296  if( !aItem )
297  return "$CLEAR: \"HIGHLIGHTED\""; // message to clear highlight state
298 
299  switch( aItem->Type() )
300  {
301  case PCB_MODULE_T:
302  module = (MODULE*) aItem;
303  return StrPrintf( "$PART: \"%s\"", TO_UTF8( module->GetReference() ) );
304 
305  case PCB_PAD_T:
306  {
307  module = (MODULE*) aItem->GetParent();
308  wxString pad = ((D_PAD*)aItem)->GetName();
309 
310  return StrPrintf( "$PART: \"%s\" $PAD: \"%s\"",
311  TO_UTF8( module->GetReference() ),
312  TO_UTF8( pad ) );
313  }
314 
315  case PCB_MODULE_TEXT_T:
316  {
317  module = static_cast<MODULE*>( aItem->GetParent() );
318 
319  TEXTE_MODULE* text_mod = static_cast<TEXTE_MODULE*>( aItem );
320 
321  const char* text_key;
322 
323  /* This can't be a switch since the break need to pull out
324  * from the outer switch! */
325  if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_REFERENCE )
326  text_key = "$REF:";
327  else if( text_mod->GetType() == TEXTE_MODULE::TEXT_is_VALUE )
328  text_key = "$VAL:";
329  else
330  break;
331 
332  return StrPrintf( "$PART: \"%s\" %s \"%s\"",
333  TO_UTF8( module->GetReference() ),
334  text_key,
335  TO_UTF8( text_mod->GetText() ) );
336  }
337 
338  default:
339  break;
340  }
341 
342  return "";
343 }
344 
345 
346 /* Send a remote command to Eeschema via a socket,
347  * aSyncItem = item to be located on schematic (module, pin or text)
348  * Commands are
349  * $PART: "reference" put cursor on component anchor
350  * $PART: "reference" $PAD: "pad number" put cursor on the component pin
351  * $PART: "reference" $REF: "reference" put cursor on the component ref
352  * $PART: "reference" $VAL: "value" put cursor on the component value
353  */
355 {
356  std::string packet = FormatProbeItem( aSyncItem );
357 
358  if( !packet.empty() )
359  {
360  if( Kiface().IsSingle() )
361  SendCommand( MSG_TO_SCH, packet.c_str() );
362  else
363  {
364  // Typically ExpressMail is going to be s-expression packets, but since
365  // we have existing interpreter of the cross probe packet on the other
366  // side in place, we use that here.
367  Kiway().ExpressMail( FRAME_SCH, MAIL_CROSS_PROBE, packet, this );
368  }
369  }
370 }
371 
372 
373 void PCB_EDIT_FRAME::SendCrossProbeNetName( const wxString& aNetName )
374 {
375  std::string packet = StrPrintf( "$NET: \"%s\"", TO_UTF8( aNetName ) );
376 
377  if( !packet.empty() )
378  {
379  if( Kiface().IsSingle() )
380  SendCommand( MSG_TO_SCH, packet.c_str() );
381  else
382  {
383  // Typically ExpressMail is going to be s-expression packets, but since
384  // we have existing interpreter of the cross probe packet on the other
385  // side in place, we use that here.
386  Kiway().ExpressMail( FRAME_SCH, MAIL_CROSS_PROBE, packet, this );
387  }
388  }
389 }
390 
391 
393 {
394  std::string& payload = mail.GetPayload();
395 
396  switch( mail.Command() )
397  {
399  {
400  NETLIST netlist;
401  STRING_FORMATTER sf;
402 
403  for( MODULE* module : this->GetBoard()->Modules() )
404  {
405  COMPONENT* component = new COMPONENT( module->GetFPID(), module->GetReference(),
406  module->GetValue(), module->GetPath() );
407 
408  for( D_PAD* pad : module->Pads() )
409  {
410  const wxString& netname = pad->GetShortNetname();
411 
412  if( !netname.IsEmpty() )
413  component->AddNet( pad->GetName(), netname, wxEmptyString );
414  }
415 
416  netlist.AddComponent( component );
417  }
418 
419  netlist.Format( "pcb_netlist", &sf, 0, CTL_OMIT_FILTERS );
420  payload = sf.GetString();
421  }
422  break;
423 
425  try
426  {
427  NETLIST netlist;
429 
430  BOARD_NETLIST_UPDATER updater( this, GetBoard() );
431  updater.SetLookupByTimestamp( false );
432  updater.SetDeleteUnusedComponents ( false );
433  updater.SetReplaceFootprints( false );
434  updater.SetDeleteSinglePadNets( false );
435  updater.SetWarnPadNoNetInNetlist( false );
436  updater.UpdateNetlist( netlist );
437 
438  bool dummy;
439  OnNetlistChanged( updater, &dummy );
440  }
441  catch( const IO_ERROR& )
442  {
443  assert( false ); // should never happen
444  return;
445  }
446  break;
447 
448  case MAIL_CROSS_PROBE:
449  ExecuteRemoteCommand( payload.c_str() );
450  break;
451 
452  case MAIL_PCB_UPDATE:
454  break;
455 
456  case MAIL_IMPORT_FILE:
457  {
458  // Extract file format type and path (plugin type and path separated with \n)
459  size_t split = payload.find( '\n' );
460  wxCHECK( split != std::string::npos, /*void*/ );
461  int importFormat;
462 
463  try
464  {
465  importFormat = std::stoi( payload.substr( 0, split ) );
466  }
467  catch( std::invalid_argument& )
468  {
469  wxFAIL;
470  importFormat = -1;
471  }
472 
473  std::string path = payload.substr( split + 1 );
474  wxASSERT( !path.empty() );
475 
476  if( importFormat >= 0 )
477  importFile( path, importFormat );
478  }
479  break;
480 
481  // many many others.
482  default:
483  ;
484  }
485 }
486 
NETINFO_ITEM * FindNet(int aNetcode) const
Function FindNet searches for a net with the given netcode.
KIGFX::VIEW * GetView() const
Definition: tool_manager.h:289
KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
int GetNetCode() const
Function GetNetCode.
DDE server & client.
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to eeschema for highlighting.
static wxString FROM_UTF8(const char *cstring)
function FROM_UTF8 converts a UTF8 encoded C string to a wxString for all wxWidgets build modes.
Definition: macros.h:114
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
RENDER_SETTINGS Contains all the knowledge about how graphical objects are drawn on any output surfac...
void HighLightON(bool aValue=true)
Enable or disable net highlighting.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Function ToWorld() Converts a screen space point/vector to a point/vector in world space coordinates.
Definition: view.cpp:474
BOARD_NETLIST_UPDATER updates the BOARD with a new netlist.
static TOOL_ACTION highlightItem
Definition: pcb_actions.h:434
void SetDeleteSinglePadNets(bool aEnabled)
Enables "delete single pad nets" option
bool IsHighLightNetON() const
Function IsHighLightNetON.
Definition: class_board.h:400
#define MSG_TO_SCH
Definition: eda_dde.h:46
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Function RunAction() Runs the specified action.
Definition: tool_manager.h:140
void SetWarnPadNoNetInNetlist(bool aEnabled)
Enables warning option if a connectable pad is not found in netlist connectable = pad with a name and...
BOARD_NETLIST_UPDATER class definition.
class D_PAD, a pad in a footprint
Definition: typeinfo.h:90
static TOOL_ACTION updatePcbFromSchematic
Definition: actions.h:159
bool SendCommand(int service, const char *cmdline)
Definition: eda_dde.cpp:132
void SetLookupByTimestamp(bool aEnabled)
Enables component lookup by timestamp instead of reference
PCBNEW_SETTINGS * GetPcbNewSettings()
bool IsHighlightEnabled() const
Function IsHighlightEnabled Returns current highlight setting.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected and have...
bool UpdateNetlist(NETLIST &aNetlist)
Function UpdateNetlist()
PAINTER * GetPainter() const
Function GetPainter() Returns the painter object used by the view for drawing VIEW_ITEMS.
Definition: view.h:199
A single base class (TRACK) represents both tracks and vias, with subclasses for curved tracks (ARC) ...
This file contains miscellaneous commonly used macros and functions.
const wxString GetReference() const
Function GetReference.
Definition: class_module.h:451
void AddComponent(COMPONENT *aComponent)
Function AddComponent adds aComponent to the NETLIST.
int StrPrintf(std::string *result, const char *format,...)
Function StrPrintf is like sprintf() but the output is appended to a std::string instead of to a char...
Definition: richio.cpp:74
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:100
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
Cross-probing behavior.
Definition: app_settings.h:30
class MODULE, a footprint
Definition: typeinfo.h:89
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
D_PAD * FindPadByName(const wxString &aPadName) const
Function FindPadByName returns a D_PAD* with a matching name.
void ResetNetHighLight()
Function ResetNetHighLight Reset all high light data to the init state.
void SetCenter(const VECTOR2D &aCenter)
Function SetCenter() Sets the center point of the VIEW (i.e.
Definition: view.cpp:603
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
Definition: pcb_netlist.h:194
#define NULL
bool IsSingle() const
Function IsSingle is this KIFACE_I running under single_top?
Definition: kiface_i.h:117
MODULES & Modules()
Definition: class_board.h:249
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command send by Eeschema via a socket, port KICAD_PCB_PORT_SERVICE_NUMBER (currently...
coord_type GetWidth() const
Definition: box2.h:197
#define CTL_OMIT_FILTERS
Definition: pcb_netlist.h:283
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
void SetReplaceFootprints(bool aEnabled)
Enables replacing footprints with new ones
const std::string & GetString()
Definition: richio.h:475
void SetHighLightNet(int aNetCode, bool aMulti=false)
Function SetHighLightNet Select the netcode to be highlighted.
BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Function Merge modifies the position and size of the rectangle in order to contain aRect.
Definition: box2.h:386
std::string FormatProbeItem(BOARD_ITEM *aItem)
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
bool zoom_to_fit
Zoom to fit items (ignored if center_on_items is off)
Definition: app_settings.h:33
COMPONENT is used to store components and all of their related information found in a netlist.
Definition: pcb_netlist.h:80
const std::set< int > & GetHighLightNetCodes() const
Function GetHighLightNetCode.
Definition: class_board.h:383
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Function SetScale() Sets the scaling factor, zooming around a given anchor point.
Definition: view.cpp:577
class TEXTE_MODULE, text in a footprint
Definition: typeinfo.h:93
VTBL_ENTRY void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=NULL)
Function ExpressMail send aPayload to aDestination from aSource.
Definition: kiway.cpp:437
void SendMessageToEESCHEMA(BOARD_ITEM *objectToSync)
Function SendMessageToEESCHEMA sends a message to the schematic editor so that it may move its cursor...
virtual RENDER_SETTINGS * GetSettings()=0
Function GetAdapter Returns pointer to current settings that are going to be used when drawing items.
bool auto_highlight
Automatically turn on highlight mode in the target frame.
Definition: app_settings.h:34
NETINFO_ITEM handles the data for a net.
Definition: netinfo.h:65
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:302
ZONE_CONTAINERS & Zones()
Definition: class_board.h:254
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:50
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Function SetHighlight Turns on/off highlighting - it may be done for the active layer or the specifie...
Vec Centre() const
Definition: box2.h:79
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
int GetNet() const
Function GetNet.
Definition: netinfo.h:223
static TOOL_ACTION selectOnSheetFromEeschema
Selects all components on sheet from Eeschema crossprobing.
Definition: pcb_actions.h:86
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:178
#define _(s)
Definition: 3d_actions.cpp:33
void Format(const char *aDocName, OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl=0)
void SetDeleteUnusedComponents(bool aEnabled)
Enables removing unused components
coord_type GetHeight() const
Definition: box2.h:198
MODULE * FindModuleByReference(const wxString &aReference) const
Function FindModuleByReference searches for a MODULE within this board with the given reference desig...
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:102
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:78
BOARD * GetBoard() const
CROSS_PROBING_SETTINGS m_CrossProbing
Definition: app_settings.h:157
VIEW.
Definition: view.h:61
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo returns the information about the NETINFO_ITEM in aList to display in the me...
MAIL_T Command()
Function Command returns the MAIL_T associated with this mail.
Definition: kiway_express.h:52
void UpdateAllLayersColor()
Function UpdateAllLayersColor() Applies the new coloring scheme to all layers.
Definition: view.cpp:794
double GetScale() const
Function GetScale()
Definition: view.h:257
BOARD_ITEM_CONTAINER * GetParent() const
bool center_on_items
Automatically pan to cross-probed items.
Definition: app_settings.h:32
void AddNet(const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction)
Definition: pcb_netlist.h:128
STRING_FORMATTER implements OUTPUTFORMATTER to a memory buffer.
Definition: richio.h:445
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
std::string & GetPayload()
Function Payload returns the payload, which can be any text but it typicall self identifying s-expres...
Definition: kiway_express.h:62
bool FetchNetlistFromSchematic(NETLIST &aNetlist, FETCH_NETLIST_MODE aMode)
TRACKS & Tracks()
Definition: class_board.h:246
static std::vector< std::string > split(const std::string &aStr, const std::string &aDelim)
Splits the input string into a vector of output strings.
Definition: kicad_string.h:268
KICAD_T Type() const
Function Type()
Definition: base_struct.h:193