24#include <unordered_set>
59 if( member.m_item == aItem.
m_Uuid )
73 switch( aItem.
Type() )
96 switch(
static_cast<const PCB_SHAPE&
>( aItem ).GetShape() )
117 wxString genType =
static_cast<const PCB_GENERATOR&
>( aItem ).GetGeneratorType();
158 std::vector<BOARD_ITEM*> expanded;
159 std::unordered_set<const BOARD_ITEM*> seen;
163 if( !aItem || !seen.insert( aItem ).second )
180 expanded.push_back( aItem );
188 std::erase_if( expanded,
193 return parent && seen.count( parent );
bool BlockDragIsConstraintMember(const BOARD_ITEM &aItem)
True when the item belongs to any geometric constraint on its board or inside one of its footprints.
BLOCK_DRAG_CAPABILITY BlockDragCapability(const BOARD_ITEM &aItem)
Classify one board item for a block drag.
std::vector< BOARD_ITEM * > BlockDragExpandSelection(const std::vector< BOARD_ITEM * > &aSelection)
Replace group containers with their members, through nested groups, and drop duplicates.
bool BlockDragAnchorEditingEnabled(const PCB_BASE_FRAME *aFrame)
Whether the user has turned on editing anchor points on a multi-selection.
BLOCK_DRAG_CAPABILITY
How one selected item takes part in a block drag.
@ UNSUPPORTED
Stops the drag with a message before anything moves.
@ DEFORMABLE
Shows handles, and reshapes as the user drags the ones they picked.
@ ROUTER
Moves with the block through the router, which repairs the copper at the edge of the block.
@ RIGID
Moves with the block using its own move operation.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
FOOTPRINT * GetParentFootprint() const
Information pertinent to a Pcbnew printed circuit board.
bool IsFootprintHolder() const
Find out if the board is being used to hold a single footprint for editing/viewing.
KICAD_T Type() const
Returns the type of object.
bool m_AreaAnchorPointSelection
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PCBNEW_SETTINGS * GetPcbNewSettings() const
A geometric constraint between board items (issue #2329).
A set of BOARD_ITEMs (i.e., without duplicates).
static const wxString GENERATOR_TYPE
static const wxString GENERATOR_TYPE
static const wxString GENERATOR_TYPE
std::vector< PCB_CONSTRAINT * > CollectResolvedConstraints(const BOARD *aBoard)
The constraints the editor resolves on aBoard.
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
Class to handle a set of BOARD_ITEMs.
One participant in a constraint: a referenced board item plus the feature of that item that participa...
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_DRILL_MAP_T
class PCB_DRILL_MAP, drill symbols drawn at the holes
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_MARKER_T
class PCB_MARKER, a marker used to show something
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
@ PCB_TARGET_T
class PCB_TARGET, a target (graphic item)
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_GRID_ITEM_T
a subgrid placed on a board
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
@ PCB_POINT_T
class PCB_POINT, a 0-dimensional point
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE