31#include <wx/statbox.h>
32#include <wx/statline.h>
33#include <wx/radiobut.h>
80#define MIN_THICKNESS 10*pcbIUScale.IU_PER_MILS
86 m_outlineHatchPitch( aParent, m_stBorderHatchPitchText,
87 m_outlineHatchPitchCtrl, m_outlineHatchUnits ),
88 m_minWidth( aParent, m_MinWidthLabel, m_MinWidthCtrl, m_MinWidthUnits ),
89 m_hatchRotation( aParent, m_hatchOrientLabel, m_hatchOrientCtrl, m_hatchOrientUnits ),
90 m_hatchWidth( aParent, m_hatchWidthLabel, m_hatchWidthCtrl, m_hatchWidthUnits),
91 m_hatchGap( aParent, m_hatchGapLabel, m_hatchGapCtrl, m_hatchGapUnits ),
93 m_cornerRadius( aParent, m_cornerRadiusLabel, m_cornerRadiusCtrl, m_cornerRadiusUnits ),
94 m_convertSettings( aConvertSettings ),
95 m_rbCenterline( nullptr ),
96 m_rbEnvelope( nullptr ),
97 m_cbDeleteOriginals( nullptr )
104 if( aConvertSettings )
106 wxStaticBox* bConvertBox =
new wxStaticBox(
this, wxID_ANY,
_(
"Conversion Settings" ) );
107 wxStaticBoxSizer* bConvertSizer =
new wxStaticBoxSizer( bConvertBox, wxVERTICAL );
109 m_rbCenterline =
new wxRadioButton(
this, wxID_ANY,
_(
"Use centerlines" ) );
112 bConvertSizer->AddSpacer( 2 );
113 m_rbEnvelope =
new wxRadioButton(
this, wxID_ANY,
_(
"Create bounding hull" ) );
114 bConvertSizer->Add(
m_rbEnvelope, 0, wxLEFT|wxRIGHT, 5 );
116 bConvertSizer->AddSpacer( 6 );
118 _(
"Delete source objects after conversion" ) );
121 GetSizer()->Insert( 0, bConvertSizer, 0, wxALL|wxEXPAND, 10 );
123 wxStaticLine* line =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
125 GetSizer()->Insert( 1, line, 0, wxLEFT|wxRIGHT|wxEXPAND, 10 );
127 SetTitle(
_(
"Convert to Non Copper Zone" ) );
181 case ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER:
break;
190 case ZONE_FILL_MODE::HATCH_PATTERN:
m_GridStyleCtrl->SetSelection( 1 );
break;
221 wxCommandEvent event;
243 if( event.GetColumn() != 0 )
246 int row =
m_layers->ItemToRow( event.GetItem() );
247 bool val =
m_layers->GetToggleValue( row, 0 );
250 m_layers->GetValue( layerID, row, 2 );
315 for(
int ii = 0; ii <
m_layers->GetItemCount(); ++ii )
317 if(
m_layers->GetToggleValue( (
unsigned) ii, 0 ) )
constexpr EDA_IU_SCALE pcbIUScale
Class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE.
wxStaticText * m_smoothValueLabel
wxStaticText * m_cornerRadiusLabel
wxStaticText * m_smoothLevelLabel
wxStaticText * m_staticTextLayerSelection
wxSpinCtrl * m_spinCtrlSmoothLevel
wxSpinCtrlDouble * m_spinCtrlSmoothValue
wxChoice * m_cornerSmoothingChoice
wxTextCtrl * m_cornerRadiusCtrl
wxChoice * m_OutlineDisplayCtrl
wxDataViewListCtrl * m_layers
wxChoice * m_GridStyleCtrl
wxRadioButton * m_rbEnvelope
UNIT_BINDER m_cornerRadius
bool TransferDataFromWindow() override
void OnUpdateUI(wxUpdateUIEvent &) override
UNIT_BINDER m_hatchRotation
wxRadioButton * m_rbCenterline
bool TransferDataToWindow() override
DIALOG_NON_COPPER_ZONES_EDITOR(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
int m_cornerSmoothingType
void OnStyleSelection(wxCommandEvent &event) override
CONVERT_SETTINGS * m_convertSettings
wxCheckBox * m_cbDeleteOriginals
PCB_BASE_FRAME * m_parent
UNIT_BINDER m_outlineHatchPitch
void OnLayerSelection(wxDataViewEvent &event) 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...
bool IsType(FRAME_T aType) const
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
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 void SetAngleValue(const EDA_ANGLE &aValue)
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.
ZONE_SETTINGS handles zones parameters.
EDA_ANGLE m_HatchOrientation
double m_HatchSmoothingValue
void SetCornerRadius(int aRadius)
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers, bool aFpEditorMode)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
int GetCornerSmoothingType() const
ZONE_FILL_MODE m_FillMode
void SetCornerSmoothingType(int aType)
int m_HatchSmoothingLevel
unsigned int GetCornerRadius() const
ZONE_BORDER_DISPLAY_STYLE m_ZoneBorderDisplayStyle
Option to show the zone area (outlines only, short hatches or full hatches.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
This file is part of the common library.
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
wxFont GetInfoFont(wxWindow *aWindow)
CONVERT_STRATEGY m_Strategy
constexpr int mmToIU(double mm) const
#define ZONE_BORDER_HATCH_MINDIST_MM
#define ZONE_BORDER_HATCH_MAXDIST_MM