30#ifndef CLASS_PCB_GROUP_H_
31#define CLASS_PCB_GROUP_H_
36#include <unordered_set>
63 return wxT(
"PCB_GROUP" );
74 const std::unordered_set<BOARD_ITEM*>&
GetItems()
const
112 void Show(
int nestLevel, std::ostream& os )
const override
158 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
161 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
168 FLASHING aFlash = FLASHING::DEFAULT )
const override;
172 const std::vector<KICAD_T>& aScanTypes )
override;
175 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
206 int aDepth = 0 )
const override;
BITMAPS
A list of all bitmap identifiers.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
LSET is a set of PCB_LAYER_IDs.
A set of BOARD_ITEMs (i.e., without duplicates).
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
std::unordered_set< BOARD_ITEM * > m_items
static bool WithinScope(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
PCB_GROUP * DeepClone() const
static PCB_GROUP * TopLevelGroup(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void RunOnDescendants(const std::function< void(BOARD_ITEM *)> &aFunction, int aDepth=0) const override
Invoke a function on all descendants.
std::unordered_set< BOARD_ITEM * > & GetItems()
static bool IsGroupableType(KICAD_T aType)
Check if the proposed type can be added to a group.
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
bool IsOnCopperLayer() const override
bool operator==(const PCB_GROUP &aOther) const
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Test to see if this object is on the given layer.
PCB_GROUP * DeepDuplicate() const
static bool ClassOf(const EDA_ITEM *aItem)
LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void SetName(const wxString &aName)
void SetPosition(const VECTOR2I &aNewpos) override
void Move(const VECTOR2I &aMoveVector) override
Move this object.
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
wxString GetClass() const override
Return the class name.
INSPECT_RESULT Visit(INSPECTOR aInspector, void *aTestData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
virtual bool RemoveItem(BOARD_ITEM *aItem)
Remove item from group.
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
VECTOR2I GetPosition() const override
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
virtual bool AddItem(BOARD_ITEM *aItem)
Add item to group.
void ViewGetLayers(int aLayers[], int &aCount) const override
const std::unordered_set< BOARD_ITEM * > & GetItems() const
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const override
Invoke a function on all descendants.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
void swapData(BOARD_ITEM *aImage) override
void SetLocked(bool aLocked) override
const INSPECTOR_FUNC & INSPECTOR
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
PCB_LAYER_ID
A quick note on layer IDs:
The Cairo implementation of the graphics abstraction layer.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs