Pcbnew: control of masks clearance: Pad Editor Dialog rewritten to handle local mask clearances and a local Net clearance
This commit is contained in:
parent
f65ae5cd87
commit
077fff6f5f
|
@ -5,6 +5,12 @@ Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
|
||||||
|
2009-Nov-05 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||||
|
================================================================================
|
||||||
|
++pcbnew
|
||||||
|
control of masks clearance: Pad Editor Dialog rewritten to handle mask clearances
|
||||||
|
and a locad Net clearance
|
||||||
|
|
||||||
2009-Nov-5 UPDATE Dick Hollenbeck <dick@softplc.com>
|
2009-Nov-5 UPDATE Dick Hollenbeck <dick@softplc.com>
|
||||||
================================================================================
|
================================================================================
|
||||||
++all
|
++all
|
||||||
|
|
|
@ -126,12 +126,12 @@ WinEDA_MainFrame::WinEDA_MainFrame( wxWindow* parent,
|
||||||
m_auimgr.AddPane(m_HToolBar,
|
m_auimgr.AddPane(m_HToolBar,
|
||||||
wxAuiPaneInfo(horiz).Name(wxT("m_HToolBar")).Top());
|
wxAuiPaneInfo(horiz).Name(wxT("m_HToolBar")).Top());
|
||||||
|
|
||||||
m_auimgr.AddPane(m_DialogWin,
|
|
||||||
wxAuiPaneInfo(horiz).Name(wxT("m_DialogWin")).Center());
|
|
||||||
|
|
||||||
m_auimgr.AddPane(m_CommandWin,
|
m_auimgr.AddPane(m_CommandWin,
|
||||||
wxAuiPaneInfo().Name(wxT("m_CommandWin")).CentrePane());
|
wxAuiPaneInfo().Name(wxT("m_CommandWin")).CentrePane());
|
||||||
|
|
||||||
|
m_auimgr.AddPane(m_DialogWin,
|
||||||
|
wxAuiPaneInfo(horiz).Name(wxT("m_DialogWin")).CentrePane());
|
||||||
|
|
||||||
m_auimgr.AddPane(m_LeftWin,
|
m_auimgr.AddPane(m_LeftWin,
|
||||||
wxAuiPaneInfo(horiz).Name(wxT("m_LeftWin")).Left().BestSize(clientsize.x/3,clientsize.y));
|
wxAuiPaneInfo(horiz).Name(wxT("m_LeftWin")).Left().BestSize(clientsize.x/3,clientsize.y));
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
@ -215,6 +215,10 @@ void WinEDA_MainFrame::OnSashDrag( wxSashEvent& event )
|
||||||
void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
|
void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
|
||||||
/************************************************/
|
/************************************************/
|
||||||
{
|
{
|
||||||
|
#if defined(KICAD_AUIMANAGER)
|
||||||
|
if(m_auimgr.GetManagedWindow())
|
||||||
|
m_auimgr.Update();
|
||||||
|
#else
|
||||||
if( m_CommandWin && m_BottomWin )
|
if( m_CommandWin && m_BottomWin )
|
||||||
{
|
{
|
||||||
int w, h, dy;
|
int w, h, dy;
|
||||||
|
@ -236,9 +240,6 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
|
||||||
layout.LayoutFrame( this );
|
layout.LayoutFrame( this );
|
||||||
if( m_CommandWin )
|
if( m_CommandWin )
|
||||||
m_CommandWin->Refresh( TRUE );
|
m_CommandWin->Refresh( TRUE );
|
||||||
#if defined(KICAD_AUIMANAGER)
|
|
||||||
if(m_auimgr.GetManagedWindow())
|
|
||||||
m_auimgr.Update();
|
|
||||||
#endif
|
#endif
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,12 +141,6 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
|
||||||
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL netclass") );
|
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL netclass") );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL net") );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if( netclass )
|
if( netclass )
|
||||||
return netclass;
|
return netclass;
|
||||||
|
|
|
@ -203,6 +203,7 @@ void D_PAD::Copy( D_PAD* source )
|
||||||
m_PadShape = source->m_PadShape; // forme CERCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID ou libre
|
m_PadShape = source->m_PadShape; // forme CERCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID ou libre
|
||||||
m_Attribut = source->m_Attribut; // NORMAL, PAD_SMD, PAD_CONN, Bit 7 = STACK
|
m_Attribut = source->m_Attribut; // NORMAL, PAD_SMD, PAD_CONN, Bit 7 = STACK
|
||||||
m_Orient = source->m_Orient; // en 1/10 degres
|
m_Orient = source->m_Orient; // en 1/10 degres
|
||||||
|
m_LocalClearance = source->m_LocalClearance;
|
||||||
m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin;
|
m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin;
|
||||||
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
|
m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin;
|
||||||
m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio;
|
m_LocalSolderPasteMarginRatio = source->m_LocalSolderPasteMarginRatio;
|
||||||
|
@ -213,6 +214,38 @@ void D_PAD::Copy( D_PAD* source )
|
||||||
m_ShortNetname = source->m_ShortNetname;
|
m_ShortNetname = source->m_ShortNetname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Virtual function GetClearance
|
||||||
|
* returns the clearance in 1/10000 inches. If \a aItem is not NULL then the
|
||||||
|
* returned clearance is the greater of this object's NETCLASS clearance and
|
||||||
|
* aItem's NETCLASS clearance. If \a aItem is NULL, then this objects clearance
|
||||||
|
* is returned.
|
||||||
|
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
|
||||||
|
* @return int - the clearance in 1/10000 inches.
|
||||||
|
*/
|
||||||
|
int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
|
||||||
|
{
|
||||||
|
int clearance = m_LocalClearance;
|
||||||
|
if ( clearance == 0 )
|
||||||
|
{
|
||||||
|
if( GetParent() && ((MODULE*)GetParent())->m_LocalClearance )
|
||||||
|
clearance = ((MODULE*)GetParent())->m_LocalClearance;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( clearance == 0 )
|
||||||
|
return BOARD_CONNECTED_ITEM::GetClearance( aItem );
|
||||||
|
|
||||||
|
if( aItem )
|
||||||
|
{
|
||||||
|
NETCLASS* hisclass = aItem->GetNetClass();
|
||||||
|
if( hisclass )
|
||||||
|
{
|
||||||
|
int hisClearance = hisclass->GetClearance();
|
||||||
|
return max( hisClearance, clearance );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return clearance;
|
||||||
|
}
|
||||||
|
|
||||||
// Mask margins handling:
|
// Mask margins handling:
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,18 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mask margins handling:
|
/**
|
||||||
|
* Function GetClearance
|
||||||
|
* returns the clearance in 1/10000 inches. If \a aItem is not NULL then the
|
||||||
|
* returned clearance is the greater of this object's NETCLASS clearance and
|
||||||
|
* aItem's NETCLASS clearance. If \a aItem is NULL, then this objects clearance
|
||||||
|
* is returned.
|
||||||
|
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
|
||||||
|
* @return int - the clearance in 1/10000 inches.
|
||||||
|
*/
|
||||||
|
virtual int GetClearance( BOARD_CONNECTED_ITEM* aItem = NULL ) const;
|
||||||
|
|
||||||
|
// Mask margins handling:
|
||||||
|
|
||||||
/** Function GetSolderMaskMargin
|
/** Function GetSolderMaskMargin
|
||||||
* @return the margin for the solder mask layer
|
* @return the margin for the solder mask layer
|
||||||
|
|
|
@ -48,25 +48,19 @@ static long Std_Pad_Layers[NBTYPES] =
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
/* class DialogPadProperties, derived from DialogPadPropertiesBase, */
|
/* class DIALOG_PAD_PROPERTIES, derived from DIALOG_PAD_PROPERTIES_BASE, */
|
||||||
/* created by wxFormBuilder */
|
/* created by wxFormBuilder */
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
class DialogPadProperties : public DialogPadPropertiesBase
|
class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinEDA_BasePcbFrame* m_Parent;
|
WinEDA_BasePcbFrame* m_Parent;
|
||||||
wxDC* m_DC;
|
wxDC* m_DC;
|
||||||
D_PAD* m_CurrentPad;
|
D_PAD* m_CurrentPad;
|
||||||
|
|
||||||
WinEDA_SizeCtrl* m_PadSizeCtrl;
|
|
||||||
WinEDA_PositionCtrl* m_PadPositionCtrl;
|
|
||||||
WinEDA_SizeCtrl* m_PadDeltaSizeCtrl;
|
|
||||||
WinEDA_SizeCtrl* m_PadOffsetCtrl;
|
|
||||||
WinEDA_SizeCtrl* m_PadDrillCtrl;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DialogPadProperties( WinEDA_BasePcbFrame* parent, D_PAD* Pad, wxDC* DC );
|
DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD* Pad, wxDC* DC );
|
||||||
void Init( );
|
void InitDialog( );
|
||||||
void OnPadShapeSelection( wxCommandEvent& event );
|
void OnPadShapeSelection( wxCommandEvent& event );
|
||||||
void OnDrillShapeSelected( wxCommandEvent& event );
|
void OnDrillShapeSelected( wxCommandEvent& event );
|
||||||
void PadOrientEvent( wxCommandEvent& event );
|
void PadOrientEvent( wxCommandEvent& event );
|
||||||
|
@ -78,8 +72,8 @@ public:
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************************/
|
/*******************************************************************************************/
|
||||||
DialogPadProperties::DialogPadProperties( WinEDA_BasePcbFrame* parent, D_PAD* Pad, wxDC* DC ) :
|
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD* Pad, wxDC* DC ) :
|
||||||
DialogPadPropertiesBase( parent )
|
DIALOG_PAD_PROPERTIES_BASE( parent )
|
||||||
/*******************************************************************************************/
|
/*******************************************************************************************/
|
||||||
{
|
{
|
||||||
m_Parent = parent;
|
m_Parent = parent;
|
||||||
|
@ -92,7 +86,7 @@ DialogPadProperties::DialogPadProperties( WinEDA_BasePcbFrame* parent, D_PAD* Pa
|
||||||
g_Current_PadName = m_CurrentPad->ReturnStringPadName();
|
g_Current_PadName = m_CurrentPad->ReturnStringPadName();
|
||||||
}
|
}
|
||||||
|
|
||||||
Init( );
|
InitDialog( );
|
||||||
if( GetSizer() )
|
if( GetSizer() )
|
||||||
{
|
{
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
@ -104,18 +98,18 @@ DialogPadProperties::DialogPadProperties( WinEDA_BasePcbFrame* parent, D_PAD* Pa
|
||||||
void WinEDA_BasePcbFrame::InstallPadOptionsFrame( D_PAD* Pad, wxDC* DC, const wxPoint& pos )
|
void WinEDA_BasePcbFrame::InstallPadOptionsFrame( D_PAD* Pad, wxDC* DC, const wxPoint& pos )
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
{
|
{
|
||||||
DialogPadProperties* frame = new DialogPadProperties( this, Pad, DC );
|
DIALOG_PAD_PROPERTIES dlg( this, Pad, DC );
|
||||||
|
dlg.ShowModal();
|
||||||
frame->ShowModal(); frame->Destroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
void DialogPadProperties::Init( )
|
void DIALOG_PAD_PROPERTIES::InitDialog( )
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
wxCommandEvent cmd_event;
|
wxCommandEvent cmd_event;
|
||||||
|
int internalUnits = m_Parent->m_InternalUnits;
|
||||||
|
|
||||||
SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key
|
SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key
|
||||||
|
|
||||||
|
@ -125,31 +119,45 @@ void DialogPadProperties::Init( )
|
||||||
if( pad == NULL )
|
if( pad == NULL )
|
||||||
pad = &g_Pad_Master;
|
pad = &g_Pad_Master;
|
||||||
|
|
||||||
m_PadPositionCtrl = new WinEDA_PositionCtrl( this, _( "Pad Position" ),
|
// Display current unit name in dialog:
|
||||||
pad->m_Pos,
|
m_PadPosX_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
g_UnitMetric, m_PadPositionBoxSizer,
|
m_PadPosY_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
m_Parent->m_InternalUnits );
|
m_PadDrill_X_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadDrill_Y_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeSizeX_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeSizeY_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeOffsetX_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeOffsetY_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeDeltaX_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_PadShapeDeltaY_Unit->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
// Display current pad masks clearances units
|
||||||
|
m_NetClearanceUnits->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_SolderMaskMarginUnits->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
m_SolderPasteMarginUnits->SetLabel( GetUnitsLabel( g_UnitMetric ) );
|
||||||
|
|
||||||
m_PadSizeCtrl = new WinEDA_SizeCtrl( this, _( "Pad Size" ),
|
// Display current pad parameters units:
|
||||||
pad->m_Size,
|
PutValueInLocalUnits( *m_PadPosition_X_Ctrl, pad->m_Pos.x, internalUnits );
|
||||||
g_UnitMetric, m_PadPositionBoxSizer,
|
PutValueInLocalUnits( *m_PadPosition_Y_Ctrl, pad->m_Pos.y, internalUnits );
|
||||||
m_Parent->m_InternalUnits );
|
|
||||||
|
|
||||||
m_PadDeltaSizeCtrl = new WinEDA_SizeCtrl( this, _( "Delta" ),
|
PutValueInLocalUnits( *m_PadDrill_X_Ctrl, pad->m_Drill.x, internalUnits );
|
||||||
pad->m_DeltaSize,
|
PutValueInLocalUnits( *m_PadDrill_Y_Ctrl, pad->m_Drill.y, internalUnits );
|
||||||
g_UnitMetric, m_PadPositionBoxSizer,
|
|
||||||
m_Parent->m_InternalUnits );
|
|
||||||
|
|
||||||
m_PadOffsetCtrl = new WinEDA_SizeCtrl( this, _( "Offset" ),
|
PutValueInLocalUnits( *m_ShapeSize_X_Ctrl, pad->m_Size.x, internalUnits );
|
||||||
pad->m_Offset,
|
PutValueInLocalUnits( *m_ShapeSize_Y_Ctrl, pad->m_Size.y, internalUnits );
|
||||||
g_UnitMetric, m_PadPositionBoxSizer,
|
|
||||||
m_Parent->m_InternalUnits );
|
|
||||||
|
|
||||||
/* In second column */
|
PutValueInLocalUnits( *m_ShapeOffset_X_Ctrl, pad->m_Offset.x, internalUnits );
|
||||||
m_PadDrillCtrl = new WinEDA_SizeCtrl( this, _( "Pad drill" ),
|
PutValueInLocalUnits( *m_ShapeOffset_Y_Ctrl, pad->m_Offset.y, internalUnits );
|
||||||
pad->m_Drill,
|
|
||||||
g_UnitMetric, m_DrillShapeBoxSizer,
|
PutValueInLocalUnits( *m_ShapeDelta_X_Ctrl, pad->m_DeltaSize.x, internalUnits );
|
||||||
m_Parent->m_InternalUnits );
|
PutValueInLocalUnits( *m_ShapeDelta_Y_Ctrl, pad->m_DeltaSize.y, internalUnits );
|
||||||
|
|
||||||
|
PutValueInLocalUnits( *m_NetClearanceValueCtrl, pad->m_LocalClearance, internalUnits );
|
||||||
|
PutValueInLocalUnits( *m_SolderMaskMarginCtrl, pad->m_LocalSolderMaskMargin, internalUnits );
|
||||||
|
PutValueInLocalUnits( *m_SolderPasteMarginCtrl, pad->m_LocalSolderPasteMargin, internalUnits );
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( wxT( "%.1f" ), pad->m_LocalSolderPasteMarginRatio * 100.0 );
|
||||||
|
m_SolderPasteMarginRatioCtrl->SetValue( msg );
|
||||||
|
|
||||||
if( m_CurrentPad )
|
if( m_CurrentPad )
|
||||||
{
|
{
|
||||||
|
@ -158,7 +166,8 @@ void DialogPadProperties::Init( )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tmp = g_Pad_Master.m_Orient;
|
tmp = g_Pad_Master.m_Orient;
|
||||||
wxString msg; msg << tmp;
|
msg.Clear();
|
||||||
|
msg << tmp;
|
||||||
m_PadOrientCtrl->SetValue( msg );
|
m_PadOrientCtrl->SetValue( msg );
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,25 +176,25 @@ void DialogPadProperties::Init( )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
m_PadOrient->SetSelection( 0 );
|
m_PadOrient->SetSelection( 0 );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case - 2700:
|
case - 2700:
|
||||||
case 900:
|
case 900:
|
||||||
m_PadOrient->SetSelection( 1 );
|
m_PadOrient->SetSelection( 1 );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case - 900:
|
case - 900:
|
||||||
case 2700:
|
case 2700:
|
||||||
m_PadOrient->SetSelection( 2 );
|
m_PadOrient->SetSelection( 2 );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1800:
|
case 1800:
|
||||||
case - 1800:
|
case - 1800:
|
||||||
m_PadOrient->SetSelection( 3 );
|
m_PadOrient->SetSelection( 3 );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -246,91 +255,98 @@ void DialogPadProperties::Init( )
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
void DialogPadProperties::OnPadShapeSelection( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
{
|
{
|
||||||
switch( m_PadShape->GetSelection() )
|
switch( m_PadShape->GetSelection() )
|
||||||
{
|
{
|
||||||
case 0: //CIRCLE:
|
case 0: //CIRCLE:
|
||||||
m_PadDeltaSizeCtrl->Enable( FALSE, FALSE );
|
m_ShapeDelta_X_Ctrl->Enable( false );
|
||||||
m_PadSizeCtrl->Enable( TRUE, FALSE );
|
m_ShapeDelta_Y_Ctrl->Enable( false );
|
||||||
|
m_ShapeSize_Y_Ctrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: //OVALE:
|
case 1: //OVALE:
|
||||||
m_PadDeltaSizeCtrl->Enable( FALSE, FALSE );
|
m_ShapeDelta_X_Ctrl->Enable( false );
|
||||||
m_PadSizeCtrl->Enable( TRUE, TRUE );
|
m_ShapeDelta_Y_Ctrl->Enable( false );
|
||||||
|
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // PAD_RECT:
|
case 2: // PAD_RECT:
|
||||||
m_PadDeltaSizeCtrl->Enable( FALSE, FALSE );
|
m_ShapeDelta_X_Ctrl->Enable( false );
|
||||||
m_PadSizeCtrl->Enable( TRUE, TRUE );
|
m_ShapeDelta_Y_Ctrl->Enable( false );
|
||||||
|
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: //TRAPEZE:
|
case 3: //TRAPEZE:
|
||||||
m_PadDeltaSizeCtrl->Enable( TRUE, TRUE );
|
m_ShapeDelta_X_Ctrl->Enable( true );
|
||||||
m_PadSizeCtrl->Enable( TRUE, TRUE );
|
m_ShapeDelta_Y_Ctrl->Enable( true );
|
||||||
|
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
void DialogPadProperties::OnDrillShapeSelected( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnDrillShapeSelected( wxCommandEvent& event )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
{
|
{
|
||||||
if ( (m_PadType->GetSelection() == 1) || (m_PadType->GetSelection() == 2) )
|
if ( (m_PadType->GetSelection() == 1) || (m_PadType->GetSelection() == 2) )
|
||||||
{ // pad type = SMD or CONN: no hole allowed
|
{ // pad type = SMD or CONN: no hole allowed
|
||||||
m_PadDrillCtrl->Enable( FALSE, FALSE );
|
m_PadDrill_X_Ctrl->Enable( false );
|
||||||
|
m_PadDrill_Y_Ctrl->Enable( false );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch( m_DrillShapeCtrl->GetSelection() )
|
switch( m_DrillShapeCtrl->GetSelection() )
|
||||||
{
|
{
|
||||||
case 0: //CIRCLE:
|
case 0: //CIRCLE:
|
||||||
m_PadDrillCtrl->Enable( TRUE, FALSE );
|
m_PadDrill_X_Ctrl->Enable( true );
|
||||||
|
m_PadDrill_Y_Ctrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: //OVALE:
|
case 1: //OVALE:
|
||||||
m_PadDrillCtrl->Enable( TRUE, TRUE );
|
m_PadDrill_X_Ctrl->Enable( true );
|
||||||
|
m_PadDrill_Y_Ctrl->Enable( true );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
void DialogPadProperties::PadOrientEvent( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
{
|
{
|
||||||
switch( m_PadOrient->GetSelection() )
|
switch( m_PadOrient->GetSelection() )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
m_PadOrientCtrl->SetValue( wxT( "0" ) );
|
m_PadOrientCtrl->SetValue( wxT( "0" ) );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
m_PadOrientCtrl->SetValue( wxT( "900" ) );
|
m_PadOrientCtrl->SetValue( wxT( "900" ) );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
m_PadOrientCtrl->SetValue( wxT( "2700" ) );
|
m_PadOrientCtrl->SetValue( wxT( "2700" ) );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
m_PadOrientCtrl->SetValue( wxT( "1800" ) );
|
m_PadOrientCtrl->SetValue( wxT( "1800" ) );
|
||||||
m_PadOrientCtrl->Enable( FALSE );
|
m_PadOrientCtrl->Enable( false );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_PadOrientCtrl->Enable( TRUE );
|
m_PadOrientCtrl->Enable( true );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
void DialogPadProperties::PadTypeSelected( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
|
||||||
/* Adjust the better mask layer according to the selected pad type
|
/* Adjust the better mask layer according to the selected pad type
|
||||||
|
@ -353,7 +369,7 @@ void DialogPadProperties::PadTypeSelected( wxCommandEvent& event )
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
void DialogPadProperties::SetPadLayersList( long layer_mask )
|
void DIALOG_PAD_PROPERTIES::SetPadLayersList( long layer_mask )
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
/** SetPadLayersList
|
/** SetPadLayersList
|
||||||
|
@ -384,29 +400,44 @@ void DialogPadProperties::SetPadLayersList( long layer_mask )
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
/* Met a jour les differents parametres pour le composant en cours d'édition
|
/* Met a jour les differents parametres pour le composant en cours d'édition
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
long PadLayerMask;
|
long PadLayerMask;
|
||||||
bool error = FALSE;
|
bool error = false;
|
||||||
bool RastnestIsChanged = false;
|
bool RastnestIsChanged = false;
|
||||||
|
int internalUnits = m_Parent->m_InternalUnits;
|
||||||
|
wxString msg;
|
||||||
|
|
||||||
if( m_DC )
|
if( m_DC )
|
||||||
m_Parent->DrawPanel->CursorOff( m_DC );
|
m_Parent->DrawPanel->CursorOff( m_DC );
|
||||||
|
|
||||||
g_Pad_Master.m_Attribut = CodeType[m_PadType->GetSelection()];
|
g_Pad_Master.m_Attribut = CodeType[m_PadType->GetSelection()];
|
||||||
g_Pad_Master.m_PadShape = CodeShape[m_PadShape->GetSelection()];
|
g_Pad_Master.m_PadShape = CodeShape[m_PadShape->GetSelection()];
|
||||||
g_Pad_Master.m_Pos = m_PadPositionCtrl->GetValue();
|
|
||||||
|
// Read pad clearances values:
|
||||||
|
g_Pad_Master.m_LocalClearance = ReturnValueFromTextCtrl( *m_NetClearanceValueCtrl, internalUnits );
|
||||||
|
g_Pad_Master.m_LocalSolderMaskMargin = ReturnValueFromTextCtrl( *m_SolderMaskMarginCtrl, internalUnits );
|
||||||
|
g_Pad_Master.m_LocalSolderPasteMargin = ReturnValueFromTextCtrl( *m_SolderPasteMarginCtrl, internalUnits );
|
||||||
|
double dtmp;
|
||||||
|
msg = m_SolderPasteMarginRatioCtrl->GetValue();
|
||||||
|
msg.ToDouble( &dtmp );
|
||||||
|
// A margin ratio de -50% means no paste on a pad, the ratio must be >= 50 %
|
||||||
|
if( dtmp < -50 )
|
||||||
|
dtmp = -50;
|
||||||
|
g_Pad_Master.m_LocalSolderPasteMarginRatio = dtmp / 100;
|
||||||
|
|
||||||
|
// Read pad position:
|
||||||
|
g_Pad_Master.m_Pos.x = ReturnValueFromTextCtrl( *m_PadPosition_X_Ctrl, internalUnits );
|
||||||
|
g_Pad_Master.m_Pos.y = ReturnValueFromTextCtrl( *m_PadPosition_Y_Ctrl, internalUnits );
|
||||||
g_Pad_Master.m_Pos0 = g_Pad_Master.m_Pos;
|
g_Pad_Master.m_Pos0 = g_Pad_Master.m_Pos;
|
||||||
g_Pad_Master.m_Size = m_PadSizeCtrl->GetValue();
|
|
||||||
if( g_Pad_Master.m_PadShape == PAD_CIRCLE )
|
// Read pad drill:
|
||||||
g_Pad_Master.m_Size.y = g_Pad_Master.m_Size.x;
|
g_Pad_Master.m_Drill.x = ReturnValueFromTextCtrl( *m_PadDrill_X_Ctrl, internalUnits );
|
||||||
g_Pad_Master.m_DeltaSize = m_PadDeltaSizeCtrl->GetValue();
|
g_Pad_Master.m_Drill.y = ReturnValueFromTextCtrl( *m_PadDrill_Y_Ctrl, internalUnits );
|
||||||
g_Pad_Master.m_Offset = m_PadOffsetCtrl->GetValue();
|
|
||||||
g_Pad_Master.m_Drill = m_PadDrillCtrl->GetValue();
|
|
||||||
if( m_DrillShapeCtrl->GetSelection() == 0 )
|
if( m_DrillShapeCtrl->GetSelection() == 0 )
|
||||||
{
|
{
|
||||||
g_Pad_Master.m_DrillShape = PAD_CIRCLE;
|
g_Pad_Master.m_DrillShape = PAD_CIRCLE;
|
||||||
|
@ -414,10 +445,25 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_Pad_Master.m_DrillShape = PAD_OVAL;
|
g_Pad_Master.m_DrillShape = PAD_OVAL;
|
||||||
long ovalue = 0;
|
|
||||||
wxString msg = m_PadOrientCtrl->GetValue();
|
// Read pad shape size:
|
||||||
msg.ToLong( &ovalue );
|
g_Pad_Master.m_Size.x = ReturnValueFromTextCtrl( *m_ShapeSize_X_Ctrl, internalUnits );
|
||||||
g_Pad_Master.m_Orient = ovalue;
|
g_Pad_Master.m_Size.y = ReturnValueFromTextCtrl( *m_ShapeSize_Y_Ctrl, internalUnits );
|
||||||
|
if( g_Pad_Master.m_PadShape == PAD_CIRCLE )
|
||||||
|
g_Pad_Master.m_Size.y = g_Pad_Master.m_Size.x;
|
||||||
|
|
||||||
|
// Read pad shape delta size:
|
||||||
|
g_Pad_Master.m_DeltaSize.x = ReturnValueFromTextCtrl( *m_ShapeDelta_X_Ctrl, internalUnits );
|
||||||
|
g_Pad_Master.m_DeltaSize.y = ReturnValueFromTextCtrl( *m_ShapeDelta_Y_Ctrl, internalUnits );
|
||||||
|
|
||||||
|
// Read pad shape offset:
|
||||||
|
g_Pad_Master.m_Offset.x = ReturnValueFromTextCtrl( *m_ShapeOffset_X_Ctrl, internalUnits );
|
||||||
|
g_Pad_Master.m_Offset.y = ReturnValueFromTextCtrl( *m_ShapeOffset_Y_Ctrl, internalUnits );
|
||||||
|
|
||||||
|
long orient_value = 0;
|
||||||
|
msg = m_PadOrientCtrl->GetValue();
|
||||||
|
msg.ToLong( &orient_value );
|
||||||
|
g_Pad_Master.m_Orient = orient_value;
|
||||||
|
|
||||||
g_Current_PadName = m_PadNumCtrl->GetValue().Left( 4 );
|
g_Current_PadName = m_PadNumCtrl->GetValue().Left( 4 );
|
||||||
Current_PadNetName = m_PadNetNameCtrl->GetValue();
|
Current_PadNetName = m_PadNetNameCtrl->GetValue();
|
||||||
|
@ -426,13 +472,13 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
if( (g_Pad_Master.m_Size.x < g_Pad_Master.m_Drill.x)
|
if( (g_Pad_Master.m_Size.x < g_Pad_Master.m_Drill.x)
|
||||||
|| (g_Pad_Master.m_Size.y < g_Pad_Master.m_Drill.y) )
|
|| (g_Pad_Master.m_Size.y < g_Pad_Master.m_Drill.y) )
|
||||||
{
|
{
|
||||||
error = TRUE;
|
error = true;
|
||||||
DisplayError( this, _( "Incorrect value for pad drill: pad drill bigger than pad size" ) );
|
DisplayError( this, _( "Incorrect value for pad drill: pad drill bigger than pad size" ) );
|
||||||
}
|
}
|
||||||
if( ( g_Pad_Master.m_Size.x / 2 <= ABS( g_Pad_Master.m_Offset.x ) )
|
if( ( g_Pad_Master.m_Size.x / 2 <= ABS( g_Pad_Master.m_Offset.x ) )
|
||||||
|| ( g_Pad_Master.m_Size.y / 2 <= ABS( g_Pad_Master.m_Offset.y ) ) )
|
|| ( g_Pad_Master.m_Size.y / 2 <= ABS( g_Pad_Master.m_Offset.y ) ) )
|
||||||
{
|
{
|
||||||
error = TRUE;
|
error = true;
|
||||||
DisplayError( this, _( "Incorrect value for pad offset" ) );
|
DisplayError( this, _( "Incorrect value for pad offset" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,7 +521,7 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
|
|
||||||
g_Pad_Master.m_Masque_Layer = PadLayerMask;
|
g_Pad_Master.m_Masque_Layer = PadLayerMask;
|
||||||
|
|
||||||
if( m_CurrentPad ) // Set Pad Name & Num
|
if( m_CurrentPad ) // Set current Pad parameters
|
||||||
{
|
{
|
||||||
MODULE* Module = (MODULE*) m_CurrentPad->GetParent();
|
MODULE* Module = (MODULE*) m_CurrentPad->GetParent();
|
||||||
m_Parent->SaveCopyInUndoList( Module, UR_CHANGED );
|
m_Parent->SaveCopyInUndoList( Module, UR_CHANGED );
|
||||||
|
@ -573,6 +619,11 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_CurrentPad->m_LocalClearance = g_Pad_Master.m_LocalClearance;
|
||||||
|
m_CurrentPad->m_LocalSolderMaskMargin = g_Pad_Master.m_LocalSolderMaskMargin;
|
||||||
|
m_CurrentPad->m_LocalSolderPasteMargin = g_Pad_Master.m_LocalSolderPasteMargin;
|
||||||
|
m_CurrentPad->m_LocalSolderPasteMarginRatio = g_Pad_Master.m_LocalSolderPasteMarginRatio;
|
||||||
|
|
||||||
m_CurrentPad->ComputeRayon();
|
m_CurrentPad->ComputeRayon();
|
||||||
|
|
||||||
Module->Set_Rectangle_Encadrement();
|
Module->Set_Rectangle_Encadrement();
|
||||||
|
@ -591,7 +642,7 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
void DialogPadProperties::OnCancelButtonClick( wxCommandEvent& event )
|
void DIALOG_PAD_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
{
|
{
|
||||||
EndModal(0);
|
EndModal(0);
|
||||||
|
|
|
@ -9,12 +9,15 @@
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
wxBoxSizer* m_MainSizer;
|
wxBoxSizer* m_MainSizer;
|
||||||
m_MainSizer = new wxBoxSizer( wxHORIZONTAL );
|
m_MainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bGeneralSizer;
|
||||||
|
bGeneralSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxBoxSizer* m_LeftBoxSizer;
|
wxBoxSizer* m_LeftBoxSizer;
|
||||||
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
|
m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -33,11 +36,153 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
|
||||||
m_PadNetNameCtrl = new wxTextCtrl( this, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_PadNetNameCtrl = new wxTextCtrl( this, wxID_PADNETNAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_LeftBoxSizer->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_LeftBoxSizer->Add( m_PadNetNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_PadPositionBoxSizer = new wxBoxSizer( wxVERTICAL );
|
wxStaticBoxSizer* sbSizer2;
|
||||||
|
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Geometry:") ), wxVERTICAL );
|
||||||
|
|
||||||
m_LeftBoxSizer->Add( m_PadPositionBoxSizer, 0, wxEXPAND, 5 );
|
wxFlexGridSizer* fgSizerGeometry;
|
||||||
|
fgSizerGeometry = new wxFlexGridSizer( 9, 3, 0, 0 );
|
||||||
|
fgSizerGeometry->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
m_MainSizer->Add( m_LeftBoxSizer, 0, wxBOTTOM|wxLEFT, 5 );
|
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Pad pos X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText4->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadPosition_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_PadPosition_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadPosX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadPosX_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadPosX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_staticText41 = new wxStaticText( this, wxID_ANY, _("Pad pos Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText41->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText41, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_PadPosition_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_PadPosition_Y_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadPosY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadPosY_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadPosY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticline7 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline7, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_textPadDrillX = new wxStaticText( this, wxID_ANY, _("Pad Drill X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_textPadDrillX->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_textPadDrillX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_PadDrill_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_PadDrill_X_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadDrill_X_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadDrill_X_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadDrill_X_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_textPadDrillY = new wxStaticText( this, wxID_ANY, _("Pad Drill Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_textPadDrillY->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_textPadDrillY, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadDrill_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_PadDrill_Y_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadDrill_Y_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadDrill_Y_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadDrill_Y_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgSizerGeometry->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Shape size X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText12->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText12, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_ShapeSize_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeSize_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadShapeSizeX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeSizeX_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeSizeX_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Shape size Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText15->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText15, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_ShapeSize_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeSize_Y_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadShapeSizeY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeSizeY_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeSizeY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Shape Offset X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText17->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_ShapeOffset_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeOffset_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadShapeOffsetX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeOffsetX_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeOffsetX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticText19 = new wxStaticText( this, wxID_ANY, _("Shape Offset Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText19->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText19, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_ShapeOffset_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeOffset_Y_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadShapeOffsetY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeOffsetY_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeOffsetY_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticText21 = new wxStaticText( this, wxID_ANY, _("Shape delta X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText21->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_ShapeDelta_X_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeDelta_X_Ctrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_PadShapeDeltaX_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeDeltaX_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeDeltaX_Unit, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticText23 = new wxStaticText( this, wxID_ANY, _("Shape delta Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText23->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_staticText23, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_ShapeDelta_Y_Ctrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerGeometry->Add( m_ShapeDelta_Y_Ctrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_PadShapeDeltaY_Unit = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_PadShapeDeltaY_Unit->Wrap( -1 );
|
||||||
|
fgSizerGeometry->Add( m_PadShapeDeltaY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
sbSizer2->Add( fgSizerGeometry, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_LeftBoxSizer->Add( sbSizer2, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
bGeneralSizer->Add( m_LeftBoxSizer, 0, wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bMiddleSizer;
|
||||||
|
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bMiddleUpperSizer;
|
||||||
|
bMiddleUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_DrillShapeBoxSizer = new wxBoxSizer( wxVERTICAL );
|
m_DrillShapeBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
@ -47,16 +192,13 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
|
||||||
m_PadShape->SetSelection( 0 );
|
m_PadShape->SetSelection( 0 );
|
||||||
m_DrillShapeBoxSizer->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
|
m_DrillShapeBoxSizer->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_DrillShapeBoxSizer->Add( 0, 8, 1, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxString m_DrillShapeCtrlChoices[] = { _("Circle"), _("Oval") };
|
wxString m_DrillShapeCtrlChoices[] = { _("Circle"), _("Oval") };
|
||||||
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
|
int m_DrillShapeCtrlNChoices = sizeof( m_DrillShapeCtrlChoices ) / sizeof( wxString );
|
||||||
m_DrillShapeCtrl = new wxRadioBox( this, ID_RADIOBOX_DRILL_SHAPE, _("Drill Shape:"), wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
m_DrillShapeCtrl = new wxRadioBox( this, ID_RADIOBOX_DRILL_SHAPE, _("Drill Shape:"), wxDefaultPosition, wxDefaultSize, m_DrillShapeCtrlNChoices, m_DrillShapeCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_DrillShapeCtrl->SetSelection( 1 );
|
m_DrillShapeCtrl->SetSelection( 0 );
|
||||||
m_DrillShapeBoxSizer->Add( m_DrillShapeCtrl, 0, wxALL|wxEXPAND, 5 );
|
m_DrillShapeBoxSizer->Add( m_DrillShapeCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_MainSizer->Add( m_DrillShapeBoxSizer, 1, wxBOTTOM, 5 );
|
bMiddleUpperSizer->Add( m_DrillShapeBoxSizer, 1, wxBOTTOM, 5 );
|
||||||
|
|
||||||
wxBoxSizer* m_MiddleRightBoxSizer;
|
wxBoxSizer* m_MiddleRightBoxSizer;
|
||||||
m_MiddleRightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
m_MiddleRightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -74,29 +216,91 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
|
||||||
m_PadOrientCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_PadOrientCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_MiddleRightBoxSizer->Add( m_PadOrientCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_MiddleRightBoxSizer->Add( m_PadOrientCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
bMiddleUpperSizer->Add( m_MiddleRightBoxSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_MiddleRightBoxSizer->Add( 0, 8, 1, wxEXPAND, 5 );
|
bMiddleSizer->Add( bMiddleUpperSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbClearancesSizer;
|
||||||
|
sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Clearances:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
m_staticText20 = new wxStaticText( this, wxID_ANY, _("Set these values to 0\nto use Parent footprint or global values"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText20->Wrap( -1 );
|
||||||
|
m_staticText20->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
|
||||||
|
|
||||||
|
sbClearancesSizer->Add( m_staticText20, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgClearancesGridSizer;
|
||||||
|
fgClearancesGridSizer = new wxFlexGridSizer( 4, 3, 0, 0 );
|
||||||
|
fgClearancesGridSizer->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticTextNetClearance = new wxStaticText( this, wxID_ANY, _("Net Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextNetClearance->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_staticTextNetClearance, 0, wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_NetClearanceValueCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgClearancesGridSizer->Add( m_NetClearanceValueCtrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_NetClearanceUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_NetClearanceUnits->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_NetClearanceUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgClearancesGridSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgClearancesGridSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
fgClearancesGridSizer->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_MaskClearanceTitle = new wxStaticText( this, wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_MaskClearanceTitle->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_MaskClearanceTitle, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_SolderMaskMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderMaskMarginCtrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_SolderMaskMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_SolderMaskMarginUnits->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderMaskMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticTextSolderPaste = new wxStaticText( this, wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextSolderPaste->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_staticTextSolderPaste, 0, wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_SolderPasteMarginCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderPasteMarginCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_SolderPasteMarginUnits = new wxStaticText( this, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_SolderPasteMarginUnits->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderPasteMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticTextRatio = new wxStaticText( this, wxID_ANY, _("Solder mask ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextRatio->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_SolderPasteMarginRatioCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_SolderPasteRatioMarginUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_SolderPasteRatioMarginUnits->Wrap( -1 );
|
||||||
|
fgClearancesGridSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
sbClearancesSizer->Add( fgClearancesGridSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
bMiddleSizer->Add( sbClearancesSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
bGeneralSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* m_RightBoxSizer;
|
||||||
|
m_RightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxString m_PadTypeChoices[] = { _("Standard"), _("SMD"), _("Conn") };
|
wxString m_PadTypeChoices[] = { _("Standard"), _("SMD"), _("Conn") };
|
||||||
int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString );
|
int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString );
|
||||||
m_PadType = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS );
|
m_PadType = new wxRadioBox( this, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_PadType->SetSelection( 0 );
|
m_PadType->SetSelection( 0 );
|
||||||
m_MiddleRightBoxSizer->Add( m_PadType, 0, wxALL|wxEXPAND, 5 );
|
m_RightBoxSizer->Add( m_PadType, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_MainSizer->Add( m_MiddleRightBoxSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* m_RightBoxSizer;
|
|
||||||
m_RightBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_buttonOk = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_buttonOk->SetDefault();
|
|
||||||
m_RightBoxSizer->Add( m_buttonOk, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_RightBoxSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
m_RightBoxSizer->Add( 0, 8, 1, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxStaticBoxSizer* m_LayersSizer;
|
wxStaticBoxSizer* m_LayersSizer;
|
||||||
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
|
m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxVERTICAL );
|
||||||
|
@ -158,7 +362,17 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
|
||||||
|
|
||||||
m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 );
|
m_RightBoxSizer->Add( m_LayersSizer, 0, 0, 5 );
|
||||||
|
|
||||||
m_MainSizer->Add( m_RightBoxSizer, 0, wxBOTTOM|wxRIGHT, 5 );
|
bGeneralSizer->Add( m_RightBoxSizer, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_MainSizer->Add( bGeneralSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||||
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||||
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
||||||
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
||||||
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
||||||
|
m_sdbSizer1->Realize();
|
||||||
|
m_MainSizer->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
this->SetSizer( m_MainSizer );
|
this->SetSizer( m_MainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
@ -166,21 +380,21 @@ DialogPadPropertiesBase::DialogPadPropertiesBase( wxWindow* parent, wxWindowID i
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
m_PadShape->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::OnPadShapeSelection ), NULL, this );
|
m_PadShape->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
|
||||||
m_DrillShapeCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::OnDrillShapeSelected ), NULL, this );
|
m_DrillShapeCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
|
||||||
m_PadOrient->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::PadOrientEvent ), NULL, this );
|
m_PadOrient->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
|
||||||
m_PadType->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::PadTypeSelected ), NULL, this );
|
m_PadType->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
|
||||||
m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogPadPropertiesBase::PadPropertiesAccept ), NULL, this );
|
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
|
||||||
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogPadPropertiesBase::OnCancelButtonClick ), NULL, this );
|
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogPadPropertiesBase::~DialogPadPropertiesBase()
|
DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
m_PadShape->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::OnPadShapeSelection ), NULL, this );
|
m_PadShape->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
|
||||||
m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::OnDrillShapeSelected ), NULL, this );
|
m_DrillShapeCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
|
||||||
m_PadOrient->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::PadOrientEvent ), NULL, this );
|
m_PadOrient->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
|
||||||
m_PadType->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogPadPropertiesBase::PadTypeSelected ), NULL, this );
|
m_PadType->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
|
||||||
m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogPadPropertiesBase::PadPropertiesAccept ), NULL, this );
|
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this );
|
||||||
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogPadPropertiesBase::OnCancelButtonClick ), NULL, this );
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadPropertiesAccept ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,19 +17,20 @@
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/radiobox.h>
|
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/checkbox.h>
|
|
||||||
#include <wx/statbox.h>
|
#include <wx/statbox.h>
|
||||||
|
#include <wx/radiobox.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DialogPadPropertiesBase
|
/// Class DIALOG_PAD_PROPERTIES_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DialogPadPropertiesBase : public wxDialog
|
class DIALOG_PAD_PROPERTIES_BASE : public wxDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -49,19 +50,65 @@ class DialogPadPropertiesBase : public wxDialog
|
||||||
wxTextCtrl* m_PadNumCtrl;
|
wxTextCtrl* m_PadNumCtrl;
|
||||||
wxStaticText* m_PadNameText;
|
wxStaticText* m_PadNameText;
|
||||||
wxTextCtrl* m_PadNetNameCtrl;
|
wxTextCtrl* m_PadNetNameCtrl;
|
||||||
wxBoxSizer* m_PadPositionBoxSizer;
|
wxStaticText* m_staticText4;
|
||||||
|
wxTextCtrl* m_PadPosition_X_Ctrl;
|
||||||
|
wxStaticText* m_PadPosX_Unit;
|
||||||
|
wxStaticText* m_staticText41;
|
||||||
|
wxTextCtrl* m_PadPosition_Y_Ctrl;
|
||||||
|
wxStaticText* m_PadPosY_Unit;
|
||||||
|
wxStaticLine* m_staticline7;
|
||||||
|
wxStaticLine* m_staticline8;
|
||||||
|
wxStaticLine* m_staticline9;
|
||||||
|
wxStaticText* m_textPadDrillX;
|
||||||
|
wxTextCtrl* m_PadDrill_X_Ctrl;
|
||||||
|
wxStaticText* m_PadDrill_X_Unit;
|
||||||
|
wxStaticText* m_textPadDrillY;
|
||||||
|
wxTextCtrl* m_PadDrill_Y_Ctrl;
|
||||||
|
wxStaticText* m_PadDrill_Y_Unit;
|
||||||
|
wxStaticLine* m_staticline4;
|
||||||
|
wxStaticLine* m_staticline5;
|
||||||
|
wxStaticLine* m_staticline6;
|
||||||
|
wxStaticText* m_staticText12;
|
||||||
|
wxTextCtrl* m_ShapeSize_X_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeSizeX_Unit;
|
||||||
|
wxStaticText* m_staticText15;
|
||||||
|
wxTextCtrl* m_ShapeSize_Y_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeSizeY_Unit;
|
||||||
|
wxStaticText* m_staticText17;
|
||||||
|
wxTextCtrl* m_ShapeOffset_X_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeOffsetX_Unit;
|
||||||
|
wxStaticText* m_staticText19;
|
||||||
|
wxTextCtrl* m_ShapeOffset_Y_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeOffsetY_Unit;
|
||||||
|
wxStaticText* m_staticText21;
|
||||||
|
wxTextCtrl* m_ShapeDelta_X_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeDeltaX_Unit;
|
||||||
|
wxStaticText* m_staticText23;
|
||||||
|
wxTextCtrl* m_ShapeDelta_Y_Ctrl;
|
||||||
|
wxStaticText* m_PadShapeDeltaY_Unit;
|
||||||
wxBoxSizer* m_DrillShapeBoxSizer;
|
wxBoxSizer* m_DrillShapeBoxSizer;
|
||||||
wxRadioBox* m_PadShape;
|
wxRadioBox* m_PadShape;
|
||||||
|
|
||||||
wxRadioBox* m_DrillShapeCtrl;
|
wxRadioBox* m_DrillShapeCtrl;
|
||||||
wxRadioBox* m_PadOrient;
|
wxRadioBox* m_PadOrient;
|
||||||
wxStaticText* m_PadOrientText;
|
wxStaticText* m_PadOrientText;
|
||||||
wxTextCtrl* m_PadOrientCtrl;
|
wxTextCtrl* m_PadOrientCtrl;
|
||||||
|
wxStaticText* m_staticText20;
|
||||||
|
wxStaticText* m_staticTextNetClearance;
|
||||||
|
wxTextCtrl* m_NetClearanceValueCtrl;
|
||||||
|
wxStaticText* m_NetClearanceUnits;
|
||||||
|
wxStaticLine* m_staticline1;
|
||||||
|
wxStaticLine* m_staticline2;
|
||||||
|
wxStaticLine* m_staticline3;
|
||||||
|
wxStaticText* m_MaskClearanceTitle;
|
||||||
|
wxTextCtrl* m_SolderMaskMarginCtrl;
|
||||||
|
wxStaticText* m_SolderMaskMarginUnits;
|
||||||
|
wxStaticText* m_staticTextSolderPaste;
|
||||||
|
wxTextCtrl* m_SolderPasteMarginCtrl;
|
||||||
|
wxStaticText* m_SolderPasteMarginUnits;
|
||||||
|
wxStaticText* m_staticTextRatio;
|
||||||
|
wxTextCtrl* m_SolderPasteMarginRatioCtrl;
|
||||||
|
wxStaticText* m_SolderPasteRatioMarginUnits;
|
||||||
wxRadioBox* m_PadType;
|
wxRadioBox* m_PadType;
|
||||||
wxButton* m_buttonOk;
|
|
||||||
wxButton* m_buttonCancel;
|
|
||||||
|
|
||||||
wxCheckBox* m_PadLayerCu;
|
wxCheckBox* m_PadLayerCu;
|
||||||
wxCheckBox* m_PadLayerCmp;
|
wxCheckBox* m_PadLayerCmp;
|
||||||
|
|
||||||
|
@ -76,19 +123,22 @@ class DialogPadPropertiesBase : public wxDialog
|
||||||
wxCheckBox* m_PadLayerECO1;
|
wxCheckBox* m_PadLayerECO1;
|
||||||
wxCheckBox* m_PadLayerECO2;
|
wxCheckBox* m_PadLayerECO2;
|
||||||
wxCheckBox* m_PadLayerDraft;
|
wxCheckBox* m_PadLayerDraft;
|
||||||
|
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||||
|
wxButton* m_sdbSizer1OK;
|
||||||
|
wxButton* m_sdbSizer1Cancel;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnPadShapeSelection( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnPadShapeSelection( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnDrillShapeSelected( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnDrillShapeSelected( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void PadOrientEvent( wxCommandEvent& event ){ event.Skip(); }
|
virtual void PadOrientEvent( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void PadTypeSelected( wxCommandEvent& event ){ event.Skip(); }
|
virtual void PadTypeSelected( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void PadPropertiesAccept( wxCommandEvent& event ){ event.Skip(); }
|
|
||||||
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
virtual void PadPropertiesAccept( wxCommandEvent& event ){ event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DialogPadPropertiesBase( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 520,396 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
|
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 673,466 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
|
||||||
~DialogPadPropertiesBase();
|
~DIALOG_PAD_PROPERTIES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue