87 std::vector<EDA_ITEM*>& aUpdatedItems ) = 0;
109 return &aEditedPoint == &aPoint;
115#define CHECK_POINT_COUNT(aPoints, aExpected) wxCHECK( aPoints.PointsSize() == aExpected, )
116#define CHECK_POINT_COUNT_GE(aPoints, aExpected) wxCHECK( aPoints.PointsSize() >= aExpected, )
160 std::vector<EDA_ITEM*>& aUpdatedItems )
override
183 wxASSERT( aPolygon.
GetShape() == SHAPE_T::POLY );
196 wxASSERT( aSegment.
GetShape() == SHAPE_T::SEGMENT );
204 std::vector<EDA_ITEM*>& aUpdatedItems )
override;
231 wxASSERT( aCircle.
GetShape() == SHAPE_T::CIRCLE );
239 std::vector<EDA_ITEM*>& aUpdatedItems )
override;
266 wxASSERT( aBezier.
GetShape() == SHAPE_T::BEZIER );
274 std::vector<EDA_ITEM*>& aUpdatedItems )
override;
306 wxASSERT( aCell.
GetShape() == SHAPE_T::RECTANGLE );
Represent a set of changes (additions, deletions or modifications) of a data model (e....
"Standard" bezier editing behavior for EDA_SHAPE beziers.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
EDA_BEZIER_POINT_EDIT_BEHAVIOR(EDA_SHAPE &aBezier)
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
"Standard" circle editing behavior for EDA_SHAPE circles.
OPT_VECTOR2I Get45DegreeConstrainer(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints) const override
Get the 45-degree constrainer for the item, when the given point is moved.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
EDA_CIRCLE_POINT_EDIT_BEHAVIOR(EDA_SHAPE &aCircle)
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
"Standard" polygon editing behavior for EDA_SHAPE polygons.
EDA_POLYGON_POINT_EDIT_BEHAVIOR(EDA_SHAPE &aPolygon)
"Standard" segment editing behavior for EDA_SHAPE segments.
OPT_VECTOR2I Get45DegreeConstrainer(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints) const override
Get the 45-degree constrainer for the item, when the given point is moved.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
EDA_SEGMENT_POINT_EDIT_BEHAVIOR(EDA_SHAPE &aSegment)
"Standard" table-cell editing behavior.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
EDA_TABLECELL_POINT_EDIT_BEHAVIOR(EDA_SHAPE &aCell)
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
Represent a single point that can be used for modifying items.
A helper class interface to manage the edit points for a single item.
virtual OPT_VECTOR2I Get45DegreeConstrainer(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints) const
Get the 45-degree constrainer for the item, when the given point is moved.
virtual void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems)=0
Update the item with the new positions of the edit points.
virtual ~POINT_EDIT_BEHAVIOR()=default
virtual void MakePoints(EDIT_POINTS &aPoints)=0
Construct the initial set of edit points for the item and append to the given list.
static bool isModified(const EDIT_POINT &aEditedPoint, const EDIT_POINT &aPoint)
Checks if two points are the same instance - which means the point is being edited.
virtual void UpdatePoints(EDIT_POINTS &aPoints)=0
Update the list of the edit points for the item.
Class that implements "standard" polygon editing behavior.
static void UpdateOutlineFromPoints(SHAPE_POLY_SET &aOutline, const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints)
Update the polygon outline with the new positions of the edit points.
SHAPE_POLY_SET & m_polygon
static void UpdatePointsFromOutline(const SHAPE_POLY_SET &aOutline, EDIT_POINTS &aPoints)
Update the edit points with the current polygon outline.
POLYGON_POINT_EDIT_BEHAVIOR(SHAPE_POLY_SET &aPolygon)
static void BuildForPolyOutline(EDIT_POINTS &aPoints, const SHAPE_POLY_SET &aOutline)
Build the edit points for the given polygon outline.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
Represent a set of closed polygons.
std::optional< VECTOR2I > OPT_VECTOR2I