26using namespace std::placeholders;
47 m_selectionTool( nullptr ),
48 m_anchor_item( nullptr )
56 m_commit = std::make_unique<BOARD_COMMIT>(
this );
92 std::deque<EDA_ITEM*>& items = padsOnly.
Items();
93 items.erase( std::remove_if( items.begin(), items.end(),
96 return aItem->Type() != PCB_PAD_T;
132 if( !item->IsBOARD_ITEM() )
139 && !
frame()->GetPcbNewSettings()->m_AllowFreePads
146 boardItem->
Move( aggregateTranslation );
149 m_commit->Push(
_(
"Position Relative" ) );
169 statusPopup.SetText(
_(
"Click on reference item..." ) );
172 [&](
const VECTOR2D& aPoint ) ->
bool
209 [&](
const int& aFinalState )
245 statusPopup.SetText(
_(
"Click on reference point..." ) );
248 [&](
const VECTOR2D& aPoint ) ->
bool
277 [&](
const int& aFinalState )
static TOOL_ACTION pickerTool
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void Move(const VECTOR2I &aMoveVector)
Move this object.
BOARD_ITEM_CONTAINER * GetParent() const
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
KICAD_T Type() const
Returns the type of object.
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.
std::optional< VECTOR2I > GetSnappedPoint() const
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectPositionRelativePoint
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.
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_PAD_T
class PAD, a pad in a footprint