eeschema: libedit changes (see changelog)

This commit is contained in:
charras 2008-08-11 18:21:21 +00:00
parent 18b8932b50
commit ebeb2363a2
7 changed files with 447 additions and 242 deletions

View File

@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Aug-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
libedit:
solved : a bug which can crash eeschema on a double click.
modified : pin lenght edit in pin edit dialog. The value (handle by spin control) was not editable with recent wxWidgets versions
2008-Aug-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-Aug-09 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +pcbnew:

View File

@ -139,7 +139,7 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
CurrentUnit, CurrentConvert ); CurrentUnit, CurrentConvert );
if( DrawEntry == NULL ) if( DrawEntry == NULL )
{ {
DrawEntry = LocateDrawItem( (SCH_SCREEN*)GetScreen(), DrawEntry = LocateDrawItem( (SCH_SCREEN*)GetScreen(),
GetScreen()->m_Curseur, GetScreen()->m_Curseur,
CurrentLibEntry, CurrentUnit, CurrentLibEntry, CurrentUnit,
CurrentConvert, LOCATE_ALL_DRAW_ITEM ); CurrentConvert, LOCATE_ALL_DRAW_ITEM );
@ -179,11 +179,9 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/ /*************************************************************************/
/* Appel<65> sur un double click: /* Called on a double click:
* pour un <EFBFBD>l<EFBFBD>ment editable (textes, composant): * If an editable item (field, pin, graphic):
* appel de l'editeur correspondant. * Call the suitable dialog editor.
* pour une connexion en cours:
* termine la connexion
*/ */
{ {
wxPoint pos = GetPosition(); wxPoint pos = GetPosition();
@ -192,9 +190,8 @@ void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if( CurrentLibEntry == NULL ) if( CurrentLibEntry == NULL )
return; return;
if( !m_ID_current_state // Simple localisation des elements if( (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) )
|| (DrawEntry == NULL) || (DrawEntry->m_Flags == 0) ) { // We can locate an item
{
DrawEntry = LocatePin( GetScreen()->m_MousePosition, CurrentLibEntry, DrawEntry = LocatePin( GetScreen()->m_MousePosition, CurrentLibEntry,
CurrentUnit, CurrentConvert ); CurrentUnit, CurrentConvert );
if( DrawEntry == NULL ) if( DrawEntry == NULL )

View File

@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: pinedit-dialog.cpp // Name: pinedit-dialog.cpp
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 11/02/2006 13:30:59 // Created: 11/02/2006 13:30:59
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59 // Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59
@ -35,7 +35,7 @@ void InstallPineditFrame(WinEDA_LibeditFrame * parent, wxDC * DC, const wxPoint
/*****************************************************************************************/ /*****************************************************************************************/
{ {
wxPoint MousePos = parent->GetScreen()->m_Curseur; wxPoint MousePos = parent->GetScreen()->m_Curseur;
int accept = TRUE; int accept = TRUE;
if ( (CurrentDrawItem == NULL) || (CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE) ) if ( (CurrentDrawItem == NULL) || (CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE) )
{ {
LibDrawPin * Pin = (LibDrawPin *) CurrentDrawItem; LibDrawPin * Pin = (LibDrawPin *) CurrentDrawItem;
@ -65,6 +65,9 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame, wxDialog )
BEGIN_EVENT_TABLE( WinEDA_PinPropertiesFrame, wxDialog ) BEGIN_EVENT_TABLE( WinEDA_PinPropertiesFrame, wxDialog )
////@begin WinEDA_PinPropertiesFrame event table entries ////@begin WinEDA_PinPropertiesFrame event table entries
EVT_SPIN_UP( ID_SPINBUTTON_INC_DEC_PINSIZE, WinEDA_PinPropertiesFrame::OnSpinbuttonIncDecPinsizeUp )
EVT_SPIN_DOWN( ID_SPINBUTTON_INC_DEC_PINSIZE, WinEDA_PinPropertiesFrame::OnSpinbuttonIncDecPinsizeDown )
EVT_BUTTON( wxID_CANCEL, WinEDA_PinPropertiesFrame::OnCancelClick ) EVT_BUTTON( wxID_CANCEL, WinEDA_PinPropertiesFrame::OnCancelClick )
EVT_BUTTON( wxID_OK, WinEDA_PinPropertiesFrame::OnOkClick ) EVT_BUTTON( wxID_OK, WinEDA_PinPropertiesFrame::OnOkClick )
@ -83,96 +86,17 @@ WinEDA_PinPropertiesFrame::WinEDA_PinPropertiesFrame( )
WinEDA_PinPropertiesFrame::WinEDA_PinPropertiesFrame( WinEDA_LibeditFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) WinEDA_PinPropertiesFrame::WinEDA_PinPropertiesFrame( WinEDA_LibeditFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{ {
wxString number;
LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem; LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
wxString msg, StringPinNum;
int tmp, ii;
m_Parent = parent; m_Parent = parent;
if ( CurrentPin ) if ( CurrentPin )
{ {
CurrentPin->ReturnPinStringNum(StringPinNum);
m_Parent->InitEditOnePin(); m_Parent->InitEditOnePin();
} }
Create(parent, id, caption, pos, size, style); Create(parent, id, caption, pos, size, style);
/* Init dialog pin name and pin name size values */ /* Init dialog pin name and pin name size values */
if ( CurrentPin ) msg = CurrentPin->m_PinName; SetValuesInDialog( );
else msg = wxEmptyString;
m_PinNameCtrl->SetValue(msg);
tmp = CurrentPin ? CurrentPin->m_PinNameSize : LastPinNameSize;
msg = ReturnStringFromValue(g_UnitMetric, tmp, m_Parent->m_InternalUnits);
m_PinNameSizeCtrl->SetValue(msg);
msg = m_PinNameSizeText->GetLabel() + ReturnUnitSymbol();
m_PinNameSizeText->SetLabel(msg);
/* Init dialog pin num and pin num size values */
m_PinNumCtrl->SetValue(StringPinNum);
tmp = CurrentPin ? CurrentPin->m_PinNumSize : LastPinNumSize;
msg = ReturnStringFromValue(g_UnitMetric, tmp, m_Parent->m_InternalUnits);
m_PinNumSizeCtrl->SetValue(msg);
msg = m_PinNumSizeText->GetLabel() + ReturnUnitSymbol();
m_PinNumSizeText->SetLabel(msg);
/* init dialog pin size */
int pinsize = CurrentPin ? CurrentPin->m_PinLen : LastPinSize;
m_PinSize->SetValue(pinsize);
/* init pin options */
if ( CurrentPin )
{
if ( CurrentPin->m_Unit == 0 ) m_CommonUnit->SetValue(TRUE);
}
else m_CommonUnit->SetValue(LastPinCommonUnit);
if ( CurrentPin )
{
if ( CurrentPin->m_Convert == 0 ) m_CommonConvert->SetValue(TRUE);
}
else m_CommonConvert->SetValue(LastPinCommonConvert);
if ( CurrentPin )
{
if ( CurrentPin->m_Attributs & PINNOTDRAW ) m_NoDraw->SetValue(TRUE);
}
else m_NoDraw->SetValue(LastPinNoDraw);
tmp = CurrentPin ? CurrentPin->m_Orient : LastPinOrient;
switch ( tmp )
{
case PIN_RIGHT:
m_PinOrient->SetSelection(0);
break;
case PIN_LEFT:
m_PinOrient->SetSelection(1);
break;
case PIN_UP:
m_PinOrient->SetSelection(2);
break;
case PIN_DOWN:
m_PinOrient->SetSelection(3);
break;
}
tmp = CurrentPin ? CurrentPin->m_PinShape : LastPinShape;
m_PinShape->SetSelection( 0 );
for ( ii = 0; ii < NBSHAPES; ii++ )
{
if ( CodeShape[ii] == tmp )
{
m_PinShape->SetSelection( ii ); break ;
}
}
tmp = CurrentPin ? CurrentPin->m_PinShape : LastPinShape;
m_PinShape->SetSelection( 0 );
for ( ii = 0; ii < NBSHAPES; ii++ )
{
if ( CodeShape[ii] == tmp )
{
m_PinShape->SetSelection( ii ); break ;
}
}
m_PinElectricalType->SetSelection( CurrentPin ? CurrentPin->m_PinType : LastPinType);
} }
/*! /*!
@ -184,7 +108,9 @@ bool WinEDA_PinPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
////@begin WinEDA_PinPropertiesFrame member initialisation ////@begin WinEDA_PinPropertiesFrame member initialisation
m_PinNameCtrl = NULL; m_PinNameCtrl = NULL;
m_PinNumCtrl = NULL; m_PinNumCtrl = NULL;
m_PinSize = NULL; m_PinSizeCtrl = NULL;
m_PinSizeIncDecButton = NULL;
m_PinSizeText = NULL;
m_CommonUnit = NULL; m_CommonUnit = NULL;
m_CommonConvert = NULL; m_CommonConvert = NULL;
m_NoDraw = NULL; m_NoDraw = NULL;
@ -217,11 +143,11 @@ bool WinEDA_PinPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
*/ */
void WinEDA_PinPropertiesFrame::CreateControls() void WinEDA_PinPropertiesFrame::CreateControls()
{ {
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_PinPropertiesFrame content construction ////@begin WinEDA_PinPropertiesFrame content construction
// Generated by DialogBlocks, 29/04/2008 21:13:51 (unregistered) // Generated by DialogBlocks, 11/08/2008 19:12:48 (unregistered)
WinEDA_PinPropertiesFrame* itemDialog1 = this; WinEDA_PinPropertiesFrame* itemDialog1 = this;
@ -234,13 +160,13 @@ void WinEDA_PinPropertiesFrame::CreateControls()
wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Name :"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Name :"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_PinNameCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNameCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_PINNAME, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add(m_PinNameCtrl, 0, wxGROW|wxALL, 5); itemBoxSizer3->Add(m_PinNameCtrl, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Num :"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Num :"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer3->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_PinNumCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNumCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_PINNUM, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add(m_PinNumCtrl, 0, wxGROW|wxALL, 5); itemBoxSizer3->Add(m_PinNumCtrl, 0, wxGROW|wxALL, 5);
itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
@ -250,40 +176,48 @@ void WinEDA_PinPropertiesFrame::CreateControls()
itemStaticBoxSizer9Static->SetForegroundColour(wxColour(64, 0, 128)); itemStaticBoxSizer9Static->SetForegroundColour(wxColour(64, 0, 128));
itemBoxSizer3->Add(itemStaticBoxSizer9, 0, wxGROW|wxALL, 5); itemBoxSizer3->Add(itemStaticBoxSizer9, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin lenght :"), wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
itemStaticBoxSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemStaticBoxSizer9->Add(itemBoxSizer10, 0, wxGROW, 5);
m_PinSize = new wxSpinCtrl( itemDialog1, ID_SPINCTRL, _T("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 2000, 0 ); m_PinSizeCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_PINSIZE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer9->Add(m_PinSize, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer10->Add(m_PinSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_CommonUnit = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Common to Units"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_PinSizeIncDecButton = new wxSpinButton( itemDialog1, ID_SPINBUTTON_INC_DEC_PINSIZE, wxDefaultPosition, wxDefaultSize, wxSP_VERTICAL );
m_PinSizeIncDecButton->SetRange(0, 2000);
m_PinSizeIncDecButton->SetValue(0);
itemBoxSizer10->Add(m_PinSizeIncDecButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);
m_PinSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Lenght"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer9->Add(m_PinSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_CommonUnit = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMON_UNITS, _("Common to Units"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_CommonUnit->SetValue(false); m_CommonUnit->SetValue(false);
itemStaticBoxSizer9->Add(m_CommonUnit, 0, wxALIGN_LEFT|wxALL, 5); itemStaticBoxSizer9->Add(m_CommonUnit, 0, wxALIGN_LEFT|wxALL, 5);
m_CommonConvert = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Common to convert"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_CommonConvert = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMON_CONVERT, _("Common to convert"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_CommonConvert->SetValue(false); m_CommonConvert->SetValue(false);
itemStaticBoxSizer9->Add(m_CommonConvert, 0, wxALIGN_LEFT|wxALL, 5); itemStaticBoxSizer9->Add(m_CommonConvert, 0, wxALIGN_LEFT|wxALL, 5);
m_NoDraw = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("No Draw"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_NoDraw = new wxCheckBox( itemDialog1, ID_CHECKBOX_NOT_DRAWN, _("No Draw"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_NoDraw->SetValue(false); m_NoDraw->SetValue(false);
itemStaticBoxSizer9->Add(m_NoDraw, 0, wxALIGN_LEFT|wxALL, 5); itemStaticBoxSizer9->Add(m_NoDraw, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer15, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer17, 0, wxGROW|wxALL, 5);
m_PinNameSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Size"), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNameSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer15->Add(m_PinNameSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer17->Add(m_PinNameSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_PinNameSizeCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNameSizeCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_PINNAME_SIZE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer15->Add(m_PinNameSizeCtrl, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer17->Add(m_PinNameSizeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_PinNumSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Size"), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNumSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer15->Add(m_PinNumSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); itemBoxSizer17->Add(m_PinNumSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_PinNumSizeCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL3, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_PinNumSizeCtrl = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_PINNUM_SIZE, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer15->Add(m_PinNumSizeCtrl, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer17->Add(m_PinNumSizeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
itemBoxSizer15->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer17->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxArrayString m_PinOrientStrings; wxArrayString m_PinOrientStrings;
m_PinOrientStrings.Add(_("Right")); m_PinOrientStrings.Add(_("Right"));
@ -293,25 +227,25 @@ void WinEDA_PinPropertiesFrame::CreateControls()
m_PinOrient = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Pin Orient:"), wxDefaultPosition, wxDefaultSize, m_PinOrientStrings, 1, wxRA_SPECIFY_COLS ); m_PinOrient = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Pin Orient:"), wxDefaultPosition, wxDefaultSize, m_PinOrientStrings, 1, wxRA_SPECIFY_COLS );
m_PinOrient->SetSelection(0); m_PinOrient->SetSelection(0);
m_PinOrient->SetForegroundColour(wxColour(41, 84, 84)); m_PinOrient->SetForegroundColour(wxColour(41, 84, 84));
itemBoxSizer15->Add(m_PinOrient, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); itemBoxSizer17->Add(m_PinOrient, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer22, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer24, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer22->Add(itemBoxSizer23, 0, wxGROW|wxALL, 5); itemBoxSizer24->Add(itemBoxSizer25, 0, wxGROW|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_btClose->SetForegroundColour(wxColour(0, 0, 160)); m_btClose->SetForegroundColour(wxColour(0, 0, 160));
itemBoxSizer23->Add(m_btClose, 0, wxGROW|wxALL, 5); itemBoxSizer25->Add(m_btClose, 0, wxGROW|wxALL, 5);
wxButton* itemButton25 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton27 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton25->SetDefault(); itemButton27->SetDefault();
itemButton25->SetForegroundColour(wxColour(198, 0, 0)); itemButton27->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer23->Add(itemButton25, 0, wxGROW|wxALL, 5); itemBoxSizer25->Add(itemButton27, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer22->Add(itemBoxSizer26, 0, wxGROW|wxALL, 5); itemBoxSizer24->Add(itemBoxSizer28, 0, wxGROW|wxALL, 5);
wxArrayString m_PinShapeStrings; wxArrayString m_PinShapeStrings;
m_PinShapeStrings.Add(_("line")); m_PinShapeStrings.Add(_("line"));
@ -324,7 +258,7 @@ void WinEDA_PinPropertiesFrame::CreateControls()
m_PinShape = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Pin Shape:"), wxDefaultPosition, wxDefaultSize, m_PinShapeStrings, 1, wxRA_SPECIFY_COLS ); m_PinShape = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Pin Shape:"), wxDefaultPosition, wxDefaultSize, m_PinShapeStrings, 1, wxRA_SPECIFY_COLS );
m_PinShape->SetSelection(0); m_PinShape->SetSelection(0);
m_PinShape->SetForegroundColour(wxColour(0, 64, 0)); m_PinShape->SetForegroundColour(wxColour(0, 64, 0));
itemBoxSizer26->Add(m_PinShape, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemBoxSizer28->Add(m_PinShape, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxArrayString m_PinElectricalTypeStrings; wxArrayString m_PinElectricalTypeStrings;
m_PinElectricalTypeStrings.Add(_("Input")); m_PinElectricalTypeStrings.Add(_("Input"));
@ -340,7 +274,7 @@ void WinEDA_PinPropertiesFrame::CreateControls()
m_PinElectricalType = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Electrical Type:"), wxDefaultPosition, wxDefaultSize, m_PinElectricalTypeStrings, 1, wxRA_SPECIFY_COLS ); m_PinElectricalType = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("Electrical Type:"), wxDefaultPosition, wxDefaultSize, m_PinElectricalTypeStrings, 1, wxRA_SPECIFY_COLS );
m_PinElectricalType->SetSelection(0); m_PinElectricalType->SetSelection(0);
m_PinElectricalType->SetForegroundColour(wxColour(68, 68, 34)); m_PinElectricalType->SetForegroundColour(wxColour(68, 68, 34));
itemBoxSizer26->Add(m_PinElectricalType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemBoxSizer28->Add(m_PinElectricalType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end WinEDA_PinPropertiesFrame content construction ////@end WinEDA_PinPropertiesFrame content construction
@ -400,4 +334,143 @@ void WinEDA_PinPropertiesFrame::OnCancelClick( wxCommandEvent& event )
EndModal(0); EndModal(0);
} }
/*******************************************************/
void WinEDA_PinPropertiesFrame::SetValuesInDialog(void)
/*******************************************************/
{
wxString number;
LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
wxString msg;
int tmp, ii;
// Init values and texts for pin name:
if ( CurrentPin ) msg = CurrentPin->m_PinName;
else msg = wxEmptyString;
m_PinNameCtrl->SetValue(msg);
tmp = CurrentPin ? CurrentPin->m_PinNameSize : LastPinNameSize;
msg = ReturnStringFromValue(g_UnitMetric, tmp, m_Parent->m_InternalUnits);
m_PinNameSizeCtrl->SetValue(msg);
msg = m_PinNameSizeText->GetLabel() + ReturnUnitSymbol();
m_PinNameSizeText->SetLabel(msg);
/* Init dialog pin num and pin num size values */
if ( CurrentPin ) CurrentPin->ReturnPinStringNum(msg);
else msg = wxEmptyString;
m_PinNumCtrl->SetValue(msg);
tmp = CurrentPin ? CurrentPin->m_PinNumSize : LastPinNumSize;
msg = ReturnStringFromValue(g_UnitMetric, tmp, m_Parent->m_InternalUnits);
m_PinNumSizeCtrl->SetValue(msg);
msg = m_PinNumSizeText->GetLabel() + ReturnUnitSymbol();
m_PinNumSizeText->SetLabel(msg);
/* init dialog pin size */
msg = m_PinSizeText->GetLabel() + ReturnUnitSymbol();
m_PinSizeText->SetLabel(msg);
int pinsize = CurrentPin ? CurrentPin->m_PinLen : LastPinSize;
msg = ReturnStringFromValue(g_UnitMetric, pinsize, m_Parent->m_InternalUnits);
m_PinSizeCtrl->SetValue(msg);
m_PinSizeIncDecButton->SetValue(pinsize);
/* init pin options */
if ( CurrentPin )
{
if ( CurrentPin->m_Unit == 0 ) m_CommonUnit->SetValue(TRUE);
}
else m_CommonUnit->SetValue(LastPinCommonUnit);
if ( CurrentPin )
{
if ( CurrentPin->m_Convert == 0 ) m_CommonConvert->SetValue(TRUE);
}
else m_CommonConvert->SetValue(LastPinCommonConvert);
if ( CurrentPin )
{
if ( CurrentPin->m_Attributs & PINNOTDRAW ) m_NoDraw->SetValue(TRUE);
}
else m_NoDraw->SetValue(LastPinNoDraw);
tmp = CurrentPin ? CurrentPin->m_Orient : LastPinOrient;
switch ( tmp )
{
case PIN_RIGHT:
m_PinOrient->SetSelection(0);
break;
case PIN_LEFT:
m_PinOrient->SetSelection(1);
break;
case PIN_UP:
m_PinOrient->SetSelection(2);
break;
case PIN_DOWN:
m_PinOrient->SetSelection(3);
break;
}
tmp = CurrentPin ? CurrentPin->m_PinShape : LastPinShape;
m_PinShape->SetSelection( 0 );
for ( ii = 0; ii < NBSHAPES; ii++ )
{
if ( CodeShape[ii] == tmp )
{
m_PinShape->SetSelection( ii ); break ;
}
}
tmp = CurrentPin ? CurrentPin->m_PinShape : LastPinShape;
m_PinShape->SetSelection( 0 );
for ( ii = 0; ii < NBSHAPES; ii++ )
{
if ( CodeShape[ii] == tmp )
{
m_PinShape->SetSelection( ii ); break ;
}
}
m_PinElectricalType->SetSelection( CurrentPin ? CurrentPin->m_PinType : LastPinType);
}
/*!
* wxEVT_SCROLL_LINEUP event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
*/
void WinEDA_PinPropertiesFrame::OnSpinbuttonIncDecPinsizeUp( wxSpinEvent& event )
{
int pinsize;
wxString msg;
// Get the new value, which can be edited by hand, so the value can not match the spin button value
msg = m_PinSizeCtrl->GetValue();
pinsize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
pinsize += 10;
if ( pinsize < 0 ) pinsize = 0;
if ( pinsize > 2000 ) pinsize = 2000;
msg = ReturnStringFromValue(g_UnitMetric, pinsize, m_Parent->m_InternalUnits);
m_PinSizeCtrl->SetValue(msg);
m_PinSizeIncDecButton->SetValue(pinsize);
}
/*!
* wxEVT_SCROLL_LINEDOWN event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
*/
void WinEDA_PinPropertiesFrame::OnSpinbuttonIncDecPinsizeDown( wxSpinEvent& event )
{
int pinsize;
wxString msg;
// Get the new value, which can be edited by hand, so the value can not match the spin button value
msg = m_PinSizeCtrl->GetValue();
pinsize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
pinsize -= 10;
if ( pinsize < 0 ) pinsize = 0;
if ( pinsize > 2000 ) pinsize = 2000;
msg = ReturnStringFromValue(g_UnitMetric, pinsize, m_Parent->m_InternalUnits);
m_PinSizeCtrl->SetValue(msg);
m_PinSizeIncDecButton->SetValue(pinsize);
}

View File

@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: pinedit-dialog.h // Name: pinedit-dialog.h
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 11/02/2006 13:30:59 // Created: 11/02/2006 13:30:59
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59 // Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59
@ -33,7 +33,7 @@
#include "protos.h" #include "protos.h"
////@begin includes ////@begin includes
#include "wx/spinctrl.h" #include "wx/spinbutt.h"
////@end includes ////@end includes
/*! /*!
@ -41,7 +41,7 @@
*/ */
////@begin forward declarations ////@begin forward declarations
class wxSpinCtrl; class wxSpinButton;
////@end forward declarations ////@end forward declarations
/*! /*!
@ -50,14 +50,15 @@ class wxSpinCtrl;
////@begin control identifiers ////@begin control identifiers
#define ID_DIALOG 10000 #define ID_DIALOG 10000
#define ID_TEXTCTRL 10001 #define ID_TEXTCTRL_PINNAME 10001
#define ID_TEXTCTRL1 10002 #define ID_TEXTCTRL_PINNUM 10002
#define ID_SPINCTRL 10003 #define ID_TEXTCTRL_PINSIZE 10003
#define ID_CHECKBOX 10004 #define ID_SPINBUTTON_INC_DEC_PINSIZE 10010
#define ID_CHECKBOX1 10005 #define ID_CHECKBOX_COMMON_UNITS 10004
#define ID_CHECKBOX2 10006 #define ID_CHECKBOX_COMMON_CONVERT 10005
#define ID_TEXTCTRL2 10007 #define ID_CHECKBOX_NOT_DRAWN 10006
#define ID_TEXTCTRL3 10008 #define ID_TEXTCTRL_PINNAME_SIZE 10007
#define ID_TEXTCTRL_PINNUM_SIZE 10008
#define ID_RADIOBOX 10009 #define ID_RADIOBOX 10009
#define ID_RADIOBOX1 10012 #define ID_RADIOBOX1 10012
#define ID_RADIOBOX2 10013 #define ID_RADIOBOX2 10013
@ -81,7 +82,7 @@ class wxSpinCtrl;
*/ */
class WinEDA_PinPropertiesFrame: public wxDialog class WinEDA_PinPropertiesFrame: public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame ) DECLARE_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
@ -98,6 +99,12 @@ public:
////@begin WinEDA_PinPropertiesFrame event handler declarations ////@begin WinEDA_PinPropertiesFrame event handler declarations
/// wxEVT_SCROLL_LINEUP event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeUp( wxSpinEvent& event );
/// wxEVT_SCROLL_LINEDOWN event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeDown( wxSpinEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
@ -118,6 +125,7 @@ public:
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
void SetValuesInDialog(void);
void PinPropertiesAccept(wxCommandEvent& event); void PinPropertiesAccept(wxCommandEvent& event);
void SetPinName(const wxString & newname, int newsize); void SetPinName(const wxString & newname, int newsize);
void SetPinNum(const wxString & newnum, int newsize); void SetPinNum(const wxString & newnum, int newsize);
@ -130,7 +138,9 @@ public:
////@begin WinEDA_PinPropertiesFrame member variables ////@begin WinEDA_PinPropertiesFrame member variables
wxTextCtrl* m_PinNameCtrl; wxTextCtrl* m_PinNameCtrl;
wxTextCtrl* m_PinNumCtrl; wxTextCtrl* m_PinNumCtrl;
wxSpinCtrl* m_PinSize; wxTextCtrl* m_PinSizeCtrl;
wxSpinButton* m_PinSizeIncDecButton;
wxStaticText* m_PinSizeText;
wxCheckBox* m_CommonUnit; wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert; wxCheckBox* m_CommonConvert;
wxCheckBox* m_NoDraw; wxCheckBox* m_NoDraw;

View File

@ -136,7 +136,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="template-name">""</string> <string name="template-name">""</string>
<bool name="dirty">1</bool> <bool name="dirty">1</bool>
<long name="makefile-last-written">0</long> <long name="makefile-last-written">-8519680</long>
<string name="Compiler name">""</string> <string name="Compiler name">""</string>
<string name="Build mode">"Debug"</string> <string name="Build mode">"Debug"</string>
<string name="Unicode mode">"ANSI"</string> <string name="Unicode mode">"ANSI"</string>
@ -393,7 +393,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxTextCtrl: ID_TEXTCTRL"</string> <string name="title">"wxTextCtrl: ID_TEXTCTRL_PINNAME"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"textctrl"</string> <string name="icon-name">"textctrl"</string>
@ -403,7 +403,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbTextCtrlProxy"</string> <string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL"</string> <string name="proxy-Id name">"ID_TEXTCTRL_PINNAME"</string>
<long name="proxy-Id value">10001</long> <long name="proxy-Id value">10001</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string> <string name="proxy-Class">"wxTextCtrl"</string>
@ -473,7 +473,6 @@
<bool name="proxy-wxFIXED_MINSIZE">0</bool> <bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string> <string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
<bool name="proxy-wxTE_LINEWRAP">0</bool>
</document> </document>
<document> <document>
<string name="title">"wxStaticText: wxID_STATIC"</string> <string name="title">"wxStaticText: wxID_STATIC"</string>
@ -546,7 +545,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxTextCtrl: ID_TEXTCTRL1"</string> <string name="title">"wxTextCtrl: ID_TEXTCTRL_PINNUM"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"textctrl"</string> <string name="icon-name">"textctrl"</string>
@ -556,7 +555,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbTextCtrlProxy"</string> <string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL1"</string> <string name="proxy-Id name">"ID_TEXTCTRL_PINNUM"</string>
<long name="proxy-Id value">10002</long> <long name="proxy-Id value">10002</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string> <string name="proxy-Class">"wxTextCtrl"</string>
@ -626,7 +625,6 @@
<bool name="proxy-wxFIXED_MINSIZE">0</bool> <bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string> <string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
<bool name="proxy-wxTE_LINEWRAP">0</bool>
</document> </document>
<document> <document>
<string name="title">"Spacer"</string> <string name="title">"Spacer"</string>
@ -688,6 +686,187 @@
<bool name="proxy-wxADJUST_MINSIZE">0</bool> <bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool> <bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string> <string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<document>
<string name="title">"wxBoxSizer H"</string>
<string name="type">"dialog-control-document"</string>
<string name="filename">""</string>
<string name="icon-name">"sizer"</string>
<long name="is-transient">0</long>
<long name="owns-file">1</long>
<long name="title-mode">0</long>
<long name="locked">0</long>
<string name="created">"11/8/2008"</string>
<string name="proxy-type">"wbBoxSizerProxy"</string>
<string name="proxy-Orientation">"Horizontal"</string>
<string name="proxy-Member variable name">""</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
<bool name="proxy-wxLEFT">0</bool>
<bool name="proxy-wxRIGHT">0</bool>
<bool name="proxy-wxTOP">0</bool>
<bool name="proxy-wxBOTTOM">0</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<document>
<string name="title">"wxTextCtrl: ID_TEXTCTRL_PINSIZE"</string>
<string name="type">"dialog-control-document"</string>
<string name="filename">""</string>
<string name="icon-name">"textctrl"</string>
<long name="is-transient">0</long>
<long name="owns-file">1</long>
<long name="title-mode">0</long>
<long name="locked">0</long>
<string name="created">"11/8/2008"</string>
<string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL_PINSIZE"</string>
<long name="proxy-Id value">10003</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string>
<string name="proxy-Base class">"wxTextCtrl"</string>
<bool name="proxy-External implementation">1</bool>
<bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">"m_PinSizeCtrl"</string>
<string name="proxy-Initial value">""</string>
<long name="proxy-Max length">0</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxTE_MULTILINE">0</bool>
<bool name="proxy-wxTE_PROCESS_ENTER">0</bool>
<bool name="proxy-wxTE_PROCESS_TAB">0</bool>
<bool name="proxy-wxTE_PASSWORD">0</bool>
<bool name="proxy-wxTE_READONLY">0</bool>
<bool name="proxy-wxTE_RICH">0</bool>
<bool name="proxy-wxTE_RICH2">0</bool>
<bool name="proxy-wxTE_AUTO_URL">0</bool>
<bool name="proxy-wxTE_NOHIDESEL">0</bool>
<bool name="proxy-wxTE_LEFT">0</bool>
<bool name="proxy-wxTE_CENTRE">0</bool>
<bool name="proxy-wxTE_RIGHT">0</bool>
<bool name="proxy-wxHSCROLL">0</bool>
<bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxTE_CAPITALIZE">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
<bool name="proxy-wxDOUBLE_BORDER">0</bool>
<bool name="proxy-wxSUNKEN_BORDER">0</bool>
<bool name="proxy-wxRAISED_BORDER">0</bool>
<bool name="proxy-wxSTATIC_BORDER">0</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
<bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
<bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
<string name="proxy-Custom styles">""</string>
<long name="proxy-X">-1</long>
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
<bool name="proxy-wxLEFT">1</bool>
<bool name="proxy-wxRIGHT">1</bool>
<bool name="proxy-wxTOP">1</bool>
<bool name="proxy-wxBOTTOM">1</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
</document>
<document>
<string name="title">"wxSpinButton: ID_SPINBUTTON_INC_DEC_PINSIZE"</string>
<string name="type">"dialog-control-document"</string>
<string name="filename">""</string>
<string name="icon-name">"spinctrl"</string>
<long name="is-transient">0</long>
<long name="owns-file">1</long>
<long name="title-mode">0</long>
<long name="locked">0</long>
<string name="created">"11/8/2008"</string>
<string name="proxy-type">"wbSpinButtonProxy"</string>
<string name="event-handler-0">"wxEVT_SCROLL_LINEUP|OnSpinbuttonIncDecPinsizeUp|NONE||WinEDA_PinPropertiesFrame"</string>
<string name="event-handler-1">"wxEVT_SCROLL_LINEDOWN|OnSpinbuttonIncDecPinsizeDown|NONE||"</string>
<string name="proxy-Id name">"ID_SPINBUTTON_INC_DEC_PINSIZE"</string>
<long name="proxy-Id value">10010</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxSpinButton"</string>
<string name="proxy-Base class">"wxSpinButton"</string>
<bool name="proxy-External implementation">1</bool>
<bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">"m_PinSizeIncDecButton"</string>
<long name="proxy-Minimum value">0</long>
<long name="proxy-Maximum value">2000</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxSP_HORIZONTAL">0</bool>
<bool name="proxy-wxSP_VERTICAL">1</bool>
<bool name="proxy-wxSP_ARROW_KEYS">0</bool>
<bool name="proxy-wxSP_WRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
<bool name="proxy-wxDOUBLE_BORDER">0</bool>
<bool name="proxy-wxSUNKEN_BORDER">0</bool>
<bool name="proxy-wxRAISED_BORDER">0</bool>
<bool name="proxy-wxSTATIC_BORDER">0</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
<bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
<bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
<string name="proxy-Custom styles">""</string>
<long name="proxy-X">-1</long>
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
<bool name="proxy-wxLEFT">0</bool>
<bool name="proxy-wxRIGHT">1</bool>
<bool name="proxy-wxTOP">0</bool>
<bool name="proxy-wxBOTTOM">0</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
</document>
</document>
<document> <document>
<string name="title">"wxStaticText: wxID_STATIC"</string> <string name="title">"wxStaticText: wxID_STATIC"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
@ -697,7 +876,7 @@
<long name="owns-file">1</long> <long name="owns-file">1</long>
<long name="title-mode">0</long> <long name="title-mode">0</long>
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/8/2008"</string>
<string name="proxy-type">"wbStaticTextProxy"</string> <string name="proxy-type">"wbStaticTextProxy"</string>
<string name="proxy-Id name">"wxID_STATIC"</string> <string name="proxy-Id name">"wxID_STATIC"</string>
<long name="proxy-Id value">5105</long> <long name="proxy-Id value">5105</long>
@ -708,8 +887,8 @@
<bool name="proxy-Separate files">0</bool> <bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string> <string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string> <string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">""</string> <string name="proxy-Member variable name">"m_PinSizeText"</string>
<string name="proxy-Label">"Pin lenght :"</string> <string name="proxy-Label">"Pin Lenght"</string>
<long name="proxy-Wrapping width">-1</long> <long name="proxy-Wrapping width">-1</long>
<string name="proxy-Help text">""</string> <string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string> <string name="proxy-Tooltip text">""</string>
@ -759,76 +938,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxSpinCtrl: ID_SPINCTRL"</string> <string name="title">"wxCheckBox: ID_CHECKBOX_COMMON_UNITS"</string>
<string name="type">"dialog-control-document"</string>
<string name="filename">""</string>
<string name="icon-name">"spinctrl"</string>
<long name="is-transient">0</long>
<long name="owns-file">1</long>
<long name="title-mode">0</long>
<long name="locked">0</long>
<string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbSpinCtrlProxy"</string>
<string name="proxy-Id name">"ID_SPINCTRL"</string>
<long name="proxy-Id value">10003</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxSpinCtrl"</string>
<string name="proxy-Base class">"wxSpinCtrl"</string>
<bool name="proxy-External implementation">1</bool>
<bool name="proxy-Separate files">0</bool>
<string name="proxy-Implementation filename">""</string>
<string name="proxy-Header filename">""</string>
<string name="proxy-Member variable name">"m_PinSize"</string>
<long name="proxy-Minimum value">0</long>
<long name="proxy-Maximum value">2000</long>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxSP_ARROW_KEYS">1</bool>
<bool name="proxy-wxSP_WRAP">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
<bool name="proxy-wxDOUBLE_BORDER">0</bool>
<bool name="proxy-wxSUNKEN_BORDER">0</bool>
<bool name="proxy-wxRAISED_BORDER">0</bool>
<bool name="proxy-wxSTATIC_BORDER">0</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
<bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
<bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
<string name="proxy-Custom styles">""</string>
<long name="proxy-X">-1</long>
<long name="proxy-Y">-1</long>
<long name="proxy-Width">-1</long>
<long name="proxy-Height">-1</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
<bool name="proxy-wxLEFT">1</bool>
<bool name="proxy-wxRIGHT">1</bool>
<bool name="proxy-wxTOP">1</bool>
<bool name="proxy-wxBOTTOM">1</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string>
</document>
<document>
<string name="title">"wxCheckBox: ID_CHECKBOX"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"checkbox"</string> <string name="icon-name">"checkbox"</string>
@ -838,7 +948,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbCheckBoxProxy"</string> <string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX"</string> <string name="proxy-Id name">"ID_CHECKBOX_COMMON_UNITS"</string>
<long name="proxy-Id value">10004</long> <long name="proxy-Id value">10004</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string> <string name="proxy-Class">"wxCheckBox"</string>
@ -892,7 +1002,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxCheckBox: ID_CHECKBOX1"</string> <string name="title">"wxCheckBox: ID_CHECKBOX_COMMON_CONVERT"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"checkbox"</string> <string name="icon-name">"checkbox"</string>
@ -902,7 +1012,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbCheckBoxProxy"</string> <string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX1"</string> <string name="proxy-Id name">"ID_CHECKBOX_COMMON_CONVERT"</string>
<long name="proxy-Id value">10005</long> <long name="proxy-Id value">10005</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string> <string name="proxy-Class">"wxCheckBox"</string>
@ -956,7 +1066,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxCheckBox: ID_CHECKBOX2"</string> <string name="title">"wxCheckBox: ID_CHECKBOX_NOT_DRAWN"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"checkbox"</string> <string name="icon-name">"checkbox"</string>
@ -966,7 +1076,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbCheckBoxProxy"</string> <string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX2"</string> <string name="proxy-Id name">"ID_CHECKBOX_NOT_DRAWN"</string>
<long name="proxy-Id value">10006</long> <long name="proxy-Id value">10006</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string> <string name="proxy-Class">"wxCheckBox"</string>
@ -1117,7 +1227,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxTextCtrl: ID_TEXTCTRL2"</string> <string name="title">"wxTextCtrl: ID_TEXTCTRL_PINNAME_SIZE"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"textctrl"</string> <string name="icon-name">"textctrl"</string>
@ -1127,7 +1237,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbTextCtrlProxy"</string> <string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL2"</string> <string name="proxy-Id name">"ID_TEXTCTRL_PINNAME_SIZE"</string>
<long name="proxy-Id value">10007</long> <long name="proxy-Id value">10007</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string> <string name="proxy-Class">"wxTextCtrl"</string>
@ -1197,7 +1307,6 @@
<bool name="proxy-wxFIXED_MINSIZE">0</bool> <bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string> <string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
<bool name="proxy-wxTE_LINEWRAP">0</bool>
</document> </document>
<document> <document>
<string name="title">"wxStaticText: wxID_STATIC"</string> <string name="title">"wxStaticText: wxID_STATIC"</string>
@ -1270,7 +1379,7 @@
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
</document> </document>
<document> <document>
<string name="title">"wxTextCtrl: ID_TEXTCTRL3"</string> <string name="title">"wxTextCtrl: ID_TEXTCTRL_PINNUM_SIZE"</string>
<string name="type">"dialog-control-document"</string> <string name="type">"dialog-control-document"</string>
<string name="filename">""</string> <string name="filename">""</string>
<string name="icon-name">"textctrl"</string> <string name="icon-name">"textctrl"</string>
@ -1280,7 +1389,7 @@
<long name="locked">0</long> <long name="locked">0</long>
<string name="created">"11/5/2006"</string> <string name="created">"11/5/2006"</string>
<string name="proxy-type">"wbTextCtrlProxy"</string> <string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL3"</string> <string name="proxy-Id name">"ID_TEXTCTRL_PINNUM_SIZE"</string>
<long name="proxy-Id value">10008</long> <long name="proxy-Id value">10008</long>
<string name="proxy-Name">""</string> <string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string> <string name="proxy-Class">"wxTextCtrl"</string>
@ -1350,7 +1459,6 @@
<bool name="proxy-wxFIXED_MINSIZE">0</bool> <bool name="proxy-wxFIXED_MINSIZE">0</bool>
<string name="proxy-Custom arguments">""</string> <string name="proxy-Custom arguments">""</string>
<string name="proxy-Custom ctor arguments">""</string> <string name="proxy-Custom ctor arguments">""</string>
<bool name="proxy-wxTE_LINEWRAP">0</bool>
</document> </document>
<document> <document>
<string name="title">"Spacer"</string> <string name="title">"Spacer"</string>

View File

@ -66,9 +66,13 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
LastPinCommonConvert = m_CommonConvert->GetValue(); LastPinCommonConvert = m_CommonConvert->GetValue();
LastPinCommonUnit = m_CommonUnit->GetValue(); LastPinCommonUnit = m_CommonUnit->GetValue();
LastPinNoDraw = m_NoDraw->GetValue(); LastPinNoDraw = m_NoDraw->GetValue();
LastPinSize = m_PinSize->GetValue();
msg = m_PinSizeCtrl->GetValue();
LastPinSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_PinNameSizeCtrl->GetValue(); msg = m_PinNameSizeCtrl->GetValue();
LastPinNameSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits ); LastPinNameSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
msg = m_PinNumSizeCtrl->GetValue(); msg = m_PinNumSizeCtrl->GetValue();
LastPinNumSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits ); LastPinNumSize = ReturnValueFromString( g_UnitMetric, msg, m_Parent->m_InternalUnits );
@ -113,7 +117,12 @@ void WinEDA_PinPropertiesFrame::PinPropertiesAccept( wxCommandEvent& event )
void WinEDA_LibeditFrame::InitEditOnePin() void WinEDA_LibeditFrame::InitEditOnePin()
/*********************************************/ /*********************************************/
/* Routine d'installation du menu d'edition d'une pin /* Called when installing the edit pin dialog frame
* Set pins flags (.m_Flags pins member) to ensure a correctins edition:
* If 2 or more pins are on the same location (and the same orientation) they are all moved or resized.
* This is usefull for components which have more than one part per package
* In this case all parts can be edited at once.
* Note: if the option "Edit Pin per Pin" (tool of the main toolbar) is activated, only the current part is edited
*/ */
{ {
LibDrawPin* Pin; LibDrawPin* Pin;
@ -135,7 +144,8 @@ void WinEDA_LibeditFrame::InitEditOnePin()
if( (Pin->m_Pos == CurrentPin->m_Pos) if( (Pin->m_Pos == CurrentPin->m_Pos)
&& (Pin->m_Orient == CurrentPin->m_Orient) && (Pin->m_Orient == CurrentPin->m_Orient)
&& ( !(CurrentPin->m_Flags & IS_NEW) ) && ( !(CurrentPin->m_Flags & IS_NEW) )
&& (g_EditPinByPinIsOn == FALSE) ) && (g_EditPinByPinIsOn == FALSE) // This is set by the tool of the main toolbar
)
Pin->m_Flags |= IS_LINKED | IN_EDIT; Pin->m_Flags |= IS_LINKED | IN_EDIT;
else else
Pin->m_Flags = 0; Pin->m_Flags = 0;

View File

@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h" # include "config.h"
(wxT(KICAD_SVN_VERSION)) (wxT(KICAD_SVN_VERSION))
# else # else
(wxT("(20080731.r1175")) (wxT("(20080811.r1188)"))
# endif # endif
#endif #endif
; ;