diff --git a/common/widgets/unit_binder.cpp b/common/widgets/unit_binder.cpp index dff050c4ea..6692e19043 100644 --- a/common/widgets/unit_binder.cpp +++ b/common/widgets/unit_binder.cpp @@ -51,7 +51,7 @@ UNIT_BINDER::UNIT_BINDER( EDA_DRAW_FRAME* aParent, if( textEntry ) textEntry->SetValue( wxT( "0" ) ); - m_unitLabel->SetLabel( GetAbbreviatedUnitsLabel( m_units, aUseMils ) ); + m_unitLabel->SetLabel( GetAbbreviatedUnitsLabel( m_units, m_useMils ) ); m_value->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( UNIT_BINDER::onSetFocus ), NULL, this ); m_value->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( UNIT_BINDER::onKillFocus ), NULL, this ); @@ -59,6 +59,14 @@ UNIT_BINDER::UNIT_BINDER( EDA_DRAW_FRAME* aParent, } +void UNIT_BINDER::SetUnits( EDA_UNITS_T aUnits, bool aUseMils ) +{ + m_units = aUnits; + m_useMils = aUseMils; + m_unitLabel->SetLabel( GetAbbreviatedUnitsLabel( m_units, m_useMils ) ); +} + + void UNIT_BINDER::onSetFocus( wxFocusEvent& aEvent ) { auto textEntry = dynamic_cast( m_value ); @@ -236,3 +244,11 @@ void UNIT_BINDER::Enable( bool aEnable ) m_unitLabel->Enable( aEnable ); } + +void UNIT_BINDER::Show( bool aShow ) +{ + m_label->Show( aShow ); + m_value->Show( aShow ); + m_unitLabel->Show( aShow ); +} + diff --git a/common/widgets/widget_net_selector.cpp b/common/widgets/widget_net_selector.cpp index 97a1ec8652..a84c0318ad 100644 --- a/common/widgets/widget_net_selector.cpp +++ b/common/widgets/widget_net_selector.cpp @@ -66,6 +66,8 @@ void WIDGET_NET_SELECTOR::SetSelectedNet ( int aNetcode ) return; } } + + SetSelection( 0 ); } diff --git a/include/widgets/unit_binder.h b/include/widgets/unit_binder.h index 2ef91f597a..bfe1dcf55d 100644 --- a/include/widgets/unit_binder.h +++ b/include/widgets/unit_binder.h @@ -58,6 +58,13 @@ public: int aMin = INT_MIN, int aMax = INT_MAX, bool aAllowEval = true ); + /** + * Function SetUnits + * Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be + * used to set to DEGREES for angular controls. + */ + virtual void SetUnits( EDA_UNITS_T aUnits, bool aUseMils = false ); + /** * Function SetValue * Sets new value (in Internal Units) for the text field, taking care of units conversion. @@ -91,10 +98,16 @@ public: /** * Function Enable - * Enables/diasables the label, text input widget, and units label. + * Enables/diasables the label, widget and units label. */ void Enable( bool aEnable ); + /** + * Function Show + * Shows/hides the label, widget and units label. + */ + void Show( bool aShow ); + protected: void onSetFocus( wxFocusEvent& aEvent ); diff --git a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp index 0a473d3627..d29150ff0d 100644 --- a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp @@ -37,23 +37,30 @@ #include #include #include -#include -#include #include #include #include +#include -DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES( - wxWindow* aParent, PAD_CS_PRIMITIVE * aShape ) - : DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( aParent ) +DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES( wxWindow* aParent, + PCB_BASE_FRAME* aFrame, + PAD_CS_PRIMITIVE * aShape ) : + DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( aParent ), + m_shape( aShape ), + m_startX( aFrame, m_startXLabel, m_startXCtrl, m_startXUnits, true ), + m_startY( aFrame, m_startYLabel, m_startYCtrl, m_startYUnits, true ), + m_endX( aFrame, m_endXLabel, m_endXCtrl, m_endXUnits, true ), + m_endY( aFrame, m_endYLabel, m_endYCtrl, m_endYUnits, true ), + m_radius( aFrame, m_radiusLabel, m_radiusCtrl, m_radiusUnits, true ), + m_thickness( aFrame, m_thicknessLabel, m_thicknessCtrl, m_thicknessUnits, true ) { - m_shape = aShape; - TransferDataToWindow(); + SetInitialFocus( m_startXCtrl ); m_sdbSizerOK->SetDefault(); - GetSizer()->SetSizeHints( this ); + + FinishDialogSettings(); } bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow() @@ -65,40 +72,29 @@ bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow() if( m_shape->m_Shape != S_CIRCLE ) m_staticTextInfo->Show( false ); - PutValueInLocalUnits( *m_textCtrlThickness, m_shape->m_Thickness ); - - // Update units and parameters names according to the shape to edit: - wxString unit = GetAbbreviatedUnitsLabel(); - m_staticTextPosUnit->SetLabel( unit ); - m_staticTextEndUnit->SetLabel( unit ); - m_staticTextThicknessUnit->SetLabel( unit ); - - m_staticTextAngleUnit->SetLabel( wxEmptyString ); - m_staticTextAngle->SetLabel( wxEmptyString ); + m_thickness.SetValue( m_shape->m_Thickness ); switch( m_shape->m_Shape ) { case S_SEGMENT: // Segment with rounded ends SetTitle( _( "Segment" ) ); - PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x ); - PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y ); - PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_End.x ); - PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_End.y ); - m_textCtrAngle->Show( false ); - m_staticTextAngleUnit->Show( false ); - m_staticTextAngle->Show( false ); + m_startX.SetValue( m_shape->m_Start.x ); + m_startY.SetValue( m_shape->m_Start.y ); + m_endX.SetValue( m_shape->m_End.x ); + m_endY.SetValue( m_shape->m_End.y ); + m_radius.Show( false ); break; case S_ARC: // Arc with rounded ends SetTitle( _( "Arc" ) ); m_staticTextPosEnd->SetLabel( _( "Center" ) ); - PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_Start.x ); // Start point of arc - PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_Start.y ); - PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_End.x ); // arc center - PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_End.y ); - m_textCtrAngle->SetValue( FMT_ANGLE( m_shape->m_ArcAngle ) ); - m_staticTextAngle->SetLabel( _( "Angle" ) ); - m_staticTextAngleUnit->SetLabel( _( "degree" ) ); + m_startX.SetValue( m_shape->m_Start.x ); // Start point of arc + m_startY.SetValue( m_shape->m_Start.y ); + m_endX.SetValue( m_shape->m_End.x ); // arc center + m_endY.SetValue( m_shape->m_End.y ); + m_radiusLabel->SetLabel( _( "Angle:" ) ); + m_radius.SetUnits( DEGREES ); + m_radius.SetValue( m_shape->m_ArcAngle ); break; case S_CIRCLE: // ring or circle @@ -108,28 +104,19 @@ bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow() SetTitle( _( "Circle" ) ); // End point does not exist for a circle or ring: - m_textCtrEndX->Show( false ); - m_textCtrEndY->Show( false ); m_staticTextPosEnd->Show( false ); - m_staticTextEndUnit->Show( false ); - m_staticTextEndX->Show( false ); - m_staticTextEndY->Show( false ); + m_endX.Show( false ); + m_endY.Show( false ); // Circle center uses position controls: - m_staticTextPosStart->SetLabel( _( "Center" ) ); - PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x ); - PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y ); - PutValueInLocalUnits( *m_textCtrAngle, m_shape->m_Radius ); - m_staticTextAngleUnit->SetLabel( unit ); - m_staticTextAngle->SetLabel( _( "Radius" ) ); + m_staticTextPosStart->SetLabel( _( "Center:" ) ); + m_startX.SetValue( m_shape->m_Start.x ); + m_startY.SetValue( m_shape->m_Start.y ); + m_radius.SetValue( m_shape->m_Radius ); break; case S_POLYGON: // polygon - SetTitle( "Polygon" ); - m_staticTextPosStart->SetLabel( wxEmptyString ); - m_staticTextPosEnd->SetLabel( wxEmptyString ); - m_staticTextAngle->SetLabel( _( "corners count" ) ); - m_textCtrAngle->SetValue( wxString::Format( "%d", m_shape->m_Poly.size() ) ); + // polygon has a specific dialog editor. So nothing here break; default: @@ -143,36 +130,36 @@ bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataToWindow() bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow() { // Transfer data out of the GUI. - m_shape->m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() ); + m_shape->m_Thickness = m_thickness.GetValue(); switch( m_shape->m_Shape ) { case S_SEGMENT: // Segment with rounded ends - m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() ); - m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() ); - m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() ); - m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() ); + m_shape->m_Start.x = m_startX.GetValue(); + m_shape->m_Start.y = m_startY.GetValue(); + m_shape->m_End.x = m_endX.GetValue(); + m_shape->m_End.y = m_endY.GetValue(); break; case S_ARC: // Arc with rounded ends // Start point of arc - m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() ); - m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() ); + m_shape->m_Start.x = m_startX.GetValue(); + m_shape->m_Start.y = m_startY.GetValue(); // arc center - m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() ); - m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() ); - m_shape->m_ArcAngle = ValueFromString( DEGREES, m_textCtrAngle->GetValue() ); + m_shape->m_End.x = m_endX.GetValue(); + m_shape->m_End.y = m_endY.GetValue(); + // arc angle + m_shape->m_ArcAngle = m_radius.GetValue(); break; case S_CIRCLE: // ring or circle - m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() ); - m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() ); - //radius - m_shape->m_Radius = ValueFromString( g_UserUnit, m_textCtrAngle->GetValue() ); + m_shape->m_Start.x = m_startX.GetValue(); + m_shape->m_Start.y = m_startY.GetValue(); + m_shape->m_Radius = m_radius.GetValue(); break; case S_POLYGON: // polygon - // polygon has a specific dialog editor. No nothing here + // polygon has a specific dialog editor. So nothing here break; default: @@ -184,26 +171,35 @@ bool DIALOG_PAD_PRIMITIVES_PROPERTIES::TransferDataFromWindow() } -DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS( - wxWindow* aParent, PAD_CS_PRIMITIVE * aShape ) - : DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( aParent ), - m_shape( aShape ), m_currshape( *m_shape ) +DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aParent, + PCB_BASE_FRAME* aFrame, + PAD_CS_PRIMITIVE * aShape ) : + DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( aParent ), + m_shape( aShape ), + m_currshape( *m_shape ), + m_thickness( aFrame, m_thicknessLabel, m_thicknessCtrl, m_thicknessUnits, true ) { + m_addButton->SetBitmap( KiBitmap( small_plus_xpm ) ); + m_deleteButton->SetBitmap( KiBitmap( trash_xpm ) ); + m_warningIcon->SetBitmap( KiBitmap( dialog_warning_xpm ) ); + + // Test for acceptable polygon (more than 2 corners, and not self-intersecting) and + // remove any redundant corners. A warning message is displayed if not OK. + doValidate( true ); + TransferDataToWindow(); m_sdbSizerOK->SetDefault(); GetSizer()->SetSizeHints( this ); // TODO: move wxEVT_GRID_CELL_CHANGING in wxFormbuilder, when it support it - m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this ); + m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this ); } DIALOG_PAD_PRIMITIVE_POLY_PROPS::~DIALOG_PAD_PRIMITIVE_POLY_PROPS() { - m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this ); + m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging ), NULL, this ); } @@ -212,19 +208,7 @@ bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow() if( m_shape == NULL ) return false; - // Update units and parameters names according to the shape to edit: - wxString unit = GetAbbreviatedUnitsLabel(); - m_staticTextThicknessUnit->SetLabel( unit ); - - PutValueInLocalUnits( *m_textCtrlThickness, m_currshape.m_Thickness ); - - // Test for acceptable polygon (more than 2 corners, and not self-intersecting) - // A warning message is displayed if not OK - Validate(); - - // If the number of corners is < 2 (Happens for a new shape, prepare 2 dummy corners - while( m_currshape.m_Poly.size() < 2 ) - m_currshape.m_Poly.push_back( wxPoint( 0, 0 ) ); + m_thickness.SetValue( m_currshape.m_Thickness ); // Populates the list of corners int extra_rows = m_currshape.m_Poly.size() - m_gridCornersList->GetNumberRows(); @@ -247,10 +231,10 @@ bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow() msg.Printf( "Corner %d", row+1 ); m_gridCornersList->SetRowLabelValue( row, msg ); - msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].x ); + msg = StringFromValue( GetUserUnits(), m_currshape.m_Poly[row].x, true, true ); m_gridCornersList->SetCellValue( row, 0, msg ); - msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].y ); + msg = StringFromValue( GetUserUnits(), m_currshape.m_Poly[row].y, true, true ); m_gridCornersList->SetCellValue( row, 1, msg ); } @@ -262,21 +246,32 @@ bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataFromWindow() if( !Validate() ) return false; - // Transfer data out of the GUI. - m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() ); + m_currshape.m_Thickness = m_thickness.GetValue(); + *m_shape = m_currshape; return true; } -// test for a valid polygon (a not self intersectiong polygon) bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::Validate() { + // Don't remove redundant corners while user is editing corner list + return doValidate( false ); +} + + +// test for a valid polygon (a not self intersectiong polygon) +bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::doValidate( bool aRemoveRedundantCorners ) +{ + // Commit any pending edits + m_gridCornersList->DisableCellEditControl(); + if( m_currshape.m_Poly.size() < 3 ) { - m_staticTextValidate->SetLabel( _("Incorrect polygon: less than 3 corners" ) ); - m_staticTextValidate->Show( true ); + m_warningText->SetLabel( _("Polygon must have at least 3 corners" ) ); + m_warningText->Show( true ); + m_warningIcon->Show( true ); return false; } @@ -295,89 +290,107 @@ bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::Validate() if( polyline.PointCount() < 3 ) { - m_staticTextValidate->SetLabel( _("Incorrect polygon: too few corners after simplification" ) ); + m_warningText->SetLabel( _("Polygon must have at least 3 corners\n after simplification" ) ); valid = false; } if( valid && polyline.SelfIntersecting() ) { - m_staticTextValidate->SetLabel( _("Incorrect polygon: self intersecting" ) ); + m_warningText->SetLabel( _("Polygon may not be self-intersecting" ) ); valid = false; } - if( valid ) - m_staticTextValidate->SetLabel( _("Polygon:" ) ); + m_warningIcon->Show( !valid ); + m_warningText->Show( !valid ); - if( polyline.PointCount() != (int)m_currshape.m_Poly.size() ) - { // Happens after simplification - m_currshape.m_Poly.clear(); + if( aRemoveRedundantCorners ) + { + if( polyline.PointCount() != (int)m_currshape.m_Poly.size() ) + { // Happens after simplification + m_currshape.m_Poly.clear(); - for( int ii = 0; ii < polyline.PointCount(); ++ii ) - m_currshape.m_Poly.push_back( wxPoint( polyline.CPoint( ii ).x, polyline.CPoint( ii ).y ) ); + for( int ii = 0; ii < polyline.PointCount(); ++ii ) + m_currshape.m_Poly.push_back( wxPoint( polyline.CPoint( ii ).x, polyline.CPoint( ii ).y ) ); - m_staticTextValidate->SetLabel( _("Polygon: redundant corners removed" ) ); + m_warningIcon->Show( true ); + m_warningText->Show( true ); + m_warningText->SetLabel( _("Note: redundant corners removed" ) ); + } } return valid; } -void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onButtonAdd( wxCommandEvent& event ) +void DIALOG_PAD_PRIMITIVE_POLY_PROPS::OnButtonAdd( wxCommandEvent& event ) { + // Commit any pending edits + m_gridCornersList->DisableCellEditControl(); + // Insert a new corner after the currently selected: + wxArrayInt selections = m_gridCornersList->GetSelectedRows(); int row = -1; - if( m_gridCornersList->GetNumberRows() ) - { - wxArrayInt selections = m_gridCornersList->GetSelectedRows(); - - if( selections.size() > 0 ) - { - std::sort( selections.begin(), selections.end() ); - row = selections[0]; - } - else - { - row = m_gridCornersList->GetGridCursorRow(); - } - - if( row < 0 ) - { - wxMessageBox( _( "Select a corner before adding a new corner" ) ); - return; - } - } - else + if( m_gridCornersList->GetNumberRows() == 0 ) row = 0; - - m_gridCornersList->SelectRow( row, false ); - - if( m_currshape.m_Poly.size() == 0 ) - m_currshape.m_Poly.push_back( wxPoint(0,0) ); + else if( selections.size() > 0 ) + row = selections[ selections.size() - 1 ] + 1; else - m_currshape.m_Poly.insert( m_currshape.m_Poly.begin() + row + 1, wxPoint(0,0) ); + row = m_gridCornersList->GetGridCursorRow() + 1; + if( row < 0 ) + { + wxMessageBox( _( "Select a corner to add the new corner after." ) ); + return; + } + + if( m_currshape.m_Poly.size() == 0 || row >= (int) m_currshape.m_Poly.size() ) + m_currshape.m_Poly.push_back( wxPoint( 0, 0 ) ); + else + m_currshape.m_Poly.insert( m_currshape.m_Poly.begin() + row, wxPoint( 0, 0 ) ); + + Validate(); TransferDataToWindow(); + m_gridCornersList->ForceRefresh(); + // Select the new row + m_gridCornersList->SelectRow( row, false ); + m_panelPoly->Refresh(); } void DIALOG_PAD_PRIMITIVE_POLY_PROPS::OnButtonDelete( wxCommandEvent& event ) { - wxArrayInt selections = m_gridCornersList->GetSelectedRows(); - std::sort( selections.begin(), selections.end() ); + // Commit any pending edits + m_gridCornersList->DisableCellEditControl(); - // remove corners: - for( int ii = selections.size()-1; ii >= 0 ; --ii ) + wxArrayInt selections = m_gridCornersList->GetSelectedRows(); + + if( m_gridCornersList->GetNumberRows() == 0 ) + return; + + if( selections.size() == 0 && m_gridCornersList->GetGridCursorRow() >= 0 ) + selections.push_back( m_gridCornersList->GetGridCursorRow() ); + + if( selections.size() == 0 ) { - m_currshape.m_Poly.erase( m_currshape.m_Poly.begin() + selections[ii] ); + wxMessageBox( _( "Select a corner to delete." ) ); + return; } - // Unselect all raws: - m_gridCornersList->SelectRow( -1, false ); + // remove corners: + std::sort( selections.begin(), selections.end() ); + for( int ii = selections.size()-1; ii >= 0 ; --ii ) + m_currshape.m_Poly.erase( m_currshape.m_Poly.begin() + selections[ii] ); + + Validate(); TransferDataToWindow(); + m_gridCornersList->ForceRefresh(); + // select the row previous to the last deleted row + m_gridCornersList->SelectRow( std::max( 0, selections[ 0 ] - 1 ) ); + m_panelPoly->Refresh(); } @@ -464,22 +477,19 @@ void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onGridSelect( wxGridRangeSelectEvent& even void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging( wxGridEvent& event ) { - int row = event.GetRow(); - int col = event.GetCol(); - + int row = event.GetRow(); + int col = event.GetCol(); wxString msg = event.GetString(); if( msg.IsEmpty() ) return; - int value = ValueFromString( g_UserUnit, msg ); - if( col == 0 ) // Set the X value - m_currshape.m_Poly[row].x = value; + m_currshape.m_Poly[row].x = ValueFromString( GetUserUnits(), msg, true ); else // Set the Y value - m_currshape.m_Poly[row].y = value; + m_currshape.m_Poly[row].y = ValueFromString( GetUserUnits(), msg, true ); - m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() ); + m_currshape.m_Thickness = m_thickness.GetValue(); Validate(); @@ -489,13 +499,17 @@ void DIALOG_PAD_PRIMITIVE_POLY_PROPS::onCellChanging( wxGridEvent& event ) // A dialog to apply geometry transforms to a shape or set of shapes // (move, rotate around origin, scaling factor, duplication). -DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM( - wxWindow* aParent, - std::vector& aList, bool aShowDuplicate ) - :DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( aParent ), m_list( aList ) +DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aParent, + PCB_BASE_FRAME* aFrame, + std::vector& aList, + bool aShowDuplicate ) : + DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( aParent ), + m_list( aList ), + m_vectorX( aFrame, m_xLabel, m_xCtrl, m_xUnits, true ), + m_vectorY( aFrame, m_yLabel, m_yCtrl, m_yUnits, true ), + m_rotation( aFrame, m_rotationLabel, m_rotationCtrl, m_rotationUnits ) { - wxString unit = GetAbbreviatedUnitsLabel(); - m_staticTextMoveUnit->SetLabel( unit ); + m_rotation.SetUnits( DEGREES ); if( !aShowDuplicate ) // means no duplicate transform { @@ -507,6 +521,7 @@ DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM( GetSizer()->SetSizeHints( this ); } + // A helper function in geometry transform inline void geom_transf( wxPoint& aCoord, wxPoint& aMove, double aScale, double aRotation ) { @@ -516,19 +531,14 @@ inline void geom_transf( wxPoint& aCoord, wxPoint& aMove, double aScale, double RotatePoint( &aCoord, aRotation ); } + void DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform( std::vector* aList, int aDuplicateCount ) { - // Get parameters from dlg: - wxPoint move_vect; - move_vect.x = ValueFromString( g_UserUnit, m_textCtrMoveX->GetValue() ); - move_vect.y = ValueFromString( g_UserUnit, m_textCtrMoveY->GetValue() ); - wxPoint currMoveVect = move_vect; + wxPoint move_vect( m_vectorX.GetValue(), m_vectorY.GetValue() ); + double rotation = m_rotation.GetValue() / 10.0; + double scale = DoubleValueFromString( UNSCALED_UNITS, m_scaleCtrl->GetValue() ); - double rotation = DoubleValueFromString( DEGREES, m_textCtrAngle->GetValue() ); - double curr_rotation = rotation; - double scale = DoubleValueFromString( UNSCALED_UNITS, m_textCtrlScalingFactor->GetValue() ); - - // Avoid too small /too large scale, which could create issues: + // Avoid too small / too large scale, which could create issues: if( scale < 0.01 ) scale = 0.01; @@ -539,6 +549,10 @@ void DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform( std::vector* // shapes are scaled, then moved then rotated. // if aList != NULL, the initial shape will be duplicated, and transform // applied to the duplicated shape + + wxPoint currMoveVect = move_vect; + double curr_rotation = rotation; + do { for( unsigned idx = 0; idx < m_list.size(); ++idx ) { diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index cfc1b05a2c..f8e86a0df0 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -47,13 +47,15 @@ #include #include #include +#include #include #include // list of pad shapes, ordered like the pad shape wxChoice in dialog. -static PAD_SHAPE_T code_shape[] = { +static PAD_SHAPE_T code_shape[] = +{ PAD_SHAPE_CIRCLE, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, @@ -65,7 +67,8 @@ static PAD_SHAPE_T code_shape[] = { // the ordered index of the pad shape wxChoice in dialog. // keep it consistent with code_shape[] and dialog strings -enum CODE_CHOICE { +enum CODE_CHOICE +{ CHOICE_SHAPE_CIRCLE = 0, CHOICE_SHAPE_OVAL, CHOICE_SHAPE_RECT, @@ -75,29 +78,21 @@ enum CODE_CHOICE { CHOICE_SHAPE_CUSTOM_RECT_ANCHOR }; - - -static PAD_ATTR_T code_type[] = { +static PAD_ATTR_T code_type[] = +{ PAD_ATTRIB_STANDARD, PAD_ATTRIB_SMD, PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED }; - // Default mask layers setup for pads according to the pad type -static const LSET std_pad_layers[] = { - // PAD_ATTRIB_STANDARD: - D_PAD::StandardMask(), - - // PAD_ATTRIB_SMD: - D_PAD::SMDMask(), - - // PAD_ATTRIB_CONN: - D_PAD::ConnSMDMask(), - - // PAD_ATTRIB_HOLE_NOT_PLATED: - D_PAD::UnplatedHoleMask() +static const LSET std_pad_layers[] = +{ + D_PAD::StandardMask(), // PAD_ATTRIB_STANDARD: + D_PAD::SMDMask(), // PAD_ATTRIB_SMD: + D_PAD::ConnSMDMask(), // PAD_ATTRIB_CONN: + D_PAD::UnplatedHoleMask() // PAD_ATTRIB_HOLE_NOT_PLATED: }; @@ -110,20 +105,38 @@ void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* aPad ) DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) : DIALOG_PAD_PROPERTIES_BASE( aParent ), - m_OrientValidator( 1, &m_OrientValue ) + m_parent( aParent ), + m_canUpdate( false ), + m_posX( aParent, m_posXLabel, m_posXCtrl, m_posXUnits ), + m_posY( aParent, m_posYLabel, m_posYCtrl, m_posYUnits ), + m_sizeX( aParent, m_sizeXLabel, m_sizeXCtrl, m_sizeXUnits, true ), + m_sizeY( aParent, m_sizeYLabel, m_sizeYCtrl, m_sizeYUnits, true ), + m_offsetX( aParent, m_offsetXLabel, m_offsetXCtrl, m_offsetXUnits, true ), + m_offsetY( aParent, m_offsetYLabel, m_offsetYCtrl, m_offsetYUnits, true ), + m_padToDie( aParent, m_padToDieLabel, m_padToDieCtrl, m_padToDieUnits, true ), + m_trapDelta( aParent, m_trapDeltaLabel, m_trapDeltaCtrl, m_trapDeltaUnits, true ), + m_cornerRadius( aParent, m_cornerRadiusLabel, m_cornerRadiusValue, m_cornerRadiusUnits, true ), + m_holeX( aParent, m_holeXLabel, m_holeXCtrl, m_holeXUnits, true, 0 ), + m_holeY( aParent, m_holeYLabel, m_holeYCtrl, m_holeYUnits, true, 0 ), + m_OrientValidator( 1, &m_OrientValue ), + m_clearance( aParent, m_clearanceLabel, m_clearanceCtrl, m_clearanceUnits, true ), + m_maskClearance( aParent, m_maskClearanceLabel, m_maskClearanceCtrl, m_maskClearanceUnits, true ), + m_pasteClearance( aParent, m_pasteClearanceLabel, m_pasteClearanceCtrl, m_pasteClearanceUnits, true ), + m_spokeWidth( aParent, m_spokeWidthLabel, m_spokeWidthCtrl, m_spokeWidthUnits, true, 0 ), + m_thermalGap( aParent, m_thermalGapLabel, m_thermalGapCtrl, m_thermalGapUnits, true, 0 ) { - m_canUpdate = false; - m_parent = aParent; m_currentPad = aPad; // aPad can be NULL, if the dialog is called // from the footprint editor to set default pad setup m_board = m_parent->GetBoard(); - m_OrientValidator.SetRange( -360.0, 360.0 ); - m_PadOrientCtrl->SetValidator( m_OrientValidator ); - m_OrientValidator.SetWindow( m_PadOrientCtrl ); + m_PadNetNameCombo->SetBoard( m_board ); - m_cbShowPadOutline->SetValue( m_drawPadOutlineMode ); + m_OrientValidator.SetRange( -360.0, 360.0 ); + m_orientation->SetValidator( m_OrientValidator ); + m_OrientValidator.SetWindow( m_orientation ); + + m_cbShowPadOutline->SetValue( m_sketchPreview ); m_FlippedWarningIcon->SetBitmap( KiBitmap( dialog_warning_xpm ) ); m_nonCopperWarningIcon->SetBitmap( KiBitmap( dialog_warning_xpm ) ); @@ -152,6 +165,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP // Initialize canvas to be able to display the dummy pad: prepareCanvas(); + SetInitialFocus( m_PadNumCtrl ); m_sdbSizerOK->SetDefault(); m_canUpdate = true; @@ -159,13 +173,11 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP FinishDialogSettings(); } -bool DIALOG_PAD_PROPERTIES::m_drawPadOutlineMode = false; // Stores the pad draw option during a session +bool DIALOG_PAD_PROPERTIES::m_sketchPreview = false; // Stores the pad draw option during a session void DIALOG_PAD_PROPERTIES::OnInitDialog( wxInitDialogEvent& event ) { - m_PadNumCtrl->SetFocus(); - m_PadNumCtrl->SetSelection( -1, -1 ); m_selectedColor = COLOR4D( 1.0, 1.0, 1.0, 0.7 ); // Needed on some WM to be sure the pad is redrawn according to the final size @@ -208,8 +220,7 @@ void DIALOG_PAD_PROPERTIES::prepareCanvas() // or be a complex shape. KIGFX::COLOR4D axis_color = LIGHTBLUE; - m_axisOrigin = new KIGFX::ORIGIN_VIEWITEM( axis_color, - KIGFX::ORIGIN_VIEWITEM::CROSS, + m_axisOrigin = new KIGFX::ORIGIN_VIEWITEM( axis_color, KIGFX::ORIGIN_VIEWITEM::CROSS, Millimeter2iu( 0.2 ), VECTOR2D( m_dummyPad->GetPosition() ) ); m_axisOrigin->SetDrawAtZero( true ); @@ -260,14 +271,10 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) COLOR4D color = COLOR4D::BLACK; if( m_dummyPad->GetLayerSet()[F_Cu] ) - { color = m_parent->Settings().Colors().GetItemColor( LAYER_PAD_FR ); - } if( m_dummyPad->GetLayerSet()[B_Cu] ) - { color = color.LegacyMix( m_parent->Settings().Colors().GetItemColor( LAYER_PAD_BK ) ); - } // What could happen: the pad color is *actually* black, or no // copper was selected @@ -279,7 +286,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) drawInfo.m_Offset = m_dummyPad->GetPosition(); drawInfo.m_Display_padnum = true; drawInfo.m_Display_netname = true; - drawInfo.m_ShowPadFilled = !m_drawPadOutlineMode; + drawInfo.m_ShowPadFilled = !m_sketchPreview; if( m_dummyPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) drawInfo.m_ShowNotPlatedHole = true; @@ -358,7 +365,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) switch( primitive.m_Shape ) { case S_SEGMENT: // usual segment : line with rounded ends - if( !m_drawPadOutlineMode ) + if( !m_sketchPreview ) GRFilledSegment( NULL, &dc, dummySegment.GetStart(), dummySegment.GetEnd(), primitive.m_Thickness, m_selectedColor ); else @@ -367,7 +374,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) break; case S_ARC: // Arc with rounded ends - if( !m_drawPadOutlineMode ) + if( !m_sketchPreview ) GRArc1( NULL, &dc, dummySegment.GetArcEnd(), dummySegment.GetArcStart(), dummySegment.GetCenter(), primitive.m_Thickness, m_selectedColor ); else @@ -382,35 +389,32 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) case S_CIRCLE: // ring or circle if( primitive.m_Thickness ) { - if( !m_drawPadOutlineMode ) - GRCircle( NULL, &dc, dummySegment.GetCenter(), primitive.m_Radius, + if( !m_sketchPreview ) + GRCircle( nullptr, &dc, dummySegment.GetCenter(), primitive.m_Radius, primitive.m_Thickness, m_selectedColor ); else { - GRCircle( NULL, &dc, dummySegment.GetCenter(), - primitive.m_Radius + primitive.m_Thickness/2, 0, - m_selectedColor ); - GRCircle( NULL, &dc, dummySegment.GetCenter(), - primitive.m_Radius - primitive.m_Thickness/2, 0, - m_selectedColor ); + GRCircle( nullptr, &dc, dummySegment.GetCenter(), + primitive.m_Radius + primitive.m_Thickness/2, 0, m_selectedColor ); + GRCircle( nullptr, &dc, dummySegment.GetCenter(), + primitive.m_Radius - primitive.m_Thickness/2, 0, m_selectedColor ); } } else { - if( !m_drawPadOutlineMode ) - GRFilledCircle( NULL, &dc, dummySegment.GetCenter(), - primitive.m_Radius, m_selectedColor ); + if( !m_sketchPreview ) + GRFilledCircle( nullptr, &dc, dummySegment.GetCenter(), primitive.m_Radius, + m_selectedColor ); else - GRCircle( NULL, &dc, dummySegment.GetCenter(), - primitive.m_Radius, 0, m_selectedColor ); + GRCircle( nullptr, &dc, dummySegment.GetCenter(), primitive.m_Radius, 0, + m_selectedColor ); } break; case S_POLYGON: // polygon { std::vector poly = dummySegment.BuildPolyPointsList(); - GRClosedPoly( NULL, &dc, poly.size(), &poly[0], - m_drawPadOutlineMode ? false : true, + GRClosedPoly( nullptr, &dc, poly.size(), &poly[0], !m_sketchPreview, primitive.m_Thickness, m_selectedColor, m_selectedColor ); } break; @@ -424,11 +428,9 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) // Draw X and Y axis. This is particularly useful to show the // reference position of pads with offset and no hole, or custom pad shapes - const int linethickness = 0; - GRLine( NULL, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0, - linethickness, LIGHTBLUE ); // X axis - GRLine( NULL, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ), - linethickness, LIGHTBLUE ); // Y axis + const int t = 0; // line thickness + GRLine( nullptr, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0, t, LIGHTBLUE ); + GRLine( nullptr, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ), t, LIGHTBLUE ); event.Skip(); } @@ -436,25 +438,23 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues() { - // Note: - // To avoid generating a wxEVT_TEXT event from m_tcCornerSizeRatio - // we use ChangeValue instead of SetValue, to set the displayed string + // Note: use m_tcCornerSizeRatio->ChangeValue() to avoid generating a wxEVT_TEXT event + if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT ) { - m_tcCornerSizeRatio->ChangeValue( wxString::Format( "%.1f", - m_dummyPad->GetRoundRectRadiusRatio()*100 ) ); - m_staticTextCornerRadiusValue->SetLabel( StringFromValue( g_UserUnit, - m_dummyPad->GetRoundRectCornerRadius() ) ); + auto ratio = wxString::Format( "%.1f", m_dummyPad->GetRoundRectRadiusRatio() * 100 ); + m_tcCornerSizeRatio->ChangeValue( ratio ); + m_cornerRadius.SetValue( m_dummyPad->GetRoundRectCornerRadius() ); } else if( m_dummyPad->GetShape() == PAD_SHAPE_RECT ) { m_tcCornerSizeRatio->ChangeValue( "0" ); - m_staticTextCornerRadiusValue->SetLabel( "0" ); + m_cornerRadius.SetValue( 0 ); } else { m_tcCornerSizeRatio->ChangeValue( wxEmptyString ); - m_staticTextCornerRadiusValue->SetLabel( wxEmptyString ); + m_cornerRadius.SetValue( wxEmptyString ); } } @@ -483,8 +483,7 @@ void DIALOG_PAD_PROPERTIES::onCornerSizePercentChange( wxCommandEvent& event ) } transferDataToPad( m_dummyPad ); - m_staticTextCornerRadiusValue->SetLabel( StringFromValue( g_UserUnit, - m_dummyPad->GetRoundRectCornerRadius() ) ); + m_cornerRadius.SetValue( m_dummyPad->GetRoundRectCornerRadius() ); redraw(); } } @@ -523,20 +522,19 @@ void DIALOG_PAD_PROPERTIES::initValues() { m_isFlipped = m_currentPad->IsFlipped(); - if( m_isFlipped ) - m_staticModuleSideValue->SetLabel( _( "Back side (footprint is mirrored)" ) ); - else - m_staticModuleSideValue->SetLabel( _( "Front side" ) ); - - // Diplay footprint rotation ( angles are in 0.1 degree ) + // Diplay parent footprint info MODULE* footprint = m_currentPad->GetParent(); + wxString msg1, msg2; if( footprint ) - msg.Printf( "%.1f", footprint->GetOrientationDegrees() ); - else - msg = _("No footprint" ); + { + wxString side = footprint->IsFlipped() ? _( "back side (mirrored)" ) : _( "front side" ); + msg1.Printf( _("Footprint %s (%s),"), footprint->GetReference(), footprint->GetValue() ); + msg2.Printf( _("%s, rotated %.1f deg"), side, footprint->GetOrientation() / 10.0 ); + } - m_staticModuleRotValue->SetLabel( msg ); + m_parentInfoLine1->SetLabel( msg1 ); + m_parentInfoLine2->SetLabel( msg2 ); } if( m_isFlipped ) @@ -561,59 +559,43 @@ void DIALOG_PAD_PROPERTIES::initValues() m_FlippedWarningSizer->Show( m_isFlipped ); m_PadNumCtrl->SetValue( m_dummyPad->GetName() ); - m_PadNetNameCtrl->SetValue( m_dummyPad->GetNetname() ); - - // Set the unit name in dialog: - wxStaticText* unitTexts[] = - { - m_PadPosX_Unit, m_PadPosY_Unit, - m_PadDrill_X_Unit, m_PadDrill_Y_Unit, - m_PadShapeSizeX_Unit, m_PadShapeSizeY_Unit, - m_PadShapeOffsetX_Unit,m_PadShapeOffsetY_Unit, - m_PadShapeDelta_Unit, m_PadLengthDie_Unit, - m_NetClearanceUnits, m_SolderMaskMarginUnits, m_SolderPasteMarginUnits, - m_ThermalWidthUnits, m_ThermalGapUnits, m_staticTextCornerSizeUnit - }; - - for( unsigned ii = 0; ii < DIM( unitTexts ); ++ii ) - unitTexts[ii]->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) ); + m_PadNetNameCombo->SetSelectedNet( m_dummyPad->GetNetCode() ); // Display current pad parameters units: - PutValueInLocalUnits( *m_PadPosition_X_Ctrl, m_dummyPad->GetPosition().x ); - PutValueInLocalUnits( *m_PadPosition_Y_Ctrl, m_dummyPad->GetPosition().y ); + m_posX.SetValue( m_dummyPad->GetPosition().x ); + m_posY.SetValue( m_dummyPad->GetPosition().y ); - PutValueInLocalUnits( *m_PadDrill_X_Ctrl, m_dummyPad->GetDrillSize().x ); - PutValueInLocalUnits( *m_PadDrill_Y_Ctrl, m_dummyPad->GetDrillSize().y ); + m_holeX.SetValue( m_dummyPad->GetDrillSize().x ); + m_holeY.SetValue( m_dummyPad->GetDrillSize().y ); - PutValueInLocalUnits( *m_ShapeSize_X_Ctrl, m_dummyPad->GetSize().x ); - PutValueInLocalUnits( *m_ShapeSize_Y_Ctrl, m_dummyPad->GetSize().y ); + m_sizeX.SetValue( m_dummyPad->GetSize().x ); + m_sizeY.SetValue( m_dummyPad->GetSize().y ); - PutValueInLocalUnits( *m_ShapeOffset_X_Ctrl, m_dummyPad->GetOffset().x ); - PutValueInLocalUnits( *m_ShapeOffset_Y_Ctrl, m_dummyPad->GetOffset().y ); + m_offsetX.SetValue( m_dummyPad->GetOffset().x ); + m_offsetY.SetValue( m_dummyPad->GetOffset().y ); if( m_dummyPad->GetDelta().x ) { - PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().x ); - m_trapDeltaDirChoice->SetSelection( 0 ); + m_trapDelta.SetValue( m_dummyPad->GetDelta().x ); + m_trapAxisCtrl->SetSelection( 0 ); } else { - PutValueInLocalUnits( *m_ShapeDelta_Ctrl, m_dummyPad->GetDelta().y ); - m_trapDeltaDirChoice->SetSelection( 1 ); + m_trapDelta.SetValue( m_dummyPad->GetDelta().y ); + m_trapAxisCtrl->SetSelection( 1 ); } - PutValueInLocalUnits( *m_LengthPadToDieCtrl, m_dummyPad->GetPadToDieLength() ); + m_padToDie.SetValue( m_dummyPad->GetPadToDieLength() ); - PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->GetLocalClearance() ); - PutValueInLocalUnits( *m_SolderMaskMarginCtrl, m_dummyPad->GetLocalSolderMaskMargin() ); - PutValueInLocalUnits( *m_ThermalWidthCtrl, m_dummyPad->GetThermalWidth() ); - PutValueInLocalUnits( *m_ThermalGapCtrl, m_dummyPad->GetThermalGap() ); - - // These 2 parameters are usually < 0, so prepare entering a negative value, if current is 0 - PutValueInLocalUnits( *m_SolderPasteMarginCtrl, m_dummyPad->GetLocalSolderPasteMargin() ); + m_clearance.SetValue( m_dummyPad->GetLocalClearance() ); + m_maskClearance.SetValue( m_dummyPad->GetLocalSolderMaskMargin() ); + m_spokeWidth.SetValue( m_dummyPad->GetThermalWidth() ); + m_thermalGap.SetValue( m_dummyPad->GetThermalGap() ); + m_pasteClearance.SetValue( m_dummyPad->GetLocalSolderPasteMargin() ); + // Prefer "-0" to "0" for normally negative values if( m_dummyPad->GetLocalSolderPasteMargin() == 0 ) - m_SolderPasteMarginCtrl->SetValue( wxT( "-" ) + m_SolderPasteMarginCtrl->GetValue() ); + m_pasteClearanceCtrl->SetValue( wxT( "-" ) + m_pasteClearanceCtrl->GetValue() ); msg.Printf( wxT( "%f" ), m_dummyPad->GetLocalSolderPasteMarginRatio() * 100.0 ); @@ -674,52 +656,17 @@ void DIALOG_PAD_PROPERTIES::initValues() setPadLayersList( m_dummyPad->GetLayerSet() ); // Pad Orient - switch( int( angle ) ) - { - case 0: - m_PadOrient->SetSelection( 0 ); - break; - - case 900: - m_PadOrient->SetSelection( 1 ); - break; - - case -900: - m_PadOrient->SetSelection( 2 ); - break; - - case 1800: - case -1800: - m_PadOrient->SetSelection( 3 ); - break; - - default: - m_PadOrient->SetSelection( 4 ); - break; - } + // Note: use ChangeValue() instead of SetValue() so that we don't generate events + m_orientation->ChangeValue( StringFromValue( DEGREES, angle ) ); switch( m_dummyPad->GetShape() ) { default: - case PAD_SHAPE_CIRCLE: - m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE ); - break; - - case PAD_SHAPE_OVAL: - m_PadShape->SetSelection( CHOICE_SHAPE_OVAL ); - break; - - case PAD_SHAPE_RECT: - m_PadShape->SetSelection( CHOICE_SHAPE_RECT ); - break; - - case PAD_SHAPE_TRAPEZOID: - m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID ); - break; - - case PAD_SHAPE_ROUNDRECT: - m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT ); - break; + case PAD_SHAPE_CIRCLE: m_PadShape->SetSelection( CHOICE_SHAPE_CIRCLE ); break; + case PAD_SHAPE_OVAL: m_PadShape->SetSelection( CHOICE_SHAPE_OVAL ); break; + case PAD_SHAPE_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_RECT ); break; + case PAD_SHAPE_TRAPEZOID: m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID ); break; + case PAD_SHAPE_ROUNDRECT: m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT ); break; case PAD_SHAPE_CUSTOM: if( m_dummyPad->GetAnchorPadShape() == PAD_SHAPE_RECT ) @@ -731,8 +678,6 @@ void DIALOG_PAD_PROPERTIES::initValues() enablePrimitivePage( PAD_SHAPE_CUSTOM == m_dummyPad->GetShape() ); - m_OrientValue = angle / 10.0; - // Type of pad selection m_PadType->SetSelection( 0 ); @@ -745,18 +690,19 @@ void DIALOG_PAD_PROPERTIES::initValues() } } - // Enable/disable Pad name,and pad length die - // (disable for NPTH pads (mechanical pads) + // Disable Pad name,and pad to die length for NPTH pads (mechanical pads) bool enable = m_dummyPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED; + m_PadNumText->Enable( enable ); m_PadNumCtrl->Enable( enable ); - m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL ); - m_LengthPadToDieCtrl->Enable( enable ); + m_PadNameText->Enable( enable && m_canEditNetName && m_currentPad ); + m_PadNetNameCombo->Enable( enable && m_canEditNetName && m_currentPad ); + m_padToDie.Enable( enable ); if( m_dummyPad->GetDrillShape() != PAD_DRILL_SHAPE_OBLONG ) - m_DrillShapeCtrl->SetSelection( 0 ); + m_holeShapeCtrl->SetSelection( 0 ); else - m_DrillShapeCtrl->SetSelection( 1 ); + m_holeShapeCtrl->SetSelection( 1 ); // Update some dialog widgets state (Enable/disable options): wxCommandEvent cmd_event; @@ -858,7 +804,7 @@ void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event ) void DIALOG_PAD_PROPERTIES::onChangePadMode( wxCommandEvent& event ) { - m_drawPadOutlineMode = m_cbShowPadOutline->GetValue(); + m_sketchPreview = m_cbShowPadOutline->GetValue(); if( m_parent->IsGalCanvasActive() ) { @@ -868,10 +814,10 @@ void DIALOG_PAD_PROPERTIES::onChangePadMode( wxCommandEvent& event ) KIGFX::PCB_RENDER_SETTINGS* settings = static_cast( view->GetPainter()->GetSettings() ); - settings->SetSketchMode( LAYER_PADS_TH, m_drawPadOutlineMode ); - settings->SetSketchMode( LAYER_PAD_FR, m_drawPadOutlineMode ); - settings->SetSketchMode( LAYER_PAD_BK, m_drawPadOutlineMode ); - settings->SetSketchModeGraphicItems( m_drawPadOutlineMode ); + settings->SetSketchMode( LAYER_PADS_TH, m_sketchPreview ); + settings->SetSketchMode( LAYER_PAD_FR, m_sketchPreview ); + settings->SetSketchMode( LAYER_PAD_BK, m_sketchPreview ); + settings->SetSketchModeGraphicItems( m_sketchPreview ); } redraw(); @@ -885,43 +831,48 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) switch( m_PadShape->GetSelection() ) { case CHOICE_SHAPE_CIRCLE: - m_ShapeDelta_Ctrl->Enable( false ); - m_trapDeltaDirChoice->Enable( false ); - m_ShapeSize_Y_Ctrl->Enable( false ); - m_ShapeOffset_X_Ctrl->Enable( false ); - m_ShapeOffset_Y_Ctrl->Enable( false ); + m_trapDelta.Enable( false ); + m_trapAxisLabel->Enable( false ); + m_trapAxisCtrl->Enable( false ); + m_holeY.Enable( false ); + m_offsetX.Enable( false ); + m_offsetY.Enable( false ); break; case CHOICE_SHAPE_OVAL: - m_ShapeDelta_Ctrl->Enable( false ); - m_trapDeltaDirChoice->Enable( false ); - m_ShapeSize_Y_Ctrl->Enable( true ); - m_ShapeOffset_X_Ctrl->Enable( true ); - m_ShapeOffset_Y_Ctrl->Enable( true ); + m_trapDelta.Enable( false ); + m_trapAxisLabel->Enable( false ); + m_trapAxisCtrl->Enable( false ); + m_holeY.Enable( true ); + m_offsetX.Enable( true ); + m_offsetY.Enable( true ); break; case CHOICE_SHAPE_RECT: - m_ShapeDelta_Ctrl->Enable( false ); - m_trapDeltaDirChoice->Enable( false ); - m_ShapeSize_Y_Ctrl->Enable( true ); - m_ShapeOffset_X_Ctrl->Enable( true ); - m_ShapeOffset_Y_Ctrl->Enable( true ); + m_trapDelta.Enable( false ); + m_trapAxisLabel->Enable( false ); + m_trapAxisCtrl->Enable( false ); + m_holeY.Enable( true ); + m_offsetX.Enable( true ); + m_offsetY.Enable( true ); break; case CHOICE_SHAPE_TRAPEZOID: - m_ShapeDelta_Ctrl->Enable( true ); - m_trapDeltaDirChoice->Enable( true ); - m_ShapeSize_Y_Ctrl->Enable( true ); - m_ShapeOffset_X_Ctrl->Enable( true ); - m_ShapeOffset_Y_Ctrl->Enable( true ); + m_trapDelta.Enable( true ); + m_trapAxisLabel->Enable( true ); + m_trapAxisCtrl->Enable( true ); + m_holeY.Enable( true ); + m_offsetX.Enable( true ); + m_offsetY.Enable( true ); break; case CHOICE_SHAPE_ROUNDRECT: - m_ShapeDelta_Ctrl->Enable( false ); - m_trapDeltaDirChoice->Enable( false ); - m_ShapeSize_Y_Ctrl->Enable( true ); - m_ShapeOffset_X_Ctrl->Enable( true ); - m_ShapeOffset_Y_Ctrl->Enable( true ); + m_trapDelta.Enable( false ); + m_trapAxisLabel->Enable( false ); + m_trapAxisCtrl->Enable( false ); + m_holeY.Enable( true ); + m_offsetX.Enable( true ); + m_offsetY.Enable( true ); // Ensure m_tcCornerSizeRatio contains the right value: m_tcCornerSizeRatio->ChangeValue( wxString::Format( "%.1f", m_dummyPad->GetRoundRectRadiusRatio()*100 ) ); @@ -930,27 +881,30 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) case CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR: // PAD_SHAPE_CUSTOM, circular anchor case CHOICE_SHAPE_CUSTOM_RECT_ANCHOR: // PAD_SHAPE_CUSTOM, rect anchor is_custom = true; - m_ShapeDelta_Ctrl->Enable( false ); - m_trapDeltaDirChoice->Enable( false ); - m_ShapeSize_Y_Ctrl->Enable( - m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR ); - m_ShapeOffset_X_Ctrl->Enable( false ); - m_ShapeOffset_Y_Ctrl->Enable( false ); + m_trapDelta.Enable( false ); + m_trapAxisLabel->Enable( false ); + m_trapAxisCtrl->Enable( false ); + m_holeY.Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR ); + m_offsetX.Enable( false ); + m_offsetY.Enable( false ); break; } enablePrimitivePage( is_custom ); // A few widgets are enabled only for rounded rect pads: + m_staticTextCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); m_tcCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); + m_staticTextCornerSizeRatioUnit->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); + m_cornerRadius.Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); // PAD_SHAPE_CUSTOM type has constraints for zone connection and thermal shape: // only not connected or solid connection is allowed to avoid destroying the shape. // Enable/disable options only available for custom shaped pads m_ZoneConnectionChoice->Enable( !is_custom ); m_ZoneConnectionCustom->Enable( is_custom ); - m_ThermalWidthCtrl->Enable( !is_custom ); - m_ThermalGapCtrl->Enable( !is_custom ); + m_spokeWidth.Enable( !is_custom ); + m_thermalGap.Enable( !is_custom ); m_sbSizerZonesSettings->Show( !is_custom ); m_sbSizerCustomShapedZonesSettings->Show( is_custom ); @@ -967,21 +921,21 @@ void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event ) if( m_PadType->GetSelection() == 1 || m_PadType->GetSelection() == 2 ) { // pad type = SMD or CONN: no hole allowed - m_PadDrill_X_Ctrl->Enable( false ); - m_PadDrill_Y_Ctrl->Enable( false ); + m_holeX.Enable( false ); + m_holeY.Enable( false ); } else { - switch( m_DrillShapeCtrl->GetSelection() ) + switch( m_holeShapeCtrl->GetSelection() ) { case 0: //CIRCLE: - m_PadDrill_X_Ctrl->Enable( true ); - m_PadDrill_Y_Ctrl->Enable( false ); + m_holeX.Enable( true ); + m_holeY.Enable( false ); break; - case 1: //OVALE: - m_PadDrill_X_Ctrl->Enable( true ); - m_PadDrill_Y_Ctrl->Enable( true ); + case 1: //OVAL: + m_holeX.Enable( true ); + m_holeY.Enable( true ); break; } } @@ -993,31 +947,6 @@ void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event ) { - switch( m_PadOrient->GetSelection() ) - { - case 0: - m_dummyPad->SetOrientation( 0 ); - break; - - case 1: - m_dummyPad->SetOrientation( 900 ); - break; - - case 2: - m_dummyPad->SetOrientation( -900 ); - break; - - case 3: - m_dummyPad->SetOrientation( 1800 ); - break; - - default: - break; - } - - m_OrientValue = m_dummyPad->GetOrientation() / 10.0; - m_OrientValidator.TransferToWindow(); - transferDataToPad( m_dummyPad ); redraw(); } @@ -1034,20 +963,20 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) setPadLayersList( layer_mask ); // Enable/disable drill dialog items: - event.SetId( m_DrillShapeCtrl->GetSelection() ); + event.SetId( m_holeShapeCtrl->GetSelection() ); OnDrillShapeSelected( event ); - if( ii == 0 || ii == DIM( code_type )-1 ) - m_DrillShapeCtrl->Enable( true ); - else - m_DrillShapeCtrl->Enable( false ); + m_holeShapeLabel->Enable( ii == 0 || ii == DIM( code_type ) - 1 ); + m_holeShapeCtrl->Enable( ii == 0 || ii == DIM( code_type ) - 1 ); // Enable/disable Pad name,and pad length die // (disable for NPTH pads (mechanical pads) bool enable = ii != 3; + m_PadNumText->Enable( enable ); m_PadNumCtrl->Enable( enable ); - m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL ); - m_LengthPadToDieCtrl->Enable( enable ); + m_PadNameText->Enable( enable ); + m_PadNetNameCombo->Enable( enable && m_canEditNetName && m_currentPad ); + m_padToDie.Enable( enable ); } @@ -1130,14 +1059,14 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() if( m_dummyPad->GetShape() == PAD_SHAPE_CUSTOM ) error_msgs.Add( _( "Pad local solder mask clearance must be zero or greater than zero" ) ); else - { + { int min_smClearance = -std::min( m_dummyPad->GetSize().x, m_dummyPad->GetSize().y )/2; if( m_dummyPad->GetLocalSolderMaskMargin() <= min_smClearance ) { error_msgs.Add( wxString::Format( _( "Pad local solder mask clearance must be greater than %s" ), - StringFromValue( g_UserUnit, min_smClearance, true ) ) ); + StringFromValue( GetUserUnits(), min_smClearance, true, true ) ) ); } } } @@ -1164,8 +1093,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() { msg += wxT( "

" ); msg += _( "For NPTH pad, set pad size value to pad drill value," - " if you do not want this pad plotted in gerber files" - ); + " if you do not want this pad plotted in gerber files" ); } error_msgs.Add( msg ); @@ -1237,8 +1165,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() if( m_dummyPad->GetShape() == PAD_SHAPE_CUSTOM ) { if( !m_dummyPad->MergePrimitivesAsPolygon( ) ) - error_msgs.Add( - _( "Incorrect pad shape: the shape must be equivalent to only one polygon" ) ); + error_msgs.Add( _( "Incorrect pad shape: the shape must be equivalent to only one polygon" ) ); } @@ -1272,10 +1199,10 @@ void DIALOG_PAD_PROPERTIES::redraw() view->Update( m_dummyPad ); // delete previous items if highlight list - while( m_highligth.size() ) + while( m_highlight.size() ) { - delete m_highligth.back(); // the dtor also removes item from view - m_highligth.pop_back(); + delete m_highlight.back(); // the dtor also removes item from view + m_highlight.pop_back(); } // highlight selected primitives: @@ -1322,7 +1249,7 @@ void DIALOG_PAD_PROPERTIES::redraw() if( dummySegment ) { view->Add( dummySegment ); - m_highligth.push_back( dummySegment ); + m_highlight.push_back( dummySegment ); } select = m_listCtrlPrimitives->GetNextSelected( select ); @@ -1470,25 +1397,16 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow() m_currentPad->SetName( m_padMaster->GetName() ); - wxString padNetname; + int padNetcode = NETINFO_LIST::UNCONNECTED; // For PAD_ATTRIB_HOLE_NOT_PLATED, ensure there is no net name selected if( m_padMaster->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED ) - padNetname = m_PadNetNameCtrl->GetValue(); + padNetcode = m_PadNetNameCombo->GetSelectedNet(); - if( m_currentPad->GetNetname() != padNetname ) + if( m_currentPad->GetNetCode() != padNetcode ) { - const NETINFO_ITEM* netinfo = m_board->FindNet( padNetname ); - - if( !padNetname.IsEmpty() && netinfo == NULL ) - { - DisplayError( NULL, _( "Unknown netname, netname not changed" ) ); - } - else if( netinfo ) - { - rastnestIsChanged = true; - m_currentPad->SetNetCode( netinfo->GetNet() ); - } + rastnestIsChanged = true; + m_currentPad->SetNetCode( padNetcode ); } m_currentPad->SetLocalClearance( m_padMaster->GetLocalClearance() ); @@ -1541,7 +1459,6 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow() bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) { wxString msg; - int x, y; if( !Validate() ) return true; @@ -1561,11 +1478,11 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetPrimitives( m_primitives ); // Read pad clearances values: - aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) ); - aPad->SetLocalSolderMaskMargin( ValueFromTextCtrl( *m_SolderMaskMarginCtrl ) ); - aPad->SetLocalSolderPasteMargin( ValueFromTextCtrl( *m_SolderPasteMarginCtrl ) ); - aPad->SetThermalWidth( ValueFromTextCtrl( *m_ThermalWidthCtrl ) ); - aPad->SetThermalGap( ValueFromTextCtrl( *m_ThermalGapCtrl ) ); + aPad->SetLocalClearance( m_clearance.GetValue() ); + aPad->SetLocalSolderMaskMargin( m_maskClearance.GetValue() ); + aPad->SetLocalSolderPasteMargin( m_pasteClearance.GetValue() ); + aPad->SetThermalWidth( m_spokeWidth.GetValue() ); + aPad->SetThermalGap( m_thermalGap.GetValue() ); double dtmp = 0.0; msg = m_SolderPasteMarginRatioCtrl->GetValue(); msg.ToDouble( &dtmp ); @@ -1583,21 +1500,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) switch( m_ZoneConnectionChoice->GetSelection() ) { default: - case 0: - aPad->SetZoneConnection( PAD_ZONE_CONN_INHERITED ); - break; - - case 1: - aPad->SetZoneConnection( PAD_ZONE_CONN_FULL ); - break; - - case 2: - aPad->SetZoneConnection( PAD_ZONE_CONN_THERMAL ); - break; - - case 3: - aPad->SetZoneConnection( PAD_ZONE_CONN_NONE ); - break; + case 0: aPad->SetZoneConnection( PAD_ZONE_CONN_INHERITED ); break; + case 1: aPad->SetZoneConnection( PAD_ZONE_CONN_FULL ); break; + case 2: aPad->SetZoneConnection( PAD_ZONE_CONN_THERMAL ); break; + case 3: aPad->SetZoneConnection( PAD_ZONE_CONN_NONE ); break; } // Custom shape has only 2 options: @@ -1609,42 +1515,27 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetZoneConnection( PAD_ZONE_CONN_FULL ); } - // Read pad position: - x = ValueFromTextCtrl( *m_PadPosition_X_Ctrl ); - y = ValueFromTextCtrl( *m_PadPosition_Y_Ctrl ); + aPad->SetPosition( wxPoint( m_posX.GetValue(), m_posY.GetValue() ) ); + aPad->SetPos0( wxPoint( m_posX.GetValue(), m_posY.GetValue() ) ); - aPad->SetPosition( wxPoint( x, y ) ); - aPad->SetPos0( wxPoint( x, y ) ); - - // Read pad drill: - x = ValueFromTextCtrl( *m_PadDrill_X_Ctrl ); - y = ValueFromTextCtrl( *m_PadDrill_Y_Ctrl ); - - if( m_DrillShapeCtrl->GetSelection() == 0 ) + if( m_holeShapeCtrl->GetSelection() == 0 ) { aPad->SetDrillShape( PAD_DRILL_SHAPE_CIRCLE ); - y = x; + aPad->SetDrillSize( wxSize( m_holeX.GetValue(), m_holeX.GetValue() ) ); } else + { aPad->SetDrillShape( PAD_DRILL_SHAPE_OBLONG ); - - aPad->SetDrillSize( wxSize( x, y ) ); - - // Read pad shape size: - x = ValueFromTextCtrl( *m_ShapeSize_X_Ctrl ); - y = ValueFromTextCtrl( *m_ShapeSize_Y_Ctrl ); + aPad->SetDrillSize( wxSize( m_holeX.GetValue(), m_holeY.GetValue() ) ); + } if( aPad->GetShape() == PAD_SHAPE_CIRCLE ) - y = x; - - // for custom shped pads, the pad size is the anchor pad size: - if( aPad->GetShape() == PAD_SHAPE_CUSTOM && aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE ) - y = x; - - aPad->SetSize( wxSize( x, y ) ); + aPad->SetSize( wxSize( m_sizeX.GetValue(), m_sizeX.GetValue() ) ); + else + aPad->SetSize( wxSize( m_sizeX.GetValue(), m_sizeY.GetValue() ) ); // Read pad length die - aPad->SetPadToDieLength( ValueFromTextCtrl( *m_LengthPadToDieCtrl ) ); + aPad->SetPadToDieLength( m_padToDie.GetValue() ); // For a trapezoid, test delta value (be sure delta is not too large for pad size) // remember DeltaSize.x is the Y size variation @@ -1656,10 +1547,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // For a trapezoid, only one of delta.x or delta.y is not 0, depending on // the direction. - if( m_trapDeltaDirChoice->GetSelection() == 0 ) - delta.x = ValueFromTextCtrl( *m_ShapeDelta_Ctrl ); + if( m_trapAxisCtrl->GetSelection() == 0 ) + delta.x = m_trapDelta.GetValue(); else - delta.y = ValueFromTextCtrl( *m_ShapeDelta_Ctrl ); + delta.y = m_trapDelta.GetValue(); if( delta.x < 0 && delta.x <= -aPad->GetSize().y ) { @@ -1688,21 +1579,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetDelta( delta ); } - // Read pad shape offset: - x = ValueFromTextCtrl( *m_ShapeOffset_X_Ctrl ); - y = ValueFromTextCtrl( *m_ShapeOffset_Y_Ctrl ); - aPad->SetOffset( wxPoint( x, y ) ); - + aPad->SetOffset( wxPoint( m_offsetX.GetValue(), m_offsetY.GetValue() ) ); aPad->SetOrientation( m_OrientValue * 10.0 ); aPad->SetName( m_PadNumCtrl->GetValue() ); - - // Check if user has set an existing net name - const NETINFO_ITEM* netinfo = m_board->FindNet( m_PadNetNameCtrl->GetValue() ); - - if( netinfo != NULL ) - aPad->SetNetCode( netinfo->GetNet() ); - else - aPad->SetNetCode( NETINFO_LIST::UNCONNECTED ); + aPad->SetNetCode( m_PadNetNameCombo->GetSelectedNet() ); // Clear some values, according to the pad type and shape switch( aPad->GetShape() ) @@ -1710,8 +1590,6 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) case PAD_SHAPE_CIRCLE: aPad->SetOffset( wxPoint( 0, 0 ) ); aPad->SetDelta( wxSize( 0, 0 ) ); - x = aPad->GetSize().x; - aPad->SetSize( wxSize( x, x ) ); break; case PAD_SHAPE_RECT: @@ -1738,16 +1616,12 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) // diameter is acceptable, and is used in Gerber files as flashed area // reference if( aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE ) - { - x = aPad->GetSize().x; - aPad->SetSize( wxSize( x, x ) ); - } + aPad->SetSize( wxSize( m_sizeX.GetValue(), m_sizeX.GetValue() ) ); // define the way the clearance area is defined in zones aPad->SetCustomShapeInZoneOpt( m_ZoneCustomPadShape->GetSelection() == 0 ? CUST_PAD_SHAPE_IN_ZONE_OUTLINE : CUST_PAD_SHAPE_IN_ZONE_CONVEXHULL ); - break; default: @@ -1796,20 +1670,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) switch( m_rbCopperLayersSel->GetSelection() ) { - case 0: - padLayerMask.set( F_Cu ); - break; - - case 1: - padLayerMask.set( B_Cu ); - break; - - case 2: - padLayerMask |= LSET::AllCuMask(); - break; - - case 3: // No copper layers - break; + case 0: padLayerMask.set( F_Cu ); break; + case 1: padLayerMask.set( B_Cu ); break; + case 2: padLayerMask |= LSET::AllCuMask(); break; + case 3: break; // No copper layers } if( m_PadLayerAdhCmp->GetValue() ) @@ -1878,7 +1742,7 @@ void DIALOG_PAD_PROPERTIES::editPrimitive() if( shape.m_Shape == S_POLYGON ) { - DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, &shape ); + DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, m_parent, &shape ); if( dlg.ShowModal() != wxID_OK ) return; @@ -1888,7 +1752,7 @@ void DIALOG_PAD_PROPERTIES::editPrimitive() else { - DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, &shape ); + DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, m_parent, &shape ); if( dlg.ShowModal() != wxID_OK ) return; @@ -1959,31 +1823,25 @@ void DIALOG_PAD_PROPERTIES::onDeletePrimitive( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::onAddPrimitive( wxCommandEvent& event ) { // Ask user for shape type - wxString shapelist[] = - { - _( "Segment" ), _( "Arc" ), _( "ring/circle" ), _( "polygon" ) - }; + wxString shapelist[] = { _( "Segment" ), _( "Arc" ), _( "Ring/Circle" ), _( "Polygon" ) }; - int type = wxGetSingleChoiceIndex( wxEmptyString, _( "Select shape type:" ), - DIM( shapelist ), shapelist, 0, this ); + int type = wxGetSingleChoiceIndex( _( "Shape type:" ), _( "Add Primitive" ), + DIM( shapelist ), shapelist, 0, this ); - STROKE_T listtype[] = - { - S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON - }; + STROKE_T listtype[] = { S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON }; PAD_CS_PRIMITIVE primitive( listtype[type] ); if( listtype[type] == S_POLYGON ) { - DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, &primitive ); + DIALOG_PAD_PRIMITIVE_POLY_PROPS dlg( this, m_parent, &primitive ); if( dlg.ShowModal() != wxID_OK ) return; } else { - DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, &primitive ); + DIALOG_PAD_PRIMITIVES_PROPERTIES dlg( this, m_parent, &primitive ); if( dlg.ShowModal() != wxID_OK ) return; @@ -2024,7 +1882,7 @@ void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event ) while( ( select = m_listCtrlPrimitives->GetNextSelected( select ) ) >= 0 ) shapeList.push_back( &m_primitives[select] ); - DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, shapeList, false ); + DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, m_parent, shapeList, false ); if( dlg.ShowModal() != wxID_OK ) return; @@ -2059,7 +1917,7 @@ void DIALOG_PAD_PROPERTIES::onDuplicatePrimitive( wxCommandEvent& event ) while( ( select = m_listCtrlPrimitives->GetNextSelected( select ) ) >= 0 ) shapeList.push_back( &m_primitives[select] ); - DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, shapeList, true ); + DIALOG_PAD_PRIMITIVES_TRANSFORM dlg( this, m_parent, shapeList, true ); if( dlg.ShowModal() != wxID_OK ) return; diff --git a/pcbnew/dialogs/dialog_pad_properties.h b/pcbnew/dialogs/dialog_pad_properties.h index 10ede8bcbb..6146056a3e 100644 --- a/pcbnew/dialogs/dialog_pad_properties.h +++ b/pcbnew/dialogs/dialog_pad_properties.h @@ -47,8 +47,7 @@ #include #include #include - - +#include /** * class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, @@ -66,33 +65,38 @@ public: private: PCB_BASE_FRAME* m_parent; - KIGFX::ORIGIN_VIEWITEM* m_axisOrigin; D_PAD* m_currentPad; // pad currently being edited D_PAD* m_dummyPad; // a working copy used to show changes - D_PAD* m_padMaster; // The pad used to create new pads in board or - // footprint editor - BOARD* m_board; // the main board: this is the board handled by - // the PCB editor, if running or the dummy - // board used by the footprint editor - // (could happen when the Footprint editor will be run - // alone, outside the board editor - bool m_isFlipped; // true if the parent footprint (therefore pads) is flipped (mirrored) - // in this case, some Y coordinates values must be negated + D_PAD* m_padMaster; // pad used to create new pads in board or footprint editor + BOARD* m_board; // the main board: this is the board handled by the PCB + // editor or the dummy board used by the footprint editor + bool m_isFlipped; // indicates the parent footprint is flipped (mirrored) in + // which case some Y coordinates values must be negated bool m_canUpdate; bool m_canEditNetName; // true only if the caller is the board editor - // for free shape pads: the list of primitives (basic shapes), - // in local coordinates, orient 0, coordinates relative to m_Pos - // They are expected to define only one copper area. - std::vector m_primitives; + std::vector m_primitives; // the list of custom shape primitives (basic + // shapes), in local coords, orient 0 + // must define a single copper area + COLOR4D m_selectedColor; // color used to draw selected primitives when + // editing a custom pad shape - std::vector m_highligth; // shapes highlighted in GAL mode + std::vector m_highlight; // shapes highlighted in GAL mode + KIGFX::ORIGIN_VIEWITEM* m_axisOrigin; // origin of the preview canvas + static bool m_sketchPreview; // session storage + UNIT_BINDER m_posX, m_posY; + UNIT_BINDER m_sizeX, m_sizeY; + UNIT_BINDER m_offsetX, m_offsetY; + UNIT_BINDER m_padToDie; + UNIT_BINDER m_trapDelta; + UNIT_BINDER m_cornerRadius; + UNIT_BINDER m_holeX, m_holeY; wxFloatingPointValidator m_OrientValidator; - double m_OrientValue; - static bool m_drawPadOutlineMode; // Stores the pad draw option during a session - COLOR4D m_selectedColor; // Color used to draw selected primitives when - // editing a custom pad shape + double m_OrientValue; + UNIT_BINDER m_clearance; + UNIT_BINDER m_maskClearance, m_pasteClearance; + UNIT_BINDER m_spokeWidth, m_thermalGap; private: void prepareCanvas(); // Initialize the canvases (legacy or gal) to display the pad @@ -169,7 +173,8 @@ private: class DIALOG_PAD_PRIMITIVES_PROPERTIES: public DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE { public: - DIALOG_PAD_PRIMITIVES_PROPERTIES( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape ); + DIALOG_PAD_PRIMITIVES_PROPERTIES( wxWindow* aParent, PCB_BASE_FRAME* aFrame, + PAD_CS_PRIMITIVE * aShape ); /** * Function TransferDataFromWindow @@ -186,6 +191,13 @@ private: // The basic shape currently edited PAD_CS_PRIMITIVE * m_shape; + + UNIT_BINDER m_startX; + UNIT_BINDER m_startY; + UNIT_BINDER m_endX; + UNIT_BINDER m_endY; + UNIT_BINDER m_radius; + UNIT_BINDER m_thickness; }; @@ -200,8 +212,11 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS: public DIALOG_PAD_PRIMITIVE_POLY_PROPS_BA // The working copy of the basic shape currently edited PAD_CS_PRIMITIVE m_currshape; + UNIT_BINDER m_thickness; + public: - DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aParent, PAD_CS_PRIMITIVE * aShape ); + DIALOG_PAD_PRIMITIVE_POLY_PROPS( wxWindow* aParent, PCB_BASE_FRAME* aFrame, + PAD_CS_PRIMITIVE * aShape ); ~DIALOG_PAD_PRIMITIVE_POLY_PROPS(); /** @@ -224,7 +239,7 @@ private: // Events handlers: void OnValidateButton( wxCommandEvent& event ); - void onButtonAdd( wxCommandEvent& event ) override; + void OnButtonAdd( wxCommandEvent& event ) override; void OnButtonDelete( wxCommandEvent& event ) override; void onPaintPolyPanel( wxPaintEvent& event ) override; void onPolyPanelResize( wxSizeEvent& event ) override; @@ -234,6 +249,9 @@ private: { event.Skip(); } + + bool doValidate( bool aRemoveRedundantCorners ); + }; @@ -247,8 +265,8 @@ private: class DIALOG_PAD_PRIMITIVES_TRANSFORM : public DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE { public: - DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aParent, - std::vector& aList, bool aShowDuplicate ); + DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aParent, PCB_BASE_FRAME* aFrame, + std::vector& aList, bool aShowDuplicate ); /** * Apply geometric transform (rotation, move, scale) defined in dialog @@ -266,6 +284,10 @@ public: private: std::vector& m_list; + + UNIT_BINDER m_vectorX; + UNIT_BINDER m_vectorY; + UNIT_BINDER m_rotation; }; #endif // #ifndef _DIALOG_PAD_PROPERTIES_H_ diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index af95f5726e..c0d798519b 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -6,6 +6,7 @@ /////////////////////////////////////////////////////////////////////////// #include "widgets/text_ctrl_eval.h" +#include "widgets/widget_net_selector.h" #include "dialog_pad_properties_base.h" @@ -32,230 +33,203 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizerShapeType; - fgSizerShapeType = new wxFlexGridSizer( 0, 3, 0, 0 ); + fgSizerShapeType = new wxFlexGridSizer( 0, 3, 2, 0 ); fgSizerShapeType->AddGrowableCol( 1 ); fgSizerShapeType->SetFlexibleDirection( wxBOTH ); fgSizerShapeType->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_PadNumText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad number:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadNumText->Wrap( -1 ); - fgSizerShapeType->Add( m_PadNumText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadNumText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); m_PadNumCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadNumCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadNumCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); m_PadNameText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadNameText->Wrap( -1 ); - fgSizerShapeType->Add( m_PadNameText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadNameText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 3 ); - m_PadNetNameCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_PadNetNameCombo = new WIDGET_NET_SELECTOR( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + fgSizerShapeType->Add( m_PadNetNameCombo, 0, wxEXPAND|wxLEFT|wxTOP, 3 ); fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText44 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad type:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText44->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); wxString m_PadTypeChoices[] = { _("Through-hole"), _("SMD"), _("Connector"), _("NPTH, Mechanical") }; int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString ); m_PadType = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 0 ); m_PadType->SetSelection( 0 ); - fgSizerShapeType->Add( m_PadType, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadType, 0, wxEXPAND|wxALL, 3 ); fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText45 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText45->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom (Circ. Anchor)"), _("Custom (Rect. Anchor)") }; int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString ); m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 ); m_PadShape->SetSelection( 0 ); - fgSizerShapeType->Add( m_PadShape, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadShape, 0, wxEXPAND|wxALL, 3 ); fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText4 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_posXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_posXLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_posXLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 3 ); - m_PadPosition_X_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadPosition_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_posXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_posXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - m_PadPosX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadPosX_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadPosX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + m_posXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_posXUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_posXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - m_staticText41 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText41->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + m_posYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_posYLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_posYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - m_PadPosition_Y_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadPosition_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_posYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_posYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - m_PadPosY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadPosY_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadPosY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_posYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_posYUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_posYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - m_staticText12 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + m_sizeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_sizeXLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_sizeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - m_ShapeSize_X_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeSize_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_sizeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_sizeXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - m_PadShapeSizeX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeSizeX_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadShapeSizeX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_sizeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_sizeXUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_sizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - m_staticText15 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText15->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + m_sizeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_sizeYLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_sizeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - m_ShapeSize_Y_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeSize_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_sizeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_sizeYCtrl, 0, wxEXPAND|wxALL, 3 ); - m_PadShapeSizeY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeSizeY_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadShapeSizeY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_sizeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_sizeYUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_sizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); m_PadOrientText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadOrientText->Wrap( -1 ); - fgSizerShapeType->Add( m_PadOrientText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + fgSizerShapeType->Add( m_PadOrientText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - wxString m_PadOrientChoices[] = { _("0"), _("90"), _("-90"), _("180"), _("Custom") }; - int m_PadOrientNChoices = sizeof( m_PadOrientChoices ) / sizeof( wxString ); - m_PadOrient = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadOrientNChoices, m_PadOrientChoices, 0 ); - m_PadOrient->SetSelection( 4 ); - fgSizerShapeType->Add( m_PadOrient, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_orientation = new wxComboBox( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_orientation->Append( _("0") ); + m_orientation->Append( _("90") ); + m_orientation->Append( _("-90") ); + m_orientation->Append( _("180") ); + fgSizerShapeType->Add( m_orientation, 0, wxALL|wxEXPAND, 5 ); m_staticText491 = new wxStaticText( m_panelGeneral, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText491->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText491, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + fgSizerShapeType->Add( m_staticText491, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); + + m_offsetXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_offsetXLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_offsetXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); + + m_offsetXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_offsetXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); + + m_offsetXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_offsetXUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_offsetXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); + + m_offsetYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_offsetYLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_offsetYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); + + m_offsetYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_offsetYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); + + m_offsetYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_offsetYUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_offsetYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); + + m_padToDieLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad to die length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_padToDieLabel->Wrap( -1 ); + m_padToDieLabel->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); + + fgSizerShapeType->Add( m_padToDieLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 3 ); + + m_padToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_padToDieCtrl, 0, wxEXPAND|wxALL, 3 ); + + m_padToDieUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_padToDieUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_padToDieUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); + + m_trapDeltaLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid delta:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_trapDeltaLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_trapDeltaLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); + + m_trapDeltaCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_trapDeltaCtrl, 0, wxEXPAND|wxALL, 3 ); + + m_trapDeltaUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_trapDeltaUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_trapDeltaUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); + + m_trapAxisLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid axis:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_trapAxisLabel->Wrap( -1 ); + fgSizerShapeType->Add( m_trapAxisLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); + + wxString m_trapAxisCtrlChoices[] = { _("Horizontal"), _("Vertical") }; + int m_trapAxisCtrlNChoices = sizeof( m_trapAxisCtrlChoices ) / sizeof( wxString ); + m_trapAxisCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trapAxisCtrlNChoices, m_trapAxisCtrlChoices, 0 ); + m_trapAxisCtrl->SetSelection( 0 ); + fgSizerShapeType->Add( m_trapAxisCtrl, 0, wxEXPAND|wxALL, 3 ); - fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_PadOrientCtrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_PadOrientCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - - m_customOrientUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); - m_customOrientUnits->Wrap( -1 ); - fgSizerShapeType->Add( m_customOrientUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_staticText17 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText17->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); - - m_ShapeOffset_X_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeOffset_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - - m_PadShapeOffsetX_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeOffsetX_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadShapeOffsetX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_staticText19 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText19->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); - - m_ShapeOffset_Y_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeOffset_Y_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - - m_PadShapeOffsetY_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeOffsetY_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadShapeOffsetY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_staticText38 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad to die length:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText38->Wrap( -1 ); - m_staticText38->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); - - fgSizerShapeType->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - - m_LengthPadToDieCtrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_LengthPadToDieCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - - m_PadLengthDie_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadLengthDie_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadLengthDie_Unit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_staticline4 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline4, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); - - m_staticline5 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline5, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); - - m_staticline6 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline6, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); - - m_staticText21 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid delta:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - - m_ShapeDelta_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_ShapeDelta_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - - m_PadShapeDelta_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadShapeDelta_Unit->Wrap( -1 ); - fgSizerShapeType->Add( m_PadShapeDelta_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_staticText23 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid axis:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText23->Wrap( -1 ); - fgSizerShapeType->Add( m_staticText23, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - - wxString m_trapDeltaDirChoiceChoices[] = { _("Horizontal"), _("Vertical") }; - int m_trapDeltaDirChoiceNChoices = sizeof( m_trapDeltaDirChoiceChoices ) / sizeof( wxString ); - m_trapDeltaDirChoice = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trapDeltaDirChoiceNChoices, m_trapDeltaDirChoiceChoices, 0 ); - m_trapDeltaDirChoice->SetSelection( 0 ); - fgSizerShapeType->Add( m_trapDeltaDirChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - - - fgSizerShapeType->Add( 0, 0, 1, wxBOTTOM|wxEXPAND|wxTOP, 15 ); - - m_staticline7 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline7, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); - - m_staticline8 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline8, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); - - m_staticline9 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerShapeType->Add( m_staticline9, 0, wxBOTTOM|wxEXPAND|wxTOP, 6 ); + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND|wxTOP, 15 ); m_staticTextCornerSizeRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCornerSizeRatio->Wrap( -1 ); m_staticTextCornerSizeRatio->SetToolTip( _("Corner radius in percent of the pad width.\nThe width is the smaller value between size X and size Y.\nThe max value is 50 percent.") ); - fgSizerShapeType->Add( m_staticTextCornerSizeRatio, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerShapeType->Add( m_staticTextCornerSizeRatio, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); m_tcCornerSizeRatio = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_tcCornerSizeRatio, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + fgSizerShapeType->Add( m_tcCornerSizeRatio, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 3 ); m_staticTextCornerSizeRatioUnit = new wxStaticText( m_panelGeneral, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCornerSizeRatioUnit->Wrap( -1 ); - fgSizerShapeType->Add( m_staticTextCornerSizeRatioUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + fgSizerShapeType->Add( m_staticTextCornerSizeRatioUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - m_staticTextCornerRadius = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCornerRadius->Wrap( -1 ); - m_staticTextCornerRadius->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y.\nNote: IPC norm gives a max value = 0.25mm.") ); + m_cornerRadiusLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerRadiusLabel->Wrap( -1 ); + m_cornerRadiusLabel->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y.\nNote: IPC norm gives a max value = 0.25mm.") ); - fgSizerShapeType->Add( m_staticTextCornerRadius, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + fgSizerShapeType->Add( m_cornerRadiusLabel, 0, wxRIGHT|wxLEFT, 3 ); - m_staticTextCornerRadiusValue = new wxStaticText( m_panelGeneral, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCornerRadiusValue->Wrap( -1 ); - m_staticTextCornerRadiusValue->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y\nNote: IPC norm gives a max value = 0.25mm") ); + m_cornerRadiusValue = new wxStaticText( m_panelGeneral, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerRadiusValue->Wrap( -1 ); + m_cornerRadiusValue->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y\nNote: IPC norm gives a max value = 0.25mm") ); - fgSizerShapeType->Add( m_staticTextCornerRadiusValue, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); + fgSizerShapeType->Add( m_cornerRadiusValue, 0, wxRIGHT|wxLEFT, 3 ); - m_staticTextCornerSizeUnit = new wxStaticText( m_panelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCornerSizeUnit->Wrap( -1 ); - fgSizerShapeType->Add( m_staticTextCornerSizeUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_cornerRadiusUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cornerRadiusUnits->Wrap( -1 ); + fgSizerShapeType->Add( m_cornerRadiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); m_LeftBoxSizer->Add( fgSizerShapeType, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -272,47 +246,47 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgSizerGeometry->SetFlexibleDirection( wxBOTH ); fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText47 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole shape:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText47->Wrap( -1 ); - fgSizerGeometry->Add( m_staticText47, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_holeShapeLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole shape:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_holeShapeLabel->Wrap( -1 ); + fgSizerGeometry->Add( m_holeShapeLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - wxString m_DrillShapeCtrlChoices[] = { _("Circular"), _("Oval") }; - int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString ); - m_DrillShapeCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 0 ); - m_DrillShapeCtrl->SetSelection( 0 ); - fgSizerGeometry->Add( m_DrillShapeCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + wxString m_holeShapeCtrlChoices[] = { _("Circular"), _("Oval") }; + int m_holeShapeCtrlNChoices = sizeof( m_holeShapeCtrlChoices ) / sizeof( wxString ); + m_holeShapeCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_holeShapeCtrlNChoices, m_holeShapeCtrlChoices, 0 ); + m_holeShapeCtrl->SetSelection( 0 ); + fgSizerGeometry->Add( m_holeShapeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxTOP, 5 ); m_staticText51 = new wxStaticText( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_staticText51->Wrap( -1 ); fgSizerGeometry->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - m_textPadDrillX = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_textPadDrillX->Wrap( -1 ); - fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); + m_holeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_holeXLabel->Wrap( -1 ); + fgSizerGeometry->Add( m_holeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); - m_PadDrill_X_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerGeometry->Add( m_PadDrill_X_Ctrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_holeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerGeometry->Add( m_holeXCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - m_PadDrill_X_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadDrill_X_Unit->Wrap( -1 ); - fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_holeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_holeXUnits->Wrap( -1 ); + fgSizerGeometry->Add( m_holeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - m_textPadDrillY = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_textPadDrillY->Wrap( -1 ); - fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); + m_holeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_holeYLabel->Wrap( -1 ); + fgSizerGeometry->Add( m_holeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - m_PadDrill_Y_Ctrl = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerGeometry->Add( m_PadDrill_Y_Ctrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); + m_holeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerGeometry->Add( m_holeYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - m_PadDrill_Y_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PadDrill_Y_Unit->Wrap( -1 ); - fgSizerGeometry->Add( m_PadDrill_Y_Unit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_holeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_holeYUnits->Wrap( -1 ); + fgSizerGeometry->Add( m_holeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); bSizer10->Add( fgSizerGeometry, 0, wxEXPAND, 5 ); wxStaticBoxSizer* m_LayersSizer; - m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGeneral, wxID_ANY, _("Layers") ), wxVERTICAL ); + m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL ); m_FlippedWarningSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -333,13 +307,13 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_staticText511 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText511->Wrap( -1 ); - bSizer11->Add( m_staticText511, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 5 ); + bSizer11->Add( m_staticText511, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 4 ); wxString m_rbCopperLayersSelChoices[] = { _("Front layer"), _("Back layer"), _("All copper layers"), _("None") }; int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString ); m_rbCopperLayersSel = new wxChoice( m_LayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 ); m_rbCopperLayersSel->SetSelection( 0 ); - bSizer11->Add( m_rbCopperLayersSel, 1, wxALL|wxEXPAND|wxTOP, 5 ); + bSizer11->Add( m_rbCopperLayersSel, 1, wxALL|wxEXPAND|wxTOP, 4 ); m_LayersSizer->Add( bSizer11, 0, wxEXPAND, 5 ); @@ -347,40 +321,42 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind wxStaticText* m_staticText85; m_staticText85 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText85->Wrap( -1 ); + m_staticText85->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_LayersSizer->Add( m_staticText85, 0, wxALL, 5 ); m_PadLayerAdhCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front adhesive"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxLEFT|wxRIGHT, 5 ); + m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxLEFT|wxRIGHT, 4 ); m_PadLayerAdhCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back adhesive"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerPateCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder paste"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerPateCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder paste"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerSilkCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front silk screen"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerSilkCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back silk screen"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerMaskCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder mask"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerMaskCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder mask"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerDraft = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Drafting notes"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerECO1 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.1"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); m_PadLayerECO2 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.2"), wxDefaultPosition, wxDefaultSize, 0 ); - m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 5 ); + m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 4 ); bSizer10->Add( m_LayersSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); @@ -428,44 +404,44 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgClearancesGridSizer->SetFlexibleDirection( wxBOTH ); fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextNetClearance = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Net pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNetClearance->Wrap( -1 ); - m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for pad.\nIf 0, the footprint local value or the Netclass value is used") ); + m_clearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_clearanceLabel->Wrap( -1 ); + m_clearanceLabel->SetToolTip( _("This is the local net clearance for pad.\nIf 0, the footprint local value or the Netclass value is used") ); - fgClearancesGridSizer->Add( m_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); + fgClearancesGridSizer->Add( m_clearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_NetClearanceValueCtrl = new TEXT_CTRL_EVAL( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_clearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgClearancesGridSizer->Add( m_clearanceCtrl, 0, wxEXPAND|wxTOP|wxLEFT, 5 ); - m_NetClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetClearanceUnits->Wrap( -1 ); - fgClearancesGridSizer->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_clearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_clearanceUnits->Wrap( -1 ); + fgClearancesGridSizer->Add( m_clearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_MaskClearanceTitle = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_MaskClearanceTitle->Wrap( -1 ); - m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between this pad and the solder mask\nIf 0, the footprint local value or the global value is used") ); + m_maskClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_maskClearanceLabel->Wrap( -1 ); + m_maskClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder mask\nIf 0, the footprint local value or the global value is used") ); - fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); + fgClearancesGridSizer->Add( m_maskClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_SolderMaskMarginCtrl = new TEXT_CTRL_EVAL( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_maskClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgClearancesGridSizer->Add( m_maskClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - m_SolderMaskMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderMaskMarginUnits->Wrap( -1 ); - fgClearancesGridSizer->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_maskClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_maskClearanceUnits->Wrap( -1 ); + fgClearancesGridSizer->Add( m_maskClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - m_staticTextSolderPaste = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSolderPaste->Wrap( -1 ); - m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); + m_pasteClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_pasteClearanceLabel->Wrap( -1 ); + m_pasteClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0 the footprint value or the global value is used..\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") ); - fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); + fgClearancesGridSizer->Add( m_pasteClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_SolderPasteMarginCtrl = new TEXT_CTRL_EVAL( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_pasteClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgClearancesGridSizer->Add( m_pasteClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - m_SolderPasteMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteMarginUnits->Wrap( -1 ); - fgClearancesGridSizer->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_pasteClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_pasteClearanceUnits->Wrap( -1 ); + fgClearancesGridSizer->Add( m_pasteClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); m_staticTextRatio = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRatio->Wrap( -1 ); @@ -493,7 +469,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_nonCopperNote->Wrap( -1 ); m_nonCopperNote->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - bNoteSizer->Add( m_nonCopperNote, 0, wxBOTTOM|wxRIGHT|wxTOP, 15 ); + bNoteSizer->Add( m_nonCopperNote, 0, wxTOP|wxRIGHT, 15 ); notePanel->SetSizer( bNoteSizer ); @@ -549,27 +525,27 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind fgSizerCopperZonesOpts->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticText49 = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief width:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText49->Wrap( -1 ); - fgSizerCopperZonesOpts->Add( m_staticText49, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); + m_spokeWidthLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief spoke width:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_spokeWidthLabel->Wrap( -1 ); + fgSizerCopperZonesOpts->Add( m_spokeWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - m_ThermalWidthCtrl = new TEXT_CTRL_EVAL( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerCopperZonesOpts->Add( m_ThermalWidthCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + m_spokeWidthCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerCopperZonesOpts->Add( m_spokeWidthCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - m_ThermalWidthUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ThermalWidthUnits->Wrap( -1 ); - fgSizerCopperZonesOpts->Add( m_ThermalWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + m_spokeWidthUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_spokeWidthUnits->Wrap( -1 ); + fgSizerCopperZonesOpts->Add( m_spokeWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - m_staticText52 = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText52->Wrap( -1 ); - fgSizerCopperZonesOpts->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + m_thermalGapLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thermalGapLabel->Wrap( -1 ); + fgSizerCopperZonesOpts->Add( m_thermalGapLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - m_ThermalGapCtrl = new TEXT_CTRL_EVAL( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerCopperZonesOpts->Add( m_ThermalGapCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); + m_thermalGapCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerCopperZonesOpts->Add( m_thermalGapCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - m_ThermalGapUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ThermalGapUnits->Wrap( -1 ); - fgSizerCopperZonesOpts->Add( m_ThermalGapUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_thermalGapUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thermalGapUnits->Wrap( -1 ); + fgSizerCopperZonesOpts->Add( m_thermalGapUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_sbSizerZonesSettings->Add( fgSizerCopperZonesOpts, 0, wxEXPAND, 5 ); @@ -609,10 +585,10 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_sbSizerCustomShapedZonesSettings->Add( fgSizerCustomShapedCopperZonesOpts, 0, wxEXPAND, 5 ); - bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 1, wxALL|wxEXPAND, 5 ); + bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 1, wxEXPAND|wxALL, 5 ); - bSizerPanelClearance->Add( bSizerClearance, 0, wxALL|wxEXPAND, 5 ); + bSizerPanelClearance->Add( bSizerClearance, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_localSettingsPanel->SetSizer( bSizerPanelClearance ); @@ -679,52 +655,39 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_bSizerPanelPrimitives->Fit( m_panelCustomShapePrimitives ); m_notebook->AddPage( m_panelCustomShapePrimitives, _("Custom Shape Primitives"), false ); - bSizerUpper->Add( m_notebook, 0, wxALL|wxEXPAND, 5 ); + bSizerUpper->Add( m_notebook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bSizerDisplayPad; bSizerDisplayPad = new wxBoxSizer( wxVERTICAL ); - bSizerDisplayPad->SetMinSize( wxSize( 200,-1 ) ); bSizerDisplayPad->Add( 0, 0, 0, wxBOTTOM|wxEXPAND|wxTOP, 3 ); - wxStaticBoxSizer* sbSizeModuleInfo; - sbSizeModuleInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Parent Footprint Orientation") ), wxVERTICAL ); + m_parentInfoLine1 = new wxStaticText( this, wxID_ANY, _("Footprint name"), wxDefaultPosition, wxDefaultSize, 0 ); + m_parentInfoLine1->Wrap( -1 ); + m_parentInfoLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticModuleSideValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Front side"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticModuleSideValue->Wrap( -1 ); - sbSizeModuleInfo->Add( m_staticModuleSideValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerDisplayPad->Add( m_parentInfoLine1, 0, wxTOP, 8 ); - wxBoxSizer* bSizerParentInfo; - bSizerParentInfo = new wxBoxSizer( wxHORIZONTAL ); + m_parentInfoLine2 = new wxStaticText( this, wxID_ANY, _("side and rotation"), wxDefaultPosition, wxDefaultSize, 0 ); + m_parentInfoLine2->Wrap( -1 ); + m_parentInfoLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - m_staticTitleModuleRot = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTitleModuleRot->Wrap( -1 ); - bSizerParentInfo->Add( m_staticTitleModuleRot, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); - - - bSizerParentInfo->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticModuleRotValue = new wxStaticText( sbSizeModuleInfo->GetStaticBox(), wxID_ANY, _("180.0"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticModuleRotValue->Wrap( -1 ); - bSizerParentInfo->Add( m_staticModuleRotValue, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - sbSizeModuleInfo->Add( bSizerParentInfo, 1, wxEXPAND, 5 ); - - - bSizerDisplayPad->Add( sbSizeModuleInfo, 0, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 8 ); + bSizerDisplayPad->Add( m_parentInfoLine2, 0, wxTOP|wxBOTTOM|wxRIGHT, 3 ); bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 ); - m_panelShowPad = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 220,-1 ), wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER ); + m_panelShowPad = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER ); m_panelShowPad->SetBackgroundColour( wxColour( 0, 0, 0 ) ); + m_panelShowPad->SetMinSize( wxSize( 280,-1 ) ); - bSizerDisplayPad->Add( m_panelShowPad, 12, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizerDisplayPad->Add( m_panelShowPad, 12, wxEXPAND|wxALL, 5 ); m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, m_galOptions, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO); - bSizerDisplayPad->Add( m_panelShowPadGal, 12, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + m_panelShowPadGal->SetMinSize( wxSize( 280,-1 ) ); + + bSizerDisplayPad->Add( m_panelShowPadGal, 12, wxEXPAND|wxALL, 5 ); m_cbShowPadOutline = new wxCheckBox( this, wxID_ANY, _("Show pad in outline mode"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerDisplayPad->Add( m_cbShowPadOutline, 0, wxBOTTOM|wxRIGHT|wxTOP, 5 ); @@ -733,10 +696,10 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerDisplayPad->Add( m_staticline13, 0, wxALL|wxEXPAND, 4 ); + bSizerDisplayPad->Add( m_staticline13, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); - bSizerUpper->Add( bSizerDisplayPad, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 ); + bSizerUpper->Add( bSizerDisplayPad, 1, wxEXPAND|wxTOP|wxRIGHT, 10 ); m_MainSizer->Add( bSizerUpper, 1, wxEXPAND, 5 ); @@ -748,7 +711,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); - m_MainSizer->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_MainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); this->SetSizer( m_MainSizer ); @@ -760,21 +723,21 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind // Connect Events this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnInitDialog ) ); m_PadNumCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadNetNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_PadNetNameCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this ); m_PadShape->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this ); - m_ShapeSize_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeSize_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadOrient->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); - m_PadOrientCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeOffset_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeOffset_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_trapDeltaDirChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_sizeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_sizeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_orientation->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); + m_orientation->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); + m_offsetXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_offsetYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_trapDeltaCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_trapAxisCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_tcCornerSizeRatio->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); - m_DrillShapeCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); - m_PadDrill_X_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadDrill_Y_Ctrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_holeShapeCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); + m_holeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_holeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_rbCopperLayersSel->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerAdhCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerAdhCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); @@ -787,7 +750,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadLayerDraft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); - m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_clearanceCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_nonCopperWarningBook->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUINonCopperWarning ), NULL, this ); m_listCtrlPrimitives->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this ); m_listCtrlPrimitives->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this ); @@ -808,21 +771,21 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() // Disconnect Events this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnInitDialog ) ); m_PadNumCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadNetNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_PadNetNameCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_PadType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this ); m_PadShape->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this ); - m_ShapeSize_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeSize_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadOrient->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); - m_PadOrientCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeOffset_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeOffset_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_ShapeDelta_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_trapDeltaDirChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); + m_sizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_sizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_orientation->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); + m_orientation->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this ); + m_offsetXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_offsetYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_trapDeltaCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_trapAxisCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_tcCornerSizeRatio->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); - m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); - m_PadDrill_X_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); - m_PadDrill_Y_Ctrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_holeShapeCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); + m_holeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_holeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerAdhCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerAdhCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); @@ -835,7 +798,7 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_PadLayerDraft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); - m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_clearanceCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_nonCopperWarningBook->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUINonCopperWarning ), NULL, this ); m_listCtrlPrimitives->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this ); m_listCtrlPrimitives->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this ); @@ -859,72 +822,78 @@ DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wx wxBoxSizer* bSizermain; bSizermain = new wxBoxSizer( wxVERTICAL ); - m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Filled circle: set thickness to 0\nRing: set thickness to the width of the ring"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInfo->Wrap( -1 ); - m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - - bSizermain->Add( m_staticTextInfo, 0, wxALL, 5 ); - wxFlexGridSizer* fgSizerShapeProperties; - fgSizerShapeProperties = new wxFlexGridSizer( 0, 6, 0, 0 ); + fgSizerShapeProperties = new wxFlexGridSizer( 0, 7, 3, 0 ); fgSizerShapeProperties->AddGrowableCol( 2 ); fgSizerShapeProperties->AddGrowableCol( 4 ); fgSizerShapeProperties->SetFlexibleDirection( wxBOTH ); fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosStart->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextStartX = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStartX->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextStartX, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_startXLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_startXLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - m_textCtrPosX = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_startXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_startXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextStartY = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextStartY->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextStartY, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_startXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_startXUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_startXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 ); - m_textCtrPosY = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrPosY, 0, wxALL|wxEXPAND, 5 ); + m_startYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_startYLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_startYLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPosUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextPosUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_startYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_startYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_startYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_startYUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_startYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosEnd->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextEndX = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextEndX->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextEndX, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_endXLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_endXLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_textCtrEndX = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrEndX, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_endXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_endXCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_staticTextEndY = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextEndY->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextEndY, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_endXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_endXUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_endXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_textCtrEndY = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrEndY, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_endYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_endYLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_endYLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - m_staticTextEndUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextEndUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextEndUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_endYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_endYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Angle:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAngle->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_endYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_endYUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_endYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_radiusLabel = new wxStaticText( this, wxID_ANY, _("Radius:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radiusLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - m_textCtrAngle = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_radiusCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_radiusCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_radiusUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radiusUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_radiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -932,35 +901,37 @@ DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wx fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAngleUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextThickness->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thicknessLabel->Wrap( -1 ); + fgSizerShapeProperties->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - m_textCtrlThickness = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrlThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thicknessUnits->Wrap( -1 ); + fgSizerShapeProperties->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND|wxALL, 10 ); - m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextThicknessUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled circle."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInfo->Wrap( -1 ); + m_staticTextInfo->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - - bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 ); + bSizermain->Add( m_staticTextInfo, 0, wxRIGHT|wxLEFT, 15 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizermain->Add( m_staticline1, 0, wxEXPAND, 5 ); + bSizermain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); @@ -990,98 +961,102 @@ DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWi wxBoxSizer* bSizermain; bSizermain = new wxBoxSizer( wxVERTICAL ); - wxFlexGridSizer* fgSizerShapeProperties; - fgSizerShapeProperties = new wxFlexGridSizer( 0, 6, 0, 0 ); - fgSizerShapeProperties->AddGrowableCol( 2 ); - fgSizerShapeProperties->AddGrowableCol( 4 ); - fgSizerShapeProperties->SetFlexibleDirection( wxBOTH ); - fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxFlexGridSizer* fgSizerShapeProperties1; + fgSizerShapeProperties1 = new wxFlexGridSizer( 0, 7, 3, 0 ); + fgSizerShapeProperties1->AddGrowableCol( 2 ); + fgSizerShapeProperties1->AddGrowableCol( 4 ); + fgSizerShapeProperties1->SetFlexibleDirection( wxBOTH ); + fgSizerShapeProperties1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextMove->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextMove, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties1->Add( m_staticTextMove, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextMoveX = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMoveX->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextMoveX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_xLabel->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - m_textCtrMoveX = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrMoveX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_xCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties1->Add( m_xCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextMoveY = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMoveY->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextMoveY, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + m_xUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_xUnits->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 ); - m_textCtrMoveY = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrMoveY, 0, wxALL|wxEXPAND, 5 ); + m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_yLabel->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_yLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_staticTextMoveUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextMoveUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextMoveUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_yCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties1->Add( m_yCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAngle->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_yUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_yUnits->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_rotationLabel = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rotationLabel->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_rotationLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - m_textCtrAngle = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_rotationCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties1->Add( m_rotationCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_rotationUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rotationUnits->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_rotationUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextAngleUnit->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextSF = new wxStaticText( this, wxID_ANY, _("Scaling factor:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSF->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextSF, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - m_textCtrlScalingFactor = new TEXT_CTRL_EVAL( this, wxID_ANY, _("1.0"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeProperties->Add( m_textCtrlScalingFactor, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_scaleLabel = new wxStaticText( this, wxID_ANY, _("Scaling factor:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_scaleLabel->Wrap( -1 ); + fgSizerShapeProperties1->Add( m_scaleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_scaleCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeProperties1->Add( m_scaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate count:"), wxDefaultPosition, wxDefaultSize, 0 ); + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); + + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextDupCnt->Wrap( -1 ); - fgSizerShapeProperties->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerShapeProperties1->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 ); - fgSizerShapeProperties->Add( m_spinCtrlDuplicateCount, 0, wxALL|wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( m_spinCtrlDuplicateCount, 0, wxALL|wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - - fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - - bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 ); + bSizermain->Add( fgSizerShapeProperties1, 1, wxALL|wxEXPAND, 10 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizermain->Add( m_staticline1, 0, wxEXPAND, 5 ); + bSizermain->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); @@ -1111,28 +1086,13 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi wxBoxSizer* bSizerMain; bSizerMain = new wxBoxSizer( wxVERTICAL ); - m_staticTextCornerListWarning = new wxStaticText( this, wxID_ANY, _("Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCornerListWarning->Wrap( -1 ); - m_staticTextCornerListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - - bSizerMain->Add( m_staticTextCornerListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_staticTextValidate = new wxStaticText( this, wxID_ANY, _("Incorrect polygon"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextValidate->Wrap( -1 ); - m_staticTextValidate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - - bSizerMain->Add( m_staticTextValidate, 0, wxALL, 5 ); - wxBoxSizer* bSizerUpper; - bSizerUpper = new wxBoxSizer( wxVERTICAL ); + bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bSizer23; - bSizer23 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizerCornerlist; - bSizerCornerlist = new wxBoxSizer( wxVERTICAL ); - - m_gridCornersList = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_gridCornersList = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER ); // Grid m_gridCornersList->CreateGrid( 1, 2 ); @@ -1142,9 +1102,11 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi m_gridCornersList->SetMargins( 0, 0 ); // Columns + m_gridCornersList->SetColSize( 0, 100 ); + m_gridCornersList->SetColSize( 1, 100 ); m_gridCornersList->EnableDragColMove( false ); m_gridCornersList->EnableDragColSize( true ); - m_gridCornersList->SetColLabelSize( 30 ); + m_gridCornersList->SetColLabelSize( 22 ); m_gridCornersList->SetColLabelValue( 0, _("Pos X") ); m_gridCornersList->SetColLabelValue( 1, _("Pos Y") ); m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); @@ -1159,31 +1121,23 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi // Cell Defaults m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - bSizerCornerlist->Add( m_gridCornersList, 1, wxALL, 5 ); + bLeftSizer->Add( m_gridCornersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); wxBoxSizer* bSizerRightButts; bSizerRightButts = new wxBoxSizer( wxHORIZONTAL ); - m_buttonAdd = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRightButts->Add( m_buttonAdd, 0, wxALL, 5 ); + m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_addButton->SetMinSize( wxSize( 30,30 ) ); - m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerRightButts->Add( m_buttonDelete, 0, wxALL, 5 ); + bSizerRightButts->Add( m_addButton, 0, wxTOP|wxLEFT, 5 ); + + m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_deleteButton->SetMinSize( wxSize( 30,30 ) ); + + bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - bSizerCornerlist->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizer23->Add( bSizerCornerlist, 0, wxEXPAND, 5 ); - - m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); - m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) ); - m_panelPoly->SetMinSize( wxSize( 300,300 ) ); - - bSizer23->Add( m_panelPoly, 1, wxEXPAND | wxALL, 5 ); - - - bSizerUpper->Add( bSizer23, 1, wxEXPAND, 5 ); + bLeftSizer->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); wxFlexGridSizer* fgSizerThickness; fgSizerThickness = new wxFlexGridSizer( 0, 5, 0, 0 ); @@ -1191,32 +1145,82 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi fgSizerThickness->SetFlexibleDirection( wxBOTH ); fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Outline thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextThickness->Wrap( -1 ); - fgSizerThickness->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Outline thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thicknessLabel->Wrap( -1 ); + fgSizerThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - m_textCtrlThickness = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerThickness->Add( m_textCtrlThickness, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_thicknessCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerThickness->Add( m_thicknessCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextThicknessUnit->Wrap( -1 ); - fgSizerThickness->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_thicknessUnits->Wrap( -1 ); + fgSizerThickness->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - fgSizerThickness->Add( 10, 10, 0, 0, 5 ); - - m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("(Thickness outline is usually set to 0)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInfo->Wrap( -1 ); - fgSizerThickness->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bLeftSizer->Add( fgSizerThickness, 0, wxALL|wxEXPAND, 10 ); - bSizerUpper->Add( fgSizerThickness, 0, 0, 5 ); + bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) ); + m_panelPoly->SetMinSize( wxSize( 290,290 ) ); + + bRightSizer->Add( m_panelPoly, 1, wxEXPAND|wxTOP|wxRIGHT, 10 ); + + wxBoxSizer* m_warningSizer; + m_warningSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_warningIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + m_warningIcon->SetMinSize( wxSize( 50,50 ) ); + + m_warningSizer->Add( m_warningIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_warningText = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_warningText->Wrap( -1 ); + m_warningSizer->Add( m_warningText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); + + + m_warningSizer->Add( 5, 88, 0, 0, 5 ); + + + bRightSizer->Add( m_warningSizer, 0, wxEXPAND|wxRIGHT, 10 ); + + + bSizerUpper->Add( bRightSizer, 1, wxEXPAND, 5 ); bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMain->Add( m_staticline3, 0, wxEXPAND, 5 ); + bSizerMain->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxVERTICAL ); + + + bSizer25->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 4 ); + + m_statusLine1 = new wxStaticText( this, wxID_ANY, _("Coordinates are relative to anchor pad, rotated 0.0 deg."), wxDefaultPosition, wxDefaultSize, 0 ); + m_statusLine1->Wrap( -1 ); + m_statusLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + + bSizer25->Add( m_statusLine1, 0, 0, 5 ); + + m_statusLine2 = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled polygon."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_statusLine2->Wrap( -1 ); + m_statusLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + + bSizer25->Add( m_statusLine2, 0, wxTOP, 2 ); + + + bSizer24->Add( bSizer25, 1, wxEXPAND|wxLEFT, 10 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); @@ -1225,7 +1229,10 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); - bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); + bSizer24->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); + + + bSizerMain->Add( bSizer24, 0, wxEXPAND, 5 ); this->SetSizer( bSizerMain ); @@ -1237,8 +1244,8 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi // Connect Events m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this ); m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onButtonAdd ), NULL, this ); - m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this ); + m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this ); + m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this ); m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this ); m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this ); } @@ -1248,8 +1255,8 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE() // Disconnect Events m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this ); m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onButtonAdd ), NULL, this ); - m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this ); + m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this ); + m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this ); m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this ); m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index a825392612..204316d3c6 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -104,7 +104,7 @@ none 5 - wxALL|wxEXPAND + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -267,20 +267,20 @@ bGeneralSizer wxHORIZONTAL none - + 5 wxALL|wxEXPAND 0 - + m_LeftBoxSizer wxVERTICAL none - + 5 wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 0 - + 3 wxBOTH 1 @@ -291,9 +291,9 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 0 + 2 - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP 0 @@ -376,8 +376,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -477,7 +477,7 @@ - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP 0 @@ -559,11 +559,11 @@ - - 5 + + 3 wxEXPAND|wxLEFT|wxTOP 0 - + 1 1 1 @@ -577,6 +577,7 @@ 1 0 + 1 1 @@ -590,16 +591,15 @@ 0 0 - wxID_PADNETNAMECTRL + wxID_ANY 0 - 0 0 1 - m_PadNetNameCtrl + m_PadNetNameCombo 1 @@ -607,10 +607,11 @@ 1 Resizable + -1 1 - - + wxCB_READONLY + WIDGET_NET_SELECTOR; widgets/widget_net_selector.h; forward_declare 0 @@ -622,6 +623,9 @@ + OnValuesChanged + + @@ -643,10 +647,8 @@ - OnValuesChanged + - - @@ -661,8 +663,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -744,8 +746,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -842,8 +844,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -925,8 +927,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -1023,8 +1025,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT 0 1 @@ -1062,7 +1064,7 @@ 0 1 - m_staticText4 + m_posXLabel 1 @@ -1106,8 +1108,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -1145,7 +1147,7 @@ 0 1 - m_PadPosition_X_Ctrl + m_posXCtrl 1 @@ -1156,7 +1158,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -1197,8 +1199,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -1236,7 +1238,7 @@ 0 1 - m_PadPosX_Unit + m_posXUnits 1 @@ -1280,7 +1282,7 @@ - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP 0 @@ -1319,7 +1321,7 @@ 0 1 - m_staticText41 + m_posYLabel 1 @@ -1363,8 +1365,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -1402,7 +1404,7 @@ 0 1 - m_PadPosition_Y_Ctrl + m_posYCtrl 1 @@ -1413,7 +1415,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -1454,8 +1456,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -1493,7 +1495,7 @@ 0 1 - m_PadPosY_Unit + m_posYUnits 1 @@ -1537,7 +1539,7 @@ - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP 0 @@ -1576,7 +1578,7 @@ 0 1 - m_staticText12 + m_sizeXLabel 1 @@ -1620,8 +1622,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -1659,7 +1661,7 @@ 0 1 - m_ShapeSize_X_Ctrl + m_sizeXCtrl 1 @@ -1670,7 +1672,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -1711,8 +1713,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -1750,7 +1752,7 @@ 0 1 - m_PadShapeSizeX_Unit + m_sizeXUnits 1 @@ -1794,8 +1796,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -1833,7 +1835,7 @@ 0 1 - m_staticText15 + m_sizeYLabel 1 @@ -1877,8 +1879,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -1916,7 +1918,7 @@ 0 1 - m_ShapeSize_Y_Ctrl + m_sizeYCtrl 1 @@ -1927,7 +1929,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -1968,8 +1970,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -2007,7 +2009,7 @@ 0 1 - m_PadShapeSizeY_Unit + m_sizeYUnits 1 @@ -2051,8 +2053,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -2133,11 +2135,11 @@ - + 5 - wxEXPAND|wxLEFT|wxTOP + wxALL|wxEXPAND 0 - + 1 1 1 @@ -2151,7 +2153,7 @@ 1 0 - "0" "90" "-90" "180" "Custom" + "0" "90" "-90" "180" 1 1 @@ -2173,7 +2175,7 @@ 0 1 - m_PadOrient + m_orientation 1 @@ -2181,22 +2183,25 @@ 1 Resizable - 4 + -1 1 - + ; forward_declare 0 wxFILTER_NONE wxDefaultValidator + - PadOrientEvent + PadOrientEvent + + @@ -2218,12 +2223,14 @@ + PadOrientEvent + - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -2305,191 +2312,7 @@ - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND|wxLEFT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_PadOrientCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnValuesChanged - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - deg - - 0 - - - 0 - - 1 - m_customOrientUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP 0 @@ -2528,7 +2351,7 @@ 0 1 - m_staticText17 + m_offsetXLabel 1 @@ -2572,8 +2395,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -2611,7 +2434,7 @@ 0 1 - m_ShapeOffset_X_Ctrl + m_offsetXCtrl 1 @@ -2622,7 +2445,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -2663,8 +2486,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -2702,7 +2525,7 @@ 0 1 - m_PadShapeOffsetX_Unit + m_offsetXUnits 1 @@ -2746,7 +2569,7 @@ - 5 + 3 wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP 0 @@ -2785,7 +2608,7 @@ 0 1 - m_staticText19 + m_offsetYLabel 1 @@ -2829,8 +2652,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -2868,7 +2691,7 @@ 0 1 - m_ShapeOffset_Y_Ctrl + m_offsetYCtrl 1 @@ -2879,7 +2702,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -2920,8 +2743,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -2959,7 +2782,7 @@ 0 1 - m_PadShapeOffsetY_Unit + m_offsetYUnits 1 @@ -3003,7 +2826,7 @@ - 5 + 3 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP 0 @@ -3042,7 +2865,7 @@ 0 1 - m_staticText38 + m_padToDieLabel 1 @@ -3086,8 +2909,8 @@ - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -3125,7 +2948,7 @@ 0 1 - m_LengthPadToDieCtrl + m_padToDieCtrl 1 @@ -3136,7 +2959,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -3177,8 +3000,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -3216,7 +3039,7 @@ 0 1 - m_PadLengthDie_Unit + m_padToDieUnits 1 @@ -3260,251 +3083,8 @@ - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline4 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline5 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline6 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -3542,7 +3122,7 @@ 0 1 - m_staticText21 + m_trapDeltaLabel 1 @@ -3586,8 +3166,8 @@ - 5 - wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -3625,7 +3205,7 @@ 0 1 - m_ShapeDelta_Ctrl + m_trapDeltaCtrl 1 @@ -3636,7 +3216,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -3677,8 +3257,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -3716,7 +3296,7 @@ 0 1 - m_PadShapeDelta_Unit + m_trapDeltaUnits 1 @@ -3760,8 +3340,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -3799,7 +3379,7 @@ 0 1 - m_staticText23 + m_trapAxisLabel 1 @@ -3843,8 +3423,8 @@ - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxTOP + 3 + wxEXPAND|wxALL 0 1 @@ -3882,7 +3462,7 @@ 0 1 - m_trapDeltaDirChoice + m_trapAxisCtrl 1 @@ -3932,7 +3512,7 @@ 15 - wxBOTTOM|wxEXPAND|wxTOP + wxEXPAND|wxTOP 1 0 @@ -3941,250 +3521,7 @@ - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline7 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline8 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline9 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 + 3 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 @@ -4267,8 +3604,8 @@ - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 3 + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -4358,8 +3695,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -4441,8 +3778,8 @@ - 5 - wxLEFT|wxRIGHT|wxTOP + 3 + wxRIGHT|wxLEFT 0 1 @@ -4480,7 +3817,7 @@ 0 1 - m_staticTextCornerRadius + m_cornerRadiusLabel 1 @@ -4524,8 +3861,8 @@ - 5 - wxLEFT|wxRIGHT|wxTOP + 3 + wxRIGHT|wxLEFT 0 1 @@ -4563,7 +3900,7 @@ 0 1 - m_staticTextCornerRadiusValue + m_cornerRadiusValue 1 @@ -4607,8 +3944,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + 3 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -4646,7 +3983,7 @@ 0 1 - m_staticTextCornerSizeUnit + m_cornerRadiusUnits 1 @@ -4720,7 +4057,7 @@ 0 5 - wxALIGN_CENTER_VERTICAL|wxLEFT + wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT 0 1 @@ -4758,7 +4095,7 @@ 0 1 - m_staticText47 + m_holeShapeLabel 1 @@ -4803,7 +4140,7 @@ 5 - wxEXPAND|wxLEFT|wxTOP + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxTOP 0 1 @@ -4841,7 +4178,7 @@ 0 1 - m_DrillShapeCtrl + m_holeShapeCtrl 1 @@ -5012,7 +4349,7 @@ 0 1 - m_textPadDrillX + m_holeXLabel 1 @@ -5095,7 +4432,7 @@ 0 1 - m_PadDrill_X_Ctrl + m_holeXCtrl 1 @@ -5106,7 +4443,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -5148,7 +4485,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT 0 1 @@ -5186,7 +4523,7 @@ 0 1 - m_PadDrill_X_Unit + m_holeXUnits 1 @@ -5269,7 +4606,7 @@ 0 1 - m_textPadDrillY + m_holeYLabel 1 @@ -5352,7 +4689,7 @@ 0 1 - m_PadDrill_Y_Ctrl + m_holeYCtrl 1 @@ -5363,7 +4700,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -5405,7 +4742,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT 0 1 @@ -5443,7 +4780,7 @@ 0 1 - m_PadDrill_Y_Unit + m_holeYUnits 1 @@ -5488,13 +4825,13 @@ - + 5 wxEXPAND|wxLEFT|wxRIGHT|wxTOP 1 - + wxID_ANY - Layers + -1,-1 m_LayersSizer wxVERTICAL @@ -5676,17 +5013,17 @@ - + 5 wxEXPAND 0 - + bSizer11 wxHORIZONTAL none - 5 + 4 wxALIGN_CENTER_VERTICAL|wxALL|wxTOP 0 @@ -5769,7 +5106,7 @@ - 5 + 4 wxALL|wxEXPAND|wxTOP 1 @@ -5886,7 +5223,7 @@ 1 1 - + ,90,90,11,70,0 0 0 wxID_ANY @@ -5942,7 +5279,7 @@ - 5 + 4 wxLEFT|wxRIGHT 0 @@ -6030,7 +5367,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6118,7 +5455,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6206,7 +5543,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6294,7 +5631,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6382,7 +5719,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6470,7 +5807,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6558,7 +5895,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6646,7 +5983,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6734,7 +6071,7 @@ - 5 + 4 wxTOP|wxRIGHT|wxLEFT 0 @@ -6822,7 +6159,7 @@ - 5 + 4 wxALL 0 @@ -7001,18 +6338,18 @@ none 5 - wxALL|wxEXPAND + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 bSizerClearance wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Clearances @@ -7270,11 +6607,11 @@ - + 5 wxEXPAND 0 - + 3 wxBOTH 1 @@ -7288,7 +6625,7 @@ 0 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM + wxALIGN_CENTER_VERTICAL 0 1 @@ -7318,7 +6655,7 @@ 0 0 wxID_ANY - Net pad clearance: + Pad clearance: 0 @@ -7326,7 +6663,7 @@ 0 1 - m_staticTextNetClearance + m_clearanceLabel 1 @@ -7371,7 +6708,7 @@ 5 - wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + wxEXPAND|wxTOP|wxLEFT 0 1 @@ -7409,7 +6746,7 @@ 0 1 - m_NetClearanceValueCtrl + m_clearanceCtrl 1 @@ -7420,7 +6757,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -7462,7 +6799,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -7500,7 +6837,7 @@ 0 1 - m_NetClearanceUnits + m_clearanceUnits 1 @@ -7583,7 +6920,7 @@ 0 1 - m_MaskClearanceTitle + m_maskClearanceLabel 1 @@ -7666,7 +7003,7 @@ 0 1 - m_SolderMaskMarginCtrl + m_maskClearanceCtrl 1 @@ -7677,7 +7014,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -7757,7 +7094,7 @@ 0 1 - m_SolderMaskMarginUnits + m_maskClearanceUnits 1 @@ -7840,7 +7177,7 @@ 0 1 - m_staticTextSolderPaste + m_pasteClearanceLabel 1 @@ -7923,7 +7260,7 @@ 0 1 - m_SolderPasteMarginCtrl + m_pasteClearanceCtrl 1 @@ -7934,7 +7271,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -8014,7 +7351,7 @@ 0 1 - m_SolderPasteMarginUnits + m_pasteClearanceUnits 1 @@ -8480,7 +7817,7 @@ none 15 - wxBOTTOM|wxRIGHT|wxTOP + wxTOP|wxRIGHT 0 1 @@ -8817,11 +8154,11 @@ - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Connection to Copper Zones @@ -8830,11 +8167,11 @@ 1 protected - + 5 wxEXPAND 0 - + 3 wxBOTH 1 @@ -9059,7 +8396,7 @@ 0 0 wxID_ANY - Thermal relief width: + Thermal relief spoke width: 0 @@ -9067,7 +8404,7 @@ 0 1 - m_staticText49 + m_spokeWidthLabel 1 @@ -9150,7 +8487,7 @@ 0 1 - m_ThermalWidthCtrl + m_spokeWidthCtrl 1 @@ -9161,7 +8498,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -9241,7 +8578,7 @@ 0 1 - m_ThermalWidthUnits + m_spokeWidthUnits 1 @@ -9324,7 +8661,7 @@ 0 1 - m_staticText52 + m_thermalGapLabel 1 @@ -9407,7 +8744,7 @@ 0 1 - m_ThermalGapCtrl + m_thermalGapCtrl 1 @@ -9418,7 +8755,7 @@ 1 - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + ; ; forward_declare 0 @@ -9498,7 +8835,7 @@ 0 1 - m_ThermalGapUnits + m_thermalGapUnits 1 @@ -9547,7 +8884,7 @@ 5 - wxALL|wxEXPAND + wxEXPAND|wxALL 1 wxID_ANY @@ -10847,10 +10184,10 @@ 10 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + wxEXPAND|wxTOP|wxRIGHT 1 - 200,-1 + -1,-1 bSizerDisplayPad wxVERTICAL none @@ -10866,287 +10203,168 @@ 8 - wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP + wxTOP 0 - + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,11,70,0 + 0 + 0 wxID_ANY - Parent Footprint Orientation - -1,-1 - sbSizeModuleInfo - wxVERTICAL - 1 - none + Footprint name + + 0 + + + 0 + + 1 + m_parentInfoLine1 + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,11,70,0 + 0 + 0 + wxID_ANY + side and rotation + + 0 + + + 0 + + 1 + m_parentInfoLine2 + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Front side - - 0 - - - 0 - - 1 - m_staticModuleSideValue - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizerParentInfo - wxHORIZONTAL - none - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotation: - - 0 - - - 0 - - 1 - m_staticTitleModuleRot - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 180.0 - - 0 - - - 0 - - 1 - m_staticModuleRotValue - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -11160,8 +10378,8 @@ - 10 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 5 + wxEXPAND|wxALL 12 1 @@ -11196,7 +10414,7 @@ 0 - -1,-1 + 280,-1 1 m_panelShowPad 1 @@ -11207,7 +10425,7 @@ Resizable 1 - 220,-1 + -1,-1 0 @@ -11240,8 +10458,8 @@ - 10 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 5 + wxEXPAND|wxALL 12 1 @@ -11280,7 +10498,7 @@ 0 - + 280,-1 1 m_panelShowPadGal 1 @@ -11363,7 +10581,7 @@ 0 - + -1,-1 1 m_cbShowPadOutline 1 @@ -11423,8 +10641,8 @@ - 4 - wxALL|wxEXPAND + 10 + wxEXPAND|wxTOP|wxBOTTOM 0 1 @@ -11509,7 +10727,7 @@ 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + wxEXPAND|wxALL 0 0 @@ -11535,7 +10753,7 @@ - + 0 wxAUI_MGR_DEFAULT @@ -11597,100 +10815,17 @@ - + bSizermain wxVERTICAL none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Filled circle: set thickness to 0 Ring: set thickness to the width of the ring - - 0 - - - 0 - - 1 - m_staticTextInfo - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND + + 10 + wxEXPAND|wxALL 1 - - 6 + + 7 wxBOTH 2,4 @@ -11700,10 +10835,10 @@ wxFLEX_GROWMODE_SPECIFIED none 0 - 0 + 3 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -11733,7 +10868,7 @@ 0 0 wxID_ANY - Start point: + Start point 0 @@ -11786,7 +10921,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT 0 1 @@ -11824,7 +10959,7 @@ 0 1 - m_staticTextStartX + m_startXLabel 1 @@ -11869,7 +11004,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -11907,7 +11042,7 @@ 0 1 - m_textCtrPosX + m_startXCtrl 1 @@ -11959,182 +11094,8 @@ - 5 - wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y: - - 0 - - - 0 - - 1 - m_staticTextStartY - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrPosY - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL + 10 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -12172,7 +11133,90 @@ 0 1 - m_staticTextPosUnit + m_startXUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Y: + + 0 + + + 0 + + 1 + m_startYLabel 1 @@ -12217,7 +11261,98 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_startYCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -12247,7 +11382,90 @@ 0 0 wxID_ANY - End point: + unit + + 0 + + + 0 + + 1 + m_startYUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + End point 0 @@ -12300,7 +11518,7 @@ 5 - wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -12338,7 +11556,7 @@ 0 1 - m_staticTextEndX + m_endXLabel 1 @@ -12383,7 +11601,7 @@ 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -12421,7 +11639,7 @@ 0 1 - m_textCtrEndX + m_endXCtrl 1 @@ -12474,7 +11692,90 @@ 5 - wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_endXUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT 0 1 @@ -12512,7 +11813,7 @@ 0 1 - m_staticTextEndY + m_endYLabel 1 @@ -12557,7 +11858,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -12595,7 +11896,7 @@ 0 1 - m_textCtrEndY + m_endYCtrl 1 @@ -12648,7 +11949,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -12686,7 +11987,7 @@ 0 1 - m_staticTextEndUnit + m_endYUnits 1 @@ -12731,7 +12032,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -12761,7 +12062,7 @@ 0 0 wxID_ANY - Angle: + Radius: 0 @@ -12769,7 +12070,7 @@ 0 1 - m_staticTextAngle + m_radiusLabel 1 @@ -12824,7 +12125,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -12862,7 +12163,7 @@ 0 1 - m_textCtrAngle + m_radiusCtrl 1 @@ -12915,27 +12216,7 @@ 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -12965,7 +12246,7 @@ 0 0 wxID_ANY - degree + unit 0 @@ -12973,7 +12254,7 @@ 0 1 - m_staticTextAngleUnit + m_radiusUnits 1 @@ -13018,7 +12299,37 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT 0 1 @@ -13056,7 +12367,7 @@ 0 1 - m_staticTextThickness + m_thicknessLabel 1 @@ -13111,7 +12422,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -13149,7 +12460,7 @@ 0 1 - m_textCtrlThickness + m_thicknessCtrl 1 @@ -13202,27 +12513,7 @@ 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 1 @@ -13260,7 +12551,7 @@ 0 1 - m_staticTextThicknessUnit + m_thicknessUnits 1 @@ -13303,11 +12594,104 @@ + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + - 5 - wxEXPAND + 15 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,11,70,0 + 0 + 0 + wxID_ANY + Set thickness to 0 for a filled circle. + + 0 + + + 0 + + 1 + m_staticTextInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -13476,30 +12860,30 @@ - + bSizermain wxVERTICAL none - - 5 - wxEXPAND + + 10 + wxALL|wxEXPAND 1 - 6 + 7 wxBOTH 2,4 0 - fgSizerShapeProperties + fgSizerShapeProperties1 wxFLEX_GROWMODE_SPECIFIED none 0 - 0 + 3 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -13529,7 +12913,7 @@ 0 0 wxID_ANY - Move vector: + Move vector 0 @@ -13582,7 +12966,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT 0 1 @@ -13620,7 +13004,7 @@ 0 1 - m_staticTextMoveX + m_xLabel 1 @@ -13665,7 +13049,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -13703,7 +13087,7 @@ 0 1 - m_textCtrMoveX + m_xCtrl 1 @@ -13721,7 +13105,7 @@ wxFILTER_NONE wxDefaultValidator - 0 + @@ -13755,182 +13139,8 @@ - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y: - - 0 - - - 0 - - 1 - m_staticTextMoveY - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrMoveY - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL + 10 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -13968,7 +13178,90 @@ 0 1 - m_staticTextMoveUnit + m_xUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Y: + + 0 + + + 0 + + 1 + m_yLabel 1 @@ -14013,7 +13306,181 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_yCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_yUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -14051,7 +13518,7 @@ 0 1 - m_staticTextAngle + m_rotationLabel 1 @@ -14106,7 +13573,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -14144,7 +13611,7 @@ 0 1 - m_textCtrAngle + m_rotationCtrl 1 @@ -14162,7 +13629,7 @@ wxFILTER_NONE wxDefaultValidator - 0 + @@ -14197,27 +13664,7 @@ 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 1 @@ -14247,7 +13694,7 @@ 0 0 wxID_ANY - degree + deg 0 @@ -14255,7 +13702,7 @@ 0 1 - m_staticTextAngleUnit + m_rotationUnits 1 @@ -14266,7 +13713,7 @@ 1 - + ; forward_declare 0 @@ -14300,7 +13747,37 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -14338,7 +13815,7 @@ 0 1 - m_staticTextSF + m_scaleLabel 1 @@ -14393,7 +13870,7 @@ 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -14431,7 +13908,7 @@ 0 1 - m_textCtrlScalingFactor + m_scaleCtrl 1 @@ -14449,7 +13926,7 @@ wxFILTER_NONE wxDefaultValidator - 1.0 + 1 @@ -14512,6 +13989,16 @@ 0 + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + 5 wxALL|wxALIGN_CENTER_VERTICAL @@ -14544,7 +14031,7 @@ 0 0 wxID_ANY - Duplicate count: + Duplicate: 0 @@ -14703,31 +14190,11 @@ 0 - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - 5 - wxEXPAND + 10 + wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -14901,172 +14368,6 @@ bSizerMain wxVERTICAL none - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Coordinates are relative to anchor pad, orientation 0 - - 0 - - - 0 - - 1 - m_staticTextCornerListWarning - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,93,92,-1,70,0 - 0 - 0 - wxID_ANY - Incorrect polygon - - 0 - - - 0 - - 1 - m_staticTextValidate - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - 5 wxEXPAND @@ -15074,7 +14375,7 @@ bSizerUpper - wxVERTICAL + wxHORIZONTAL none 5 @@ -15082,23 +14383,166 @@ 1 - bSizer23 - wxHORIZONTAL + bLeftSizer + wxVERTICAL none + + 10 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 0 + 1 + + + + 1 + + + wxALIGN_LEFT + + wxALIGN_TOP + 0 + 1 + wxALIGN_CENTRE + 22 + "Pos X" "Pos Y" + wxALIGN_CENTRE + 2 + 100,100 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + 0 + 0 + 1 + 1 + + 1 + + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + + 1 + m_gridCornersList + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTRE + 80 + + wxALIGN_CENTRE + + 1 + 1 + + + 0 + + + + wxSIMPLE_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + onGridSelect + + onCellSelect + + + + + + + + + + + + + + + + + + + + + + 5 - wxEXPAND + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 - bSizerCornerlist - wxVERTICAL + bSizerRightButts + wxHORIZONTAL none 5 - wxALL - 1 - + wxTOP|wxLEFT + 0 + 1 1 1 @@ -15107,58 +14551,39 @@ - 0 - 1 + 1 - - - wxALIGN_LEFT - - wxALIGN_TOP 0 1 - wxALIGN_CENTRE - 30 - "Pos X" "Pos Y" - wxALIGN_CENTRE - 2 - 1 + 0 0 + Dock 0 Left - 0 - 1 - 0 - 0 - 1 1 1 + - - 1 0 0 + wxID_ANY - - - - 0 - 0 + Add Corner 0 0 - + 30,30 1 - m_gridCornersList + m_addButton 1 @@ -15166,55 +14591,24 @@ 1 Resizable - wxALIGN_CENTRE - 80 - - wxALIGN_CENTRE - - 1 + 1 - + wxBU_AUTODRAW + ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + + OnButtonAdd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - onGridSelect - - onCellSelect @@ -15239,196 +14633,388 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + wxTOP|wxRIGHT|wxLEFT 0 - - - bSizerRightButts - wxHORIZONTAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Add - - 0 - - - 0 - - 1 - m_buttonAdd - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - onButtonAdd - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Delete - - 0 - - - 0 - - 1 - m_buttonDelete - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnButtonDelete - - - - - - - - - - - - - - - - - - - - - - - - - + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_ANY + Delete Corner + + 0 + + + 0 + 30,30 + 1 + m_deleteButton + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnButtonDelete + + + + + + + + + + + + + + + + + + + + + + + - 5 - wxEXPAND | wxALL + 10 + wxALL|wxEXPAND + 0 + + 5 + wxBOTH + 1 + + 0 + + fgSizerThickness + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Outline thickness: + + 0 + + + 0 + + 1 + m_thicknessLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_thicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_thicknessUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bRightSizer + wxVERTICAL + none + + 10 + wxEXPAND|wxTOP|wxRIGHT 1 1 @@ -15463,7 +15049,7 @@ 0 - 300,300 + 290,290 1 m_panelPoly 1 @@ -15480,7 +15066,7 @@ - wxSUNKEN_BORDER|wxTAB_TRAVERSAL + wxTAB_TRAVERSAL @@ -15506,372 +15092,189 @@ - - - - 5 - - 0 - - 5 - wxBOTH - 1 - - 0 - - fgSizerThickness - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - 5 - wxALL|wxALIGN_CENTER_VERTICAL + 10 + wxEXPAND|wxRIGHT 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Outline thickness: - - 0 - - - 0 - - 1 - m_staticTextThickness - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlThickness - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 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 - unit - - 0 - - - 0 - - 1 - m_staticTextThicknessUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 10 - protected - 10 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - (Thickness outline is usually set to 0) - - 0 - - - 0 - - 1 - m_staticTextInfo - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - + + -1,-1 + m_warningSizer + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 50,50 + 1 + m_warningIcon + 1 + + + protected + 1 + + Resizable + 1 + + ; forward_declare + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + MyLabel + + 0 + + + 0 + + 1 + m_warningText + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 88 + protected + 5 + + @@ -15879,8 +15282,8 @@ - 5 - wxEXPAND + 10 + wxEXPAND|wxRIGHT|wxLEFT 0 1 @@ -15961,28 +15364,226 @@ 5 - wxEXPAND|wxALL + wxEXPAND 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 + - m_sdbSizer - protected - - - - - - - - + bSizer24 + wxHORIZONTAL + none + + 10 + wxEXPAND|wxLEFT + 1 + + + bSizer25 + wxVERTICAL + none + + 4 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + 0 + protected + 0 + + + + 5 + + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,11,70,0 + 0 + 0 + wxID_ANY + Coordinates are relative to anchor pad, rotated 0.0 deg. + + 0 + + + 0 + + 1 + m_statusLine1 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,90,11,70,0 + 0 + 0 + wxID_ANY + Set thickness to 0 for a filled polygon. + + 0 + + + 0 + + 1 + m_statusLine2 + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer + protected + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 91b938261d..164780cc66 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -12,6 +12,7 @@ #include #include class TEXT_CTRL_EVAL; +class WIDGET_NET_SELECTOR; #include "dialog_shim.h" #include @@ -21,8 +22,8 @@ class TEXT_CTRL_EVAL; #include #include #include +#include #include -#include #include #include #include @@ -37,9 +38,11 @@ class TEXT_CTRL_EVAL; #include #include #include +#include #include #include #include +#include /////////////////////////////////////////////////////////////////////////// @@ -54,8 +57,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM enum { wxID_DIALOG_EDIT_PAD = 1000, - wxID_PADNUMCTRL, - wxID_PADNETNAMECTRL + wxID_PADNUMCTRL }; wxNotebook* m_notebook; @@ -63,63 +65,55 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_PadNumText; wxTextCtrl* m_PadNumCtrl; wxStaticText* m_PadNameText; - wxTextCtrl* m_PadNetNameCtrl; + WIDGET_NET_SELECTOR* m_PadNetNameCombo; wxStaticText* m_staticText44; wxChoice* m_PadType; wxStaticText* m_staticText45; wxChoice* m_PadShape; - wxStaticText* m_staticText4; - TEXT_CTRL_EVAL* m_PadPosition_X_Ctrl; - wxStaticText* m_PadPosX_Unit; - wxStaticText* m_staticText41; - TEXT_CTRL_EVAL* m_PadPosition_Y_Ctrl; - wxStaticText* m_PadPosY_Unit; - wxStaticText* m_staticText12; - TEXT_CTRL_EVAL* m_ShapeSize_X_Ctrl; - wxStaticText* m_PadShapeSizeX_Unit; - wxStaticText* m_staticText15; - TEXT_CTRL_EVAL* m_ShapeSize_Y_Ctrl; - wxStaticText* m_PadShapeSizeY_Unit; + wxStaticText* m_posXLabel; + wxTextCtrl* m_posXCtrl; + wxStaticText* m_posXUnits; + wxStaticText* m_posYLabel; + wxTextCtrl* m_posYCtrl; + wxStaticText* m_posYUnits; + wxStaticText* m_sizeXLabel; + wxTextCtrl* m_sizeXCtrl; + wxStaticText* m_sizeXUnits; + wxStaticText* m_sizeYLabel; + wxTextCtrl* m_sizeYCtrl; + wxStaticText* m_sizeYUnits; wxStaticText* m_PadOrientText; - wxChoice* m_PadOrient; + wxComboBox* m_orientation; wxStaticText* m_staticText491; - TEXT_CTRL_EVAL* m_PadOrientCtrl; - wxStaticText* m_customOrientUnits; - wxStaticText* m_staticText17; - TEXT_CTRL_EVAL* m_ShapeOffset_X_Ctrl; - wxStaticText* m_PadShapeOffsetX_Unit; - wxStaticText* m_staticText19; - TEXT_CTRL_EVAL* m_ShapeOffset_Y_Ctrl; - wxStaticText* m_PadShapeOffsetY_Unit; - wxStaticText* m_staticText38; - TEXT_CTRL_EVAL* m_LengthPadToDieCtrl; - wxStaticText* m_PadLengthDie_Unit; - wxStaticLine* m_staticline4; - wxStaticLine* m_staticline5; - wxStaticLine* m_staticline6; - wxStaticText* m_staticText21; - TEXT_CTRL_EVAL* m_ShapeDelta_Ctrl; - wxStaticText* m_PadShapeDelta_Unit; - wxStaticText* m_staticText23; - wxChoice* m_trapDeltaDirChoice; - wxStaticLine* m_staticline7; - wxStaticLine* m_staticline8; - wxStaticLine* m_staticline9; + wxStaticText* m_offsetXLabel; + wxTextCtrl* m_offsetXCtrl; + wxStaticText* m_offsetXUnits; + wxStaticText* m_offsetYLabel; + wxTextCtrl* m_offsetYCtrl; + wxStaticText* m_offsetYUnits; + wxStaticText* m_padToDieLabel; + wxTextCtrl* m_padToDieCtrl; + wxStaticText* m_padToDieUnits; + wxStaticText* m_trapDeltaLabel; + wxTextCtrl* m_trapDeltaCtrl; + wxStaticText* m_trapDeltaUnits; + wxStaticText* m_trapAxisLabel; + wxChoice* m_trapAxisCtrl; wxStaticText* m_staticTextCornerSizeRatio; TEXT_CTRL_EVAL* m_tcCornerSizeRatio; wxStaticText* m_staticTextCornerSizeRatioUnit; - wxStaticText* m_staticTextCornerRadius; - wxStaticText* m_staticTextCornerRadiusValue; - wxStaticText* m_staticTextCornerSizeUnit; - wxStaticText* m_staticText47; - wxChoice* m_DrillShapeCtrl; + wxStaticText* m_cornerRadiusLabel; + wxStaticText* m_cornerRadiusValue; + wxStaticText* m_cornerRadiusUnits; + wxStaticText* m_holeShapeLabel; + wxChoice* m_holeShapeCtrl; wxStaticText* m_staticText51; - wxStaticText* m_textPadDrillX; - TEXT_CTRL_EVAL* m_PadDrill_X_Ctrl; - wxStaticText* m_PadDrill_X_Unit; - wxStaticText* m_textPadDrillY; - TEXT_CTRL_EVAL* m_PadDrill_Y_Ctrl; - wxStaticText* m_PadDrill_Y_Unit; + wxStaticText* m_holeXLabel; + wxTextCtrl* m_holeXCtrl; + wxStaticText* m_holeXUnits; + wxStaticText* m_holeYLabel; + wxTextCtrl* m_holeYCtrl; + wxStaticText* m_holeYUnits; wxBoxSizer* m_FlippedWarningSizer; wxStaticBitmap* m_FlippedWarningIcon; wxStaticText* m_staticText86; @@ -139,15 +133,15 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxPanel* m_localSettingsPanel; wxStaticText* m_staticTextInfoPosValue; wxStaticText* m_staticTextInfoNegVal; - wxStaticText* m_staticTextNetClearance; - TEXT_CTRL_EVAL* m_NetClearanceValueCtrl; - wxStaticText* m_NetClearanceUnits; - wxStaticText* m_MaskClearanceTitle; - TEXT_CTRL_EVAL* m_SolderMaskMarginCtrl; - wxStaticText* m_SolderMaskMarginUnits; - wxStaticText* m_staticTextSolderPaste; - TEXT_CTRL_EVAL* m_SolderPasteMarginCtrl; - wxStaticText* m_SolderPasteMarginUnits; + wxStaticText* m_clearanceLabel; + wxTextCtrl* m_clearanceCtrl; + wxStaticText* m_clearanceUnits; + wxStaticText* m_maskClearanceLabel; + wxTextCtrl* m_maskClearanceCtrl; + wxStaticText* m_maskClearanceUnits; + wxStaticText* m_pasteClearanceLabel; + wxTextCtrl* m_pasteClearanceCtrl; + wxStaticText* m_pasteClearanceUnits; wxStaticText* m_staticTextRatio; TEXT_CTRL_EVAL* m_SolderPasteMarginRatioCtrl; wxStaticText* m_SolderPasteRatioMarginUnits; @@ -158,12 +152,12 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStaticBoxSizer* m_sbSizerZonesSettings; wxStaticText* m_staticText40; wxChoice* m_ZoneConnectionChoice; - wxStaticText* m_staticText49; - TEXT_CTRL_EVAL* m_ThermalWidthCtrl; - wxStaticText* m_ThermalWidthUnits; - wxStaticText* m_staticText52; - TEXT_CTRL_EVAL* m_ThermalGapCtrl; - wxStaticText* m_ThermalGapUnits; + wxStaticText* m_spokeWidthLabel; + wxTextCtrl* m_spokeWidthCtrl; + wxStaticText* m_spokeWidthUnits; + wxStaticText* m_thermalGapLabel; + wxTextCtrl* m_thermalGapCtrl; + wxStaticText* m_thermalGapUnits; wxStaticBoxSizer* m_sbSizerCustomShapedZonesSettings; wxStaticText* m_staticTextCsZconnTitle; wxChoice* m_ZoneConnectionCustom; @@ -180,9 +174,8 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_buttonDup; wxButton* m_buttonGeometry; wxButton* m_buttonImport; - wxStaticText* m_staticModuleSideValue; - wxStaticText* m_staticTitleModuleRot; - wxStaticText* m_staticModuleRotValue; + wxStaticText* m_parentInfoLine1; + wxStaticText* m_parentInfoLine2; wxPanel* m_panelShowPad; PCB_DRAW_PANEL_GAL* m_panelShowPadGal; KIGFX::GAL_DISPLAY_OPTIONS m_galOptions; @@ -230,25 +223,27 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM private: protected: - wxStaticText* m_staticTextInfo; wxStaticText* m_staticTextPosStart; - wxStaticText* m_staticTextStartX; - TEXT_CTRL_EVAL* m_textCtrPosX; - wxStaticText* m_staticTextStartY; - TEXT_CTRL_EVAL* m_textCtrPosY; - wxStaticText* m_staticTextPosUnit; + wxStaticText* m_startXLabel; + TEXT_CTRL_EVAL* m_startXCtrl; + wxStaticText* m_startXUnits; + wxStaticText* m_startYLabel; + TEXT_CTRL_EVAL* m_startYCtrl; + wxStaticText* m_startYUnits; wxStaticText* m_staticTextPosEnd; - wxStaticText* m_staticTextEndX; - TEXT_CTRL_EVAL* m_textCtrEndX; - wxStaticText* m_staticTextEndY; - TEXT_CTRL_EVAL* m_textCtrEndY; - wxStaticText* m_staticTextEndUnit; - wxStaticText* m_staticTextAngle; - TEXT_CTRL_EVAL* m_textCtrAngle; - wxStaticText* m_staticTextAngleUnit; - wxStaticText* m_staticTextThickness; - wxTextCtrl* m_textCtrlThickness; - wxStaticText* m_staticTextThicknessUnit; + wxStaticText* m_endXLabel; + TEXT_CTRL_EVAL* m_endXCtrl; + wxStaticText* m_endXUnits; + wxStaticText* m_endYLabel; + TEXT_CTRL_EVAL* m_endYCtrl; + wxStaticText* m_endYUnits; + wxStaticText* m_radiusLabel; + TEXT_CTRL_EVAL* m_radiusCtrl; + wxStaticText* m_radiusUnits; + wxStaticText* m_thicknessLabel; + wxTextCtrl* m_thicknessCtrl; + wxStaticText* m_thicknessUnits; + wxStaticText* m_staticTextInfo; wxStaticLine* m_staticline1; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; @@ -270,16 +265,17 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM protected: wxStaticText* m_staticTextMove; - wxStaticText* m_staticTextMoveX; - TEXT_CTRL_EVAL* m_textCtrMoveX; - wxStaticText* m_staticTextMoveY; - TEXT_CTRL_EVAL* m_textCtrMoveY; - wxStaticText* m_staticTextMoveUnit; - wxStaticText* m_staticTextAngle; - TEXT_CTRL_EVAL* m_textCtrAngle; - wxStaticText* m_staticTextAngleUnit; - wxStaticText* m_staticTextSF; - TEXT_CTRL_EVAL* m_textCtrlScalingFactor; + wxStaticText* m_xLabel; + TEXT_CTRL_EVAL* m_xCtrl; + wxStaticText* m_xUnits; + wxStaticText* m_yLabel; + TEXT_CTRL_EVAL* m_yCtrl; + wxStaticText* m_yUnits; + wxStaticText* m_rotationLabel; + TEXT_CTRL_EVAL* m_rotationCtrl; + wxStaticText* m_rotationUnits; + wxStaticText* m_scaleLabel; + TEXT_CTRL_EVAL* m_scaleCtrl; wxStaticText* m_staticTextDupCnt; wxSpinCtrl* m_spinCtrlDuplicateCount; wxStaticLine* m_staticline1; @@ -302,17 +298,18 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM private: protected: - wxStaticText* m_staticTextCornerListWarning; - wxStaticText* m_staticTextValidate; wxGrid* m_gridCornersList; - wxButton* m_buttonAdd; - wxButton* m_buttonDelete; + wxBitmapButton* m_addButton; + wxBitmapButton* m_deleteButton; + wxStaticText* m_thicknessLabel; + TEXT_CTRL_EVAL* m_thicknessCtrl; + wxStaticText* m_thicknessUnits; wxPanel* m_panelPoly; - wxStaticText* m_staticTextThickness; - TEXT_CTRL_EVAL* m_textCtrlThickness; - wxStaticText* m_staticTextThicknessUnit; - wxStaticText* m_staticTextInfo; + wxStaticBitmap* m_warningIcon; + wxStaticText* m_warningText; wxStaticLine* m_staticline3; + wxStaticText* m_statusLine1; + wxStaticText* m_statusLine2; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; @@ -320,7 +317,7 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); } virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); } - virtual void onButtonAdd( wxCommandEvent& event ) { event.Skip(); } + virtual void OnButtonAdd( wxCommandEvent& event ) { event.Skip(); } virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); } virtual void onPaintPolyPanel( wxPaintEvent& event ) { event.Skip(); } virtual void onPolyPanelResize( wxSizeEvent& event ) { event.Skip(); }