37 m_gridOriginX( aParent, m_staticTextGridPosX, m_GridOriginXCtrl, m_TextPosXUnits ),
38 m_gridOriginY( aParent, m_staticTextGridPosY, m_GridOriginYCtrl, m_TextPosYUnits ),
39 m_userGridX( aParent, m_staticTextSizeX, m_OptGridSizeX, m_TextSizeXUnits, true ),
40 m_userGridY( aParent, m_staticTextSizeY, m_OptGridSizeY, m_TextSizeYUnits, true )
71 [&]( wxCommandEvent& )
86 wxString savedGrid1 =
m_grid1Ctrl->GetStringSelection();
87 wxString savedGrid2 =
m_grid2Ctrl->GetStringSelection();
131 return wxDialog::TransferDataFromWindow();
160 return wxDialog::TransferDataToWindow();
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
Implementation of conversion functions that require both schematic and board internal units.
static TOOL_ACTION gridFast1
The base class for create windows for drawing purpose.
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
EDA_UNITS GetUserUnits() const
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
static TOOL_ACTION gridFast2
std::vector< wxString > sizes
static TOOL_ACTION gridPreset
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
VECTOR2< double > VECTOR2D
long long int ValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
UNIT_BINDER m_gridOriginY
wxStaticText * m_grid2HotKey
virtual const wxPoint & GetGridOrigin() const =0
Return the absolute coordinates of the origin of the snap grid.
bool TransferDataToWindow() override
DIALOG_GRID_SETTINGS(EDA_DRAW_FRAME *aParent)
This has no dependencies on calling wxFrame derivative, such as PCB_BASE_FRAME.
void OnResetGridOriginClick(wxCommandEvent &event) override
wxButton * m_buttonResetSizes
bool TransferDataFromWindow() override
wxTextCtrl * m_GridOriginXCtrl
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
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.
bool IsType(FRAME_T aType) const
virtual void SetValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
wxChoice * m_currentGridCtrl
virtual long long int GetValue()
Return the current value in Internal Units.
wxString StringFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
wxButton * m_buttonResetOrigin
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Return the key name from the key code.
Class DIALOG_GRID_SETTINGS_BASE.
void SetCoordType(ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType)
Set the current origin transform mode.
static TOOL_ACTION gridSetOrigin
virtual void SetGridOrigin(const wxPoint &aPosition)=0
UNIT_BINDER m_gridOriginX
EDA_DRAW_FRAME * m_parent
wxStaticText * m_grid1HotKey
virtual const std::vector< wxString > DefaultGridSizeList() const
By default, this returns the list of grids available in PcbNew-based applications.
Common grid settings, available to every frame.