48 if(
dynamic_cast<const EDIT_LINE*
>( &aPoint ) )
65 aPicked.insert( aKey );
69 if( !aPicked.erase( aKey ) )
70 aPicked.insert( aKey );
82 bool aAccumulate, std::set<PCB_HANDLE_KEY>& aPicked )
94 for(
unsigned ii = 0; ii < collection->PointsSize(); ++ii )
96 const EDIT_POINT& point = collection->Point( ii );
105 aPicked.insert( *key );
BLOCK_DRAG_CAPABILITY BlockDragCapability(const BOARD_ITEM &aItem)
Classify one board item for a block drag.
@ DEFORMABLE
Shows handles, and reshapes as the user drags the ones they picked.
SHAPE_LINE_CHAIN BlockDragPickRect(const VECTOR2I &aFirst, const VECTOR2I &aSecond)
The closed rectangle a box pick covers, built from two opposite corners.
bool BlockDragHandlePickable(const EDIT_POINTS &aCollection, const EDIT_POINT &aPoint)
True when the user is allowed to pick this handle.
void BlockDragApplyPick(std::set< PCB_HANDLE_KEY > &aPicked, const PCB_HANDLE_KEY &aKey, bool aAccumulate)
Add one clicked handle to the picked set.
void BlockDragLassoPick(const std::vector< EDIT_POINTS * > &aCollections, const SHAPE_LINE_CHAIN &aLasso, bool aAccumulate, std::set< PCB_HANDLE_KEY > &aPicked)
Add the handles a lasso surrounds to the picked set.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
Represent a line connecting two EDIT_POINTs.
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
EDA_ITEM * GetParent() const
Return parent of the EDIT_POINTS.
Represent a single point that can be used for modifying items.
bool DrivesWholeShape() const
Whether dragging this handle rebuilds the whole shape instead of placing one of its points,...
virtual VECTOR2I GetPosition() const
Return coordinates of an EDIT_POINT.
bool IsBOARD_ITEM() const
Lasting name for one handle in an EDIT_POINTS collection.
static std::optional< PCB_HANDLE_KEY > Make(const EDIT_POINTS &aPoints, const EDIT_POINT *aPoint)
Build the key for a handle in a collection.
bool PointOnEdge(const VECTOR2I &aP, int aAccuracy=0) const
Check if point aP lies on an edge or vertex of the line chain.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void GenerateBBoxCache() const
int PointCount() const
Return the number of points (vertices) in this line chain.
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const override
Check if point aP lies inside a closed shape.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_ZONE_T
class ZONE, a copper pour area
VECTOR2< int32_t > VECTOR2I