KiCad PCB EDA Suite
group_tool.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) 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 <tool/tool_manager.h>
25 #include <tools/pcb_actions.h>
26 #include <tools/selection_tool.h>
27 #include <tools/group_tool.h>
29 #include <status_popup.h>
30 #include <board_commit.h>
31 #include <bitmaps.h>
33 #include "edit_tool.h"
34 
36 {
37 private:
41 
42 public:
45 
46  void OnMemberSelected( wxCommandEvent& event ) override;
47  void OnAddMember( wxCommandEvent& event ) override;
48  void OnRemoveMember( wxCommandEvent& event ) override;
49 
50  void DoAddMember( EDA_ITEM* aItem );
51 
52 private:
53  bool TransferDataToWindow() override;
54  bool TransferDataFromWindow() override;
55 };
56 
57 
59  PCB_GROUP* aGroup ) :
61  m_brdEditor( aParent ),
62  m_toolMgr( aParent->GetToolManager() ),
63  m_group( aGroup )
64 {
65  m_bpAddMember->SetBitmap( KiBitmap( small_plus_xpm ) );
66  m_bpRemoveMember->SetBitmap( KiBitmap( trash_xpm ) );
67 
68  m_nameCtrl->SetValue( m_group->GetName() );
69 
70  for( BOARD_ITEM* item : m_group->GetItems() )
71  m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );
72 
73  m_sdbSizerOK->SetDefault();
74 
76 
77  // Now all widgets have the size fixed, call FinishDialogSettings
79 }
80 
81 
83 {
84  // Don't do anything here; it gets called every time we re-show the dialog after
85  // picking a new member.
86  return true;
87 }
88 
89 
91 {
92  BOARD_COMMIT commit( m_brdEditor );
93  commit.Modify( m_group );
94 
95  m_group->SetName( m_nameCtrl->GetValue() );
96 
97 
99  m_group->RemoveAll();
100 
101  for( size_t ii = 0; ii < m_membersList->GetCount(); ++ii )
102  {
103  BOARD_ITEM* item = static_cast<BOARD_ITEM*>( m_membersList->GetClientData( ii ) );
104  PCB_GROUP* existingGroup = item->GetParentGroup();
105 
106  if( existingGroup )
107  {
108  commit.Modify( existingGroup );
109  existingGroup->RemoveItem( item );
110  }
111 
112  m_group->AddItem( item );
113  }
114 
115  commit.Push( _( "Modified group" ) );
117 
118  return true;
119 }
120 
121 
122 void DIALOG_GROUP_PROPERTIES::OnMemberSelected( wxCommandEvent& aEvent )
123 {
124  int selected = m_membersList->GetSelection();
125 
126  if( selected >= 0 )
127  {
128  WINDOW_THAWER thawer( m_brdEditor );
129  BOARD_ITEM* item = static_cast<BOARD_ITEM*>( m_membersList->GetClientData( selected ) );
130 
131  m_brdEditor->FocusOnItem( item );
133  }
134 
135  aEvent.Skip();
136 }
137 
138 
139 void DIALOG_GROUP_PROPERTIES::OnAddMember( wxCommandEvent& event )
140 {
142 }
143 
144 
146 {
147  for( size_t ii = 0; ii < m_membersList->GetCount(); ++ii )
148  {
149  if( aItem == static_cast<BOARD_ITEM*>( m_membersList->GetClientData( ii ) ) )
150  return;
151  }
152 
153  if( aItem == m_group )
154  return;
155 
156  m_membersList->Append( aItem->GetSelectMenuText( m_brdEditor->GetUserUnits() ), aItem );
157 }
158 
159 
160 void DIALOG_GROUP_PROPERTIES::OnRemoveMember( wxCommandEvent& event )
161 {
162  int selected = m_membersList->GetSelection();
163 
164  if( selected >= 0 )
165  m_membersList->Delete( selected );
166 }
167 
168 
170 {
171 public:
173  {
174  SetIcon( locked_xpm ); // fixme
175  SetTitle( _( "Grouping" ) );
176 
181  }
182 
183  ACTION_MENU* create() const override
184  {
185  return new GROUP_CONTEXT_MENU();
186  }
187 
188 private:
189  void update() override
190  {
192  BOARD* board = selTool->GetBoard();
193 
194  const auto& selection = selTool->GetSelection();
195 
196  wxString check = board->GroupsSanityCheck();
197  wxCHECK_RET( check == wxEmptyString, _( "Group is in inconsistent state:" ) + wxS( " " )+ check );
198 
199  BOARD::GroupLegalOpsField legalOps = board->GroupLegalOps( selection );
200 
201  Enable( PCB_ACTIONS::groupCreate.GetUIId(), legalOps.create );
202  Enable( PCB_ACTIONS::groupUngroup.GetUIId(), legalOps.ungroup );
203  Enable( PCB_ACTIONS::groupRemoveItems.GetUIId(), legalOps.removeItems );
204  Enable( PCB_ACTIONS::groupEnter.GetUIId(), legalOps.enter );
205  }
206 };
207 
208 
210  PCB_TOOL_BASE( "pcbnew.Groups" ),
211  m_frame( nullptr ),
212  m_propertiesDialog( nullptr ),
213  m_selectionTool( nullptr )
214 {
215 }
216 
217 
219 {
220  m_frame = getEditFrame<PCB_BASE_EDIT_FRAME>();
221 
222  if( aReason != RUN )
223  m_commit = std::make_unique<BOARD_COMMIT>( this );
224 }
225 
226 
228 {
229  m_frame = getEditFrame<PCB_BASE_EDIT_FRAME>();
230 
231  // Find the selection tool, so they can cooperate
233 
234  auto groupMenu = std::make_shared<GROUP_CONTEXT_MENU>();
235  groupMenu->SetTool( this );
236 
237  // Add the group control menus to relevant other tools
238  if( m_selectionTool )
239  {
240  auto& toolMenu = m_selectionTool->GetToolMenu();
241  auto& menu = toolMenu.GetMenu();
242 
243  toolMenu.AddSubMenu( groupMenu );
244 
245  menu.AddMenu( groupMenu.get(), SELECTION_CONDITIONS::NotEmpty, 100 );
246  }
247 
248  return true;
249 }
250 
251 
253 {
254  PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>();
255  PCB_GROUP* group = aEvent.Parameter<PCB_GROUP*>();
256 
257  if( m_propertiesDialog )
258  m_propertiesDialog->Destroy();
259 
260  m_propertiesDialog = new DIALOG_GROUP_PROPERTIES( editFrame, group );
261 
262  m_propertiesDialog->Show( true );
263 
264  return 0;
265 }
266 
267 
269 {
270  std::string tool = "pcbnew.EditGroups.selectNewMember";
272  STATUS_TEXT_POPUP statusPopup( frame() );
273  bool done = false;
274 
275  if( m_propertiesDialog )
276  m_propertiesDialog->Show( false );
277 
278  Activate();
279 
280  statusPopup.SetText( _( "Click on new member..." ) );
281 
282  picker->SetClickHandler(
283  [&]( const VECTOR2D& aPoint ) -> bool
284  {
286 
288  []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, SELECTION_TOOL* sTool )
289  {
290  EditToolSelectionFilter( aCollector, EXCLUDE_TRANSIENTS, sTool );
291  } );
292 
293  if( sel.Empty() )
294  return true; // still looking for an item
295 
296  statusPopup.Hide();
297 
298  if( m_propertiesDialog )
299  {
301  m_propertiesDialog->Show( true );
302  }
303 
304  return false; // got our item; don't need any more
305  } );
306 
307  picker->SetMotionHandler(
308  [&] ( const VECTOR2D& aPos )
309  {
310  statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
311  } );
312 
313  picker->SetCancelHandler(
314  [&]()
315  {
316  if( m_propertiesDialog )
317  m_propertiesDialog->Show( true );
318 
319  statusPopup.Hide();
320  } );
321 
322  picker->SetFinalizeHandler(
323  [&]( const int& aFinalState )
324  {
325  done = true;
326  } );
327 
328  statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
329  statusPopup.Popup();
330 
331  m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );
332 
333  while( !done )
334  {
335  // Pass events unless we receive a null event, then we must shut down
336  if( TOOL_EVENT* evt = Wait() )
337  evt->SetPassEvent();
338  else
339  break;
340  }
341 
342  return 0;
343 }
344 
345 
346 int GROUP_TOOL::Group( const TOOL_EVENT& aEvent )
347 {
349  const PCBNEW_SELECTION& selection = selTool->GetSelection();
350  BOARD* board = getModel<BOARD>();
351  PCB_GROUP* group = nullptr;
352 
353  if( selection.Empty() )
355 
356  if( m_editModules )
357  {
359 
361 
362  group = new PCB_GROUP( module );
363  module->Add( group );
364 
365  for( EDA_ITEM* item : selection )
366  group->AddItem( static_cast<BOARD_ITEM*>( item ) );
367  }
368  else
369  {
370  PICKED_ITEMS_LIST undoList;
371 
372  group = new PCB_GROUP( board );
373  board->Add( group );
374 
375  undoList.PushItem( ITEM_PICKER( nullptr, group, UNDO_REDO::NEWITEM ) );
376 
377  for( EDA_ITEM* item : selection )
378  {
379  group->AddItem( static_cast<BOARD_ITEM*>( item ) );
380  undoList.PushItem( ITEM_PICKER( nullptr, item, UNDO_REDO::GROUP ) );
381  }
382 
384  }
385 
386  selTool->ClearSelection();
387  selTool->select( group );
388 
390  m_frame->OnModify();
391 
392  return 0;
393 }
394 
395 
396 int GROUP_TOOL::Ungroup( const TOOL_EVENT& aEvent )
397 {
398  const PCBNEW_SELECTION& selection = m_toolMgr->GetTool<SELECTION_TOOL>()->GetSelection();
399  BOARD* board = getModel<BOARD>();
400  std::vector<BOARD_ITEM*> members;
401 
402  if( selection.Empty() )
404 
405  PCBNEW_SELECTION selCopy = selection;
407 
408  for( EDA_ITEM* item : selCopy )
409  {
410  PCB_GROUP* group = dynamic_cast<PCB_GROUP*>( item );
411 
412  if( group )
413  {
414  if( m_editModules )
415  {
417 
419 
420  group->RemoveAll();
421  module->Remove( group );
422  }
423  else
424  {
425  PICKED_ITEMS_LIST undoList;
426 
427  for( BOARD_ITEM* member : group->GetItems() )
428  {
429  undoList.PushItem( ITEM_PICKER( nullptr, member, UNDO_REDO::UNGROUP ) );
430  members.push_back( member );
431  }
432 
433  group->RemoveAll();
434  board->Remove( group );
435 
436  undoList.PushItem( ITEM_PICKER( nullptr, group, UNDO_REDO::DELETED ) );
437 
439  }
440 
441  group->SetSelected();
442  }
443  }
444 
445  m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &members );
446 
448  m_frame->OnModify();
449 
450  return 0;
451 }
452 
453 
455 {
457  const PCBNEW_SELECTION& selection = selTool->GetSelection();
458  BOARD_COMMIT commit( m_frame );
459 
460  if( selection.Empty() )
462 
463  std::map<PCB_GROUP*, std::vector<BOARD_ITEM*>> groupMap;
464 
465  for( EDA_ITEM* item : selection )
466  {
467  BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( item );
468  PCB_GROUP* group = boardItem->GetParentGroup();
469 
470  if( group )
471  groupMap[ group ].push_back( boardItem );
472  }
473 
474  for( std::pair<PCB_GROUP*, std::vector<BOARD_ITEM*>> pair : groupMap )
475  {
476  commit.Modify( pair.first );
477 
478  for( BOARD_ITEM* item : pair.second )
479  pair.first->RemoveItem( item );
480  }
481 
482  commit.Push( "Remove Group Items" );
483 
485  m_frame->OnModify();
486 
487  return 0;
488 }
489 
490 
491 int GROUP_TOOL::EnterGroup( const TOOL_EVENT& aEvent )
492 {
494  const PCBNEW_SELECTION& selection = selTool->GetSelection();
495 
496  if( selection.GetSize() == 1 && selection[0]->Type() == PCB_GROUP_T )
497  selTool->EnterGroup();
498 
499  return 0;
500 }
501 
502 
503 int GROUP_TOOL::LeaveGroup( const TOOL_EVENT& aEvent )
504 {
505  m_toolMgr->GetTool<SELECTION_TOOL>()->ExitGroup( true /* Select the group */ );
506  return 0;
507 }
508 
509 
511 {
514 
520 }
static TOOL_ACTION selectItems
Selects a list of items (specified as the event parameter)
Definition: pcb_actions.h:69
static TOOL_ACTION groupRemoveItems
Definition: pcb_actions.h:419
static TOOL_ACTION selectionClear
Clears the current selection.
Definition: pcb_actions.h:62
int LeaveGroup(const TOOL_EVENT &aEvent)
Leave the current group (deselect its members and select the group as a whole)
Definition: group_tool.cpp:503
PCB_GROUP * GetParentGroup() const
const BITMAP_OPAQUE trash_xpm[1]
Definition: trash.cpp:34
void RemoveAll()
void AddMenu(ACTION_MENU *aMenu, const SELECTION_CONDITION &aCondition=SELECTION_CONDITIONS::ShowAlways, int aOrder=ANY_ORDER)
Adds a submenu to the menu.
int GroupProperties(const TOOL_EVENT &aEvent)
Definition: group_tool.cpp:252
bool AddItem(BOARD_ITEM *aItem)
Adds item to group.
wxMenuItem * Add(const wxString &aLabel, int aId, const BITMAP_OPAQUE *aIcon)
Adds a wxWidgets-style entry to the menu.
bool TransferDataToWindow() override
Definition: group_tool.cpp:82
COMMIT & Modify(EDA_ITEM *aItem)
Modifies a given item in the model.
Definition: commit.h:103
static TOOL_ACTION groupLeave
Definition: pcb_actions.h:421
TOOL_EVENT * Wait(const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
Function Wait()
BOARD * board() const
void EditToolSelectionFilter(GENERAL_COLLECTOR &aCollector, int aFlags, SELECTION_TOOL *selectionTool)
Definition: edit_tool.cpp:64
void update() override
Update menu state stub.
Definition: group_tool.cpp:189
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:43
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
void setTransitions() override
Sets up handlers for various events.
Definition: group_tool.cpp:510
class PCB_GROUP, a set of BOARD_ITEMs
Definition: typeinfo.h:109
static TOOL_ACTION groupUngroup
Definition: pcb_actions.h:418
PCB_GROUP is a set of BOARD_ITEMs (i.e., without duplicates)
void OnAddMember(wxCommandEvent &event) override
Definition: group_tool.cpp:139
SELECTION_TOOL.
STATUS_TEXT_POPUP.
Definition: status_popup.h:82
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
CONDITIONAL_MENU & GetMenu()
Function GetMenu.
Definition: tool_menu.cpp:46
Tool is invoked after being inactive.
Definition: tool_base.h:81
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:219
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
BOARD * GetBoard() const
TOOL_MENU & GetToolMenu()
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Function RunAction() Runs the specified action.
Definition: tool_manager.h:141
PCB_BASE_EDIT_FRAME * m_frame
Definition: group_tool.h:76
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
bool TransferDataFromWindow() override
Definition: group_tool.cpp:90
const std::unordered_set< BOARD_ITEM * > & GetItems() const
static bool NotEmpty(const SELECTION &aSelection)
Tests if there are any items selected.
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Function Go()
void select(BOARD_ITEM *aItem)
Function select() Takes necessary action mark an item as selected.
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:115
void SetFinalizeHandler(FINALIZE_HANDLER aHandler)
Function SetFinalizeHandler() Sets a handler for the finalize event.
static const TOOL_EVENT SelectedItemsModified
Definition: actions.h:213
int RemoveFromGroup(const TOOL_EVENT &aEvent)
Remove selection from group.
Definition: group_tool.cpp:454
PCBNEW_SELECTION & GetSelection()
Function GetSelection()
static TOOL_ACTION pickerTool
Definition: actions.h:153
PCB_BASE_EDIT_FRAME * frame() const
ACTION_MENU * create() const override
Returns an instance of this class. It has to be overridden in inheriting classes.
Definition: group_tool.cpp:183
TOOL_MANAGER.
Definition: tool_manager.h:51
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:82
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Generic tool for picking a point.
const PCBNEW_SELECTION & selection() const
std::unique_ptr< BOARD_COMMIT > m_commit
Definition: group_tool.h:79
void SetSelected()
Definition: eda_item.h:197
wxString GetName() const
int ClearSelection(const TOOL_EVENT &aEvent)
Clear current selection event handler.
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.
Definition: group_tool.cpp:218
DIALOG_GROUP_PROPERTIES * m_propertiesDialog
Definition: group_tool.h:77
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
void OnRemoveMember(wxCommandEvent &event) override
Definition: group_tool.cpp:160
void SetIcon(const BITMAP_OPAQUE *aIcon)
Assigns an icon for the entry.
Definition: action_menu.cpp:71
TOOL_EVENT.
Definition: tool_event.h:171
MODULE * GetFirstModule() const
Gets the first module in the list (used in footprint viewer/editor) or NULL if none.
Definition: class_board.h:347
static TOOL_ACTION pickNewGroupMember
Definition: pcb_actions.h:217
void DoAddMember(EDA_ITEM *aItem)
Definition: group_tool.cpp:145
bool Init() override
Function Init() Init() is called once upon a registration of the tool.
Definition: group_tool.cpp:227
void Remove(BOARD_ITEM *aItem) override
PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
void OnMemberSelected(wxCommandEvent &event) override
Definition: group_tool.cpp:122
bool Show(bool show) override
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...
#define EXCLUDE_TRANSIENTS
Definition: edit_tool.h:55
bool Empty() const
Checks if there is anything selected.
Definition: selection.h:121
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
virtual unsigned int GetSize() const override
Function GetSize() Returns the number of stored items.
Definition: selection.h:100
int Ungroup(const TOOL_EVENT &aEvent)
Ungroups selected items.
Definition: group_tool.cpp:396
static TOOL_ACTION groupCreate
Definition: pcb_actions.h:417
virtual void OnModify()
Function OnModify Must be called after a change in order to set the "modify" flag of the current scre...
DIALOG_GROUP_PROPERTIES(PCB_BASE_EDIT_FRAME *aParent, PCB_GROUP *aTarget)
Definition: group_tool.cpp:58
void SetTitle(const wxString &aTitle) override
Sets title for the menu.
Definition: action_menu.cpp:89
PCBNEW_SELECTION & RequestSelection(CLIENT_SELECTION_FILTER aClientFilter, std::vector< BOARD_ITEM * > *aFiltered=nullptr, bool aConfirmLockedItems=false)
Function RequestSelection()
Common, abstract interface for edit frames.
const BITMAP_OPAQUE locked_xpm[1]
Definition: locked.cpp:42
Information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:186
MODULE * module() const
#define _(s)
Definition: 3d_actions.cpp:33
TOOL_MANAGER * getToolManager() const
Returns an instance of TOOL_MANAGER class.
Used when the right click button is pressed, or when the select tool is in effect.
Definition: collectors.h:240
virtual wxString GetSelectMenuText(EDA_UNITS aUnits) const
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
Definition: eda_item.cpp:123
void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0)) override
Function SaveCopyInUndoList Creates a new entry in undo list of commands.
Definition: undo_redo.cpp:179
static TOOL_ACTION selectItem
Selects an item (specified as the event parameter).
Definition: pcb_actions.h:65
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: eda_item.h:148
void SetMotionHandler(MOTION_HANDLER aHandler)
Function SetMotionHandler() Sets a handler for mouse motion.
virtual void Push(const wxString &aMessage=wxT("A commit"), bool aCreateUndoEntry=true, bool aSetDirtyBit=true) override
Executes the changes.
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79
int Group(const TOOL_EVENT &aEvent)
Groups selected items.
Definition: group_tool.cpp:346
void Activate()
Function Activate() Runs the tool.
int PickNewMember(const TOOL_EVENT &aEvent)
Function SelectNewMember()
Definition: group_tool.cpp:268
PCB_BASE_EDIT_FRAME * m_brdEditor
Definition: group_tool.cpp:38
int EnterGroup(const TOOL_EVENT &aEvent)
Restrict seletion to only member of the group.
Definition: group_tool.cpp:491
SELECTION_TOOL * m_selectionTool
Definition: group_tool.h:78
Class DIALOG_GROUP_PROPERTIES_BASE.
static TOOL_ACTION groupEnter
Definition: pcb_actions.h:420
void SetCancelHandler(CANCEL_HANDLER aHandler)
Function SetCancelHandler() Sets a handler for cancel events (ESC or context-menu Cancel).
void PostEvent(const TOOL_EVENT &aEvent)
Puts an event to the event queue to be processed at the end of event processing cycle.
Definition: tool_manager.h:274
TOOL_MANAGER * m_toolMgr
Definition: group_tool.cpp:39
void FocusOnItem(BOARD_ITEM *aItem)
const BITMAP_OPAQUE small_plus_xpm[1]
Definition: small_plus.cpp:20
void Remove(BOARD_ITEM *aBoardItem) override
Removes an item from the container.
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
Definition: pcb_actions.h:59
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
static TOOL_ACTION groupProperties
Definition: pcb_actions.h:216
EDA_ITEM * Front() const
Definition: selection.h:184
void SetName(wxString aName)
void SetClickHandler(CLICK_HANDLER aHandler)
Function SetClickHandler() Sets a handler for mouse click event.