KiCad PCB EDA Suite
mocks.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) 1992-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-2.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 #include <pgm_base.h>
25 #include <kiface_base.h>
26 #include <confirm.h>
27 #include <pcb_edit_frame.h>
28 #include <eda_dde.h>
29 #include <wx/file.h>
30 #include <wx/snglinst.h>
31 #include <wx/app.h>
32 #include <board.h>
33 #include <fp_lib_table.h>
34 #include <footprint_viewer_frame.h>
35 #include <footprint_wizard_frame.h>
36 #include <footprint.h>
37 #include <tools/pcb_actions.h>
38 #include <router/router_tool.h>
39 #include <dialog_find.h>
41 
43 
44 
45 #if 0
46 
47 static struct IFACE : public KIFACE_BASE
48 {
49  // Of course all are overloads, implementations of the KIFACE.
50 
51  IFACE( const char* aName, KIWAY::FACE_T aType ) :
52  KIFACE_BASE( aName, aType )
53  {}
54 
55  bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits ) override
56  {
57  return true;
58  }
59 
60  void OnKifaceEnd() override {}
61 
62  wxWindow* CreateWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) override
63  {
64  assert( false );
65  return nullptr;
66  }
67 
79  void* IfaceOrAddress( int aDataId ) override
80  {
81  return NULL;
82  }
83 }
84 kiface( "pcb_test_frame", KIWAY::FACE_PCB );
85 
86 static struct PGM_TEST_FRAME : public PGM_BASE
87 {
88  bool OnPgmInit();
89 
90  void OnPgmExit()
91  {
92  Kiway.OnKiwayEnd();
93 
94  // Destroy everything in PGM_BASE, especially wxSingleInstanceCheckerImpl
95  // earlier than wxApp and earlier than static destruction would.
97  }
98 
99  void MacOpenFile( const wxString& aFileName ) override
100  {
101  wxFileName filename( aFileName );
102 
103  if( filename.FileExists() )
104  {
105  #if 0
106  // this pulls in EDA_DRAW_FRAME type info, which we don't want in
107  // the single_top link image.
108  KIWAY_PLAYER* frame = dynamic_cast<KIWAY_PLAYER*>( App().GetTopWindow() );
109  #else
110  KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow();
111  #endif
112 
113  if( frame )
114  frame->OpenProjectFiles( std::vector<wxString>( 1, aFileName ) );
115  }
116  }
117 }
118 program;
119 
120 PGM_BASE& Pgm()
121 {
122  return program;
123 }
124 
125 
126 // Similar to PGM_BASE& Pgm(), but return nullptr when a *.ki_face
127 // is run from a python script, mot from a Kicad application
129 {
130  return nullptr; //&program;
131 }
132 
133 
135 {
136  return kiface;
137 }
138 #endif
139 
140 // FP_LIB_TABLE GFootprintTable;
141 
143 {
144  // these members are initialized to avoid warnings about non initialized vars
145  m_frame = aParent;
146  m_hitList.clear();
147  m_it = m_hitList.begin();
148  m_upToDate = false;
149 }
150 
151 void DIALOG_FIND::onFindNextClick( wxCommandEvent& aEvent )
152 {
153 }
154 
155 void DIALOG_FIND::onFindPreviousClick( wxCommandEvent& aEvent )
156 {
157 }
158 
159 void DIALOG_FIND::onSearchAgainClick( wxCommandEvent& aEvent )
160 {
161 }
162 
163 void DIALOG_FIND::onTextEnter( wxCommandEvent& event )
164 {
165 }
166 
167 void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
168 {
169 }
170 
171 bool DIALOG_FIND::Show( bool show )
172 {
173  return true;
174 }
175 
176 void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
177 {
178 }
179 
180 
181 DIALOG_FIND_BASE::DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id, const wxString& title,
182  const wxPoint& pos, const wxSize& size, long style ) :
183  DIALOG_SHIM( parent, id, title, pos, size, style )
184 {
185  // these members are initialized only to avoid warnings about non initialized vars
186  searchStringLabel = nullptr;
187  m_searchCombo = nullptr;
188  m_matchCase = nullptr;
189  m_matchWords = nullptr;
190  m_wildcards = nullptr;
191  m_wrap = nullptr;
192  m_includeValues = nullptr;
193  m_includeReferences = nullptr;
194  m_includeTexts = nullptr;
195  m_includeMarkers = nullptr;
196  m_includeVias = nullptr;
197  m_findNext = nullptr;
198  m_findPrevious = nullptr;
199  m_searchAgain = nullptr;
200  m_closeButton = nullptr;
201  m_status = nullptr;
202 }
203 
204 
206 {
207 }
208 
209 
211 {
212  return nullptr;
213 }
214 
215 
216 DIALOG_FILTER_SELECTION_BASE::DIALOG_FILTER_SELECTION_BASE( wxWindow* parent, wxWindowID id,
217  const wxString& title,
218  const wxPoint& pos, const wxSize& size,
219  long style ) :
220  DIALOG_SHIM( parent, id, title, pos, size, style )
221 {
222  // these members are initialized only to avoid warnings about non initialized vars
223  m_Include_Modules = nullptr;
224  m_Include_PcbTexts = nullptr;
225  m_IncludeLockedModules = nullptr;
226  m_Include_Draw_Items = nullptr;
227  m_Include_Tracks = nullptr;
228  m_Include_Vias = nullptr;
229  m_Include_Edges_Items = nullptr;
230  m_Include_Zones = nullptr;
231  m_sdbSizer1 = nullptr;
232  m_staticLine = nullptr;
233  m_sdbSizer1OK = nullptr;
234  m_sdbSizer1Cancel = nullptr;
235 }
236 
237 
239 {
240 }
241 
242 
244  DIALOG_FILTER_SELECTION_BASE( aParent ),
245  m_options( aOptions )
246 {
247  // silence another compiler warning about m_options not being used
248  if( m_options.includeModules )
249  {
250  }
251 }
252 
253 
254 void DIALOG_FILTER_SELECTION::checkBoxClicked( wxCommandEvent& aEvent )
255 {
256 }
257 
258 
259 void DIALOG_FILTER_SELECTION::allItemsClicked( wxCommandEvent& aEvent )
260 {
261 }
262 
263 
265 {
266  return true;
267 }
268 
269 
271 {
272 }
273 
274 
275 
277 
278 
283 {
284 public:
286 };
287 
288 
290  PCB_TOOL_BASE( "pcbnew.InteractiveSelection" ),
291  m_frame( NULL ),
292  m_enteredGroup( NULL ),
293  m_nonModifiedCursor( KICURSOR::ARROW ),
294  m_priv( nullptr )
295 {
296 }
297 
298 
300 {
301 }
302 
303 
305 {
306  return true;
307 }
308 
309 
310 void PCB_SELECTION_TOOL::Reset( RESET_REASON aReason )
311 {
312 }
313 
314 
315 int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
316 {
317  return 0;
318 }
319 
320 
322 {
323 }
324 
325 
326 void PCB_SELECTION_TOOL::ExitGroup( bool aSelectGroup )
327 {
328 }
329 
330 
332 {
333  return m_selection;
334 }
335 
336 
338  bool aConfirmLockedItems )
339 {
340  return m_selection;
341 }
342 
343 
345 {
347 }
348 
349 
350 bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag,
351  bool* aSelectionCancelledFlag,
352  CLIENT_SELECTION_FILTER aClientFilter )
353 {
354  return false;
355 }
356 
357 
358 bool PCB_SELECTION_TOOL::selectCursor( bool aForceSelect, CLIENT_SELECTION_FILTER aClientFilter )
359 {
360  return false;
361 }
362 
363 
365 {
366  return false;
367 }
368 
369 
371 {
372  return 0;
373 }
374 
375 
377 {
378  return 0;
379 }
380 
381 
382 int PCB_SELECTION_TOOL::SelectItems( const TOOL_EVENT& aEvent )
383 {
384  return 0;
385 }
386 
387 
388 int PCB_SELECTION_TOOL::SelectItem( const TOOL_EVENT& aEvent )
389 {
390  return 0;
391 }
392 
393 
394 int PCB_SELECTION_TOOL::SelectAll( const TOOL_EVENT& aEvent )
395 {
396  return 0;
397 }
398 
399 
400 void PCB_SELECTION_TOOL::AddItemToSel( BOARD_ITEM* aItem, bool aQuietMode )
401 {
402 }
403 
404 
406 {
407  return 0;
408 }
409 
410 
411 int PCB_SELECTION_TOOL::UnselectItem( const TOOL_EVENT& aEvent )
412 {
413  return 0;
414 }
415 
416 
417 void PCB_SELECTION_TOOL::RemoveItemFromSel( BOARD_ITEM* aItem, bool aQuietMode )
418 {
419 }
420 
421 
423 {
424 }
425 
426 
428 {
429 }
430 
431 
433 {
434  return 0;
435 }
436 
437 
439  STOP_CONDITION aStopCondition )
440 {
441 }
442 
443 
444 void PCB_SELECTION_TOOL::selectAllItemsOnNet( int aNetCode, bool aSelect )
445 {
446 }
447 
448 
449 int PCB_SELECTION_TOOL::selectNet( const TOOL_EVENT& aEvent )
450 {
451  return 0;
452 }
453 
454 
455 void PCB_SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
456 {
457 }
458 
459 
461 {
462 }
463 
464 
466 {
467  return 0;
468 }
469 
470 
472 {
473  return 0;
474 }
475 
476 
484 static bool itemIsIncludedByFilter( const BOARD_ITEM& aItem, const BOARD& aBoard,
485  const DIALOG_FILTER_SELECTION::OPTIONS& aFilterOptions )
486 {
487  return false;
488 }
489 
490 
492 {
493  return 0;
494 }
495 
496 
497 void PCB_SELECTION_TOOL::FilterCollectedItems( GENERAL_COLLECTOR& aCollector, bool aMultiSelect )
498 {
499 }
500 
501 
502 bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect )
503 {
504  return true;
505 }
506 
507 
508 void PCB_SELECTION_TOOL::ClearSelection( bool aQuietMode )
509 {
510 }
511 
512 
514 {
515 }
516 
517 
519 {
520  return 0;
521 }
522 
523 
525 {
526  return false;
527 }
528 
529 
530 bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOnly ) const
531 {
532  return false;
533 }
534 
535 
537 {
538 }
539 
540 
542 {
543 }
544 
545 void PCB_SELECTION_TOOL::highlight( BOARD_ITEM* aItem, int aMode, PCB_SELECTION* aGroup )
546 {
547 }
548 
549 void PCB_SELECTION_TOOL::highlightInternal( BOARD_ITEM* aItem, int aMode, bool aUsingOverlay )
550 {
551 }
552 
553 
554 void PCB_SELECTION_TOOL::unhighlight( BOARD_ITEM* aItem, int aMode, PCB_SELECTION* aGroup )
555 {
556 }
557 
558 
559 void PCB_SELECTION_TOOL::unhighlightInternal( BOARD_ITEM* aItem, int aMode, bool aUsingOverlay )
560 {
561 }
562 
563 
564 bool PCB_SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const
565 {
566  return false;
567 }
568 
570  const VECTOR2I& aWhere ) const
571 {
572 }
573 
574 
575 
576 
578 {
579  return 0;
580 }
581 
582 
583 int PCB_SELECTION_TOOL::UpdateMenu( const TOOL_EVENT& aEvent )
584 {
585  return 0;
586 }
587 
588 
590 {
591 }
592 
593 void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool,
594  INTERACTIVE_PLACER_BASE* aPlacer,
595  const wxString& aCommitMessage, int aOptions )
596 {
597 }
598 
599 
600 bool PCB_TOOL_BASE::Init()
601 {
602  return true;
603 }
604 
605 
606 void PCB_TOOL_BASE::Reset( RESET_REASON aReason )
607 {
608 }
609 
610 
612 {
613 }
614 
615 
616 bool PCB_TOOL_BASE::Is45Limited() const
617 {
618  return false;
619 }
620 
621 
623 {
624  static PCB_DISPLAY_OPTIONS disp;
625 
626  return disp;
627 }
628 
630 {
631  return nullptr;
632 }
633 
634 
636 {
637  static PCB_SELECTION sel;
638 
639  return sel;
640 }
641 
642 
644 {
645  static PCB_SELECTION sel;
646 
647  return sel;
648 }
649 
650 
651 EDA_ITEM* PCB_SELECTION::GetTopLeftItem( bool onlyModules ) const
652 {
653  return nullptr;
654 }
655 
656 
657 const std::vector<KIGFX::VIEW_ITEM*> PCB_SELECTION::updateDrawList() const
658 {
659  std::vector<VIEW_ITEM*> items;
660 
661  return items;
662 }
663 
664 
666 {
667  return LSET();
668 }
669 
670 #if 0
671 #include <3d_canvas/board_adapter.h>
672 
675 BBOX_3D::BBOX_3D(){};
677 TRACK_BALL::TRACK_BALL(float x) : CAMERA(x) {};
680 
681 #endif
682 
684 
686 {
687  return nullptr;
688 }
689 
690 
692 {
693  return 0;
694 }
bool Show(bool show=true) override
The Show method is overridden to make the search combobox focused by default.
const GENERAL_COLLECTORS_GUIDE getCollectorsGuide() const
int selectSameSheet(const TOOL_EVENT &aEvent)
Invoke filter dialog and modify current selection.
virtual bool OpenProjectFiles(const std::vector< wxString > &aFileList, int aCtl=0)
Open a project or set of files given by aFileList.
Definition: kiway_player.h:118
BITMAP2CMP_SETTINGS kiface
int CursorSelection(const TOOL_EVENT &aEvent)
Clear current selection event handler.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Definition: kiway_player.h:64
void checkBoxClicked(wxCommandEvent &aEvent) override
void select(BOARD_ITEM *aItem)
Take necessary action mark an item as selected.
DDE server & client.
A KIFACE implementation.
Definition: kiface_base.h:37
bool OnKifaceStart(PGM_BASE *aProgram, int aCtlBits) override
Typically start_common() is called from here.
void MacOpenFile(const wxString &aFileName) override
Specific to MacOSX (not used under Linux or Windows).
This file is part of the common library.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
~BBOX_3D()
Definition: bbox_3d.cpp:56
Container for data for KiCad programs.
Definition: pgm_base.h:93
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
int SelectionMenu(const TOOL_EVENT &aEvent)
Show a popup menu to trim the COLLECTOR passed as aEvent's parameter down to a single item.
int GetColorStandardListCount()
Definition: mocks.cpp:691
void highlightInternal(BOARD_ITEM *aItem, int aHighlightMode, bool aUsingOverlay)
DIALOG_FILTER_SELECTION::OPTIONS m_filterOpts
virtual wxApp & App()
Returns a bare naked wxApp which may come from wxPython, SINGLE_TOP, or kicad.exe.
Definition: pgm_base.cpp:135
void FilterCollectedItems(GENERAL_COLLECTOR &aCollector, bool aMultiSelect)
void Destroy()
Definition: pgm_base.cpp:127
wxWindow * CreateWindow(wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
Create a wxWindow for the current project.
virtual void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
void highlight(BOARD_ITEM *aItem, int aHighlightMode, PCB_SELECTION *aGroup=nullptr)
Highlight the item visually.
const FAB_LAYER_COLOR * GetColorStandardList()
Definition: mocks.cpp:685
void OnKifaceEnd() override
Called just once just before the DSO is to be unloaded.
Private implementation of firewalled private data.
KICURSOR
Definition: cursors.h:33
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
void setTransitions() override
Zoom the screen to center and fit the current selection.
int UnselectItem(const TOOL_EVENT &aEvent)
void(* CLIENT_SELECTION_FILTER)(const VECTOR2I &, GENERAL_COLLECTOR &, PCB_SELECTION_TOOL *)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
Struct that will be set with the result of the user choices in the dialog.
bool doSelectionMenu(GENERAL_COLLECTOR *aItems)
Allow the selection of a single item from a list via pop-up menu.
void selectConnectedTracks(BOARD_CONNECTED_ITEM &aSourceItem, STOP_CONDITION aStopCondition)
Select connected tracks and vias.
void OnKiwayEnd()
Definition: kiway.cpp:651
DIALOG_FIND_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE)
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
int UnselectItems(const TOOL_EVENT &aEvent)
void onTextEnter(wxCommandEvent &event) override
Definition: dialog_find.cpp:97
void RebuildSelection()
Rebuild the selection from the EDA_ITEMs' selection flags.
A class used to derive camera objects from.
Definition: camera.h:77
bool Init() override
Init() is called once upon a registration of the tool.
PCB_SELECTION & GetSelection()
Return the set of currently selected items.
Class DIALOG_FILTER_SELECTION_BASE.
void UnbrightenItem(BOARD_ITEM *aItem)
int updateSelection(const TOOL_EVENT &aEvent)
Event handler to update the selection VIEW_ITEM.
static bool itemIsIncludedByFilter(const BOARD_ITEM &aItem, const BOARD &aBoard, const DIALOG_FILTER_SELECTION::OPTIONS &aFilterOptions)
Function itemIsIncludedByFilter()
Definition: mocks.cpp:484
Container for display options like enable/disable some optional drawings.
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:516
void onFindNextClick(wxCommandEvent &event) override
bool selectMultiple()
Handle drawing a selection box that allows one to select many items at the same time.
const PCB_SELECTION & selection() const
int selectNet(const TOOL_EVENT &aEvent)
Select all copper connections belonging to the same net(s) as the items in the selection.
void onFindPreviousClick(wxCommandEvent &event) override
void OnPgmExit()
Definition: mock_pgm.cpp:75
virtual void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
PGM_BASE * PgmOrNull()
similar to PGM_BASE& Pgm(), but return a reference that can be nullptr when running a shared lib from...
Definition: cvpcb.cpp:125
int expandConnection(const TOOL_EVENT &aEvent)
Expand the current track selection to the next boundary (junctions, pads, or all)
void AddItemToSel(BOARD_ITEM *aItem, bool aQuietMode=false)
Select all items on the board.
bool selectPoint(const VECTOR2I &aWhere, bool aOnDrag=false, bool *aSelectionCancelledFlag=nullptr, CLIENT_SELECTION_FILTER aClientFilter=nullptr)
Select an item pointed by the parameter aWhere.
Generic, UI-independent tool event.
Definition: tool_event.h:152
FP_LIB_TABLE GFootprintTable
The global footprint library table.
Definition: mocks.cpp:42
DIALOG_FIND(PCB_BASE_FRAME *aParent)
Definition: dialog_find.cpp:54
bool Selectable(const BOARD_ITEM *aItem, bool checkVisibilityOnly=false) const
Check conditions for an item to be selected.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:260
void OnCloseButtonClick(wxCommandEvent &aEvent) override
pcbnew DSO
Definition: kiway.h:269
EDA_ITEM * GetTopLeftItem(bool aFootprintsOnly=false) const override
void BrightenItem(BOARD_ITEM *aItem)
PCB_SELECTION m_selection
virtual bool Is45Limited() const
Should the tool use its 45° mode option?
void ExitGroup(bool aSelectGroup=false)
Leave the currently entered group.
void unselect(BOARD_ITEM *aItem)
Take necessary action mark an item as unselected.
void * IfaceOrAddress(int aDataId) override
Return pointer to the requested object.
const PCB_DISPLAY_OPTIONS & displayOptions() const
FACE_T
Known KIFACE implementations.
Definition: kiway.h:266
int selectSheetContents(const TOOL_EVENT &aEvent)
Select all footprints belonging to same hierarchical sheet as the selected footprint (same sheet path...
int Main(const TOOL_EVENT &aEvent)
The main loop.
KIFACE_BASE(const char *aKifaceName, KIWAY::FACE_T aId)
Definition: kiface_base.h:64
int SelectItems(const TOOL_EVENT &aEvent)
Item unselection event handler.
int SelectItem(const TOOL_EVENT &aEvent)
bool itemPassesFilter(BOARD_ITEM *aItem, bool aMultiSelect)
bool selectCursor(bool aForceSelect=false, CLIENT_SELECTION_FILTER aClientFilter=nullptr)
Select an item under the cursor unless there is something already selected or aSelectAlways is true.
const std::vector< KIGFX::VIEW_ITEM * > updateDrawList() const override
see class PGM_BASE
PCB_SELECTION & RequestSelection(CLIENT_SELECTION_FILTER aClientFilter, bool aConfirmLockedItems=false)
Return the current selection set, filtered according to aFlags and aClientFilter.
BBOX_3D()
Create with default values a bounding box (not initialized)
Definition: bbox_3d.cpp:37
IFACE(const char *aDSOname, KIWAY::FACE_T aType)
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
PGM_SINGLE_TOP program
DIALOG_FILTER_SELECTION(PCB_BASE_FRAME *aParent, OPTIONS &aOptions)
Create the filter selection dialog.
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:240
virtual bool Init() override
Init() is called once upon a registration of the tool.
static void NeighboringSegmentFilter(const VECTOR2I &aPt, GENERAL_COLLECTOR &aCollector)
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:99
int UpdateMenu(const TOOL_EVENT &aEvent)
Pass the selection to a conditional menu for updating.
OBJECT_2D_TYPE
Definition: object_2d.h:44
int SelectAll(const TOOL_EVENT &aEvent)
Multiple item selection event handler.
TRACK_BALL(float aInitialDistance)
Definition: track_ball.cpp:37
void selectAllItemsOnNet(int aNetCode, bool aSelect=true)
Select all items with the given net code.
DIALOG_FILTER_SELECTION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Filter Selected Items"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnClose(wxCloseEvent &event) override
void allItemsClicked(wxCommandEvent &aEvent) override
void doInteractiveItemPlacement(const std::string &aTool, INTERACTIVE_PLACER_BASE *aPlacer, const wxString &aCommitMessage, int aOptions=IPO_ROTATE|IPO_FLIP|IPO_REPEAT)
Helper function for performing a common interactive idiom: wait for a left click, place an item there...
void RemoveItemFromSel(BOARD_ITEM *aItem, bool aQuietMode=false)
Multiple item unselection event handler.
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:377
void onSearchAgainClick(wxCommandEvent &event) override
bool selectionContains(const VECTOR2I &aPoint) const
int ClearSelection(const TOOL_EVENT &aEvent)
PCB_DRAW_PANEL_GAL * canvas() const
void unhighlightInternal(BOARD_ITEM *aItem, int aHighlightMode, bool aUsingOverlay)
void GuessSelectionCandidates(GENERAL_COLLECTOR &aCollector, const VECTOR2I &aWhere) const
Try to guess best selection candidates in case multiple items are clicked, by doing some brain-dead h...
const LSET GetSelectionLayers()
void selectAllItemsOnSheet(wxString &aSheetPath)
Select all items on a sheet and its subsheets, given the full sheet path.
void unhighlight(BOARD_ITEM *aItem, int aHighlightMode, PCB_SELECTION *aGroup=nullptr)
Unhighlight the item visually.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
Class DIALOG_FIND_BASE.
int PGM_BASE * aProgram
Definition: cvpcb.cpp:110
int filterSelection(const TOOL_EVENT &aEvent)
Return true if the given item passes the current SELECTION_FILTER_OPTIONS.
FOOTPRINT * GetFootprintFromBoardByReference()
KIWAY Kiway