Commit 0d530fb3 authored by jean-pierre charras's avatar jean-pierre charras

dialog_edit_component_in_schematic: moved "Reset to Library Default" Button....

dialog_edit_component_in_schematic: moved "Reset to Library Default" Button. This command is now undoable.
parent 05287607
...@@ -789,6 +789,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event ) ...@@ -789,6 +789,10 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp( wxCommandEvent& event )
if( entry == NULL ) if( entry == NULL )
return; return;
// save old cmp in undo list if not already in edit, or moving ...
if( m_Cmp->m_Flags == 0 )
m_Parent->SaveCopyInUndoList( m_Cmp, UR_CHANGED );
INSTALL_DC( dc, m_Parent->DrawPanel ); INSTALL_DC( dc, m_Parent->DrawPanel );
RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, g_XorMode ); RedrawOneStruct( m_Parent->DrawPanel, &dc, m_Cmp, g_XorMode );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_edit_component_in_schematic_fbp.h" #include "dialog_edit_component_in_schematic_fbp.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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* mainSizer; wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxVERTICAL ); mainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* upperSizer; wxBoxSizer* upperSizer;
upperSizer = new wxBoxSizer( wxHORIZONTAL ); upperSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* optionsSizer; wxStaticBoxSizer* optionsSizer;
optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
wxStaticBoxSizer* unitSizer; wxStaticBoxSizer* unitSizer;
unitSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unit") ), wxVERTICAL ); unitSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unit") ), wxVERTICAL );
wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") }; wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") };
int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString ); int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 ); unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
unitChoice->SetSelection( 0 ); unitChoice->SetSelection( 0 );
unitSizer->Add( unitChoice, 1, wxALL|wxEXPAND, 5 ); unitSizer->Add( unitChoice, 1, wxALL|wxEXPAND, 5 );
optionsSizer->Add( unitSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
wxBoxSizer* orientationSizer; wxBoxSizer* orientationSizer;
orientationSizer = new wxBoxSizer( wxHORIZONTAL ); orientationSizer = new wxBoxSizer( wxHORIZONTAL );
wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") }; wxString orientationRadioBoxChoices[] = { _("0"), _("+90"), _("180"), _("-90") };
int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString ); int orientationRadioBoxNChoices = sizeof( orientationRadioBoxChoices ) / sizeof( wxString );
orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); orientationRadioBox = new wxRadioBox( this, wxID_ANY, _("Orientation (Degrees)"), wxDefaultPosition, wxDefaultSize, orientationRadioBoxNChoices, orientationRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
orientationRadioBox->SetSelection( 0 ); orientationRadioBox->SetSelection( 0 );
orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") ); orientationRadioBox->SetToolTip( _("Select if the component is to be rotated when drawn") );
orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 ); orientationSizer->Add( orientationRadioBox, 1, wxALL, 8 );
optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
wxBoxSizer* mirrorSizer; wxBoxSizer* mirrorSizer;
mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); mirrorSizer = new wxBoxSizer( wxHORIZONTAL );
wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") }; wxString mirrorRadioBoxChoices[] = { _("Normal"), _("Mirror ---"), _("Mirror |") };
int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString ); int mirrorRadioBoxNChoices = sizeof( mirrorRadioBoxChoices ) / sizeof( wxString );
mirrorRadioBox = new wxRadioBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, mirrorRadioBoxNChoices, mirrorRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); mirrorRadioBox = new wxRadioBox( this, wxID_ANY, _("Mirror"), wxDefaultPosition, wxDefaultSize, mirrorRadioBoxNChoices, mirrorRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
mirrorRadioBox->SetSelection( 0 ); mirrorRadioBox->SetSelection( 0 );
mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") ); mirrorRadioBox->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 ); mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
optionsSizer->Add( mirrorSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( mirrorSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 );
wxStaticBoxSizer* chipnameSizer; wxStaticBoxSizer* chipnameSizer;
chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL ); chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL );
chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
chipnameTextCtrl->SetMaxLength( 32 ); chipnameTextCtrl->SetMaxLength( 32 );
chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") ); chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
chipnameSizer->Add( chipnameTextCtrl, 1, wxALL|wxEXPAND, 5 ); chipnameSizer->Add( chipnameTextCtrl, 1, wxALL|wxEXPAND, 5 );
optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 ); convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") ); convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
optionsSizer->Add( convertCheckBox, 0, wxALL, 8 ); optionsSizer->Add( convertCheckBox, 0, wxALL, 8 );
partsAreLockedLabel = new wxStaticText( this, wxID_ANY, _("Parts are locked"), wxDefaultPosition, wxDefaultSize, 0 ); partsAreLockedLabel = new wxStaticText( this, wxID_ANY, _("Parts are locked"), wxDefaultPosition, wxDefaultSize, 0 );
partsAreLockedLabel->Wrap( -1 ); partsAreLockedLabel->Wrap( -1 );
optionsSizer->Add( partsAreLockedLabel, 0, wxALL|wxEXPAND, 8 ); optionsSizer->Add( partsAreLockedLabel, 0, wxALL|wxEXPAND, 8 );
upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 ); defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
defaultsButton->SetToolTip( _("Set position and style of fields and component orientation to default lib value.\nFields texts are not modified.") );
wxStaticBoxSizer* fieldsSizer;
fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL ); optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* gridStaticBoxSizer; upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
wxStaticBoxSizer* fieldsSizer;
fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL );
fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );
wxStaticBoxSizer* gridStaticBoxSizer;
gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 ); gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 ); fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
addFieldButton->SetToolTip( _("Add a new custom field") ); fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );
gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 );
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 ); addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") ); addFieldButton->SetToolTip( _("Add a new custom field") );
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 );
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 ); deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") ); deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 );
fieldsSizer->Add( gridStaticBoxSizer, 5, wxALL|wxEXPAND, 8 ); moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
wxBoxSizer* fieldEditBoxSizer;
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* visibilitySizer; fieldsSizer->Add( gridStaticBoxSizer, 5, wxALL|wxEXPAND, 8 );
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
wxBoxSizer* fieldEditBoxSizer;
wxBoxSizer* bShowRotateSizer; fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
bShowRotateSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* visibilitySizer;
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
showCheckBox->SetToolTip( _("Check if you want this field visible") ); wxBoxSizer* bShowRotateSizer;
bShowRotateSizer = new wxBoxSizer( wxVERTICAL );
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 );
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
showCheckBox->SetToolTip( _("Check if you want this field visible") );
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 );
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 );
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 );
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
m_StyleRadioBox->SetSelection( 0 ); visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); m_StyleRadioBox->SetSelection( 0 );
m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 );
fieldNameLabel->Wrap( -1 );
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 ); wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") ); fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 );
fieldNameLabel->Wrap( -1 );
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 ); fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 );
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 ); fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
wxBoxSizer* fieldTextBoxSizer;
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
fieldValueLabel->Wrap( -1 );
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 ); wxBoxSizer* fieldTextBoxSizer;
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
fieldValueLabel->Wrap( -1 );
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 );
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 ); fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
wxBoxSizer* textSizeBoxSizer;
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 ); fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 );
textSizeLabel->Wrap( -1 );
textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 ); wxBoxSizer* textSizeBoxSizer;
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL );
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
textSizeTextCtrl->SetToolTip( _("The size of the currently selected field's text in the schematic") ); textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 );
textSizeLabel->Wrap( -1 );
textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 ); textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 );
fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 ); textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
textSizeTextCtrl->SetToolTip( _("The size of the currently selected field's text in the schematic") );
wxBoxSizer* positionBoxSizer;
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL ); textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 );
wxBoxSizer* posXBoxSizer; fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 );
posXBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* positionBoxSizer;
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 ); positionBoxSizer = new wxBoxSizer( wxHORIZONTAL );
posXLabel->Wrap( -1 );
posXBoxSizer->Add( posXLabel, 0, 0, 5 ); wxBoxSizer* posXBoxSizer;
posXBoxSizer = new wxBoxSizer( wxVERTICAL );
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") ); posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 );
posXLabel->Wrap( -1 );
posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 ); posXBoxSizer->Add( posXLabel, 0, 0, 5 );
positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 ); posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );
wxBoxSizer* posYBoxSizer;
posYBoxSizer = new wxBoxSizer( wxVERTICAL ); posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 );
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 ); positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 );
posYLabel->Wrap( -1 );
posYBoxSizer->Add( posYLabel, 0, 0, 5 ); wxBoxSizer* posYBoxSizer;
posYBoxSizer = new wxBoxSizer( wxVERTICAL );
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") ); posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 );
posYLabel->Wrap( -1 );
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 ); posYBoxSizer->Add( posYLabel, 0, 0, 5 );
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 );
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 );
fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 );
defaultsButton = new wxButton( this, wxID_ANY, _("Reset to Library Defaults"), wxDefaultPosition, wxDefaultSize, 0 ); fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 );
defaultsButton->SetToolTip( _("Set position and style of fields and component orientation to default lib value.\nFields texts are not modified.") );
fieldEditBoxSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 );
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 );
upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
mainSizer->Add( upperSizer, 1, wxEXPAND, 5 ); mainSizer->Add( upperSizer, 1, wxEXPAND, 5 );
stdDialogButtonSizer = new wxStdDialogButtonSizer(); stdDialogButtonSizer = new wxStdDialogButtonSizer();
stdDialogButtonSizerOK = new wxButton( this, wxID_OK ); stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK ); stdDialogButtonSizer->AddButton( stdDialogButtonSizerOK );
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL ); stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel ); stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
stdDialogButtonSizer->Realize(); stdDialogButtonSizer->Realize();
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 ); mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
this->SetSizer( mainSizer ); this->SetSizer( mainSizer );
this->Layout(); this->Layout();
// Connect Events // Connect Events
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this ); defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this ); fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this ); fieldListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this ); addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this ); deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this ); stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
} }
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP() DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP()
{ {
// Disconnect Events // Disconnect Events
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this ); defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this ); fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemDeselected ), NULL, this );
addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this ); fieldListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnListItemSelected ), NULL, this );
deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this ); addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this ); deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this ); stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_edit_component_in_schematic_fbp__ #ifndef __dialog_edit_component_in_schematic_fbp__
#define __dialog_edit_component_in_schematic_fbp__ #define __dialog_edit_component_in_schematic_fbp__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/listctrl.h> #include <wx/button.h>
#include <wx/button.h> #include <wx/listctrl.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP /// Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
{ {
private: private:
protected: protected:
wxChoice* unitChoice; wxChoice* unitChoice;
wxRadioBox* orientationRadioBox; wxRadioBox* orientationRadioBox;
wxRadioBox* mirrorRadioBox; wxRadioBox* mirrorRadioBox;
wxTextCtrl* chipnameTextCtrl; wxTextCtrl* chipnameTextCtrl;
wxCheckBox* convertCheckBox; wxCheckBox* convertCheckBox;
wxStaticText* partsAreLockedLabel; wxStaticText* partsAreLockedLabel;
wxListCtrl* fieldListCtrl; wxButton* defaultsButton;
wxButton* addFieldButton; wxListCtrl* fieldListCtrl;
wxButton* deleteFieldButton; wxButton* addFieldButton;
wxButton* moveUpButton; wxButton* deleteFieldButton;
wxCheckBox* showCheckBox; wxButton* moveUpButton;
wxCheckBox* rotateCheckBox; wxCheckBox* showCheckBox;
wxRadioBox* m_StyleRadioBox; wxCheckBox* rotateCheckBox;
wxStaticText* fieldNameLabel; wxRadioBox* m_StyleRadioBox;
wxTextCtrl* fieldNameTextCtrl; wxStaticText* fieldNameLabel;
wxStaticText* fieldValueLabel; wxTextCtrl* fieldNameTextCtrl;
wxTextCtrl* fieldValueTextCtrl; wxStaticText* fieldValueLabel;
wxStaticText* textSizeLabel; wxTextCtrl* fieldValueTextCtrl;
wxTextCtrl* textSizeTextCtrl; wxStaticText* textSizeLabel;
wxStaticText* posXLabel; wxTextCtrl* textSizeTextCtrl;
wxTextCtrl* posXTextCtrl; wxStaticText* posXLabel;
wxStaticText* posYLabel; wxTextCtrl* posXTextCtrl;
wxTextCtrl* posYTextCtrl; wxStaticText* posYLabel;
wxTextCtrl* posYTextCtrl;
wxButton* defaultsButton;
wxStdDialogButtonSizer* stdDialogButtonSizer; wxStdDialogButtonSizer* stdDialogButtonSizer;
wxButton* stdDialogButtonSizerOK; wxButton* stdDialogButtonSizerOK;
wxButton* stdDialogButtonSizerCancel; wxButton* stdDialogButtonSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnListItemDeselected( wxListEvent& event ){ event.Skip(); } virtual void SetInitCmp( wxCommandEvent& event ){ event.Skip(); }
virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); } virtual void OnListItemDeselected( wxListEvent& event ){ event.Skip(); }
virtual void addFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); }
virtual void deleteFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void addFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); }
virtual void moveUpButtonHandler( wxCommandEvent& event ){ event.Skip(); } virtual void deleteFieldButtonHandler( wxCommandEvent& event ){ event.Skip(); }
virtual void SetInitCmp( wxCommandEvent& event ){ event.Skip(); } virtual void moveUpButtonHandler( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ){ event.Skip(); }
public: public:
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 864,640 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(); ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
}; };
#endif //__dialog_edit_component_in_schematic_fbp__ #endif //__dialog_edit_component_in_schematic_fbp__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment