KiCad PCB EDA Suite
Loading...
Searching...
No Matches
RECTANGLE_GEOM_SYNCER Class Reference

Class that keeps a rectangle's various fields all up to date. More...

Inheritance diagram for RECTANGLE_GEOM_SYNCER:
GEOM_SYNCER

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
 
int GetRectangleWidth () const
 
int GetRectangleHeight () const
 
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_SHAPEGetShape ()
 
const PCB_SHAPEGetShape () const
 

Private Attributes

PCB_SHAPEm_shape
 
std::vector< BOUND_CONTROL > & m_boundCtrls
 

Detailed Description

Class that keeps a rectangle's various fields all up to date.

Definition at line 145 of file pcbnew/dialogs/dialog_shape_properties.cpp.

Member Enumeration Documentation

◆ CTRL_IDX

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 148 of file pcbnew/dialogs/dialog_shape_properties.cpp.

Constructor & Destructor Documentation

◆ RECTANGLE_GEOM_SYNCER()

Member Function Documentation

◆ BindCtrls()

◆ ChangeAngleValue()

void GEOM_SYNCER::ChangeAngleValue ( size_t aIndex,
const EDA_ANGLE & aValue )
inlineprotectedinherited

◆ ChangeValue()

◆ GetAngleValue()

EDA_ANGLE GEOM_SYNCER::GetAngleValue ( size_t aIndex) const
inlineprotectedinherited

◆ GetCtrl()

wxTextCtrl * GEOM_SYNCER::GetCtrl ( size_t aIndex) const
inlineprotectedinherited

Definition at line 102 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_boundCtrls.

◆ GetIntValue()

◆ GetRectangleHeight()

int RECTANGLE_GEOM_SYNCER::GetRectangleHeight ( ) const
inline

◆ GetRectangleWidth()

int RECTANGLE_GEOM_SYNCER::GetRectangleWidth ( ) const
inline

◆ GetShape() [1/2]

◆ GetShape() [2/2]

const PCB_SHAPE & GEOM_SYNCER::GetShape ( ) const
inlineprotectedinherited

Definition at line 134 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_shape.

◆ OnCenterSizeChange()

◆ OnCornersChange()

◆ OnCornerSizeChange()

◆ SetShape()

void GEOM_SYNCER::SetShape ( PCB_SHAPE & aShape)
inlineinherited

Definition at line 91 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References m_shape, and updateAll().

◆ updateAll()

void RECTANGLE_GEOM_SYNCER::updateAll ( )
inlineoverridevirtual

◆ updateCenterSize()

◆ updateCorners()

◆ updateCornerSize()

◆ Validate()

bool RECTANGLE_GEOM_SYNCER::Validate ( wxArrayString & aErrs) const
inlineoverridevirtual

Reimplemented from GEOM_SYNCER.

Definition at line 191 of file pcbnew/dialogs/dialog_shape_properties.cpp.

References _, END_X, END_Y, GEOM_SYNCER::GetIntValue(), START_X, and START_Y.

Member Data Documentation

◆ m_boundCtrls

std::vector<BOUND_CONTROL>& GEOM_SYNCER::m_boundCtrls
privateinherited

◆ m_shape

PCB_SHAPE& GEOM_SYNCER::m_shape
privateinherited

The documentation for this class was generated from the following file: