26 using namespace std::placeholders;
43 m_selectionTool(
NULL ),
52 m_commit = std::make_unique<BOARD_COMMIT>(
this );
78 std::set<BOARD_ITEM*> to_add;
81 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
102 aCollector.
Append( item );
142 item = item->GetParent();
145 static_cast<BOARD_ITEM*>( item )->Move( aggregateTranslation );
148 m_commit->Push(
_(
"Position Relative" ) );
162 std::string tool =
"pcbnew.PositionRelative.selectReferenceItem";
169 statusPopup.SetText(
_(
"Click on reference item..." ) );
172 [&](
const VECTOR2D& aPoint ) ->
bool 196 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
209 [&](
const int& aFinalState )
214 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
void UpdateAnchor(EDA_ITEM *aItem)
static TOOL_ACTION selectionClear
Clear the current selection.
This file is part of the common library.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
static TOOL_ACTION selectpositionRelativeItem
Selection of anchor item for position relative tool.
class PAD, a pad in a footprint
virtual wxPoint GetPosition() const
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
static TOOL_ACTION pickerTool
void Append(EDA_ITEM *item)
Add an item to the end of the list.
EDA_UNITS GetUserUnits() const
int GetCount() const
Return the number of objects in the list.
bool HasItem(const EDA_ITEM *aItem) const
Tests if aItem has already been collected.
EDA_ITEM * GetTopLeftItem(bool aFootprintsOnly=false) const override
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...
bool Empty() const
Checks if there is anything selected.
virtual bool IsLocked() const
class MARKER_PCB, a marker used to show something
bool IsType(FRAME_T aType) const
Used when the right click button is pressed, or when the select tool is in effect.
static TOOL_ACTION positionRelative
Activation of the position relative tool.
BOARD_ITEM_CONTAINER * GetParent() const
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
KICAD_T Type() const
Returns the type of object.