KiCad PCB EDA Suite
|
Public Member Functions | |
SCH_TABLECELL_POINT_EDIT_BEHAVIOR (SCH_TABLECELL &aCell, SCH_SCREEN &aScreen) | |
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. | |
void | UpdatePoints (EDIT_POINTS &aPoints) override |
Update the list of the edit points for the 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. | |
Protected Types | |
enum | TABLECELL_POINTS { COL_WIDTH , ROW_HEIGHT , TABLECELL_MAX_POINTS } |
Static Protected Member Functions | |
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. | |
Private Attributes | |
SCH_TABLECELL & | m_cell |
SCH_SCREEN & | m_screen |
Definition at line 354 of file ee_point_editor.cpp.
|
protectedinherited |
Enumerator | |
---|---|
COL_WIDTH | |
ROW_HEIGHT | |
TABLECELL_MAX_POINTS |
Definition at line 314 of file point_editor_behavior.h.
|
inline |
Definition at line 357 of file ee_point_editor.cpp.
|
inlinevirtualinherited |
Get the 45-degree constrainer for the item, when the given point is moved.
Return std::nullopt if not, and the caller can decide.
If you want to actively disable constraining, return the aEditedPoint position.
Reimplemented in EDA_SEGMENT_POINT_EDIT_BEHAVIOR, EDA_CIRCLE_POINT_EDIT_BEHAVIOR, ARC_POINT_EDIT_BEHAVIOR, ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR, DIM_CENTER_POINT_EDIT_BEHAVIOR, and DIM_RADIAL_POINT_EDIT_BEHAVIOR.
Definition at line 96 of file point_editor_behavior.h.
|
inlinestaticprotectedinherited |
Checks if two points are the same instance - which means the point is being edited.
Definition at line 107 of file point_editor_behavior.h.
Referenced by ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::Get45DegreeConstrainer(), DIM_CENTER_POINT_EDIT_BEHAVIOR::Get45DegreeConstrainer(), DIM_RADIAL_POINT_EDIT_BEHAVIOR::Get45DegreeConstrainer(), RECTANGLE_POINT_EDIT_BEHAVIOR::PinEditedCorner(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateAlignedDimension(), ARC_POINT_EDIT_BEHAVIOR::UpdateItem(), BITMAP_POINT_EDIT_BEHAVIOR::UpdateItem(), UpdateItem(), SHEET_POINT_EDIT_BEHAVIOR::UpdateItem(), EDA_SEGMENT_POINT_EDIT_BEHAVIOR::UpdateItem(), EDA_CIRCLE_POINT_EDIT_BEHAVIOR::UpdateItem(), EDA_BEZIER_POINT_EDIT_BEHAVIOR::UpdateItem(), REFERENCE_IMAGE_POINT_EDIT_BEHAVIOR::UpdateItem(), PCB_TABLECELL_POINT_EDIT_BEHAVIOR::UpdateItem(), PAD_POINT_EDIT_BEHAVIOR::UpdateItem(), DIM_CENTER_POINT_EDIT_BEHAVIOR::UpdateItem(), DIM_RADIAL_POINT_EDIT_BEHAVIOR::UpdateItem(), DIM_LEADER_POINT_EDIT_BEHAVIOR::UpdateItem(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), and POLYGON_POINT_EDIT_BEHAVIOR::UpdateOutlineFromPoints().
|
overridevirtualinherited |
Construct the initial set of edit points for the item and append to the given list.
aPoints | The list of edit points to fill. |
Implements POINT_EDIT_BEHAVIOR.
Definition at line 232 of file point_editor_behavior.cpp.
References EDIT_POINTS::AddPoint(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRectangleHeight(), EDA_SHAPE::GetRectangleWidth(), and EDA_TABLECELL_POINT_EDIT_BEHAVIOR::m_cell.
|
inlineoverridevirtual |
Update the item with the new positions of the edit points.
This method should all commit and add to the update list anything that is NOT the parent item of the EDIT_POINTs. For example, connected lines, parent tables, etc. The item itself is already handled (most behaviors don't need more than that).
aEditedPoint | The point that was dragged. You can use this to check by address which point to update. |
aPoints | The new positions of the edit points. |
aCommit | The commit object to use to modify the item. |
aUpdatedItems | The list of items that were updated by the edit (not only the item that was being edited, but also any other items that were affected, e.g. by being conneted to the edited item). |
Implements POINT_EDIT_BEHAVIOR.
Definition at line 364 of file ee_point_editor.cpp.
References std::abs(), EDA_TABLECELL_POINT_EDIT_BEHAVIOR::COL_WIDTH, SCH_TABLECELL::GetColSpan(), SCH_TABLECELL::GetColumn(), SCH_TABLE::GetColWidth(), EDA_SHAPE::GetEndX(), EDA_SHAPE::GetEndY(), EDA_ITEM::GetParent(), EDA_SHAPE::GetRectangleHeight(), EDA_SHAPE::GetRectangleWidth(), SCH_TABLECELL::GetRow(), SCH_TABLE::GetRowHeight(), SCH_TABLECELL::GetRowSpan(), EDA_TEXT::GetTextAngle(), EDIT_POINT::GetX(), EDIT_POINT::GetY(), EDA_ANGLE::IsHorizontal(), POINT_EDIT_BEHAVIOR::isModified(), m_cell, m_screen, COMMIT::Modify(), SCH_TABLE::Normalize(), EDIT_POINTS::Point(), EDA_TABLECELL_POINT_EDIT_BEHAVIOR::ROW_HEIGHT, SCH_TABLE::SetColWidth(), EDA_SHAPE::SetEnd(), and SCH_TABLE::SetRowHeight().
|
overridevirtualinherited |
Update the list of the edit points for the item.
Be very careful not to overrun the list of points - this class knows how bug there are because it made them in the first place.
If item has changed such that that number of points needs to change, this method has to handle that (probably by clearing the list and refilling it).
aPoints | The list of edit points to update. |
Implements POINT_EDIT_BEHAVIOR.
Definition at line 239 of file point_editor_behavior.cpp.
References EDA_TABLECELL_POINT_EDIT_BEHAVIOR::COL_WIDTH, EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRectangleHeight(), EDA_SHAPE::GetRectangleWidth(), EDA_TABLECELL_POINT_EDIT_BEHAVIOR::m_cell, EDIT_POINTS::Point(), EDA_TABLECELL_POINT_EDIT_BEHAVIOR::ROW_HEIGHT, and EDIT_POINT::SetPosition().
|
private |
Definition at line 428 of file ee_point_editor.cpp.
Referenced by UpdateItem().
|
private |
Definition at line 429 of file ee_point_editor.cpp.
Referenced by UpdateItem().