40 m_originalOffset( aOffset ), m_updatedOffset( aOffset ),
41 m_xOffset( &aParent, m_xLabel, m_xEntry, m_xUnit ),
42 m_yOffset( &aParent, m_yLabel, m_yEntry, m_yUnit )
58 wxString
text =
_(
"Clear" );
62 text =
_(
"Reset this value to zero." );
68 wxString
text =
_(
"Reset" );
72 text =
_(
"Reset this value to the original value." );
85 wxTextCtrl* obj =
static_cast<wxTextCtrl*
>(
event.GetEventObject() );
87 if( obj->GetValue().IsEmpty() )
117 const wxObject*
const obj =
event.GetEventObject();
202 m_clearX->SetToolTip(
_(
"Reset to the current distance from the reference position." ) );
203 m_clearY->SetToolTip(
_(
"Reset to the current angle from the reference position." ) );
210 m_clearX->SetToolTip(
_(
"Reset to the current X offset from the reference position." ) );
211 m_clearY->SetToolTip(
_(
"Reset to the current Y offset from the reference position." ) );
Class DIALOG_SET_OFFSET_BASE.
wxCheckBox * m_polarCoords
virtual bool TransferDataToWindow() override
virtual void OnPolarChanged(wxCommandEvent &event) override
void updateDialogControls(bool aPolar)
virtual void OnTextFocusLost(wxFocusEvent &event) override
virtual bool TransferDataFromWindow() override
DIALOG_SET_OFFSET(PCB_BASE_FRAME &aFrame, VECTOR2I &aOffset, bool aClearToZero)
const VECTOR2I m_originalOffset
virtual void OnClear(wxCommandEvent &event) override
VECTOR2I & m_updatedOffset
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
EDA_UNITS GetUserUnits() const
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual long long int GetValue()
Return the current value in Internal Units.
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 DE...
virtual EDA_ANGLE GetAngleValue()
virtual double GetDoubleValue()
Return the current value in Internal Units.
virtual void SetAngleValue(const EDA_ANGLE &aValue)
void SetLabel(const wxString &aLabel)
virtual void SetDoubleValue(double aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
void SetCoordType(ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType)
Set the current origin transform mode.
static SET_OFFSET_OPTIONS s_savedOptions
static void ToPolarDeg(double x, double y, double &r, EDA_ANGLE &q)
static constexpr EDA_ANGLE ANGLE_0
VECTOR2< double > VECTOR2D