37 m_translation( aTranslate ),
38 m_rotation( aRotate ),
39 m_rotationAnchor( aAnchor ),
41 m_moveX( aParent, m_xLabel, m_xEntry, m_xUnit ),
42 m_moveY( aParent, m_yLabel, m_yEntry, m_yUnit ),
43 m_rotate( aParent, m_rotLabel, m_rotEntry, m_rotUnit ),
80 wxArrayString menuItems;
198 wxObject* obj =
event.GetEventObject();
234 wxRealPoint translation;
247 wxTextCtrl* obj =
static_cast<wxTextCtrl*
>(
event.GetEventObject() );
249 if( obj->GetValue().IsEmpty() )
250 obj->SetValue(
"0" );
260 double max_border = std::numeric_limits<int>::max() * M_SQRT1_2;
267 const wxString invalid_length =
_(
"Invalid movement values. Movement would place selection "
268 "outside of the maximum board area." );
270 m_xEntry->SetToolTip( invalid_length );
271 m_xEntry->SetForegroundColour( *wxRED );
272 m_yEntry->SetToolTip( invalid_length );
273 m_yEntry->SetForegroundColour( *wxRED );
279 m_xEntry->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) );
281 m_yEntry->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) );
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
constexpr coord_type GetLeft() const
constexpr coord_type GetRight() const
constexpr coord_type GetTop() const
constexpr coord_type GetBottom() const
Class DIALOG_MOVE_EXACT_BASE.
wxChoice * m_anchorOptions
wxButton * m_stdButtonsCancel
wxStdDialogButtonSizer * m_stdButtons
wxButton * m_stdButtonsOK
wxCheckBox * m_polarCoords
void buildRotationAnchorMenu()
bool TransferDataToWindow() override
bool TransferDataFromWindow() override
ROTATION_ANCHOR & m_rotationAnchor
void ToPolarDeg(double x, double y, double &r, EDA_ANGLE &q)
Convert a given Cartesian point into a polar representation.
void updateDialogControls(bool aPolar)
void OnClear(wxCommandEvent &event) override
DIALOG_MOVE_EXACT(PCB_BASE_FRAME *aParent, VECTOR2I &aTranslate, EDA_ANGLE &aRotate, ROTATION_ANCHOR &aAnchor, const BOX2I &aBbox)
void OnTextFocusLost(wxFocusEvent &event) override
Reset a text field to be 0 if it was exited while blank.
void OnPolarChanged(wxCommandEvent &event) override
void OnTextChanged(wxCommandEvent &event) override
bool GetTranslationInIU(wxRealPoint &val, bool polar)
Get the (Cartesian) translation described by the text entries.
std::vector< ROTATION_ANCHOR > m_menuIDs
std::vector< wxWindow * > m_tabOrder
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
bool IsType(FRAME_T aType) const
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
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.
void RequireEval()
Force the binder to evaluate the text.
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.
@ ROTATE_AROUND_USER_ORIGIN
@ ROTATE_AROUND_SEL_CENTER
@ ROTATE_AROUND_AUX_ORIGIN
@ ROTATE_AROUND_ITEM_ANCHOR
static constexpr EDA_ANGLE ANGLE_0
Functions for manipulating tab traversal in forms and dialogs.
VECTOR2< double > VECTOR2D