41 m_toolMgr( aParent->GetToolManager() ),
42 m_xOffset( aParent, m_xLabel, m_xEntry, m_xUnit ),
43 m_yOffset( aParent, m_yLabel, m_yEntry, m_yUnit ),
163 m_clearX->SetToolTip(
_(
"Reset to the current distance from the reference position." ) );
164 m_clearY->SetToolTip(
_(
"Reset to the current angle from the reference position." ) );
171 m_clearX->SetToolTip(
_(
"Reset to the current X offset from the reference position." ) );
172 m_clearY->SetToolTip(
_(
"Reset to the current Y offset from the reference position." ) );
179 wxObject* obj =
event.GetEventObject();
181 wxASSERT( posrelTool );
218 wxCHECK( pickerTool, );
232 wxCHECK( pickerTool, );
250 m_referenceInfo->SetLabel(
_(
"Reference location: local coordinates origin" ) );
256 wxString msg =
_(
"<none selected>" );
261 m_referenceInfo->SetLabel( wxString::Format(
_(
"Reference item: %s" ), msg ) );
267 _(
"Reference location: selected point (%s, %s)" ),
314 item =
static_cast<const BOARD_ITEM*
>( aItem );
362 wxTextCtrl* obj =
static_cast<wxTextCtrl*
>(
event.GetEventObject() );
364 if( obj->GetValue().IsEmpty() )
365 obj->SetValue(
"0" );
constexpr EDA_IU_SCALE pcbIUScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
Class DIALOG_POSITION_RELATIVE_BASE.
wxStaticText * m_referenceInfo
wxButton * m_stdButtonsOK
wxCheckBox * m_polarCoords
wxButton * m_stdButtonsCancel
bool getTranslationInIU(VECTOR2I &val, bool polar)
Get the (Cartesian) translation described by the text entries.
void OnUseGridOriginClick(wxCommandEvent &event) override
void OnPolarChanged(wxCommandEvent &event) override
void OnOkClick(wxCommandEvent &event) override
void updateDialogControls(bool aPolar)
void OnClear(wxCommandEvent &event) override
static POSITION_RELATIVE_OPTIONS m_options
void OnSelectItemClick(wxCommandEvent &event) override
void UpdatePickedPoint(const std::optional< VECTOR2I > &aPoint) override
void OnSelectPointClick(wxCommandEvent &event) override
void UpdatePickedItem(const EDA_ITEM *aItem) override
VECTOR2I m_anchorItemPosition
void OnTextFocusLost(wxFocusEvent &event) override
Reset a text field to be 0 if it was exited while blank.
void OnUseUserOriginClick(wxCommandEvent &event) override
void ToPolarDeg(double x, double y, double &r, EDA_ANGLE &q)
Convert a given Cartesian point into a polar representation.
void updateAnchorInfo(const BOARD_ITEM *aItem)
DIALOG_POSITION_RELATIVE(PCB_BASE_FRAME *aParent)
std::vector< wxWindow * > m_tabOrder
bool Show(bool show) 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_BASE_FRAME * m_parentFrame
EDA_UNITS GetUserUnits() const
A base class for most all the KiCad significant classes used in schematics and boards.
virtual VECTOR2I GetPosition() const
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const
Return a user-visible description string of this item.
bool IsBOARD_ITEM() const
static TOOL_ACTION selectPointInteractively
static TOOL_ACTION selectItemInteractively
Selection of reference points/items.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
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 constexpr EDA_ANGLE ANGLE_0
Functions for manipulating tab traversal in forms and dialogs.
VECTOR2< double > VECTOR2D