61 using ITER = std::deque<EDA_ITEM*>::iterator;
62 using CITER = std::deque<EDA_ITEM*>::const_iterator;
88 virtual unsigned int GetSize()
const override 160 if( IsA<T, EDA_ITEM>( item ) )
161 return static_cast<T*> ( item );
177 virtual const std::vector<KIGFX::VIEW_ITEM*>
updateDrawList()
const override;
221 using VIEW_GROUP::Add;
222 using VIEW_GROUP::Remove;
VECTOR2I GetReferencePoint() const
void ClearReferencePoint()
size_t CountType(KICAD_T aType) const
virtual VECTOR2I GetCenter() const
Returns the center point of the selection area bounding box.
virtual void Clear() override
Remove all the stored items from the group.
std::deque< EDA_ITEM * > & Items()
The Cairo implementation of the graphics abstraction layer.
bool HasType(KICAD_T aType) const
Checks if there is at least one item of requested kind.
virtual void Add(EDA_ITEM *aItem)
VECTOR2I GetPosition() const
Returns the top left point of the selection area bounding box.
Define a general 2D-vector/point.
std::deque< EDA_ITEM * >::const_iterator CITER
VIEW_GROUP(VIEW *aView=nullptr)
bool AreAllItemsIdentical() const
Checks if all items in the selection are the same KICAD_T type.
An abstract base class for deriving all objects that can be added to a VIEW.
OPT< VECTOR2I > m_referencePoint
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
void SetIsHover(bool aIsHover)
void SetReferencePoint(const VECTOR2I &aP)
SELECTION(const SELECTION &aOther)
std::deque< EDA_ITEM * > m_items
bool Contains(EDA_ITEM *aItem) const
const std::deque< EDA_ITEM * > GetItems() const
Extend VIEW_ITEM by possibility of grouping items into a single object.
std::deque< EDA_ITEM * >::iterator ITER
virtual EDA_ITEM * GetTopLeftItem(bool onlyModules=false) const
bool Empty() const
Checks if there is anything selected.
EDA_ITEM * operator[](const size_t aIdx) const
virtual unsigned int GetSize() const override
Return the number of stored items.
virtual const std::vector< KIGFX::VIEW_ITEM * > updateDrawList() const override
bool HasReferencePoint() const
virtual KIGFX::VIEW_ITEM * GetItem(unsigned int aIdx) const override
bool OnlyContains(std::vector< KICAD_T > aList) const
Checks if all items in the selection have a type in aList.
virtual void Remove(EDA_ITEM *aItem)
Handle the component boundary box.
int Size() const
Returns the number of selected parts.
A base class for most all the KiCad significant classes used in schematics and boards.
SELECTION & operator=(const SELECTION &aOther)
virtual EDA_RECT GetBoundingBox() const
virtual const BOX2I ViewBBox() const override
Return the bounding box for all stored items covering all its layers.