KiCad PCB EDA Suite
|
A class that operates over a list of BOUND_CONTROLs and keeps them in sync with a PCB_SHAPE. More...
Public Member Functions | |
GEOM_SYNCER (PCB_SHAPE &aShape, std::vector< BOUND_CONTROL > &aBoundCtrls) | |
void | BindCtrls (size_t aFrom, size_t aTo, std::function< void()> aCb) |
void | SetShape (PCB_SHAPE &aShape) |
virtual bool | Validate (wxArrayString &aErrs) const |
Protected Member Functions | |
virtual void | updateAll ()=0 |
wxTextCtrl * | GetCtrl (size_t aIndex) const |
int | GetIntValue (size_t aIndex) const |
EDA_ANGLE | GetAngleValue (size_t aIndex) const |
void | ChangeValue (size_t aIndex, int aValue) |
void | ChangeAngleValue (size_t aIndex, const EDA_ANGLE &aValue) |
PCB_SHAPE & | GetShape () |
const PCB_SHAPE & | GetShape () const |
Private Attributes | |
PCB_SHAPE & | m_shape |
std::vector< BOUND_CONTROL > & | m_boundCtrls |
A class that operates over a list of BOUND_CONTROLs and keeps them in sync with a PCB_SHAPE.
Exactly how that is done depends on the kind of shape.
Inherit from this class and implement the relvant update functions and listen for changes on the right controls for each mode (e.g. edit line segment by endpoints).
Definition at line 63 of file pcbnew/dialogs/dialog_shape_properties.cpp.
|
inline |
Definition at line 66 of file pcbnew/dialogs/dialog_shape_properties.cpp.
|
inline |
Definition at line 72 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
Referenced by ARC_GEOM_SYNCER::ARC_GEOM_SYNCER(), BEZIER_GEOM_SYNCER::BEZIER_GEOM_SYNCER(), CIRCLE_GEOM_SYNCER::CIRCLE_GEOM_SYNCER(), LINE_GEOM_SYNCER::LINE_GEOM_SYNCER(), and RECTANGLE_GEOM_SYNCER::RECTANGLE_GEOM_SYNCER().
|
inlineprotected |
Definition at line 122 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
Referenced by ARC_GEOM_SYNCER::updateCSA(), and LINE_GEOM_SYNCER::updatePolar().
|
inlineprotected |
Definition at line 116 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
Referenced by BEZIER_GEOM_SYNCER::updateBezier(), CIRCLE_GEOM_SYNCER::updateCenterPoint(), CIRCLE_GEOM_SYNCER::updateCenterRadius(), RECTANGLE_GEOM_SYNCER::updateCenterSize(), RECTANGLE_GEOM_SYNCER::updateCorners(), RECTANGLE_GEOM_SYNCER::updateCornerSize(), ARC_GEOM_SYNCER::updateCSA(), LINE_GEOM_SYNCER::updateEnds(), LINE_GEOM_SYNCER::updatePolar(), ARC_GEOM_SYNCER::updateSME(), and LINE_GEOM_SYNCER::updateStartMidpoint().
|
inlineprotected |
Definition at line 110 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
Referenced by ARC_GEOM_SYNCER::OnCSAChange(), LINE_GEOM_SYNCER::OnPolarChange(), and ARC_GEOM_SYNCER::Validate().
|
inlineprotected |
Definition at line 98 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
|
inlineprotected |
Definition at line 104 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_boundCtrls.
Referenced by BEZIER_GEOM_SYNCER::OnBezierChange(), CIRCLE_GEOM_SYNCER::OnCenterPointChange(), CIRCLE_GEOM_SYNCER::OnCenterRadiusChange(), RECTANGLE_GEOM_SYNCER::OnCenterSizeChange(), RECTANGLE_GEOM_SYNCER::OnCornersChange(), RECTANGLE_GEOM_SYNCER::OnCornerSizeChange(), ARC_GEOM_SYNCER::OnCSAChange(), LINE_GEOM_SYNCER::OnEndsChange(), LINE_GEOM_SYNCER::OnPolarChange(), ARC_GEOM_SYNCER::OnSMEChange(), LINE_GEOM_SYNCER::OnStartMidpointChange(), RECTANGLE_GEOM_SYNCER::Validate(), ARC_GEOM_SYNCER::Validate(), and CIRCLE_GEOM_SYNCER::Validate().
|
inlineprotected |
Definition at line 128 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_shape.
Referenced by ARC_GEOM_SYNCER::ARC_GEOM_SYNCER(), BEZIER_GEOM_SYNCER::BEZIER_GEOM_SYNCER(), CIRCLE_GEOM_SYNCER::CIRCLE_GEOM_SYNCER(), LINE_GEOM_SYNCER::LINE_GEOM_SYNCER(), BEZIER_GEOM_SYNCER::OnBezierChange(), CIRCLE_GEOM_SYNCER::OnCenterPointChange(), CIRCLE_GEOM_SYNCER::OnCenterRadiusChange(), RECTANGLE_GEOM_SYNCER::OnCenterSizeChange(), RECTANGLE_GEOM_SYNCER::OnCornersChange(), RECTANGLE_GEOM_SYNCER::OnCornerSizeChange(), ARC_GEOM_SYNCER::OnCSAChange(), LINE_GEOM_SYNCER::OnEndsChange(), LINE_GEOM_SYNCER::OnPolarChange(), ARC_GEOM_SYNCER::OnSMEChange(), LINE_GEOM_SYNCER::OnStartMidpointChange(), RECTANGLE_GEOM_SYNCER::RECTANGLE_GEOM_SYNCER(), BEZIER_GEOM_SYNCER::updateBezier(), CIRCLE_GEOM_SYNCER::updateCenterPoint(), CIRCLE_GEOM_SYNCER::updateCenterRadius(), RECTANGLE_GEOM_SYNCER::updateCenterSize(), RECTANGLE_GEOM_SYNCER::updateCorners(), RECTANGLE_GEOM_SYNCER::updateCornerSize(), ARC_GEOM_SYNCER::updateCSA(), LINE_GEOM_SYNCER::updateEnds(), LINE_GEOM_SYNCER::updatePolar(), ARC_GEOM_SYNCER::updateSME(), and LINE_GEOM_SYNCER::updateStartMidpoint().
|
inlineprotected |
Definition at line 130 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_shape.
|
inline |
Definition at line 87 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References m_shape, and updateAll().
|
protectedpure virtual |
Implemented in RECTANGLE_GEOM_SYNCER, LINE_GEOM_SYNCER, ARC_GEOM_SYNCER, CIRCLE_GEOM_SYNCER, and BEZIER_GEOM_SYNCER.
Referenced by SetShape().
|
inlinevirtual |
Reimplemented in RECTANGLE_GEOM_SYNCER, ARC_GEOM_SYNCER, and CIRCLE_GEOM_SYNCER.
Definition at line 93 of file pcbnew/dialogs/dialog_shape_properties.cpp.
|
private |
Definition at line 134 of file pcbnew/dialogs/dialog_shape_properties.cpp.
Referenced by BindCtrls(), ChangeAngleValue(), ChangeValue(), GetAngleValue(), GetCtrl(), and GetIntValue().
|
private |
Definition at line 133 of file pcbnew/dialogs/dialog_shape_properties.cpp.
Referenced by GetShape(), and SetShape().