|
KiCad PCB EDA Suite
|
Handlers for receiving changes from the tool. More...
#include <item_modification_routine.h>
Public Member Functions | |
| virtual | ~CHANGE_HANDLER ()=default |
| virtual void | AddNewItem (std::unique_ptr< BOARD_ITEM > aItem)=0 |
| Report that the tools wants to add a new item to the board. | |
| virtual void | MarkItemModified (BOARD_ITEM &aItem)=0 |
| Report that the tool has modified an item on the board. | |
| virtual void | DeleteItem (BOARD_ITEM &aItem)=0 |
| Report that the tool has deleted an item on the board. | |
Handlers for receiving changes from the tool.
These are used to allow the tool's caller to make changes to affected board items using extra information that the tool does not have access to (e.g. is this an FP editor, was the line created from a rectangle and needs to be added, not modified, etc).
We can't store them up until the end, because modifications need the old state to be known, so this allows the caller to inject the dependencies for how to handle the changes.
Definition at line 58 of file item_modification_routine.h.
|
virtualdefault |
|
pure virtual |
Report that the tools wants to add a new item to the board.
| aItem | the new item |
Implemented in ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER.
Referenced by POLYGON_BOOLEAN_ROUTINE::Finalize(), OUTSET_ROUTINE::ProcessItem(), DOGBONE_CORNER_ROUTINE::ProcessLinePair(), LINE_CHAMFER_ROUTINE::ProcessLinePair(), and LINE_FILLET_ROUTINE::ProcessLinePair().
|
pure virtual |
Report that the tool has deleted an item on the board.
| aItem | the deleted item |
Implemented in ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER.
Referenced by ITEM_MODIFICATION_ROUTINE::ModifyLineOrDeleteIfZeroLength(), OUTSET_ROUTINE::ProcessItem(), and POLYGON_BOOLEAN_ROUTINE::ProcessShape().
|
pure virtual |
Report that the tool has modified an item on the board.
| aItem | the modified item |
Implemented in ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER.
Referenced by ITEM_MODIFICATION_ROUTINE::ModifyLineOrDeleteIfZeroLength(), and LINE_EXTENSION_ROUTINE::ProcessLinePair().