58 statusPopup.SetText(
_(
"Click on new member..." ) );
61 picker->SetSnapping(
false );
62 picker->ClearHandlers();
64 picker->SetClickHandler(
65 [&](
const VECTOR2D& aPoint ) ->
bool
83 if( !isFootprintEditor )
96 picker->SetMotionHandler(
102 picker->SetCancelHandler(
111 picker->SetFinalizeHandler(
112 [&](
const int& aFinalState )
119 m_frame->GetCanvas()->SetStatusPopup( statusPopup.GetPanel() );
132 picker->ClearHandlers();
133 m_frame->GetCanvas()->SetStatusPopup(
nullptr );
145 if( isFootprintEditor )
151 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
156 aCollector.
Remove( item );
166 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
171 aCollector.
Remove( item );
174 aCollector.
Remove( item );
179 if( selection.Empty() )
185 if( isFootprintEditor )
190 for(
EDA_ITEM* eda_item : selection )
192 if( eda_item->IsBOARD_ITEM() )
194 if(
static_cast<BOARD_ITEM*
>( eda_item )->IsLocked() )
195 group->SetLocked(
true );
199 for(
EDA_ITEM* eda_item : selection )
201 if( eda_item->IsBOARD_ITEM() )
203 if(
EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
207 group->AddItem( eda_item );
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION pickerTool
static TOOL_ACTION selectionClear
Clear the current selection.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
bool IsGroupableType() const
FOOTPRINT * GetParentFootprint() const
Information pertinent to a Pcbnew printed circuit board.
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
int GetCount() const
Return the number of objects in the list.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
A set of EDA_ITEMs (i.e., without duplicates).
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM * GetParent() const
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Used when the right click button is pressed, or when the select tool is in effect.
A set of BOARD_ITEMs (i.e., without duplicates).
bool Empty() const
Checks if there is anything selected.
Class to handle a set of BOARD_ITEMs.
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D