51 wxTextCtrl* obj =
static_cast<wxTextCtrl*
>(
event.GetEventObject() );
53 if( obj->GetValue().IsEmpty() )
71 const wxObject*
const obj =
event.GetEventObject();
104 double xOffset =
m_xOffset.GetDoubleValue();
105 double yOffset =
m_yOffset.GetDoubleValue();
156 m_clearX->SetToolTip(
_(
"Reset to the current distance from the reference position." ) );
157 m_clearY->SetToolTip(
_(
"Reset to the current angle from the reference position." ) );
164 m_clearX->SetToolTip(
_(
"Reset to the current X offset from the reference position." ) );
165 m_clearY->SetToolTip(
_(
"Reset to the current Y offset from the reference position." ) );
176 wxCommandEvent
dummy;
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
DIALOG_OFFSET_ITEM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Offset Item"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_polarCoords
DIALOG_OFFSET_ITEM(PCB_BASE_FRAME &aFrame, VECTOR2I &aOffset)
VECTOR2I & m_updatedOffset
void updateDialogControls(bool aPolar)
const VECTOR2I m_originalOffset
virtual bool TransferDataToWindow() override
virtual bool TransferDataFromWindow() override
virtual void OnPolarChanged(wxCommandEvent &event) override
virtual void OnTextFocusLost(wxFocusEvent &event) override
virtual void OnClear(wxCommandEvent &event) override
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 ToPolar(double x, double y, double &r, EDA_ANGLE &q)
static constexpr EDA_ANGLE ANGLE_0
std::vector< FAB_LAYER_COLOR > dummy
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D