KiCad PCB EDA Suite
modules.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) 2015 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
7  * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
31 #include <fctsys.h>
32 #include <gr_basic.h>
33 #include <class_drawpanel.h>
34 #include <confirm.h>
35 #include <wxPcbStruct.h>
36 #include <trigo.h>
37 #include <macros.h>
38 
39 #include <class_board.h>
40 #include <class_module.h>
41 
42 #include <pcbnew.h>
43 #include <drag.h>
45 
46 #include <connectivity.h>
47 
48 static void MoveFootprint( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
49  const wxPoint& aPosition, bool aErase );
50 static void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC );
51 
52 
53 static MODULE* s_ModuleInitialCopy = NULL; /* Copy of module for
54  * abort/undo command
55  */
56 static PICKED_ITEMS_LIST s_PickedList; /* a picked list to
57  * save initial module
58  * and dragged tracks
59  */
60 
61 
63 {
64  wxString moduleName;
65  MODULE* module = NULL;
66  wxArrayString fplist;
67 
68  // Build list of available fp references, to display them in dialog
69  for( MODULE* fp = GetBoard()->m_Modules; fp; fp = fp->Next() )
70  fplist.Add( fp->GetReference() + wxT(" ( ") + fp->GetValue() + wxT(" )") );
71 
72  fplist.Sort();
73 
74  DIALOG_GET_FOOTPRINT_BY_NAME dlg( this, fplist );
75 
76  if( dlg.ShowModal() != wxID_OK ) //Aborted by user
77  return NULL;
78 
79  moduleName = dlg.GetValue();
80  moduleName.Trim( true );
81  moduleName.Trim( false );
82 
83  if( !moduleName.IsEmpty() )
84  {
85  module = GetBoard()->m_Modules;
86 
87  while( module )
88  {
89  if( module->GetReference().CmpNoCase( moduleName ) == 0 )
90  break;
91 
92  module = module->Next();
93  }
94  }
95 
96  return module;
97 }
98 
99 
100 void PCB_EDIT_FRAME::StartMoveModule( MODULE* aModule, wxDC* aDC,
101  bool aDragConnectedTracks )
102 {
103  if( aModule == NULL )
104  return;
105 
106  if( s_ModuleInitialCopy )
107  delete s_ModuleInitialCopy;
108 
109  s_PickedList.ClearItemsList(); // Should be empty, but...
110 
111  // Creates a copy of the current module, for abort and undo commands
112  s_ModuleInitialCopy = (MODULE*)aModule->Clone();
113  s_ModuleInitialCopy->SetParent( GetBoard() );
114  s_ModuleInitialCopy->ClearFlags();
115 
116  SetCurItem( aModule );
118  aModule->SetFlags( IS_MOVED );
119 
120  /* Show ratsnest. */
122  DrawGeneralRatsnest( aDC );
123 
124  EraseDragList();
125 
126  if( aDragConnectedTracks )
127  {
128  DRAG_LIST drglist( GetBoard() );
129  drglist.BuildDragListe( aModule );
130 
131  ITEM_PICKER itemWrapper( NULL, UR_CHANGED );
132 
133  for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ )
134  {
135  TRACK* segm = g_DragSegmentList[ii].m_Track;
136  itemWrapper.SetItem( segm );
137  itemWrapper.SetLink( segm->Clone() );
138  itemWrapper.GetLink()->SetState( IN_EDIT, false );
139  s_PickedList.PushItem( itemWrapper );
140  }
141 
143  }
144 
147  m_canvas->SetAutoPanRequest( true );
148 
149  // Erase the module.
150  if( aDC )
151  {
152  aModule->SetFlags( DO_NOT_DRAW );
154  aModule->ClearFlags( DO_NOT_DRAW );
155  }
156 
157  m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
158 }
159 
160 
161 /* Called on a move or copy module command abort
162  */
163 void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
164 {
165  TRACK* pt_segm;
166  MODULE* module;
167  PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Panel->GetParent();
168 
169  module = (MODULE*) pcbframe->GetScreen()->GetCurItem();
171  Panel->SetMouseCapture( NULL, NULL );
172 
173  if( module )
174  {
175  // Erase the current footprint on screen
176  module->DrawOutlinesWhenMoving( Panel, DC, g_Offset_Module );
177 
178  /* If a move command: return to old position
179  * If a copy command, delete the new footprint
180  */
181  if( module->IsMoving() )
182  {
183  /* Restore old position for dragged tracks */
184  for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ )
185  {
186  pt_segm = g_DragSegmentList[ii].m_Track;
187  pt_segm->Draw( Panel, DC, GR_XOR );
188  pt_segm->SetState( IN_EDIT, false );
189  pt_segm->ClearFlags();
190  g_DragSegmentList[ii].RestoreInitialValues();
191  pt_segm->Draw( Panel, DC, GR_OR );
192  }
193 
194  EraseDragList();
195  module->ClearFlags( IS_MOVED );
196  }
197 
198  if( module->IsNew() ) // Copy command: delete new footprint
199  {
200  module->DeleteStructure();
201  module = NULL;
202  pcbframe->GetBoard()->m_Status_Pcb = 0;
203  pcbframe->GetBoard()->BuildListOfNets();
204  }
205  }
206 
207  /* Redraw the module. */
208  if( module && s_ModuleInitialCopy )
209  {
210  if( s_ModuleInitialCopy->GetOrientation() != module->GetOrientation() )
211  pcbframe->Rotate_Module( NULL, module, s_ModuleInitialCopy->GetOrientation(), false );
212 
213  if( s_ModuleInitialCopy->GetLayer() != module->GetLayer() )
214  pcbframe->Change_Side_Module( module, NULL );
215 
216  module->Draw( Panel, DC, GR_OR );
217  }
218 
219  pcbframe->SetCurItem( NULL );
220 
221  delete s_ModuleInitialCopy;
222  s_ModuleInitialCopy = NULL;
223  s_PickedList.ClearListAndDeleteItems();
224 
225  // Display ratsnest is allowed
227 
228  if( pcbframe->GetBoard()->IsElementVisible( LAYER_RATSNEST ) )
229  pcbframe->DrawGeneralRatsnest( DC );
230 
231 #ifdef __WXMAC__
232  Panel->Refresh();
233 #endif
234 }
235 
236 
237 /* Redraw the footprint when moving the mouse.
238  */
239 void MoveFootprint( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase )
240 {
241  MODULE* module = (MODULE*) aPanel->GetScreen()->GetCurItem();
242 
243  if( module == NULL )
244  return;
245 
246  /* Erase current footprint. */
247  if( aErase )
248  {
249  module->DrawOutlinesWhenMoving( aPanel, aDC, g_Offset_Module );
250  }
251 
252  /* Redraw the module at the new position. */
253  g_Offset_Module = module->GetPosition() - aPanel->GetParent()->GetCrossHairPosition();
254  module->DrawOutlinesWhenMoving( aPanel, aDC, g_Offset_Module );
255 
256  DrawSegmentWhileMovingFootprint( aPanel, aDC );
257 }
258 
259 
260 bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC )
261 {
262  wxString msg;
263 
264  if( aModule == NULL )
265  return false;
266 
267  SetMsgPanel( aModule );
268 
269  /* Remove module from list, and put it in undo command list */
270  m_Pcb->Remove( aModule );
271  aModule->SetState( IS_DELETED, true );
272  SaveCopyInUndoList( aModule, UR_DELETED );
273 
274  if( aDC && GetBoard()->IsElementVisible( LAYER_RATSNEST ) )
275  Compile_Ratsnest( aDC, true );
276 
277  // Redraw the full screen to ensure perfect display of board and ratsnest.
278  if( aDC )
279  m_canvas->Refresh();
280 
281  OnModify();
282 
283  return true;
284 }
285 
286 
288 {
289  if( Module == NULL )
290  return;
291 
292  if( ( Module->GetLayer() != F_Cu ) && ( Module->GetLayer() != B_Cu ) )
293  return;
294 
295  OnModify();
296 
297  if( !Module->IsMoving() ) /* This is a simple flip, no other edition in progress */
298  {
299 
300  if( DC )
301  {
302  Module->SetFlags( DO_NOT_DRAW );
304  Module->ClearFlags( DO_NOT_DRAW );
305  }
306 
307  /* Show ratsnest if necessary. */
308  if( DC && GetBoard()->IsElementVisible( LAYER_RATSNEST ) )
309  DrawGeneralRatsnest( DC );
310 
311  g_Offset_Module.x = 0;
312  g_Offset_Module.y = 0;
313  }
314  else // Module is being moved.
315  {
316  /* Erase footprint and draw outline if it has been already drawn. */
317  if( DC )
318  {
321  }
322  }
323 
324  /* Flip the module */
325  Module->Flip( Module->GetPosition() );
326  m_Pcb->GetConnectivity()->Update( Module );
327  SetMsgPanel( Module );
328 
329  if( !Module->IsMoving() ) /* Inversion simple */
330  {
331  if( DC )
332  {
333  Module->Draw( m_canvas, DC, GR_OR );
334 
336  Compile_Ratsnest( DC, true );
337  }
338  }
339  else
340  {
341  if( DC )
342  {
345  }
346 
347  }
348  m_Pcb->GetConnectivity()->Update( Module );
349 }
350 
351 
352 void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreateRatsnest )
353 {
354  wxPoint newpos;
355 
356  if( aModule == 0 )
357  return;
358 
359  OnModify();
360 
361 
362  if( aModule->IsNew() )
363  {
364  SaveCopyInUndoList( aModule, UR_NEW );
365  }
366  else if( aModule->IsMoving() )
367  {
368  ITEM_PICKER picker( aModule, UR_CHANGED );
369  picker.SetLink( s_ModuleInitialCopy );
370  s_PickedList.PushItem( picker );
371  s_ModuleInitialCopy = NULL; // the picker is now owner of s_ModuleInitialCopy.
372  }
373 
374  if( s_PickedList.GetCount() )
375  {
376  SaveCopyInUndoList( s_PickedList, UR_UNSPECIFIED );
377 
378  // Clear list, but DO NOT delete items, because they are owned by the saved undo
379  // list and they therefore in use
380  s_PickedList.ClearItemsList();
381  }
382 
384 
385  if( displ_opts->m_Show_Module_Ratsnest && aDC )
386  TraceModuleRatsNest( aDC );
387 
388  newpos = GetCrossHairPosition();
389  aModule->SetPosition( newpos );
390  aModule->ClearFlags();
391 
392  delete s_ModuleInitialCopy;
393  s_ModuleInitialCopy = NULL;
394 
395  if( aDC )
396  aModule->Draw( m_canvas, aDC, GR_OR );
397 
398  // Redraw dragged track segments, if any
399  for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ )
400  {
401  TRACK * track = g_DragSegmentList[ii].m_Track;
402  track->SetState( IN_EDIT, false );
403  track->ClearFlags();
404 
405  if( aDC )
406  track->Draw( m_canvas, aDC, GR_OR );
407  }
408 
409  // Delete drag list
410  EraseDragList();
411 
412  m_canvas->SetMouseCapture( NULL, NULL );
413 
414  m_Pcb->GetConnectivity()->Update( aModule );
415 
416  if( GetBoard()->IsElementVisible( LAYER_RATSNEST ) && !aDoNotRecreateRatsnest )
417  Compile_Ratsnest( aDC, true );
418 
419  if( aDC )
420  m_canvas->Refresh();
421 
422  SetMsgPanel( aModule );
423 }
424 
425 
426 /*
427  * Rotate the footprint angle degrees in the direction < 0.
428  * If incremental == true, the rotation is made from the last orientation,
429  * If the module is placed in the absolute orientation angle.
430  * If DC == NULL, the component does not redraw.
431  * Otherwise, it erases and redraws turns
432  */
433 void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool incremental )
434 {
435  if( module == NULL )
436  return;
437 
438  OnModify();
439 
440  if( !module->IsMoving() ) /* This is a simple rotation, no other
441  * edition in progress */
442  {
443  if( DC ) // Erase footprint to screen
444  {
445  module->SetFlags( DO_NOT_DRAW );
447  module->ClearFlags( DO_NOT_DRAW );
448 
449  if( GetBoard()->IsElementVisible( LAYER_RATSNEST ) )
450  DrawGeneralRatsnest( DC );
451  }
452  }
453  else
454  {
455  if( DC )
456  {
459  }
460  }
461 
462 
463  if( incremental )
464  module->SetOrientation( module->GetOrientation() + angle );
465  else
466  module->SetOrientation( angle );
467 
468  SetMsgPanel( module );
469  m_Pcb->GetConnectivity()->Update( module );
470 
471  if( DC )
472  {
473  if( !module->IsMoving() )
474  {
475  // not beiing moved: redraw the module and update ratsnest
476  module->Draw( m_canvas, DC, GR_OR );
477 
478  if( GetBoard()->IsElementVisible( LAYER_RATSNEST ) )
479  Compile_Ratsnest( DC, true );
480  }
481  else
482  {
483  // Beiing moved: just redraw it
486  }
487 
488  if( module->GetFlags() == 0 ) // module not in edit: redraw full screen
489  m_canvas->Refresh();
490  }
491 }
void BuildListOfNets()
Definition: class_board.h:736
static PICKED_ITEMS_LIST s_PickedList
Definition: modules.cpp:56
virtual void OnModify() override
Function OnModify must be called after a board change to set the modified flag.
Definition: pcbframe.cpp:994
static void Abort_MoveOrCopyModule(EDA_DRAW_PANEL *Panel, wxDC *DC)
Definition: modules.cpp:163
STATUS_FLAGS GetFlags() const
Definition: base_struct.h:255
wxPoint g_Offset_Module
Definition: pcbnew.cpp:83
bool IsElementVisible(GAL_LAYER_ID LAYER_aPCB) const
Function IsElementVisible tests whether a given element category is visible.
bool IsMoving() const
Definition: base_struct.h:218
#define IN_EDIT
Item currently edited.
Definition: base_struct.h:111
void DrawSegmentWhileMovingFootprint(EDA_DRAW_PANEL *panel, wxDC *DC)
Definition: dragsegm.cpp:278
void TraceModuleRatsNest(wxDC *aDC)
Function TraceModuleRatsNest display the rats nest of a moving footprint, computed by build_ratsnest_...
Definition: ratsnest.cpp:131
EDA_ITEM * GetCurItem() const
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Definition: draw_panel.cpp:326
bool Delete_Module(MODULE *aModule, wxDC *aDC)
Function Delete Module Remove a footprint from m_Modules linked list and put it in undelete buffer Th...
Definition: modules.cpp:260
This file is part of the common library.
bool IsNew() const
Definition: base_struct.h:216
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw draws the footprint to the aDC.
void Flip(const wxPoint &aCentre) override
Function Flip Flip this object, i.e.
Class BOARD to handle a board.
const wxPoint & GetPosition() const override
Definition: class_module.h:155
MODULE * Next() const
Definition: class_module.h:100
void SetCurItem(BOARD_ITEM *aItem, bool aDisplayInfo=true)
Function SetCurItem sets the currently selected item and displays it in the MsgPanel.
void EraseDragList()
Function EraseDragList clear the .m_Flags of all track segments stored in g_DragSegmentList and clear...
Definition: dragsegm.cpp:293
void DeleteStructure()
Function DeleteStructure deletes this object after UnLink()ing it from its owner if it has one...
virtual EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
BOARD * GetBoard() const
void Rotate_Module(wxDC *DC, MODULE *module, double angle, bool incremental)
Definition: modules.cpp:433
void RefreshDrawingRect(const EDA_RECT &aRect, bool aEraseBackground=true)
Function RefreshDrawingRect redraws the contents of aRect in drawing units.
Definition: draw_panel.cpp:306
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
void SetLink(EDA_ITEM *aItem)
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
This file contains miscellaneous commonly used macros and functions.
void PlaceModule(MODULE *aModule, wxDC *aDC, bool aDoNotRecreateRatsnest=false)
Function PlaceModule places aModule at the current cursor position and updates module coordinates wit...
Definition: modules.cpp:352
BOARD_ITEM * Next() const
DIALOG_GET_FOOTPRINT_BY_NAME is a helper dialog to select a footprint by its reference One can enter ...
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
Definition: pcbframe.cpp:928
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
>
std::vector< DRAG_SEGM_PICKER > g_DragSegmentList
Definition: dragsegm.cpp:47
BOARD_ITEM * GetCurItem() const
Function GetCurItem returns the currently selected BOARD_ITEM, overriding BASE_SCREEN::GetCurItem().
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:253
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Function SetMsgPanel clears the message panel and populates it with the contents of aList...
Definition: draw_frame.cpp:773
static MODULE * s_ModuleInitialCopy
Definition: modules.cpp:53
void SetParent(EDA_ITEM *aParent)
Definition: base_struct.h:213
double GetOrientation() const
Definition: class_module.h:160
#define IS_DELETED
Definition: base_struct.h:116
Useful classes and functions used to collect tracks to drag.
void UndrawAndMarkSegmentsToDrag(EDA_DRAW_PANEL *aCanvas, wxDC *aDC)
Definition: dragsegm.cpp:388
void DrawGeneralRatsnest(wxDC *aDC, int aNetcode=0)
function Displays the general ratsnest Only ratsnest with the status bit CH_VISIBLE is set are displa...
Definition: ratsnest.cpp:88
void CallMouseCapture(wxDC *aDC, const wxPoint &aPosition, bool aErase)
Function CallMouseCapture calls the mouse capture callback.
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
EDA_DRAW_FRAME * GetParent() const
Definition: draw_panel.cpp:175
static void MoveFootprint(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aPosition, bool aErase)
Definition: modules.cpp:239
void SetPosition(const wxPoint &aPos) override
void SetAutoPanRequest(bool aEnable)
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
void SaveCopyInUndoList(BOARD_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0)) override
Function SaveCopyInUndoList Creates a new entry in undo list of commands.
Definition: undo_redo.cpp:172
void SetItem(EDA_ITEM *aItem)
void Compile_Ratsnest(wxDC *aDC, bool aDisplayStatus)
Function Compile_Ratsnest Create the entire board ratsnest.
Definition: ratsnest.cpp:57
Class DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
Definition: pcbstruct.h:62
unsigned GetCount() const
Function GetCount.
Definition: gr_basic.h:42
void Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset) override
Function Draw BOARD_ITEMs have their own color information.
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:92
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
PCB_LAYER_ID GetLayer() const
Function GetLayer returns the primary layer this item is on.
void SetState(int type, int state)
Definition: base_struct.h:242
const wxString & GetReference() const
Function GetReference.
Definition: class_module.h:419
void StartMoveModule(MODULE *aModule, wxDC *aDC, bool aDragConnectedTracks)
Function StartMoveModule Initialize a drag or move pad command.
Definition: modules.cpp:100
DLIST< MODULE > m_Modules
Definition: class_board.h:245
void SetOrientation(double newangle)
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
void BuildDragListe(MODULE *aModule)
Build the list of track segments connected to pads of aModule in m_DragList For each selected track s...
Definition: dragsegm.cpp:152
virtual void SaveCopyInUndoList(BOARD_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))=0
Function SaveCopyInUndoList (virtual pure) Creates a new entry in undo list of commands.
BASE_SCREEN * GetScreen()
Definition: draw_panel.cpp:188
void ClearItemsList()
Function ClearItemsList deletes only the list of pickers, NOT the picked data itself.
PCB_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:254
MODULE * GetFootprintFromBoardByReference()
Function GetFootprintFromBoardByReference.
Definition: modules.cpp:62
void DrawOutlinesWhenMoving(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aMoveVector)
Function DrawOutlinesWhenMoving draws in XOR mode the footprint when moving it to the aDC...
Definition: ratsnest.cpp:218
Module description (excepted pads)
bool m_Show_Module_Ratsnest
Definition: pcbstruct.h:87
void Change_Side_Module(MODULE *Module, wxDC *DC)
Function Change_Side_Module Flip a footprint (switch layer from component or component to copper) The...
Definition: modules.cpp:287
void SetMouseCapture(MOUSE_CAPTURE_CALLBACK aMouseCaptureCallback, END_MOUSE_CAPTURE_CALLBACK aEndMouseCaptureCallback)
Function SetMouseCapture sets the mouse capture and end mouse capture callbacks to aMouseCaptureCallb...
wxPoint GetCrossHairPosition(bool aInvertY=false) const
Function GetCrossHairPosition return the current cross hair position in logical (drawing) coordinates...
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Function GetConnectivity() returns list of missing connections between components/tracks.
Definition: class_board.h:290
void Remove(BOARD_ITEM *aBoardItem) override
Removes an item from the container.
EDA_ITEM * GetLink() const
void ClearListAndDeleteItems()
Function ClearListAndDeleteItems deletes the list of pickers, AND the data pointed by m_PickedItem or...
#define DO_NOT_DRAW
Used to disable draw function.
Definition: base_struct.h:125
int m_Status_Pcb
Flags used in ratsnest calculation and update.
Definition: class_board.h:237
#define IS_MOVED
Item being moved.
Definition: base_struct.h:112