71 using ITER = std::deque<EDA_ITEM*>::iterator;
72 using CITER = std::deque<EDA_ITEM*>::const_iterator;
137 bool topBeforeBottom =
true )
const;
182 const std::deque<EDA_ITEM*>&
Items()
const
192 if( IsA<T, EDA_ITEM>( item ) )
193 return static_cast<T*
> ( item );
209 virtual const std::vector<KIGFX::VIEW_ITEM*>
updateDrawList()
const override;
242 using VIEW_GROUP::Add;
243 using VIEW_GROUP::Remove;
constexpr const Vec & GetPosition() const
constexpr void SetMaximum()
A base class for most all the KiCad significant classes used in schematics and boards.
Extend VIEW_ITEM by possibility of grouping items into a single object.
VIEW_GROUP(VIEW *aView=nullptr)
An abstract base class for deriving all objects that can be added to a VIEW.
std::deque< EDA_ITEM * > m_items
virtual void Add(EDA_ITEM *aItem)
SELECTION & operator=(const SELECTION &aOther)
virtual KIGFX::VIEW_ITEM * GetItem(unsigned int aIdx) const override
bool operator==(const SELECTION &aOther) const
const std::deque< EDA_ITEM * > GetItems() const
VECTOR2I GetReferencePoint() const
std::deque< int > m_itemsOrders
const std::deque< EDA_ITEM * > & Items() const
VECTOR2I GetPosition() const
Returns the top left point of the selection area bounding box.
void SetIsHover(bool aIsHover)
std::deque< EDA_ITEM * >::const_iterator CITER
virtual VECTOR2I GetCenter() const
Returns the center point of the selection area bounding box.
EDA_ITEM * GetLastAddedItem() const
virtual void Remove(EDA_ITEM *aItem)
bool AreAllItemsIdentical() const
Checks if all items in the selection are the same KICAD_T type.
virtual unsigned int GetSize() const override
Return the number of stored items.
virtual void Clear() override
Remove all the stored items from the group.
bool HasType(KICAD_T aType) const
Checks if there is at least one item of requested kind.
int Size() const
Returns the number of selected parts.
virtual EDA_ITEM * GetTopLeftItem(bool onlyModules=false) const
virtual const BOX2I ViewBBox() const override
Return the bounding box for all stored items covering all its layers.
std::deque< EDA_ITEM * >::iterator ITER
std::deque< EDA_ITEM * > & Items()
std::vector< EDA_ITEM * > GetItemsSortedBySelectionOrder() const
EDA_ITEM * operator[](const size_t aIdx) const
void ClearReferencePoint()
bool OnlyContains(std::vector< KICAD_T > aList) const
Checks if all items in the selection have a type in aList.
void SetReferencePoint(const VECTOR2I &aP)
bool Empty() const
Checks if there is anything selected.
EDA_ITEM * m_lastAddedItem
std::vector< EDA_ITEM * > GetItemsSortedByTypeAndXY(bool leftBeforeRight=true, bool topBeforeBottom=true) const
Returns a copy of this selection of items sorted by their X then Y position.
bool HasReferencePoint() const
size_t CountType(KICAD_T aType) const
std::optional< VECTOR2I > m_referencePoint
bool Contains(EDA_ITEM *aItem) const
virtual BOX2I GetBoundingBox() const
virtual const std::vector< KIGFX::VIEW_ITEM * > updateDrawList() const override
SELECTION(const SELECTION &aOther)
The Cairo implementation of the graphics abstraction layer.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.