78 m_outset( &aParent, m_outsetLabel, m_outsetEntry, m_outsetUnit ),
79 m_lineWidth( &aParent, m_lineWidthLabel, m_lineWidthEntry, m_lineWidthUnit ),
80 m_roundingGrid( &aParent, m_gridRoundingLabel, m_gridRoundingEntry, m_gridRoundingUnit )
87 const auto fillOptionList = [&](
UNIT_BINDER& aCombo,
const std::vector<int>& aPresets,
88 const std::vector<int>& aRecentPresets )
90 std::vector<long long int> optionList;
91 optionList.reserve( aPresets.size() + aRecentPresets.size() );
93 for(
const int val : aPresets )
94 optionList.push_back( val );
96 for(
const int val : aRecentPresets )
97 optionList.push_back( val );
100 std::sort( optionList.begin(), optionList.end() );
101 optionList.erase( std::unique( optionList.begin(), optionList.end() ), optionList.end() );
180 const auto saveRecentValue = []( std::vector<int>& aRecentValues,
int aValue )
182 const auto it = std::find( aRecentValues.begin(), aRecentValues.end(), aValue );
184 if( it != aRecentValues.end() )
187 aRecentValues.push_back( aValue );
constexpr EDA_IU_SCALE pcbIUScale
Container for design settings for a BOARD object.
int GetLineThickness(PCB_LAYER_ID aLayer) const
Return the default graphic segment thickness from the layer class for the given layer.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Class DIALOG_OUTSET_ITEMS_BASE.
PCB_LAYER_BOX_SELECTOR * m_LayerSelectionCtrl
wxCheckBox * m_roundCorners
wxCheckBox * m_deleteSourceItems
wxCheckBox * m_roundToGrid
wxComboBox * m_gridRoundingEntry
wxCheckBox * m_copyWidths
wxCheckBox * m_copyLayers
void OnLayerDefaultClick(wxCommandEvent &event) override
void OnCopyLayersChecked(wxCommandEvent &event) override
PCB_BASE_FRAME & m_parent
OUTSET_ROUTINE::PARAMETERS & m_params
bool TransferDataFromWindow() override
void OnRoundToGridChecked(wxCommandEvent &event) override
DIALOG_OUTSET_ITEMS(PCB_BASE_FRAME &aParent, OUTSET_ROUTINE::PARAMETERS &aParams)
UNIT_BINDER m_roundingGrid
bool TransferDataToWindow() override
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...
int GetLayerSelection() const
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void ShowNonActivatedLayers(bool aShow)
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetOptionsList(std::span< const long long int > aOptions)
Set the list of options for a combobox control.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
static const std::vector< int > s_presetGridRounding
static std::vector< int > s_lineWidthRecentValues
static std::vector< int > s_gridRoundingRecentValues
static int s_gridRoundValuePersist
static const std::vector< int > s_presetLineWidths
static const std::vector< int > s_outsetPresetValue
Some handy preset values for common outset distances.
static std::vector< int > s_outsetRecentValues
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
constexpr int mmToIU(double mm) const
std::optional< int > gridRounding