22#ifndef EE_GRID_HELPER_H
23#define EE_GRID_HELPER_H
65 std::optional<VECTOR2I> aMovingReferencePoint = std::nullopt );
99 bool aIncludeText =
false );
A base class for most all the KiCad significant classes used in schematics and boards.
static std::vector< std::pair< const SCH_PIN *, VECTOR2I > > layoutPins(SCH_ITEM &aItem)
Pin connection points the item offers as alignment anchors.
~EE_GRID_HELPER() override
GRID_HELPER_GRIDS GetItemGrid(const EDA_ITEM *aItem) const override
Get the coarsest grid that applies to an item.
friend class EEGridHelperTestFixture
VECTOR2I BestDragOrigin(const VECTOR2I &aMousePos, GRID_HELPER_GRIDS aGrid, const SCH_SELECTION &aItems)
std::set< SCH_ITEM * > queryVisible(const BOX2I &aArea, const SCH_SELECTION &aSkipList) const
void AddConstructionItems(std::vector< SCH_ITEM * > aItems, bool aExtensionOnly, bool aIsPersistent)
ANCHOR * nearestAnchor(const VECTOR2I &aPos, int aFlags, GRID_HELPER_GRIDS aGrid)
VECTOR2D GetGridSize(GRID_HELPER_GRIDS aGrid) const override
Return the size of the specified grid.
SCH_ITEM * GetSnapped() const
Function GetSnapped If the EE_GRID_HELPER has highlighted a snap point (target shown),...
SNAP_RESULT ResolveSnap(const VECTOR2I &aOrigin, GRID_HELPER_GRIDS aGrid, SCH_ITEM *aSkip)
SNAP_INFERENCE_SETTINGS snapInferenceSettings() const
Snap inference settings for whichever editor owns this helper.
void computeAnchors(SCH_ITEM *aItem, const VECTOR2I &aRefPos, bool aFrom=false, bool aIncludeText=false)
Insert the local anchor points in to the grid helper for the specified schematic item,...
static BOX2I layoutBounds(const SCH_ITEM &aItem)
Bounds a layout relation should align to.
Base class for any item which can be embedded within the SCHEMATIC container class,...
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D