KiCad PCB EDA Suite
|
#include <pcb_grid_helper.h>
Public Types | |
enum | ANCHOR_FLAGS { CORNER = 1 , OUTLINE = 2 , SNAPPABLE = 4 , ORIGIN = 8 , VERTICAL = 16 , HORIZONTAL = 32 , ALL = CORNER | OUTLINE | SNAPPABLE | ORIGIN | VERTICAL | HORIZONTAL } |
Public Member Functions | |
PCB_GRID_HELPER (TOOL_MANAGER *aToolMgr, MAGNETIC_SETTINGS *aMagneticSettings) | |
~PCB_GRID_HELPER () override | |
BOARD_ITEM * | GetSnapped () const |
Function GetSnapped If the PCB_GRID_HELPER has highlighted a snap point (target shown), this function will return a pointer to the item to which it snapped. | |
VECTOR2I | AlignToSegment (const VECTOR2I &aPoint, const SEG &aSeg) |
VECTOR2I | BestDragOrigin (const VECTOR2I &aMousePos, std::vector< BOARD_ITEM * > &aItem, GRID_HELPER_GRIDS aGrid=GRID_HELPER_GRIDS::GRID_CURRENT, const PCB_SELECTION_FILTER_OPTIONS *aSelectionFilter=nullptr) |
VECTOR2I | AlignToArc (const VECTOR2I &aPoint, const SHAPE_ARC &aSeg) |
VECTOR2I | AlignToNearestPad (const VECTOR2I &aMousePos, std::deque< PAD * > &aPads) |
virtual void | OnBoardItemRemoved (BOARD &aBoard, BOARD_ITEM *aBoardItem) override |
VECTOR2I | BestSnapAnchor (const VECTOR2I &aOrigin, BOARD_ITEM *aReferenceItem, GRID_HELPER_GRIDS aGrid=GRID_HELPER_GRIDS::GRID_CURRENT) |
Chooses the "best" snap anchor around the given point, optionally taking layers from the reference item. | |
VECTOR2I | BestSnapAnchor (const VECTOR2I &aOrigin, const LSET &aLayers, GRID_HELPER_GRIDS aGrid=GRID_HELPER_GRIDS::GRID_CURRENT, const std::vector< BOARD_ITEM * > &aSkip={}) |
GRID_HELPER_GRIDS | GetItemGrid (const EDA_ITEM *aItem) const override |
Gets the coarsest grid that applies to an item. | |
VECTOR2D | GetGridSize (GRID_HELPER_GRIDS aGrid) const override |
Return the size of the specified grid. | |
virtual VECTOR2I | Align (const VECTOR2I &aPoint, GRID_HELPER_GRIDS aGrid) const |
virtual VECTOR2I | Align (const VECTOR2I &aPoint) const |
virtual VECTOR2I | Align (const VECTOR2I &aPoint, const VECTOR2D &aGrid, const VECTOR2D &aOffset) const |
virtual VECTOR2I | AlignGrid (const VECTOR2I &aPoint, GRID_HELPER_GRIDS aGrid) const |
VECTOR2I | AlignGrid (const VECTOR2I &aPoint) const |
VECTOR2I | AlignGrid (const VECTOR2I &aPoint, const VECTOR2D &aGrid, const VECTOR2D &aOffset) const |
VECTOR2I | GetGrid () const |
VECTOR2D | GetVisibleGrid () const |
VECTOR2I | GetOrigin () const |
void | SetAuxAxes (bool aEnable, const VECTOR2I &aOrigin=VECTOR2I(0, 0)) |
virtual GRID_HELPER_GRIDS | GetSelectionGrid (const SELECTION &aSelection) const |
Gets the coarsest grid that applies to a selecion of items. | |
void | SetSkipPoint (const VECTOR2I &aPoint) |
void | ClearSkipPoint () |
We clear the skip point by setting it to an unreachable position, thereby preventing matching. | |
void | SetSnap (bool aSnap) |
bool | GetSnap () const |
void | SetUseGrid (bool aSnapToGrid) |
bool | GetUseGrid () const |
void | SetSnapLine (bool aSnap) |
void | SetMask (int aMask) |
void | SetMaskFlag (int aFlag) |
void | ClearMaskFlag (int aFlag) |
std::optional< VECTOR2I > | GetSnappedPoint () const |
virtual void | OnBoardItemAdded (BOARD &aBoard, BOARD_ITEM *aBoardItem) |
virtual void | OnBoardItemsAdded (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem) |
virtual void | OnBoardItemsRemoved (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem) |
virtual void | OnBoardNetSettingsChanged (BOARD &aBoard) |
virtual void | OnBoardItemChanged (BOARD &aBoard, BOARD_ITEM *aBoardItem) |
virtual void | OnBoardItemsChanged (BOARD &aBoard, std::vector< BOARD_ITEM * > &aBoardItem) |
virtual void | OnBoardHighlightNetChanged (BOARD &aBoard) |
virtual void | OnBoardRatsnestChanged (BOARD &aBoard) |
virtual void | OnBoardCompositeUpdate (BOARD &aBoard, std::vector< BOARD_ITEM * > &aAddedItems, std::vector< BOARD_ITEM * > &aRemovedItems, std::vector< BOARD_ITEM * > &aDeletedItems) |
Protected Member Functions | |
void | addAnchor (const VECTOR2I &aPos, int aFlags, EDA_ITEM *aItem, int aPointTypes=POINT_TYPE::PT_NONE) |
void | clearAnchors () |
bool | canUseGrid () const |
Check whether it is possible to use the grid – this depends both on local grid helper settings and global (tool manager) KiCad settings. | |
VECTOR2I | computeNearest (const VECTOR2I &aPoint, const VECTOR2I &aGrid, const VECTOR2I &aOffset) const |
Protected Attributes | |
std::vector< ANCHOR > | m_anchors |
TOOL_MANAGER * | m_toolMgr |
std::optional< VECTOR2I > | m_auxAxis |
int | m_maskTypes |
bool | m_enableSnap |
bool | m_enableGrid |
bool | m_enableSnapLine |
std::optional< ANCHOR > | m_snapItem |
VECTOR2I | m_skipPoint |
KIGFX::SNAP_INDICATOR | m_viewSnapPoint |
KIGFX::ORIGIN_VIEWITEM | m_viewSnapLine |
KIGFX::ORIGIN_VIEWITEM | m_viewAxis |
Private Member Functions | |
std::vector< BOARD_ITEM * > | queryVisible (const BOX2I &aArea, const std::vector< BOARD_ITEM * > &aSkip) const |
ANCHOR * | nearestAnchor (const VECTOR2I &aPos, int aFlags, LSET aMatchLayers) |
void | computeAnchors (const std::vector< BOARD_ITEM * > &aItems, const VECTOR2I &aRefPos, bool aFrom, const PCB_SELECTION_FILTER_OPTIONS *aSelectionFilter) |
computeAnchors inserts the local anchor points in to the grid helper for the specified container of board items, including points implied by intersections or other relationships between the items. | |
void | computeAnchors (BOARD_ITEM *aItem, const VECTOR2I &aRefPos, bool aFrom, const PCB_SELECTION_FILTER_OPTIONS *aSelectionFilter) |
computeAnchors inserts the local anchor points in to the grid helper for the specified board item, given the reference point and the direction of use for the point. | |
Private Attributes | |
MAGNETIC_SETTINGS * | m_magneticSettings |
Definition at line 41 of file pcb_grid_helper.h.
|
inherited |
Enumerator | |
---|---|
CORNER | |
OUTLINE | |
SNAPPABLE | |
ORIGIN | |
VERTICAL | |
HORIZONTAL | |
ALL |
Definition at line 122 of file grid_helper.h.
PCB_GRID_HELPER::PCB_GRID_HELPER | ( | TOOL_MANAGER * | aToolMgr, |
MAGNETIC_SETTINGS * | aMagneticSettings | ||
) |
Definition at line 53 of file pcb_grid_helper.cpp.
References KIGFX::VIEW::Add(), KIGFX::ORIGIN_VIEWITEM::CIRCLE_CROSS, KIGFX::ORIGIN_VIEWITEM::CROSS, KIGFX::ORIGIN_VIEWITEM::DASH_LINE, KIGFX::RENDER_SETTINGS::GetLayerColor(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), TOOL_MANAGER::GetView(), LAYER_ANCHOR, LAYER_AUX_ITEMS, GRID_HELPER::m_toolMgr, GRID_HELPER::m_viewAxis, GRID_HELPER::m_viewSnapLine, GRID_HELPER::m_viewSnapPoint, KIGFX::ORIGIN_VIEWITEM::SetColor(), KIGFX::ORIGIN_VIEWITEM::SetDrawAtZero(), KIGFX::ORIGIN_VIEWITEM::SetSize(), KIGFX::ORIGIN_VIEWITEM::SetStyle(), KIGFX::VIEW::SetVisible(), and KIGFX::COLOR4D::WithAlpha().
|
override |
Definition at line 84 of file pcb_grid_helper.cpp.
References TOOL_MANAGER::GetView(), GRID_HELPER::m_toolMgr, GRID_HELPER::m_viewAxis, GRID_HELPER::m_viewSnapLine, GRID_HELPER::m_viewSnapPoint, and KIGFX::VIEW::Remove().
|
inlineprotectedinherited |
Definition at line 162 of file grid_helper.h.
References GRID_HELPER::m_anchors, and GRID_HELPER::m_maskTypes.
Referenced by computeAnchors(), and EE_GRID_HELPER::computeAnchors().
Reimplemented from GRID_HELPER.
Definition at line 72 of file grid_helper.cpp.
|
virtual |
Reimplemented from GRID_HELPER.
Definition at line 73 of file grid_helper.cpp.
|
inlinevirtual |
Reimplemented from GRID_HELPER.
Definition at line 62 of file grid_helper.h.
Referenced by AlignToArc(), AlignToSegment(), BestSnapAnchor(), PNS::TOOL_BASE::snapToItem(), and PNS::TOOL_BASE::updateEndItem().
Definition at line 76 of file grid_helper.cpp.
VECTOR2I GRID_HELPER::AlignGrid | ( | const VECTOR2I & | aPoint, |
const VECTOR2D & | aGrid, | ||
const VECTOR2D & | aOffset | ||
) | const |
Definition at line 77 of file grid_helper.cpp.
|
inlinevirtual |
Reimplemented from GRID_HELPER.
Definition at line 67 of file grid_helper.h.
Definition at line 149 of file pcb_grid_helper.cpp.
References Align(), VECTOR2< int32_t >::ECOORD_MAX, SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), SHAPE_ARC::IntersectLine(), and GRID_HELPER::m_enableSnap.
Referenced by PNS::TOOL_BASE::snapToItem().
VECTOR2I PCB_GRID_HELPER::AlignToNearestPad | ( | const VECTOR2I & | aMousePos, |
std::deque< PAD * > & | aPads | ||
) |
Definition at line 194 of file pcb_grid_helper.cpp.
References GRID_HELPER::clearAnchors(), computeAnchors(), EDA_ITEM::HitTest(), GRID_HELPER::m_anchors, GRID_HELPER::ORIGIN, and GRID_HELPER::ANCHOR::pos.
Definition at line 94 of file pcb_grid_helper.cpp.
References SEG::A, Align(), SEG::B, VECTOR2< int32_t >::ECOORD_MAX, SEG::IntersectLines(), GRID_HELPER::m_enableSnap, and SEG::SquaredDistance().
Referenced by DRAWING_TOOL::DrawVia(), and PNS::TOOL_BASE::snapToItem().
VECTOR2I PCB_GRID_HELPER::BestDragOrigin | ( | const VECTOR2I & | aMousePos, |
std::vector< BOARD_ITEM * > & | aItem, | ||
GRID_HELPER_GRIDS | aGrid = GRID_HELPER_GRIDS::GRID_CURRENT , |
||
const PCB_SELECTION_FILTER_OPTIONS * | aSelectionFilter = nullptr |
||
) |
Definition at line 227 of file pcb_grid_helper.cpp.
References LSET::AllLayersMask(), GRID_HELPER::clearAnchors(), computeAnchors(), GRID_HELPER::CORNER, GRID_HELPER::ANCHOR::Distance(), KIGFX::VIEW::GetGAL(), TOOL_MANAGER::GetView(), KIGFX::GAL::GetWorldScale(), GRID_HELPER::m_toolMgr, nearestAnchor(), GRID_HELPER::ORIGIN, GRID_HELPER::OUTLINE, and GRID_HELPER::ANCHOR::pos.
VECTOR2I PCB_GRID_HELPER::BestSnapAnchor | ( | const VECTOR2I & | aOrigin, |
BOARD_ITEM * | aReferenceItem, | ||
GRID_HELPER_GRIDS | aGrid = GRID_HELPER_GRIDS::GRID_CURRENT |
||
) |
Chooses the "best" snap anchor around the given point, optionally taking layers from the reference item.
The reference item will not be snapped to (it is being dragged or created) and we choose the layers that can be snapped based on the reference item layer
aOrigin | Point we want to snap from |
aReferenceItem | Reference item for layer/type special casing |
Definition at line 274 of file pcb_grid_helper.cpp.
References LSET::AllLayersMask(), BestSnapAnchor(), and BOARD_ITEM::GetLayerSet().
Referenced by BestSnapAnchor().
VECTOR2I PCB_GRID_HELPER::BestSnapAnchor | ( | const VECTOR2I & | aOrigin, |
const LSET & | aLayers, | ||
GRID_HELPER_GRIDS | aGrid = GRID_HELPER_GRIDS::GRID_CURRENT , |
||
const std::vector< BOARD_ITEM * > & | aSkip = {} |
||
) |
Allows de-snapping from the line if you are closer to another snap point
Definition at line 293 of file pcb_grid_helper.cpp.
References std::abs(), Align(), GRID_HELPER::clearAnchors(), computeAnchors(), GRID_HELPER::ANCHOR::Distance(), KIGFX::GEOMETRY, KIGFX::VIEW::GetGAL(), KIGFX::ORIGIN_VIEWITEM::GetPosition(), TOOL_MANAGER::GetView(), GRID_HELPER::GetVisibleGrid(), KIGFX::GAL::GetWorldScale(), KIGFX::VIEW::IsVisible(), KiROUND(), GRID_HELPER::m_enableGrid, GRID_HELPER::m_enableSnap, GRID_HELPER::m_enableSnapLine, GRID_HELPER::m_skipPoint, GRID_HELPER::m_snapItem, GRID_HELPER::m_toolMgr, GRID_HELPER::m_viewSnapLine, GRID_HELPER::m_viewSnapPoint, nearestAnchor(), GRID_HELPER::ANCHOR::pointTypes, GRID_HELPER::ANCHOR::pos, queryVisible(), BOX2< Vec >::SetEnd(), KIGFX::ORIGIN_VIEWITEM::SetEndPosition(), BOX2< Vec >::SetOrigin(), KIGFX::ORIGIN_VIEWITEM::SetPosition(), KIGFX::SNAP_INDICATOR::SetSnapTypes(), KIGFX::VIEW::SetVisible(), GRID_HELPER::SNAPPABLE, KIGFX::VIEW::Update(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
protectedinherited |
Check whether it is possible to use the grid – this depends both on local grid helper settings and global (tool manager) KiCad settings.
Definition at line 162 of file grid_helper.cpp.
References KIGFX::VIEW::GetGAL(), KIGFX::GAL::GetGridSnapping(), TOOL_MANAGER::GetView(), GRID_HELPER::m_enableGrid, and GRID_HELPER::m_toolMgr.
Referenced by GRID_HELPER::Align(), and EE_GRID_HELPER::BestSnapAnchor().
|
inlineprotectedinherited |
Definition at line 169 of file grid_helper.h.
References GRID_HELPER::m_anchors.
Referenced by AlignToNearestPad(), EE_GRID_HELPER::BestDragOrigin(), BestDragOrigin(), BestSnapAnchor(), and EE_GRID_HELPER::BestSnapAnchor().
|
inlineinherited |
Definition at line 118 of file grid_helper.h.
References GRID_HELPER::m_maskTypes.
|
inlineinherited |
We clear the skip point by setting it to an unreachable position, thereby preventing matching.
Definition at line 103 of file grid_helper.h.
References GRID_HELPER::m_skipPoint.
|
private |
computeAnchors inserts the local anchor points in to the grid helper for the specified board item, given the reference point and the direction of use for the point.
aItem | The board item for which to compute the anchors |
aRefPos | The point for which to compute the anchors (if used by the component) |
aFrom | Is this for an anchor that is designating a source point (aFrom=true) or not |
If we are getting a drag point, we don't want to center the edge of pads
Definition at line 665 of file pcb_grid_helper.cpp.
References SEG::A, GRID_HELPER::addAnchor(), ANGLE_90, SHAPE_LINE_CHAIN::Append(), SEG::B, SEG::Center(), BOX2< Vec >::Centre(), SHAPE_POLY_SET::CIterateWithHoles(), computeAnchors(), GRID_HELPER::CORNER, PCB_SELECTION_FILTER_OPTIONS::dimensions, ERROR_INSIDE, PCB_SELECTION_FILTER_OPTIONS::footprints, FOOTPRINT::GetBoundingBox(), BOARD_ITEM::GetCenter(), PCB_DIM_ALIGNED::GetCrossbarEnd(), PCB_DIM_ALIGNED::GetCrossbarStart(), PCB_DIMENSION_BASE::GetEnd(), PCB_TRACK::GetEnd(), GRID_HELPER::GetGrid(), KIGFX::RENDER_SETTINGS::GetHighContrast(), KIGFX::RENDER_SETTINGS::GetHighContrastLayers(), PCB_DIM_RADIAL::GetKnee(), GetOvalKeyPoints(), KIGFX::VIEW::GetPainter(), EDA_ITEM::GetPosition(), FOOTPRINT::GetPosition(), KIGFX::VIEW::GetScale(), SHAPE_LINE_CHAIN::GetSegment(), SHAPE_LINE_CHAIN::GetSegmentCount(), KIGFX::PAINTER::GetSettings(), PCB_DIMENSION_BASE::GetStart(), PCB_TRACK::GetStart(), EDA_TEXT::GetTextPos(), TOOL_MANAGER::GetView(), PCB_SELECTION_FILTER_OPTIONS::graphics, MAGNETIC_SETTINGS::graphics, grid, KIGFX::VIEW::IsLayerVisible(), KIGFX::VIEW::IsVisible(), KI_FALLTHROUGH, LAYER_ANCHOR, m_magneticSettings, GRID_HELPER::m_toolMgr, SHAPE_LINE_CHAIN::Move(), SHAPE_LINE_CHAIN::NearestPoint(), GRID_HELPER::ORIGIN, GRID_HELPER::OUTLINE, OVAL_CAP_TIPS, OVAL_CARDINAL_EXTREMES, OVAL_CENTER, OVAL_SIDE_MIDPOINTS, pad, PCB_SELECTION_FILTER_OPTIONS::pads, FOOTPRINT::Pads(), MAGNETIC_SETTINGS::pads, PCB_ARC_T, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GROUP_T, PCB_MARKER_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, SHAPE_LINE_CHAIN::Rotate(), RotatePoint(), SHAPE_LINE_CHAIN::SetClosed(), GRID_HELPER::SNAPPABLE, PCB_SELECTION_FILTER_OPTIONS::text, PCB_SELECTION_FILTER_OPTIONS::tracks, MAGNETIC_SETTINGS::tracks, EDA_ITEM::Type(), PCB_SELECTION_FILTER_OPTIONS::vias, VECTOR2< T >::x, VECTOR2< T >::y, and PCB_SELECTION_FILTER_OPTIONS::zones.
|
private |
computeAnchors inserts the local anchor points in to the grid helper for the specified container of board items, including points implied by intersections or other relationships between the items.
Definition at line 558 of file pcb_grid_helper.cpp.
References GRID_HELPER::addAnchor(), computeAnchors(), PCB_INTERSECTABLE::Geometry, EDA_SHAPE::GetArcMid(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), PCB_TRACK::GetEnd(), PCB_ARC::GetMid(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_TRACK::GetStart(), PCB_SELECTION_FILTER_OPTIONS::graphics, PCB_INTERSECTABLE::Item, PCB_ARC_T, PCB_SHAPE_T, PCB_TRACE_T, GRID_HELPER::SNAPPABLE, and PCB_SELECTION_FILTER_OPTIONS::tracks.
Referenced by AlignToNearestPad(), BestDragOrigin(), BestSnapAnchor(), and computeAnchors().
|
protectedinherited |
Definition at line 127 of file grid_helper.cpp.
References KiROUND(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GRID_HELPER::AlignGrid().
|
inherited |
Definition at line 53 of file grid_helper.cpp.
References KIGFX::VIEW::GetGAL(), KIGFX::GAL::GetGridSize(), TOOL_MANAGER::GetView(), and GRID_HELPER::m_toolMgr.
Referenced by GRID_HELPER::Align(), GRID_HELPER::AlignGrid(), computeAnchors(), and PNS::TOOL_BASE::pickSingleItem().
|
overridevirtual |
Return the size of the specified grid.
Reimplemented from GRID_HELPER.
Definition at line 430 of file pcb_grid_helper.cpp.
References KIGFX::VIEW::GetGAL(), KIGFX::GAL::GetGridSize(), TOOL_MANAGER::GetSettings(), TOOL_MANAGER::GetView(), grid, WINDOW_SETTINGS::grid, GRID_CONNECTABLE, GRID_GRAPHICS, GRID_TEXT, GRID_VIAS, GRID_WIRES, GRID_HELPER::m_toolMgr, APP_SETTINGS_BASE::m_Window, and pcbIUScale.
|
overridevirtual |
Gets the coarsest grid that applies to an item.
Reimplemented from GRID_HELPER.
Definition at line 396 of file pcb_grid_helper.cpp.
References GRID_CONNECTABLE, GRID_CURRENT, GRID_GRAPHICS, GRID_TEXT, GRID_VIAS, GRID_WIRES, PCB_ARC_T, PCB_DIMENSION_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_PAD_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, and EDA_ITEM::Type().
|
inherited |
Definition at line 67 of file grid_helper.cpp.
References KIGFX::VIEW::GetGAL(), KIGFX::GAL::GetGridOrigin(), TOOL_MANAGER::GetView(), and GRID_HELPER::m_toolMgr.
Referenced by GRID_HELPER::Align(), and GRID_HELPER::AlignGrid().
|
virtualinherited |
Gets the coarsest grid that applies to a selecion of items.
Reimplemented in EE_GRID_HELPER.
Definition at line 75 of file grid_helper.cpp.
|
inlineinherited |
Definition at line 109 of file grid_helper.h.
References GRID_HELPER::m_enableSnap.
Referenced by DRAWING_TOOL::DrawVia(), EE_POINT_EDITOR::pinEditedCorner(), and PNS::TOOL_BASE::updateEndItem().
BOARD_ITEM * PCB_GRID_HELPER::GetSnapped | ( | ) | const |
Function GetSnapped If the PCB_GRID_HELPER has highlighted a snap point (target shown), this function will return a pointer to the item to which it snapped.
Definition at line 387 of file pcb_grid_helper.cpp.
References GRID_HELPER::m_snapItem.
|
inherited |
Definition at line 168 of file grid_helper.cpp.
References GRID_HELPER::m_snapItem.
Referenced by POSITION_RELATIVE_TOOL::SelectPositionRelativePoint().
|
inlineinherited |
Definition at line 112 of file grid_helper.h.
References GRID_HELPER::m_enableGrid.
Referenced by PNS::TOOL_BASE::updateStartItem().
|
inherited |
Definition at line 61 of file grid_helper.cpp.
References KIGFX::VIEW::GetGAL(), TOOL_MANAGER::GetView(), KIGFX::GAL::GetVisibleGridSize(), and GRID_HELPER::m_toolMgr.
Referenced by BestSnapAnchor().
|
private |
Definition at line 1179 of file pcb_grid_helper.cpp.
References MAGNETIC_SETTINGS::allLayers, BOARD_ITEM::GetLayerSet(), GRID_HELPER::m_anchors, and m_magneticSettings.
Referenced by BestDragOrigin(), and BestSnapAnchor().
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, APPEARANCE_CONTROLS, PCB_NET_INSPECTOR_PANEL, and PCB_SEARCH_PANE.
Definition at line 263 of file board.h.
Referenced by BOARD::OnItemsCompositeUpdate().
|
inlinevirtualinherited |
Reimplemented in PCB_NET_INSPECTOR_PANEL, and PCB_SEARCH_PANE.
Definition at line 261 of file board.h.
Referenced by BOARD::HighLightON(), BOARD::ResetNetHighLight(), and BOARD::SetHighLightNet().
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, PCB_NET_INSPECTOR_PANEL, PCB_SEARCH_PANE, and APPEARANCE_CONTROLS.
Definition at line 254 of file board.h.
Referenced by BOARD::Add().
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, PCB_NET_INSPECTOR_PANEL, PCB_SEARCH_PANE, and APPEARANCE_CONTROLS.
Definition at line 259 of file board.h.
Referenced by BOARD::OnItemChanged().
|
inlineoverridevirtual |
Reimplemented from BOARD_LISTENER.
Definition at line 70 of file pcb_grid_helper.h.
References GRID_HELPER::m_snapItem.
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, PCB_NET_INSPECTOR_PANEL, PCB_SEARCH_PANE, and APPEARANCE_CONTROLS.
Definition at line 255 of file board.h.
Referenced by BOARD::FinalizeBulkAdd().
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, PCB_NET_INSPECTOR_PANEL, PCB_SEARCH_PANE, and APPEARANCE_CONTROLS.
Definition at line 260 of file board.h.
Referenced by BOARD::OnItemsChanged().
|
inlinevirtualinherited |
Reimplemented in DIALOG_GENERATORS, PCB_NET_INSPECTOR_PANEL, PCB_SEARCH_PANE, and APPEARANCE_CONTROLS.
Definition at line 257 of file board.h.
Referenced by BOARD::FinalizeBulkRemove().
|
inlinevirtualinherited |
Reimplemented in APPEARANCE_CONTROLS, PCB_NET_INSPECTOR_PANEL, and PCB_SEARCH_PANE.
Definition at line 258 of file board.h.
Referenced by BOARD::SynchronizeNetsAndNetClasses().
|
inlinevirtualinherited |
Reimplemented in PCB_SEARCH_PANE.
Definition at line 262 of file board.h.
Referenced by BOARD::OnRatsnestChanged().
|
private |
Definition at line 484 of file pcb_grid_helper.cpp.
References TOOL_MANAGER::GetCurrentTool(), KIGFX::RENDER_SETTINGS::GetHighContrast(), KIGFX::RENDER_SETTINGS::GetHighContrastLayers(), KIGFX::VIEW::GetPainter(), BOARD_ITEM::GetParentFootprint(), KIGFX::VIEW::GetScale(), KIGFX::PAINTER::GetSettings(), TOOL_MANAGER::GetView(), PCB_TOOL_BASE::IsFootprintEditor(), IsPcbLayer(), KIGFX::VIEW::IsVisible(), GRID_HELPER::m_toolMgr, PCB_FOOTPRINT_T, KIGFX::VIEW::Query(), BOARD_ITEM::RunOnDescendants(), EDA_ITEM::Type(), and KIGFX::VIEW_ITEM::ViewGetLOD().
Referenced by BestSnapAnchor().
|
inherited |
Definition at line 98 of file grid_helper.cpp.
References TOOL_MANAGER::GetView(), GRID_HELPER::m_auxAxis, GRID_HELPER::m_toolMgr, GRID_HELPER::m_viewAxis, KIGFX::ORIGIN_VIEWITEM::SetPosition(), and KIGFX::VIEW::SetVisible().
Referenced by ROUTER_TOOL::InlineDrag(), and ROUTER_TOOL::performDragging().
|
inlineinherited |
Definition at line 116 of file grid_helper.h.
References GRID_HELPER::m_maskTypes.
|
inlineinherited |
Definition at line 117 of file grid_helper.h.
References GRID_HELPER::m_maskTypes.
|
inlineinherited |
Definition at line 95 of file grid_helper.h.
References GRID_HELPER::m_skipPoint.
|
inlineinherited |
Definition at line 108 of file grid_helper.h.
References GRID_HELPER::m_enableSnap.
Referenced by DRAWING_TOOL::DrawVia(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), POSITION_RELATIVE_TOOL::SelectPositionRelativePoint(), PNS::TOOL_BASE::updateEndItem(), EE_POINT_EDITOR::updateParentItem(), and PNS::TOOL_BASE::updateStartItem().
|
inlineinherited |
Definition at line 114 of file grid_helper.h.
References GRID_HELPER::m_enableSnapLine.
|
inlineinherited |
Definition at line 111 of file grid_helper.h.
References GRID_HELPER::m_enableGrid.
Referenced by ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PNS::TOOL_BASE::updateEndItem(), and PNS::TOOL_BASE::updateStartItem().
|
protectedinherited |
Definition at line 184 of file grid_helper.h.
Referenced by GRID_HELPER::addAnchor(), AlignToNearestPad(), GRID_HELPER::clearAnchors(), EE_GRID_HELPER::nearestAnchor(), and nearestAnchor().
|
protectedinherited |
Definition at line 187 of file grid_helper.h.
Referenced by GRID_HELPER::Align(), and GRID_HELPER::SetAuxAxes().
|
protectedinherited |
Definition at line 192 of file grid_helper.h.
Referenced by BestSnapAnchor(), GRID_HELPER::canUseGrid(), GRID_HELPER::GetUseGrid(), GRID_HELPER::GRID_HELPER(), and GRID_HELPER::SetUseGrid().
|
protectedinherited |
Definition at line 191 of file grid_helper.h.
Referenced by AlignToArc(), AlignToSegment(), BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::GetSnap(), GRID_HELPER::GRID_HELPER(), and GRID_HELPER::SetSnap().
|
protectedinherited |
Definition at line 193 of file grid_helper.h.
Referenced by BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::GRID_HELPER(), and GRID_HELPER::SetSnapLine().
|
private |
Definition at line 124 of file pcb_grid_helper.h.
Referenced by computeAnchors(), and nearestAnchor().
|
protectedinherited |
Definition at line 189 of file grid_helper.h.
Referenced by GRID_HELPER::addAnchor(), GRID_HELPER::ClearMaskFlag(), GRID_HELPER::GRID_HELPER(), GRID_HELPER::SetMask(), and GRID_HELPER::SetMaskFlag().
|
protectedinherited |
Definition at line 196 of file grid_helper.h.
Referenced by BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::ClearSkipPoint(), and GRID_HELPER::SetSkipPoint().
|
protectedinherited |
Definition at line 194 of file grid_helper.h.
Referenced by BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), EE_GRID_HELPER::GetSnapped(), GetSnapped(), GRID_HELPER::GetSnappedPoint(), GRID_HELPER::GRID_HELPER(), and OnBoardItemRemoved().
|
protectedinherited |
Definition at line 186 of file grid_helper.h.
Referenced by EE_GRID_HELPER::BestDragOrigin(), BestDragOrigin(), BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::canUseGrid(), computeAnchors(), EE_GRID_HELPER::EE_GRID_HELPER(), GRID_HELPER::GetGrid(), GRID_HELPER::GetGridSize(), EE_GRID_HELPER::GetGridSize(), GetGridSize(), GRID_HELPER::GetOrigin(), GRID_HELPER::GetVisibleGrid(), PCB_GRID_HELPER(), EE_GRID_HELPER::queryVisible(), queryVisible(), GRID_HELPER::SetAuxAxes(), EE_GRID_HELPER::~EE_GRID_HELPER(), and ~PCB_GRID_HELPER().
|
protectedinherited |
Definition at line 200 of file grid_helper.h.
Referenced by EE_GRID_HELPER::EE_GRID_HELPER(), PCB_GRID_HELPER(), GRID_HELPER::SetAuxAxes(), EE_GRID_HELPER::~EE_GRID_HELPER(), and ~PCB_GRID_HELPER().
|
protectedinherited |
Definition at line 199 of file grid_helper.h.
Referenced by BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), EE_GRID_HELPER::EE_GRID_HELPER(), PCB_GRID_HELPER(), EE_GRID_HELPER::~EE_GRID_HELPER(), and ~PCB_GRID_HELPER().
|
protectedinherited |
Definition at line 198 of file grid_helper.h.
Referenced by BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), EE_GRID_HELPER::EE_GRID_HELPER(), PCB_GRID_HELPER(), EE_GRID_HELPER::~EE_GRID_HELPER(), and ~PCB_GRID_HELPER().