20#ifndef DRC_RE_OVERLAY_FIELD_H
21#define DRC_RE_OVERLAY_FIELD_H
45 using Getter = std::function<double()>;
46 using Setter = std::function<void(
double )>;
129 void ShowError(
const wxString& aMessage );
UNIT_BINDER * m_unitBinder
void ShowError(const wxString &aMessage)
Show the error icon inside the right end of this field, with a tooltip listing the error.
wxStaticText * GetLabel() const
UNIT_BINDER * GetUnitBinder() const
wxStaticText * GetPrefixLabel() const
void CreateLabels()
Create and associate labels with this field.
std::function< void(double)> Setter
bool TransferFromWindow()
Transfer data from the control to the model.
const wxString & GetFieldId() const
void SetGetter(Getter aGetter)
Set the getter lambda for reading model data.
bool HasPrefixLabel() const
const DRC_RE_FIELD_POSITION & GetPosition() const
bool IsShowingError() const
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.
DRC_RE_FIELD_POSITION m_position
void ClearError()
Hide the error icon.
void SetSetter(Setter aSetter)
Set the setter lambda for writing model data.
FIELD_WARNING_ICON * m_errorIcon
Owned by the control's parent window, created on first error.
wxControl * GetControl() const
wxStaticText * m_prefixLabel
A warning icon drawn inside the right edge of a field, left of its dropdown button when it has one,...
Specifies the position and size of a field overlaid on a constraint bitmap.