26#include <wx/textdlg.h>
42 m_unitsProvider( aProvider ), m_grid( aGrid ),
43 m_gridSizeX( aProvider, aEventSource, m_staticTextX, m_textX, m_staticTextXUnits, true ),
44 m_gridSizeY( aProvider, aEventSource, m_staticTextY, m_textY, m_staticTextYUnits, true )
61 wxMessageBox(
_(
"Grid size X out of range." ),
_(
"Error" ), wxOK | wxICON_ERROR );
68 wxMessageBox(
_(
"Grid size Y out of range." ),
_(
"Error" ), wxOK | wxICON_ERROR );
77 EDA_UNITS::MILLIMETRES, gridX );
79 EDA_UNITS::MILLIMETRES, gridY );
Class DIALOG_GRID_SETTINGS_BASE.
wxCheckBox * m_checkLinked
UNITS_PROVIDER * m_unitsProvider
void OnLinkedChecked(wxCommandEvent &event) override
DIALOG_GRID_SETTINGS(wxWindow *aParent, wxWindow *aEventSource, UNITS_PROVIDER *aProvider, GRID &aGrid)
bool TransferDataFromWindow() 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...
const EDA_IU_SCALE & GetIuScale() const
virtual double GetDoubleValue()
Return the current value in Internal Units.
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
This file is part of the common library.
KICOMMON_API wxString StringFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Returns the string from aValue according to aUnits (inch, mm ...) for display.
Common grid settings, available to every frame.