139 for(
int ptN = arraySize - 1; ptN >= 0; --ptN )
142 std::set<FOOTPRINT*> fpDeDupe;
160 if( fpDeDupe.count( parentFootprint ) == 0 )
162 fpDeDupe.emplace( parentFootprint );
163 item = parentFootprint;
179 commit.
Modify( this_item );
198 switch( item->
Type() )
219 this_item =
static_cast<PCB_GROUP*
>( item )->DeepDuplicate();
229 items_for_this_block.
Add( this_item );
256 commit.
Add( this_item );
268 PAD&
pad =
static_cast<PAD&
>( *this_item );
270 if(
pad.CanHaveNumber() )
273 pad.SetNumber( newNumber );
285 for(
EDA_ITEM* item : items_for_this_block )
286 all_added_items.push_back( item );
292 commit.
Push(
_(
"Create Array" ) );
Options that govern the setup of an "array" of multiple item.
virtual TRANSFORM GetTransform(int aN, const VECTOR2I &aPos) const =0
Get the transform of the n-th point in the array.
Simple class that sequentially provides numbers from an ARRAY_OPTIONS object, making sure that they d...
wxString GetNextPadNumber()
Get the next available pad name.
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
Rotate this object.
virtual BOARD_ITEM * Duplicate() const
Create a copy of this BOARD_ITEM.
virtual void Move(const VECTOR2I &aMoveVector)
Move this object.
FOOTPRINT * GetParentFootprint() const
virtual void RunOnDescendants(const std::function< void(BOARD_ITEM *)> &aFunction, int aDepth=0) const
Invoke a function on all descendants.
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
bool Show(bool show) override
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.
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 selectItems
Select a list of items (specified as the event parameter)
static TOOL_ACTION createArray
Tool for creating an array of objects.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A set of BOARD_ITEMs (i.e., without duplicates).
virtual void Add(EDA_ITEM *aItem)
bool Empty() const
Checks if there is anything selected.
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
Class to handle a set of BOARD_ITEMs.
@ 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_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_TARGET_T
class PCB_TARGET, a target (graphic item)
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ 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_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