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

#include <unit_binder.h>

Inheritance diagram for UNIT_BINDER:
PROPERTY_EDITOR_UNIT_BINDER

Public Member Functions

 UNIT_BINDER (EDA_DRAW_FRAME *aParent, wxStaticText *aLabel, wxWindow *aValueCtrl, wxStaticText *aUnitLabel, bool aAllowEval=true, bool aBindFocusEvent=true)
 
 UNIT_BINDER (UNITS_PROVIDER *aUnitsProvider, wxWindow *aEventSource, wxStaticText *aLabel, wxWindow *aValueCtrl, wxStaticText *aUnitLabel, bool aAllowEval=true, bool aBindFocusEvent=true)
 
virtual ~UNIT_BINDER () override
 
virtual void SetUnits (EDA_UNITS aUnits)
 Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DEGREES for angular controls. More...
 
virtual void SetNegativeZero ()
 
virtual void SetPrecision (int aLength)
 Normally not needed, but can be used to set the precision when using internal units that are floats (not integers) like DEGREES or PERCENT. More...
 
void SetDataType (EDA_DATA_TYPE aDataType)
 Used to override the datatype of the displayed property (default is DISTANCE) More...
 
virtual void SetValue (long long int aValue)
 Set new value (in Internal Units) for the text field, taking care of units conversion. More...
 
void SetValue (const wxString &aValue)
 
virtual void SetDoubleValue (double aValue)
 Set new value (in Internal Units) for the text field, taking care of units conversion. More...
 
virtual void SetAngleValue (const EDA_ANGLE &aValue)
 
virtual void ChangeValue (int aValue)
 Set new value (in Internal Units) for the text field, taking care of units conversion WITHOUT triggering the update routine. More...
 
void ChangeValue (const wxString &aValue)
 
virtual void ChangeDoubleValue (double aValue)
 Set new value (in Internal Units) for the text field, taking care of units conversion WITHOUT triggering the update routine. More...
 
virtual void ChangeAngleValue (const EDA_ANGLE &aValue)
 
virtual long long int GetValue ()
 Return the current value in Internal Units. More...
 
int GetIntValue ()
 
virtual double GetDoubleValue ()
 Return the current value in Internal Units. More...
 
virtual EDA_ANGLE GetAngleValue ()
 
bool IsIndeterminate () const
 Return true if the control holds the indeterminate value (for instance, if it represents a multiple selection of differing values). More...
 
wxString GetOriginalText () const
 Return the pre-evaluated text (or the current text if evaluation is not supported). More...
 
virtual bool Validate (double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
 Validate the control against the given range, informing the user of any errors found. More...
 
void SetLabel (const wxString &aLabel)
 
void Enable (bool aEnable)
 Enable/disable the label, widget and units label. More...
 
void Show (bool aShow, bool aResize=false)
 Show/hide the label, widget and units label. More...
 
ORIGIN_TRANSFORMS::COORD_TYPES_T GetCoordType () const
 Get the origin transforms coordinate type. More...
 
void SetCoordType (ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType)
 Set the current origin transform mode. More...
 
void RequireEval ()
 Force the binder to evaluate the text. More...
 

Protected Member Functions

void init (UNITS_PROVIDER *aProvider)
 
void onClick (wxMouseEvent &aEvent)
 
void onSetFocus (wxFocusEvent &aEvent)
 
void onKillFocus (wxFocusEvent &aEvent)
 
void delayedFocusHandler (wxCommandEvent &aEvent)
 
void onUnitsChanged (wxCommandEvent &aEvent)
 
double setPrecision (double aValue, bool aValueUsesUserUnits)
 When m_precision > 0 truncate the value aValue to show only m_precision digits in mantissa. More...
 

Protected Attributes

bool m_bindFocusEvent
 The bound widgets. More...
 
wxStaticText * m_label
 
wxWindow * m_valueCtrl
 
wxStaticText * m_unitLabel
 Can be nullptr. More...
 
const EDA_IU_SCALEm_iuScale
 
EDA_UNITS m_units
 
bool m_negativeZero
 Indicates "-0" should be displayed for 0. More...
 
EDA_DATA_TYPE m_dataType
 
int m_precision
 0 to 6 More...
 
wxString m_errorMessage
 
NUMERIC_EVALUATOR m_eval
 
bool m_allowEval
 
bool m_needsEval
 
long m_selStart
 Selection start and end of the original text. More...
 
long m_selEnd
 
bool m_unitsInValue
 Units label should be included in value text. More...
 
ORIGIN_TRANSFORMSm_originTransforms
 A reference to an ORIGIN_TRANSFORMS object. More...
 
ORIGIN_TRANSFORMS::COORD_TYPES_T m_coordType
 Type of coordinate for display origin transforms. More...
 

Detailed Description

Definition at line 40 of file unit_binder.h.

Constructor & Destructor Documentation

◆ UNIT_BINDER() [1/2]

UNIT_BINDER::UNIT_BINDER ( EDA_DRAW_FRAME aParent,
wxStaticText *  aLabel,
wxWindow *  aValueCtrl,
wxStaticText *  aUnitLabel,
bool  aAllowEval = true,
bool  aBindFocusEvent = true 
)
Parameters
aParentis the parent EDA_BASE_FRAME, used to fetch units and coordinate systems.
aLabelis the static text used to label the text input widget (note: the label text, trimmed of its colon, will also be used in error messages)
aValueCtrlis the control used to edit or display the given value (wxTextCtrl, wxComboBox, wxStaticText, etc.).
aUnitLabel(optional) is the units label displayed after the text input widget
aAllowEvalindicates aTextInput's content should be eval'ed before storing
aBindFocusEventindicates the control should respond to DELAY_FOCUS from the parent frame

Definition at line 40 of file unit_binder.cpp.

◆ UNIT_BINDER() [2/2]

UNIT_BINDER::UNIT_BINDER ( UNITS_PROVIDER aUnitsProvider,
wxWindow *  aEventSource,
wxStaticText *  aLabel,
wxWindow *  aValueCtrl,
wxStaticText *  aUnitLabel,
bool  aAllowEval = true,
bool  aBindFocusEvent = true 
)

◆ ~UNIT_BINDER()

UNIT_BINDER::~UNIT_BINDER ( )
overridevirtual

Member Function Documentation

◆ ChangeAngleValue()

void UNIT_BINDER::ChangeAngleValue ( const EDA_ANGLE aValue)
virtual

Definition at line 437 of file unit_binder.cpp.

References EDA_ANGLE::AsDegrees(), and ChangeDoubleValue().

Referenced by DIALOG_PAD_PROPERTIES::initValues().

◆ ChangeDoubleValue()

void UNIT_BINDER::ChangeDoubleValue ( double  aValue)
virtual

Set new value (in Internal Units) for the text field, taking care of units conversion WITHOUT triggering the update routine.

The value will be truncated according to the precision set by SetPrecision() (if not <= 0).

Definition at line 423 of file unit_binder.cpp.

References ChangeValue(), m_coordType, m_dataType, m_iuScale, m_negativeZero, m_originTransforms, m_units, setPrecision(), EDA_UNIT_UTILS::UI::StringFromValue(), and ORIGIN_TRANSFORMS::ToDisplay().

Referenced by ChangeAngleValue(), DIALOG_PAD_PROPERTIES::initValues(), DIALOG_PAD_PROPERTIES::onCornerRadiusChange(), DIALOG_PAD_PROPERTIES::OnPadShapeSelection(), and DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues().

◆ ChangeValue() [1/2]

void UNIT_BINDER::ChangeValue ( const wxString &  aValue)

◆ ChangeValue() [2/2]

◆ delayedFocusHandler()

void UNIT_BINDER::delayedFocusHandler ( wxCommandEvent &  aEvent)
protected

Definition at line 286 of file unit_binder.cpp.

References DisplayError(), m_errorMessage, and m_valueCtrl.

Referenced by UNIT_BINDER(), and ~UNIT_BINDER().

◆ Enable()

void UNIT_BINDER::Enable ( bool  aEnable)

◆ GetAngleValue()

◆ GetCoordType()

ORIGIN_TRANSFORMS::COORD_TYPES_T UNIT_BINDER::GetCoordType ( ) const
inline

Get the origin transforms coordinate type.

Returns
the origin transforms coordinate type

Definition at line 181 of file unit_binder.h.

References m_coordType.

◆ GetDoubleValue()

◆ GetIntValue()

◆ GetOriginalText()

wxString UNIT_BINDER::GetOriginalText ( ) const

Return the pre-evaluated text (or the current text if evaluation is not supported).

Used primarily to remember values between dialog invocations.

Definition at line 567 of file unit_binder.cpp.

References m_allowEval, m_eval, m_valueCtrl, and NUMERIC_EVALUATOR::OriginalText().

◆ GetValue()

long long int UNIT_BINDER::GetValue ( )
virtual

Return the current value in Internal Units.

Definition at line 471 of file unit_binder.cpp.

References ORIGIN_TRANSFORMS::FromDisplay(), m_coordType, m_dataType, m_eval, m_iuScale, m_needsEval, m_originTransforms, m_units, m_valueCtrl, NUMERIC_EVALUATOR::Process(), NUMERIC_EVALUATOR::Result(), and EDA_UNIT_UTILS::UI::ValueFromString().

Referenced by DIALOG_PNS_LENGTH_TUNING_SETTINGS::AcceptOptions(), DIALOG_COPPER_ZONE::AcceptOptions(), DIALOG_PLOT::applyPlotSettings(), DIALOG_CREATE_ARRAY::calculateCircularArrayProperties(), PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_PAGES_SETTINGS::GetCustomSizeMilsFromDialog(), GetIntValue(), DIALOG_LIB_NEW_SYMBOL::GetPinTextPosition(), DIALOG_PLOT_SCHEMATIC::getPlotOptions(), WX_UNIT_ENTRY_DIALOG::GetValue(), DIALOG_DIMENSION_PROPERTIES::onBoldToggle(), DIALOG_TEXT_PROPERTIES::onBoldToggle(), DIALOG_TEXTBOX_PROPERTIES::onBoldToggle(), DIALOG_LIB_SHAPE_PROPERTIES::onBorderChecked(), DIALOG_SHAPE_PROPERTIES::onBorderChecked(), DIALOG_TEXT_PROPERTIES::onBorderChecked(), DIALOG_LIB_TEXTBOX_PROPERTIES::onBorderChecked(), DIALOG_TEXTBOX_PROPERTIES::onBorderChecked(), DIALOG_PAD_PROPERTIES::onCornerRadiusChange(), DIALOG_DIMENSION_PROPERTIES::onFontSelected(), DIALOG_TEXT_PROPERTIES::onFontSelected(), DIALOG_TEXTBOX_PROPERTIES::onFontSelected(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::onPaintPolyPanel(), DIALOG_PIN_PROPERTIES::OnPropertiesChange(), DIALOG_DIMENSION_PROPERTIES::onThickness(), DIALOG_TEXT_PROPERTIES::onThickness(), DIALOG_TEXTBOX_PROPERTIES::onThickness(), DIALOG_PAD_PROPERTIES::PadTypeSelected(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DIALOG_PLOT_SCHEMATIC::setHpglPenWidth(), DIALOG_FIELD_PROPERTIES::TransferDataFromWindow(), DIALOG_IMAGE_PROPERTIES::TransferDataFromWindow(), DIALOG_JUNCTION_PROPS::TransferDataFromWindow(), DIALOG_LABEL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_LINE_PROPERTIES::TransferDataFromWindow(), DIALOG_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow(), PANEL_SETUP_FORMATTING::TransferDataFromWindow(), PANEL_SYM_EDITING_OPTIONS::TransferDataFromWindow(), DIALOG_GRID_SETTINGS::TransferDataFromWindow(), DIALOG_CREATE_ARRAY::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow(), DIALOG_PNS_DIFF_PAIR_DIMENSIONS::TransferDataFromWindow(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataFromWindow(), DIALOG_TARGET_PROPERTIES::TransferDataFromWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataFromWindow(), DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow(), DIALOG_TRACK_VIA_SIZE::TransferDataFromWindow(), PANEL_SETUP_CONSTRAINTS::TransferDataFromWindow(), PANEL_SETUP_MASK_AND_PASTE::TransferDataFromWindow(), PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow(), DIALOG_IMPORT_GFX::TransferDataFromWindow(), MWAVE_POLYGONAL_SHAPE_DLG::TransferDataFromWindow(), CONVERT_SETTINGS_DIALOG::TransferDataFromWindow(), DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform(), PANEL_PREVIEW_3D_MODEL::updateBoardThickness(), DIALOG_DIMENSION_PROPERTIES::updateDimensionFromDialog(), DIALOG_GRAPHIC_ITEM_PROPERTIES::Validate(), Validate(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::visitItem(), and DIALOG_IMPORT_GFX::~DIALOG_IMPORT_GFX().

◆ init()

void UNIT_BINDER::init ( UNITS_PROVIDER aProvider)
protected

Definition at line 130 of file unit_binder.cpp.

References UNITS_PROVIDER::GetUserUnits(), m_needsEval, m_selEnd, m_selStart, and m_units.

Referenced by UNIT_BINDER().

◆ IsIndeterminate()

◆ onClick()

void UNIT_BINDER::onClick ( wxMouseEvent &  aEvent)
protected

◆ onKillFocus()

◆ onSetFocus()

void UNIT_BINDER::onSetFocus ( wxFocusEvent &  aEvent)
protected

◆ onUnitsChanged()

void UNIT_BINDER::onUnitsChanged ( wxCommandEvent &  aEvent)
protected

◆ RequireEval()

void UNIT_BINDER::RequireEval ( )
inline

Force the binder to evaluate the text.

Definition at line 197 of file unit_binder.h.

References m_needsEval.

Referenced by DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT().

◆ SetAngleValue()

◆ SetCoordType()

◆ SetDataType()

void UNIT_BINDER::SetDataType ( EDA_DATA_TYPE  aDataType)

Used to override the datatype of the displayed property (default is DISTANCE)

Parameters
aDataTypeis the datatype to use for the units text display

Definition at line 157 of file unit_binder.cpp.

References EDA_UNIT_UTILS::GetLabel(), m_dataType, m_unitLabel, and m_units.

Referenced by DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ SetDoubleValue()

◆ SetLabel()

void UNIT_BINDER::SetLabel ( const wxString &  aLabel)

◆ SetNegativeZero()

◆ setPrecision()

double UNIT_BINDER::setPrecision ( double  aValue,
bool  aValueUsesUserUnits 
)
protected

When m_precision > 0 truncate the value aValue to show only m_precision digits in mantissa.

used in GetDoubleValue to return a rounded value. Mainly for units set to DEGREES.

Parameters
aValueis the value to modify.
aValueUsesUserUnitsmust be set to true if aValue is a user value, and set to false if aValue is a internal unit value.
Returns
the "rounded" value.

Definition at line 499 of file unit_binder.cpp.

References EDA_UNIT_UTILS::UI::FromUserUnit(), m_iuScale, m_precision, m_units, scale, and EDA_UNIT_UTILS::UI::ToUserUnit().

Referenced by ChangeDoubleValue(), ChangeValue(), GetDoubleValue(), and SetDoubleValue().

◆ SetPrecision()

void UNIT_BINDER::SetPrecision ( int  aLength)
virtual

Normally not needed, but can be used to set the precision when using internal units that are floats (not integers) like DEGREES or PERCENT.

Not used for integer values in IU

Parameters
aLengthis the number of digits for mantissa (0 = no truncation) must be <= 6

Definition at line 151 of file unit_binder.cpp.

References m_precision.

Referenced by DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), and DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES().

◆ SetUnits()

void UNIT_BINDER::SetUnits ( EDA_UNITS  aUnits)
virtual

Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DEGREES for angular controls.

Definition at line 139 of file unit_binder.cpp.

References EDA_UNIT_UTILS::GetLabel(), NUMERIC_EVALUATOR::LocaleChanged(), m_dataType, m_eval, m_unitLabel, m_units, and NUMERIC_EVALUATOR::SetDefaultUnits().

Referenced by DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_GLOBAL_EDIT_TEARDROPS::DIALOG_GLOBAL_EDIT_TEARDROPS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), onUnitsChanged(), PANEL_EDIT_OPTIONS::PANEL_EDIT_OPTIONS(), PANEL_SETUP_MASK_AND_PASTE::PANEL_SETUP_MASK_AND_PASTE(), PANEL_SETUP_FORMATTING::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), DIALOG_MOVE_EXACT::updateDialogControls(), and DIALOG_POSITION_RELATIVE::updateDialogControls().

◆ SetValue() [1/2]

void UNIT_BINDER::SetValue ( const wxString &  aValue)

◆ SetValue() [2/2]

void UNIT_BINDER::SetValue ( long long int  aValue)
virtual

Set new value (in Internal Units) for the text field, taking care of units conversion.

Definition at line 347 of file unit_binder.cpp.

References m_coordType, m_dataType, m_iuScale, m_negativeZero, m_originTransforms, m_units, SetValue(), EDA_UNIT_UTILS::UI::StringFromValue(), and ORIGIN_TRANSFORMS::ToDisplay().

Referenced by DIALOG_COPPER_ZONE::AcceptOptions(), DIALOG_PLOT::applyPlotSettings(), DIALOG_CREATE_ARRAY::calculateCircularArrayProperties(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), PANEL_SETUP_FORMATTING::ImportSettingsFrom(), DIALOG_PLOT::init_Dialog(), DIALOG_PLOT_SCHEMATIC::initDlg(), DIALOG_PAD_PROPERTIES::initValues(), PANEL_EESCHEMA_EDITING_OPTIONS::loadEEschemaSettings(), PANEL_SYM_EDITING_OPTIONS::loadSymEditorSettings(), DIALOG_LIB_SHAPE_PROPERTIES::onBorderChecked(), DIALOG_SHAPE_PROPERTIES::onBorderChecked(), DIALOG_TEXT_PROPERTIES::onBorderChecked(), DIALOG_LIB_TEXTBOX_PROPERTIES::onBorderChecked(), DIALOG_TEXTBOX_PROPERTIES::onBorderChecked(), DIALOG_MOVE_EXACT::OnClear(), DIALOG_POSITION_RELATIVE::OnClear(), DIALOG_PAD_PROPERTIES::OnOffsetCheckbox(), DIALOG_PAD_PROPERTIES::OnPadToDieCheckbox(), DIALOG_GRID_SETTINGS::OnResetGridOriginClick(), onUnitsChanged(), MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr(), DIALOG_JUNCTION_PROPS::resetDefaults(), DIALOG_LINE_PROPERTIES::resetDefaults(), DIALOG_WIRE_BUS_PROPERTIES::resetDefaults(), SetDoubleValue(), DIALOG_LIB_NEW_SYMBOL::SetPinTextPosition(), SetValue(), DIALOG_FIELD_PROPERTIES::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_IMAGE_PROPERTIES::TransferDataToWindow(), DIALOG_JUNCTION_PROPS::TransferDataToWindow(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_LINE_PROPERTIES::TransferDataToWindow(), DIALOG_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_SHAPE_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), DIALOG_TEXT_PROPERTIES::TransferDataToWindow(), DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow(), PANEL_SETUP_FORMATTING::TransferDataToWindow(), DIALOG_GRID_SETTINGS::TransferDataToWindow(), DIALOG_PAGES_SETTINGS::TransferDataToWindow(), DIALOG_COPPER_ZONE::TransferDataToWindow(), DIALOG_DIMENSION_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow(), DIALOG_PNS_DIFF_PAIR_DIMENSIONS::TransferDataToWindow(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_TARGET_PROPERTIES::TransferDataToWindow(), DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow(), DIALOG_TRACK_VIA_SIZE::TransferDataToWindow(), PANEL_SETUP_CONSTRAINTS::TransferDataToWindow(), PANEL_SETUP_MASK_AND_PASTE::TransferDataToWindow(), PANEL_SETUP_TEARDROPS::TransferDataToWindow(), PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow(), CONVERT_SETTINGS_DIALOG::TransferDataToWindow(), and WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG().

◆ Show()

◆ Validate()

bool UNIT_BINDER::Validate ( double  aMin,
double  aMax,
EDA_UNITS  aUnits = EDA_UNITS::UNSCALED 
)
virtual

Member Data Documentation

◆ m_allowEval

bool UNIT_BINDER::m_allowEval
protected

◆ m_bindFocusEvent

bool UNIT_BINDER::m_bindFocusEvent
protected

The bound widgets.

Definition at line 226 of file unit_binder.h.

Referenced by UNIT_BINDER(), and ~UNIT_BINDER().

◆ m_coordType

ORIGIN_TRANSFORMS::COORD_TYPES_T UNIT_BINDER::m_coordType
protected

Type of coordinate for display origin transforms.

Definition at line 255 of file unit_binder.h.

Referenced by ChangeDoubleValue(), ChangeValue(), GetCoordType(), GetDoubleValue(), GetValue(), SetCoordType(), SetDoubleValue(), and SetValue().

◆ m_dataType

◆ m_errorMessage

wxString UNIT_BINDER::m_errorMessage
protected

Definition at line 240 of file unit_binder.h.

Referenced by delayedFocusHandler(), and Validate().

◆ m_eval

NUMERIC_EVALUATOR UNIT_BINDER::m_eval
protected

◆ m_iuScale

const EDA_IU_SCALE* UNIT_BINDER::m_iuScale
protected

◆ m_label

wxStaticText* UNIT_BINDER::m_label
protected

Definition at line 229 of file unit_binder.h.

Referenced by Enable(), SetLabel(), Show(), and Validate().

◆ m_needsEval

bool UNIT_BINDER::m_needsEval
protected

Definition at line 244 of file unit_binder.h.

Referenced by GetDoubleValue(), GetValue(), init(), onKillFocus(), onSetFocus(), and RequireEval().

◆ m_negativeZero

bool UNIT_BINDER::m_negativeZero
protected

Indicates "-0" should be displayed for 0.

Definition at line 236 of file unit_binder.h.

Referenced by ChangeDoubleValue(), ChangeValue(), SetDoubleValue(), SetNegativeZero(), SetValue(), and UNIT_BINDER().

◆ m_originTransforms

ORIGIN_TRANSFORMS& UNIT_BINDER::m_originTransforms
protected

A reference to an ORIGIN_TRANSFORMS object.

Definition at line 252 of file unit_binder.h.

Referenced by ChangeDoubleValue(), ChangeValue(), GetDoubleValue(), GetValue(), SetDoubleValue(), and SetValue().

◆ m_precision

int UNIT_BINDER::m_precision
protected

0 to 6

Definition at line 238 of file unit_binder.h.

Referenced by setPrecision(), and SetPrecision().

◆ m_selEnd

long UNIT_BINDER::m_selEnd
protected

Definition at line 247 of file unit_binder.h.

Referenced by init(), onKillFocus(), and onSetFocus().

◆ m_selStart

long UNIT_BINDER::m_selStart
protected

Selection start and end of the original text.

Definition at line 246 of file unit_binder.h.

Referenced by init(), onKillFocus(), and onSetFocus().

◆ m_unitLabel

wxStaticText* UNIT_BINDER::m_unitLabel
protected

Can be nullptr.

Currently used units.

Definition at line 231 of file unit_binder.h.

Referenced by ChangeValue(), Enable(), SetDataType(), SetUnits(), SetValue(), Show(), and UNIT_BINDER().

◆ m_units

◆ m_unitsInValue

bool UNIT_BINDER::m_unitsInValue
protected

Units label should be included in value text.

Definition at line 249 of file unit_binder.h.

Referenced by ChangeValue(), onKillFocus(), PROPERTY_EDITOR_UNIT_BINDER::PROPERTY_EDITOR_UNIT_BINDER(), and SetValue().

◆ m_valueCtrl


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