38 m_gridOriginX( aParent, m_staticTextGridPosX, m_GridOriginXCtrl, m_TextPosXUnits ),
39 m_gridOriginY( aParent, m_staticTextGridPosY, m_GridOriginYCtrl, m_TextPosYUnits ),
40 m_userGridX( aParent, m_staticTextSizeX, m_OptGridSizeX, m_TextSizeXUnits ),
41 m_userGridY( aParent, m_staticTextSizeY, m_OptGridSizeY, m_TextSizeYUnits )
77 [&]( wxCommandEvent& )
92 wxString savedGrid1 =
m_grid1Ctrl->GetStringSelection();
93 wxString savedGrid2 =
m_grid2Ctrl->GetStringSelection();
138 return wxDialog::TransferDataFromWindow();
162 return wxDialog::TransferDataToWindow();
static TOOL_ACTION gridFast1
static TOOL_ACTION gridPreset
static TOOL_ACTION gridSetOrigin
static TOOL_ACTION gridFast2
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
const std::vector< wxString > DefaultGridSizeList() const
Class DIALOG_GRID_SETTINGS_BASE.
wxStaticText * m_grid1HotKey
wxButton * m_buttonResetSizes
wxTextCtrl * m_GridOriginXCtrl
wxButton * m_buttonResetOrigin
wxChoice * m_currentGridCtrl
wxStaticText * m_grid2HotKey
UNIT_BINDER m_gridOriginX
bool TransferDataFromWindow() override
void OnResetGridOriginClick(wxCommandEvent &event) override
EDA_DRAW_FRAME * m_parent
bool TransferDataToWindow() override
DIALOG_GRID_SETTINGS(EDA_DRAW_FRAME *aParent)
This has no dependencies on calling wxFrame derivative, such as PCB_BASE_FRAME.
UNIT_BINDER m_gridOriginY
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...
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
bool IsType(FRAME_T aType) const
The base class for create windows for drawing purpose.
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
virtual void SetGridOrigin(const VECTOR2I &aPosition)=0
virtual const VECTOR2I & GetGridOrigin() const =0
Return the absolute coordinates of the origin of the snap grid.
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Converts aValue in internal units into a united string.
int ValueFromString(const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Converts aTextValue in aUnits to internal units used by the frame.
virtual long long int GetValue()
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.
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.
@ FRAME_SCH_SYMBOL_EDITOR
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Return the key name from the key code.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Common grid settings, available to every frame.
std::vector< wxString > sizes
VECTOR2< double > VECTOR2D