26using namespace std::placeholders;
45 m_selectionTool( nullptr ),
46 m_anchor_item( nullptr )
54 m_commit = std::make_unique<BOARD_COMMIT>(
this );
90 std::deque<EDA_ITEM*>& items = padsOnly.
Items();
91 items.erase( std::remove_if( items.begin(), items.end(),
94 return aItem->Type() != PCB_PAD_T;
132 && !
frame()->GetPcbNewSettings()->m_AllowFreePads
135 item = item->GetParent();
150 static_cast<BOARD_ITEM*
>( item )->Move( aggregateTranslation );
153 m_commit->Push(
_(
"Position Relative" ) );
173 statusPopup.SetText(
_(
"Click on reference item..." ) );
176 [&](
const VECTOR2D& aPoint ) ->
bool
200 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
213 [&](
const int& aFinalState )
218 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
static TOOL_ACTION pickerTool
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
void UpdateAnchor(EDA_ITEM *aItem)
bool Show(bool show) override
EDA_UNITS GetUserUnits() const
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetStatusPopup(wxWindow *aPopup)
A base class for most all the KiCad significant classes used in schematics and boards.
virtual VECTOR2I GetPosition() 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.
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION positionRelative
Activation of the position relative tool.
static TOOL_ACTION selectpositionRelativeItem
Selection of anchor item for position relative tool.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A set of BOARD_ITEMs (i.e., without duplicates).
EDA_ITEM * GetTopLeftItem(bool aFootprintsOnly=false) const override
bool HasType(KICAD_T aType) const
Checks if there is at least one item of requested kind.
std::deque< EDA_ITEM * > & Items()
bool Empty() const
Checks if there is anything selected.
EDA_UNITS GetUserUnits() const
This file is part of the common library.
Class to handle a set of BOARD_ITEMs.
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_PAD_T
class PAD, a pad in a footprint