41    std::function<void( 
SCH_ITEM* )> changeHandler =
 
   42            [&]( 
SCH_ITEM* aChangedItem ) -> 
void 
 
   57    std::vector<SCH_LINE*> wires;
 
   70            wires.push_back( line );
 
   79        if( !
IsPointOnSegment( line->GetStartPoint(), line->GetEndPoint(), aStart ) ||
 
   86        if( ( line->GetStartPoint() == aStart && line->GetEndPoint() == aEnd )
 
   87            || ( line->GetStartPoint() == aEnd && line->GetEndPoint() == aStart ) )
 
   95        lwbTool->
BreakSegment( aCommit, line, aStart, &new_line, screen );
 
  102        lwbTool->
BreakSegment( aCommit, line, aEnd, &new_line, screen );
 
  108        aCommit->
Removed( line, screen );
 
 
  125    aCommit->
Removed( aJunction, screen );
 
  129    std::list<SCH_LINE*> lines;
 
  139            lines.push_back( line );
 
  146                if( ( firstLine->GetEditFlags() & STRUCT_DELETED )
 
  147                        || ( secondLine->GetEditFlags() & STRUCT_DELETED )
 
  148                        || !secondLine->IsParallel( firstLine ) )
 
  157                    firstLine->SetFlags( STRUCT_DELETED );
 
  164                    firstLine->SetFlags( STRUCT_DELETED );
 
  165                    secondLine->SetFlags( STRUCT_DELETED );
 
  166                    AddToScreen( new_line, screen );
 
  167                    aCommit->Added( new_line, screen );
 
  169                    if( new_line->IsSelected() )
 
  170                        selectionTool->AddItemToSel( new_line, true  );
 
  172                    lines.push_back( new_line );
 
  180            if( line->IsSelected() )
 
  181                selectionTool->RemoveItemFromSel( line, 
true  );
 
  183            RemoveFromScreen( line, screen );
 
  184            aCommit->Removed( line, screen );
 
 
  191    std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> items;
 
  195    for( 
const auto& it : items )
 
  197        if( !it.first->IsSCH_ITEM() )
 
  205        if( item->
IsType( { SCH_ITEM_LOCATE_WIRE_T } ) )
 
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
COMMIT & Removed(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
virtual VECTOR2I GetPosition() const
 
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
 
EDA_ITEM_FLAGS GetEditFlags() const
 
void SetFlags(EDA_ITEM_FLAGS aMask)
 
EE_TYPE Overlapping(const BOX2I &aRect) const
 
void Update(const KIGFX::VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
 
int Query(const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const
Find all visible items that touch or are within the rectangle aRect.
 
A holder to handle information on schematic or board items.
 
void RemoveFromScreen(EDA_ITEM *aItem, SCH_SCREEN *aScreen) override
Remove an item from the screen (and view) aScreen is the screen the item is located on,...
 
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
 
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
 
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
 
bool TrimWire(SCH_COMMIT *aCommit, const VECTOR2I &aStart, const VECTOR2I &aEnd)
If any single wire passes through both points, remove the portion between the two points,...
 
void TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
 
void DeleteJunction(SCH_COMMIT *aCommit, SCH_ITEM *aItem)
Remove a given junction and heals any wire segments under the junction.
 
void UpdateHopOveredWires(SCH_ITEM *aItem)
 
Base class for any item which can be embedded within the SCHEMATIC container class,...
 
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
 
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
 
Segment description base class to describe items which have 2 end points (track, wire,...
 
bool IsWire() const
Return true if the line is a wire.
 
VECTOR2I GetEndPoint() const
 
VECTOR2I GetStartPoint() const
 
SCH_LINE * MergeOverlap(SCH_SCREEN *aScreen, SCH_LINE *aLine, bool aCheckJunctions)
Check line against aLine to see if it overlaps and merge if it does.
 
bool IsBus() const
Return true if the line is a bus.
 
bool IsEndPoint(const VECTOR2I &aPoint) const override
Test if aPt is an end point of this schematic object.
 
void TestDanglingEnds(const SCH_SHEET_PATH *aPath=nullptr, std::function< void(SCH_ITEM *)> *aChangedHandler=nullptr) const
Test all of the connectable objects in the schematic for unused connection points.
 
EE_RTREE & Items()
Get the full RTree, usually for iterating.
 
#define STRUCT_DELETED
flag indication structures to be erased
 
#define SKIP_STRUCT
flag indicating that the structure should be ignored
 
#define IS_MOVING
Item being moved.
 
@ REPAINT
Item needs to be redrawn.
 
void for_all_pairs(_InputIterator __first, _InputIterator __last, _Function __f)
Apply a function to every possible pair of elements of a sequence.
 
bool IsPointOnSegment(const VECTOR2I &aSegStart, const VECTOR2I &aSegEnd, const VECTOR2I &aTestPoint)
Test if aTestPoint is on line defined by aSegStart and aSegEnd.
 
VECTOR2< int32_t > VECTOR2I