KiCad PCB EDA Suite
|
Class that keeps a rectangle's various fields all up to date. More...
Public Types | |
enum | CTRL_IDX { START_X = 0 , START_Y , END_X , END_Y , CORNER_X , CORNER_Y , CORNER_W , CORNER_H , CENTER_X , CENTER_Y , CENTER_W , CENTER_H , NUM_CTRLS } |
Public Member Functions | |
RECTANGLE_GEOM_SYNCER (PCB_SHAPE &aShape, std::vector< BOUND_CONTROL > &aBoundCtrls) | |
bool | Validate (wxArrayString &aErrs) const override |
void | updateAll () override |
void | OnCornersChange () |
void | updateCorners () |
void | OnCornerSizeChange () |
void | updateCornerSize () |
void | OnCenterSizeChange () |
void | updateCenterSize () |
void | BindCtrls (size_t aFrom, size_t aTo, std::function< void()> aCb) |
void | SetShape (PCB_SHAPE &aShape) |
Protected Member Functions | |
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 |
Class that keeps a rectangle's various fields all up to date.
Definition at line 138 of file pcbnew/dialogs/dialog_shape_properties.cpp.
Enumerator | |
---|---|
START_X | |
START_Y | |
END_X | |
END_Y | |
CORNER_X | |
CORNER_Y | |
CORNER_W | |
CORNER_H | |
CENTER_X | |
CENTER_Y | |
CENTER_W | |
CENTER_H | |
NUM_CTRLS |
Definition at line 141 of file pcbnew/dialogs/dialog_shape_properties.cpp.
|
inline |
Definition at line 159 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::BindCtrls(), CENTER_H, CENTER_X, CORNER_H, CORNER_X, END_Y, GEOM_SYNCER::GetShape(), NUM_CTRLS, OnCenterSizeChange(), OnCornersChange(), OnCornerSizeChange(), and START_X.
|
inlineinherited |
Definition at line 69 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::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().
|
inlineprotectedinherited |
Definition at line 119 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_boundCtrls.
Referenced by ARC_GEOM_SYNCER::updateCSA(), and LINE_GEOM_SYNCER::updatePolar().
|
inlineprotectedinherited |
Definition at line 113 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_boundCtrls.
Referenced by BEZIER_GEOM_SYNCER::updateBezier(), CIRCLE_GEOM_SYNCER::updateCenterPoint(), CIRCLE_GEOM_SYNCER::updateCenterRadius(), updateCenterSize(), updateCorners(), updateCornerSize(), ARC_GEOM_SYNCER::updateCSA(), LINE_GEOM_SYNCER::updateEnds(), LINE_GEOM_SYNCER::updateMidEndpoint(), LINE_GEOM_SYNCER::updatePolar(), and ARC_GEOM_SYNCER::updateSME().
|
inlineprotectedinherited |
Definition at line 107 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_boundCtrls.
Referenced by LINE_GEOM_SYNCER::OnPolarChange(), and ARC_GEOM_SYNCER::Validate().
|
inlineprotectedinherited |
Definition at line 95 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_boundCtrls.
|
inlineprotectedinherited |
Definition at line 101 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_boundCtrls.
Referenced by BEZIER_GEOM_SYNCER::OnBezierChange(), CIRCLE_GEOM_SYNCER::OnCenterPointChange(), CIRCLE_GEOM_SYNCER::OnCenterRadiusChange(), OnCenterSizeChange(), OnCornersChange(), OnCornerSizeChange(), ARC_GEOM_SYNCER::OnCSAChange(), LINE_GEOM_SYNCER::OnEndsChange(), LINE_GEOM_SYNCER::OnMidEndpointChange(), LINE_GEOM_SYNCER::OnPolarChange(), ARC_GEOM_SYNCER::OnSMEChange(), Validate(), ARC_GEOM_SYNCER::Validate(), and CIRCLE_GEOM_SYNCER::Validate().
|
inlineprotectedinherited |
Definition at line 125 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::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(), OnCenterSizeChange(), OnCornersChange(), OnCornerSizeChange(), ARC_GEOM_SYNCER::OnCSAChange(), LINE_GEOM_SYNCER::OnEndsChange(), LINE_GEOM_SYNCER::OnMidEndpointChange(), LINE_GEOM_SYNCER::OnPolarChange(), ARC_GEOM_SYNCER::OnSMEChange(), RECTANGLE_GEOM_SYNCER(), BEZIER_GEOM_SYNCER::updateBezier(), CIRCLE_GEOM_SYNCER::updateCenterPoint(), CIRCLE_GEOM_SYNCER::updateCenterRadius(), updateCenterSize(), updateCorners(), updateCornerSize(), ARC_GEOM_SYNCER::updateCSA(), LINE_GEOM_SYNCER::updateEnds(), LINE_GEOM_SYNCER::updateMidEndpoint(), LINE_GEOM_SYNCER::updatePolar(), and ARC_GEOM_SYNCER::updateSME().
|
inlineprotectedinherited |
Definition at line 127 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_shape.
|
inline |
Definition at line 250 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References CENTER_H, CENTER_W, CENTER_X, CENTER_Y, GEOM_SYNCER::GetIntValue(), GEOM_SYNCER::GetShape(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), updateCorners(), and updateCornerSize().
Referenced by RECTANGLE_GEOM_SYNCER().
|
inline |
Definition at line 205 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References END_X, END_Y, GEOM_SYNCER::GetIntValue(), GEOM_SYNCER::GetShape(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), START_X, START_Y, updateCenterSize(), and updateCornerSize().
Referenced by RECTANGLE_GEOM_SYNCER().
|
inline |
Definition at line 228 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References CORNER_H, CORNER_W, CORNER_X, CORNER_Y, GEOM_SYNCER::GetIntValue(), GEOM_SYNCER::GetShape(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetStart(), updateCenterSize(), and updateCorners().
Referenced by RECTANGLE_GEOM_SYNCER().
|
inlineinherited |
Definition at line 84 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::m_shape, and GEOM_SYNCER::updateAll().
|
inlineoverridevirtual |
Implements GEOM_SYNCER.
Definition at line 198 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References updateCenterSize(), updateCorners(), and updateCornerSize().
|
inline |
Definition at line 262 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References CENTER_H, CENTER_W, CENTER_X, CENTER_Y, GEOM_SYNCER::ChangeValue(), PCB_SHAPE::GetCenter(), GEOM_SYNCER::GetShape(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by OnCornersChange(), OnCornerSizeChange(), and updateAll().
|
inline |
Definition at line 217 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::ChangeValue(), END_X, END_Y, EDA_SHAPE::GetEnd(), GEOM_SYNCER::GetShape(), EDA_SHAPE::GetStart(), START_X, START_Y, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by OnCenterSizeChange(), OnCornerSizeChange(), and updateAll().
|
inline |
Definition at line 240 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References GEOM_SYNCER::ChangeValue(), CORNER_H, CORNER_W, CORNER_X, CORNER_Y, GEOM_SYNCER::GetShape(), EDA_SHAPE::GetStart(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by OnCenterSizeChange(), OnCornersChange(), and updateAll().
|
inlineoverridevirtual |
Reimplemented from GEOM_SYNCER.
Definition at line 184 of file pcbnew/dialogs/dialog_shape_properties.cpp.
References _, END_X, END_Y, GEOM_SYNCER::GetIntValue(), START_X, and START_Y.
|
privateinherited |
Definition at line 131 of file pcbnew/dialogs/dialog_shape_properties.cpp.
Referenced by GEOM_SYNCER::BindCtrls(), GEOM_SYNCER::ChangeAngleValue(), GEOM_SYNCER::ChangeValue(), GEOM_SYNCER::GetAngleValue(), GEOM_SYNCER::GetCtrl(), and GEOM_SYNCER::GetIntValue().
|
privateinherited |
Definition at line 130 of file pcbnew/dialogs/dialog_shape_properties.cpp.
Referenced by GEOM_SYNCER::GetShape(), and GEOM_SYNCER::SetShape().