50 statusPopup.SetText(
_(
"Click on new member..." ) );
52 picker->SetClickHandler(
53 [&](
const VECTOR2D& aPoint ) ->
bool
69 EDA_ITEM* elem = sel.Front();
71 if( !isFootprintEditor )
73 while( elem->GetParent() && elem->GetParent()->Type() != PCB_T )
74 elem = elem->GetParent();
84 picker->SetMotionHandler(
90 picker->SetCancelHandler(
93 if( m_propertiesDialog )
94 m_propertiesDialog->Show(
true );
99 picker->SetFinalizeHandler(
100 [&](
const int& aFinalState )
107 m_frame->GetCanvas()->SetStatusPopup( statusPopup.GetPanel() );
120 m_frame->GetCanvas()->SetStatusPopup(
nullptr );
132 if( isFootprintEditor )
145 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
150 aCollector.
Remove( item );
155 if( selection.Empty() )
158 BOARD* board = getModel<BOARD>();
161 if( isFootprintEditor )
166 for(
EDA_ITEM* eda_item : selection )
168 if( eda_item->IsBOARD_ITEM() )
170 if(
static_cast<BOARD_ITEM*
>( eda_item )->IsLocked() )
171 group->SetLocked(
true );
177 for(
EDA_ITEM* eda_item : selection )
179 if( eda_item->IsBOARD_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...
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).
void DoAddMember(EDA_ITEM *aItem)
bool Show(bool show) override
FRAME_T GetFrameType() const
virtual void OnModify()
Must be called after a model change in order to set the "modify" flag and do other frame-specific pro...
A base class for most all the KiCad significant classes used in schematics and boards.
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.