diff --git a/pcbnew/dialogs/dialog_copper_zones_base.cpp b/pcbnew/dialogs/dialog_copper_zones_base.cpp index 738ebac082..b59394ec38 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.cpp +++ b/pcbnew/dialogs/dialog_copper_zones_base.cpp @@ -140,7 +140,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i m_OutlineDisplayCtrl->SetSelection( 0 ); gbSizer1->Add( m_OutlineDisplayCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_stBorderHatchPitchText = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline hatch dist:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stBorderHatchPitchText = new wxStaticText( m_ExportableSetupSizer->GetStaticBox(), wxID_ANY, _("Outline hatch pitch:"), wxDefaultPosition, wxDefaultSize, 0 ); m_stBorderHatchPitchText->Wrap( -1 ); gbSizer1->Add( m_stBorderHatchPitchText, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); diff --git a/pcbnew/dialogs/dialog_copper_zones_base.fbp b/pcbnew/dialogs/dialog_copper_zones_base.fbp index 3eae333d1e..7de985db25 100644 --- a/pcbnew/dialogs/dialog_copper_zones_base.fbp +++ b/pcbnew/dialogs/dialog_copper_zones_base.fbp @@ -1117,7 +1117,7 @@ 0 0 wxID_ANY - Outline hatch dist: + Outline hatch pitch: 0 0 diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index a7a35dfbea..76bf66dca5 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -39,6 +39,7 @@ private: PCB_BASE_FRAME* m_parent; ZONE_SETTINGS* m_ptr; ZONE_SETTINGS m_settings; // working copy of zone settings + UNIT_BINDER m_outlineHatchPitch; UNIT_BINDER m_minWidth; UNIT_BINDER m_hatchRotation; UNIT_BINDER m_hatchWidth; @@ -70,6 +71,8 @@ int InvokeNonCopperZonesEditor( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSetting DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) : DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( aParent ), + m_outlineHatchPitch( aParent, m_stBorderHatchPitchText, + m_outlineHatchPitchCtrl, m_outlineHatchUnits ), m_minWidth( aParent, m_MinWidthLabel, m_MinWidthCtrl, m_MinWidthUnits ), m_hatchRotation( aParent, m_hatchOrientLabel, m_hatchOrientCtrl, m_hatchOrientUnits ), m_hatchWidth( aParent, m_hatchWidthLabel, m_hatchWidthCtrl, m_hatchWidthUnits), @@ -121,6 +124,8 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow() case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break; } + m_outlineHatchPitch.SetValue( m_settings.m_BorderHatchPitch ); + SetInitialFocus( m_OutlineDisplayCtrl ); switch( m_settings.m_FillMode ) @@ -206,6 +211,12 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow() case 2: m_settings.m_ZoneBorderDisplayStyle = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL; break; } + if( !m_outlineHatchPitch.Validate( Millimeter2iu( ZONE_BORDER_HATCH_MINDIST_MM ), + Millimeter2iu( ZONE_BORDER_HATCH_MAXDIST_MM ) ) ) + return false; + + m_settings.m_BorderHatchPitch = m_outlineHatchPitch.GetValue(); + if( m_GridStyleCtrl->GetSelection() > 0 ) m_settings.m_FillMode = ZONE_FILL_MODE::HATCH_PATTERN; else diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp index 51f81ad339..4454ffea1e 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -64,37 +64,48 @@ DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( m_OutlineDisplayCtrl->SetSelection( 0 ); gbSizer1->Add( m_OutlineDisplayCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_stBorderHatchPitchText = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Outline hatch pitch:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stBorderHatchPitchText->Wrap( -1 ); + gbSizer1->Add( m_stBorderHatchPitchText, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_outlineHatchPitchCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_outlineHatchPitchCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_outlineHatchUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); + m_outlineHatchUnits->Wrap( -1 ); + gbSizer1->Add( m_outlineHatchUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + m_MinWidthLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_MinWidthLabel->Wrap( -1 ); - gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_MinWidthCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_MinWidthUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); m_MinWidthUnits->Wrap( -1 ); - gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); m_staticTextSmoothing = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSmoothing->Wrap( -1 ); - gbSizer1->Add( m_staticTextSmoothing, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_staticTextSmoothing, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") }; int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString ); m_cornerSmoothingChoice = new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 ); m_cornerSmoothingChoice->SetSelection( 0 ); - gbSizer1->Add( m_cornerSmoothingChoice, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbSizer1->Add( m_cornerSmoothingChoice, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_cornerRadiusLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerRadiusLabel->Wrap( -1 ); - gbSizer1->Add( m_cornerRadiusLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_cornerRadiusLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_cornerRadiusCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_cornerRadiusCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbSizer1->Add( m_cornerRadiusCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_cornerRadiusUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerRadiusUnits->Wrap( -1 ); - gbSizer1->Add( m_cornerRadiusUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); + gbSizer1->Add( m_cornerRadiusUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); gbSizer1->AddGrowableCol( 1 ); diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp index 4eb6e1bbf4..ddbd4aa4f2 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_non_copper_zones_properties_base 1000 none + 1 dialog_non_copper_zones_properties_base @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Non Copper Zones Properties + 0 wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN @@ -483,9 +486,204 @@ 5 1 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALL|wxALIGN_CENTER_VERTICAL 3 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline hatch pitch: + 0 + + 0 + + + 0 + + 1 + m_stBorderHatchPitchText + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_outlineHatchPitchCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + units + 0 + + 0 + + + 0 + + 1 + m_outlineHatchUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 4 + 1 1 1 @@ -547,8 +745,8 @@ 5 1 1 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 3 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL + 4 1 1 @@ -615,7 +813,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT - 3 + 4 1 1 @@ -679,7 +877,7 @@ 1 0 wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 4 + 5 1 1 @@ -743,7 +941,7 @@ 1 1 wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND - 4 + 5 1 1 @@ -810,7 +1008,7 @@ 1 0 wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 5 + 6 1 1 @@ -874,7 +1072,7 @@ 1 1 wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND - 5 + 6 1 1 @@ -941,7 +1139,7 @@ 1 2 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT - 5 + 6 1 1 diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h index 27f76f5a92..09bd3c352c 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -45,6 +45,9 @@ class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM wxCheckBox* m_cbLocked; wxStaticText* m_staticTextStyle; wxChoice* m_OutlineDisplayCtrl; + wxStaticText* m_stBorderHatchPitchText; + wxTextCtrl* m_outlineHatchPitchCtrl; + wxStaticText* m_outlineHatchUnits; wxStaticText* m_MinWidthLabel; wxTextCtrl* m_MinWidthCtrl; wxStaticText* m_MinWidthUnits; @@ -73,7 +76,7 @@ class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); } virtual void OnStyleSelection( wxCommandEvent& event ) { event.Skip(); } @@ -82,6 +85,7 @@ class DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE : public DIALOG_SHIM public: DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); + ~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(); }; diff --git a/pcbnew/dialogs/dialog_rule_area_properties.cpp b/pcbnew/dialogs/dialog_rule_area_properties.cpp index db26542c67..f110b777cc 100644 --- a/pcbnew/dialogs/dialog_rule_area_properties.cpp +++ b/pcbnew/dialogs/dialog_rule_area_properties.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #define LAYER_LIST_COLUMN_CHECK 0 #define LAYER_LIST_COLUMN_ICON 1 @@ -43,6 +44,7 @@ public: DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ); private: + UNIT_BINDER m_outlineHatchPitch; PCB_BASE_FRAME* m_parent; ZONE_SETTINGS m_zonesettings; ///< the working copy of zone settings ZONE_SETTINGS* m_ptr; ///< the pointer to the zone settings @@ -66,7 +68,10 @@ int InvokeRuleAreaEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings ) DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) : - DIALOG_RULE_AREA_PROPERTIES_BASE( aParent ) + DIALOG_RULE_AREA_PROPERTIES_BASE( aParent ), + m_outlineHatchPitch( aParent, m_stBorderHatchPitchText, + m_outlineHatchPitchCtrl, m_outlineHatchUnits ) + { m_parent = aParent; @@ -106,6 +111,8 @@ bool DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow() case ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL: m_OutlineDisplayCtrl->SetSelection( 2 ); break; } + m_outlineHatchPitch.SetValue( m_zonesettings.m_BorderHatchPitch ); + SetInitialFocus( m_OutlineDisplayCtrl ); return true; @@ -168,6 +175,12 @@ bool DIALOG_RULE_AREA_PROPERTIES::TransferDataFromWindow() break; } + if( !m_outlineHatchPitch.Validate( Millimeter2iu( ZONE_BORDER_HATCH_MINDIST_MM ), + Millimeter2iu( ZONE_BORDER_HATCH_MAXDIST_MM ) ) ) + return false; + + m_zonesettings.m_BorderHatchPitch = m_outlineHatchPitch.GetValue(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_Zones.hatching_style = static_cast( m_zonesettings.m_ZoneBorderDisplayStyle ); diff --git a/pcbnew/dialogs/dialog_rule_area_properties_base.cpp b/pcbnew/dialogs/dialog_rule_area_properties_base.cpp index c5051bcbab..0da6f71575 100644 --- a/pcbnew/dialogs/dialog_rule_area_properties_base.cpp +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -101,21 +101,39 @@ DIALOG_RULE_AREA_PROPERTIES_BASE::DIALOG_RULE_AREA_PROPERTIES_BASE( wxWindow* pa m_cbLocked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerRight->Add( m_cbLocked, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizerLowerRight; - bSizerLowerRight = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer* fgSizerLowerRigth; + fgSizerLowerRigth = new wxFlexGridSizer( 0, 3, 0, 0 ); + fgSizerLowerRigth->SetFlexibleDirection( wxBOTH ); + fgSizerLowerRigth->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Outline display:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStyle->Wrap( -1 ); - bSizerLowerRight->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerLowerRigth->Add( m_staticTextStyle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); wxString m_OutlineDisplayCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") }; int m_OutlineDisplayCtrlNChoices = sizeof( m_OutlineDisplayCtrlChoices ) / sizeof( wxString ); m_OutlineDisplayCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OutlineDisplayCtrlNChoices, m_OutlineDisplayCtrlChoices, 0 ); m_OutlineDisplayCtrl->SetSelection( 0 ); - bSizerLowerRight->Add( m_OutlineDisplayCtrl, 0, wxALL, 5 ); + fgSizerLowerRigth->Add( m_OutlineDisplayCtrl, 0, wxALL, 5 ); - bSizerRight->Add( bSizerLowerRight, 0, wxEXPAND, 5 ); + fgSizerLowerRigth->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_stBorderHatchPitchText = new wxStaticText( this, wxID_ANY, _("Outline hatch pitch:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_stBorderHatchPitchText->Wrap( -1 ); + fgSizerLowerRigth->Add( m_stBorderHatchPitchText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_outlineHatchPitchCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_outlineHatchPitchCtrl->SetToolTip( _("A unique name for this rule area for use in DRC rules") ); + + fgSizerLowerRigth->Add( m_outlineHatchPitchCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_outlineHatchUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_outlineHatchUnits->Wrap( -1 ); + fgSizerLowerRigth->Add( m_outlineHatchUnits, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + + bSizerRight->Add( fgSizerLowerRigth, 1, wxEXPAND, 5 ); bUpperSizer->Add( bSizerRight, 0, wxEXPAND|wxALL, 5 ); diff --git a/pcbnew/dialogs/dialog_rule_area_properties_base.fbp b/pcbnew/dialogs/dialog_rule_area_properties_base.fbp index 4689de7854..9bbd3eb184 100644 --- a/pcbnew/dialogs/dialog_rule_area_properties_base.fbp +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_rule_area_properties_base 1000 none + 1 dialog_rule_areas_properties_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Rule Area Properties + 0 wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN @@ -866,12 +869,19 @@ 5 wxEXPAND - 0 - + 1 + + 3 + wxBOTH + + + 0 - bSizerLowerRight - wxHORIZONTAL + fgSizerLowerRigth + wxFLEX_GROWMODE_SPECIFIED none + 0 + 0 5 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT @@ -997,6 +1007,202 @@ + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline hatch pitch: + 0 + + 0 + + + 0 + + 1 + m_stBorderHatchPitchText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_outlineHatchPitchCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + A unique name for this rule area for use in DRC rules + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + + 1 + m_outlineHatchUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + diff --git a/pcbnew/dialogs/dialog_rule_area_properties_base.h b/pcbnew/dialogs/dialog_rule_area_properties_base.h index 9d0334f33b..8c246471a4 100644 --- a/pcbnew/dialogs/dialog_rule_area_properties_base.h +++ b/pcbnew/dialogs/dialog_rule_area_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -51,12 +51,15 @@ class DIALOG_RULE_AREA_PROPERTIES_BASE : public DIALOG_SHIM wxCheckBox* m_cbLocked; wxStaticText* m_staticTextStyle; wxChoice* m_OutlineDisplayCtrl; + wxStaticText* m_stBorderHatchPitchText; + wxTextCtrl* m_outlineHatchPitchCtrl; + wxStaticText* m_outlineHatchUnits; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnLayerSelection( wxDataViewEvent& event ) { event.Skip(); } virtual void onLayerListRightDown( wxMouseEvent& event ) { event.Skip(); } virtual void OnSizeLayersList( wxSizeEvent& event ) { event.Skip(); } @@ -65,6 +68,7 @@ class DIALOG_RULE_AREA_PROPERTIES_BASE : public DIALOG_SHIM public: DIALOG_RULE_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rule Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN ); + ~DIALOG_RULE_AREA_PROPERTIES_BASE(); };