145 std::optional<int> aDistToNearest,
int snapRange )
const;
A class that mananges "construction" objects and geometry.
KIGFX::CONSTRUCTION_GEOM & m_constructionGeomPreview
void AddConstructionItems(CONSTRUCTION_ITEM_BATCH aBatch, bool aIsPersistent)
Add a batch of construction items to the helper.
OPT_VECTOR2I m_snapLineEnd
void ClearSnapLine()
Clear the snap line origin and end points.
SOURCE
Items to be used for the construction of "virtual" anchors, for example, when snapping to a point inv...
OPT_VECTOR2I m_snapLineOrigin
const std::vector< VECTOR2I > & GetReferenceOnlyPoints() const
std::deque< CONSTRUCTION_ITEM_BATCH > m_temporaryConstructionBatches
GFX_UPDATE_CALLBACK m_updateCallback
void SetSnappedAnchor(const VECTOR2I &aAnchorPos)
Inform the construction manager that an anchor snap is wanted.
std::vector< CONSTRUCTION_ITEM_BATCH > GetConstructionItems() const
OPT_VECTOR2I GetNearestSnapLinePoint(const VECTOR2I &aCursor, const VECTOR2I &aNearestGrid, std::optional< int > aDistToNearest, int snapRange) const
If the snap line is active, return the best snap point that is closest to the cursor.
std::vector< CONSTRUCTION_ITEM > CONSTRUCTION_ITEM_BATCH
std::optional< CONSTRUCTION_ITEM_BATCH > m_persistentConstructionBatch
std::vector< VECTOR2I > m_referenceOnlyPoints
void SetSnapLineOrigin(const VECTOR2I &aOrigin)
The snap point is a special point that is located at the last point the cursor snapped to.
void SetSnapLineEnd(const OPT_VECTOR2I &aSnapPoint)
Set the end point of the snap line.
bool InvolvesAllGivenRealItems(const std::vector< EDA_ITEM * > &aItems) const
Check if all 'real' (non-null = constructed) the items in the batch are in the list of items currentl...
std::optional< VECTOR2I > GetSnapLineOrigin() const
void SetReferenceOnlyPoints(std::vector< VECTOR2I > aPoints)
Set the reference-only points - these are points that are not snapped to, but can still be used for c...
std::function< void(bool)> GFX_UPDATE_CALLBACK
void SetUpdateCallback(GFX_UPDATE_CALLBACK aCallback)
Set the callback to call when the construction geometry changes and a view may need updating.
std::set< EDA_ITEM * > m_involvedItems
A base class for most all the KiCad significant classes used in schematics and boards.
Shows construction geometry for things like line extensions, arc centers, etc.
std::optional< VECTOR2I > OPT_VECTOR2I
std::vector< KIGFX::CONSTRUCTION_GEOM::DRAWABLE > Constructions