24#ifndef DRC_RE_OVERLAY_FIELD_H
25#define DRC_RE_OVERLAY_FIELD_H
49 using Getter = std::function<double()>;
50 using Setter = std::function<void(
double )>;
UNIT_BINDER * m_unitBinder
wxStaticText * GetLabel() const
UNIT_BINDER * GetUnitBinder() const
std::function< void(double)> Setter
bool TransferFromWindow()
Transfer data from the control to the model.
const wxString & GetFieldId() const
void CreateLabel()
Create and associate a label with this field.
void SetGetter(Getter aGetter)
Set the getter lambda for reading model data.
const DRC_RE_FIELD_POSITION & GetPosition() const
bool IsShowingError() const
wxStaticBitmap * m_errorIcon
DRC_RE_OVERLAY_FIELD(wxWindow *aParent, const wxString &aFieldId, wxControl *aControl, const DRC_RE_FIELD_POSITION &aPosition)
Construct an overlay field wrapping an existing control.
std::function< double()> Getter
bool TransferToWindow()
Transfer data from the model to the control.
void SetUnitBinder(UNIT_BINDER *aBinder)
Associate a UNIT_BINDER for unit conversion.
void ShowError(bool aShow)
Show or hide the error indicator icon adjacent to this field.
DRC_RE_FIELD_POSITION m_position
void SetSetter(Setter aSetter)
Set the setter lambda for writing model data.
wxControl * GetControl() const
Specifies the position and size of a field overlaid on a constraint bitmap.