Loading cvpcb/cvpcb.cpp +5 −3 Original line number Original line Diff line number Diff line Loading @@ -36,10 +36,12 @@ const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files (*.eq const wxString titleLibLoadError( _( "Library Load Error" ) ); const wxString titleLibLoadError( _( "Library Load Error" ) ); /* MacOSX: Needed for file association /* * MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics * http://wiki.wxwidgets.org/WxMac-specific_topics */ */ void WinEDA_App::MacOpenFile(const wxString &fileName) { void WinEDA_App::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; wxFileName filename = fileName; wxString oldPath; wxString oldPath; WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); Loading cvpcb/menubar.cpp +3 −3 Original line number Original line Diff line number Diff line /** /* * @file menucfg.cpp * menubar.cpp * (Re)Create the CvPCB main MenuBar * Build the CvPCB MenuBar */ */ #include "fctsys.h" #include "fctsys.h" #include "appl_wxstruct.h" #include "appl_wxstruct.h" Loading cvpcb/setvisu.cpp +2 −3 Original line number Original line Diff line number Diff line Loading @@ -108,11 +108,10 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /* /* * Redraw the BOARD items but not cursors, axis or grid. * Redraw the BOARD items but not cursors, axis or grid. */ */ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC, void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) int aDrawMode, const wxPoint& offset ) { { if( m_Modules ) if( m_Modules ) { { m_Modules->Draw( aPanel, DC, GR_COPY ); m_Modules->Draw( aPanel, aDC, GR_COPY ); } } } } eeschema/dialogs/dialog_edit_component_in_schematic.cpp +29 −0 Original line number Original line Diff line number Diff line Loading @@ -578,6 +578,22 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() m_StyleRadioBox->SetSelection( style ); m_StyleRadioBox->SetSelection( style ); // Select the right text justification if( field.m_HJustify == GR_TEXT_HJUSTIFY_LEFT ) m_FieldHJustifyCtrl->SetSelection(0); else if( field.m_HJustify == GR_TEXT_HJUSTIFY_RIGHT ) m_FieldHJustifyCtrl->SetSelection(2); else m_FieldHJustifyCtrl->SetSelection(1); if( field.m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM ) m_FieldVJustifyCtrl->SetSelection(0); else if( field.m_VJustify == GR_TEXT_VJUSTIFY_TOP ) m_FieldVJustifyCtrl->SetSelection(2); else m_FieldVJustifyCtrl->SetSelection(1); fieldNameTextCtrl->SetValue( field.m_Name ); fieldNameTextCtrl->SetValue( field.m_Name ); // the names of the fixed fields are not editable, others are. // the names of the fixed fields are not editable, others are. Loading Loading @@ -657,6 +673,19 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); // Copy the text justification GRTextHorizJustifyType hjustify[3] = { GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT }; GRTextVertJustifyType vjustify[3] = { GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP }; field.m_HJustify = hjustify[m_FieldHJustifyCtrl->GetSelection()]; field.m_VJustify = vjustify[m_FieldVJustifyCtrl->GetSelection()]; field.m_Name = fieldNameTextCtrl->GetValue(); field.m_Name = fieldNameTextCtrl->GetValue(); /* Void fields texts for REFERENCE and VALUE (value is the name of the /* Void fields texts for REFERENCE and VALUE (value is the name of the Loading eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp +27 −18 Original line number Original line Diff line number Diff line /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/ // // // PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -29,7 +29,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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, 0, wxALL|wxEXPAND, 5 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); Loading @@ -42,9 +42,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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|wxEXPAND, 8 ); optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 ); wxBoxSizer* mirrorSizer; wxBoxSizer* mirrorSizer; mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); Loading @@ -57,7 +57,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 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 ); Loading @@ -71,7 +71,6 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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 ); Loading Loading @@ -113,11 +112,28 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); fieldsSizer->Add( gridStaticBoxSizer, 5, wxALL|wxEXPAND, 8 ); fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT|wxLEFT, 8 ); wxBoxSizer* fieldEditBoxSizer; wxBoxSizer* fieldEditBoxSizer; fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizerOptions; sbSizerOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxHORIZONTAL ); wxString m_FieldHJustifyCtrlChoices[] = { _("Align left"), _("Align center"), _("Align right") }; int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString ); m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldHJustifyCtrl->SetSelection( 1 ); sbSizerOptions->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); wxString m_FieldVJustifyCtrlChoices[] = { _("Align bottom"), _("Align center"), _("Align top") }; int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString ); m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldVJustifyCtrl->SetSelection( 1 ); sbSizerOptions->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); fieldEditBoxSizer->Add( sbSizerOptions, 0, wxEXPAND, 5 ); wxStaticBoxSizer* visibilitySizer; wxStaticBoxSizer* visibilitySizer; visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); Loading @@ -125,13 +141,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox->SetToolTip( _("Check if you want this field visible") ); showCheckBox->SetToolTip( _("Check if you want this field visible") ); bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); Loading @@ -146,7 +160,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND|wxTOP, 5 ); wxBoxSizer* fieldNameBoxSizer; wxBoxSizer* fieldNameBoxSizer; fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); Loading Loading @@ -221,15 +235,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 ); fieldEditBoxSizer->Add( positionBoxSizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fieldsSizer->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); Loading Loading @@ -268,4 +276,5 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), 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 ); } } Loading
cvpcb/cvpcb.cpp +5 −3 Original line number Original line Diff line number Diff line Loading @@ -36,10 +36,12 @@ const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files (*.eq const wxString titleLibLoadError( _( "Library Load Error" ) ); const wxString titleLibLoadError( _( "Library Load Error" ) ); /* MacOSX: Needed for file association /* * MacOSX: Needed for file association * http://wiki.wxwidgets.org/WxMac-specific_topics * http://wiki.wxwidgets.org/WxMac-specific_topics */ */ void WinEDA_App::MacOpenFile(const wxString &fileName) { void WinEDA_App::MacOpenFile(const wxString &fileName) { wxFileName filename = fileName; wxFileName filename = fileName; wxString oldPath; wxString oldPath; WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); WinEDA_CvpcbFrame * frame = ((WinEDA_CvpcbFrame*)GetTopWindow()); Loading
cvpcb/menubar.cpp +3 −3 Original line number Original line Diff line number Diff line /** /* * @file menucfg.cpp * menubar.cpp * (Re)Create the CvPCB main MenuBar * Build the CvPCB MenuBar */ */ #include "fctsys.h" #include "fctsys.h" #include "appl_wxstruct.h" #include "appl_wxstruct.h" Loading
cvpcb/setvisu.cpp +2 −3 Original line number Original line Diff line number Diff line Loading @@ -108,11 +108,10 @@ void DISPLAY_FOOTPRINTS_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /* /* * Redraw the BOARD items but not cursors, axis or grid. * Redraw the BOARD items but not cursors, axis or grid. */ */ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC, void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset ) int aDrawMode, const wxPoint& offset ) { { if( m_Modules ) if( m_Modules ) { { m_Modules->Draw( aPanel, DC, GR_COPY ); m_Modules->Draw( aPanel, aDC, GR_COPY ); } } } }
eeschema/dialogs/dialog_edit_component_in_schematic.cpp +29 −0 Original line number Original line Diff line number Diff line Loading @@ -578,6 +578,22 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() m_StyleRadioBox->SetSelection( style ); m_StyleRadioBox->SetSelection( style ); // Select the right text justification if( field.m_HJustify == GR_TEXT_HJUSTIFY_LEFT ) m_FieldHJustifyCtrl->SetSelection(0); else if( field.m_HJustify == GR_TEXT_HJUSTIFY_RIGHT ) m_FieldHJustifyCtrl->SetSelection(2); else m_FieldHJustifyCtrl->SetSelection(1); if( field.m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM ) m_FieldVJustifyCtrl->SetSelection(0); else if( field.m_VJustify == GR_TEXT_VJUSTIFY_TOP ) m_FieldVJustifyCtrl->SetSelection(2); else m_FieldVJustifyCtrl->SetSelection(1); fieldNameTextCtrl->SetValue( field.m_Name ); fieldNameTextCtrl->SetValue( field.m_Name ); // the names of the fixed fields are not editable, others are. // the names of the fixed fields are not editable, others are. Loading Loading @@ -657,6 +673,19 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); // Copy the text justification GRTextHorizJustifyType hjustify[3] = { GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT }; GRTextVertJustifyType vjustify[3] = { GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP }; field.m_HJustify = hjustify[m_FieldHJustifyCtrl->GetSelection()]; field.m_VJustify = vjustify[m_FieldVJustifyCtrl->GetSelection()]; field.m_Name = fieldNameTextCtrl->GetValue(); field.m_Name = fieldNameTextCtrl->GetValue(); /* Void fields texts for REFERENCE and VALUE (value is the name of the /* Void fields texts for REFERENCE and VALUE (value is the name of the Loading
eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp +27 −18 Original line number Original line Diff line number Diff line /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/ // // // PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE! Loading Loading @@ -29,7 +29,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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, 0, wxALL|wxEXPAND, 5 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); Loading @@ -42,9 +42,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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|wxEXPAND, 8 ); optionsSizer->Add( orientationSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 0 ); optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 ); wxBoxSizer* mirrorSizer; wxBoxSizer* mirrorSizer; mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); mirrorSizer = new wxBoxSizer( wxHORIZONTAL ); Loading @@ -57,7 +57,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 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 ); Loading @@ -71,7 +71,6 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( 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 ); Loading Loading @@ -113,11 +112,28 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 ); fieldsSizer->Add( gridStaticBoxSizer, 5, wxALL|wxEXPAND, 8 ); fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT|wxLEFT, 8 ); wxBoxSizer* fieldEditBoxSizer; wxBoxSizer* fieldEditBoxSizer; fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizerOptions; sbSizerOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxHORIZONTAL ); wxString m_FieldHJustifyCtrlChoices[] = { _("Align left"), _("Align center"), _("Align right") }; int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString ); m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldHJustifyCtrl->SetSelection( 1 ); sbSizerOptions->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); wxString m_FieldVJustifyCtrlChoices[] = { _("Align bottom"), _("Align center"), _("Align top") }; int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString ); m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_FieldVJustifyCtrl->SetSelection( 1 ); sbSizerOptions->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); fieldEditBoxSizer->Add( sbSizerOptions, 0, wxEXPAND, 5 ); wxStaticBoxSizer* visibilitySizer; wxStaticBoxSizer* visibilitySizer; visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); Loading @@ -125,13 +141,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox->SetToolTip( _("Check if you want this field visible") ); showCheckBox->SetToolTip( _("Check if you want this field visible") ); bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); Loading @@ -146,7 +160,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND|wxTOP, 5 ); wxBoxSizer* fieldNameBoxSizer; wxBoxSizer* fieldNameBoxSizer; fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); Loading Loading @@ -221,15 +235,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 ); fieldEditBoxSizer->Add( positionBoxSizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fieldsSizer->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 ); Loading Loading @@ -268,4 +276,5 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), 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 ); } }