46 wxString
text =
_(
"Clear" );
50 text =
_(
"Reset this value to zero." );
56 wxString
text =
_(
"Reset" );
60 text =
_(
"Reset this value to the original value." );
73 wxTextCtrl* obj =
static_cast<wxTextCtrl*
>(
event.GetEventObject() );
75 if( obj->GetValue().IsEmpty() )
105 const wxObject*
const obj =
event.GetEventObject();
138 double xOffset =
m_xOffset.GetDoubleValue();
139 double yOffset =
m_yOffset.GetDoubleValue();
190 m_clearX->SetToolTip(
_(
"Reset to the current distance from the reference position." ) );
191 m_clearY->SetToolTip(
_(
"Reset to the current angle from the reference position." ) );
198 m_clearX->SetToolTip(
_(
"Reset to the current X offset from the reference position." ) );
199 m_clearY->SetToolTip(
_(
"Reset to the current Y offset from the reference position." ) );
DIALOG_SET_OFFSET_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Set Offset"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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.
static void ToPolarDeg(double x, double y, double &r, EDA_ANGLE &q)
static constexpr EDA_ANGLE ANGLE_0
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D