Fix footprint editor options dialog layout.

Add padding to standard dialog button sizer.  On windows, the buttons are
slammed against the bottom of the dialog with no border which looks awful.

Fix alignment and padding in grid sizers.
This commit is contained in:
Wayne Stambaugh 2018-05-09 14:12:26 -04:00
parent 7b887c4844
commit 7bd9fc9235
3 changed files with 2825 additions and 2824 deletions

View File

@ -1,225 +1,225 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 20 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "widgets/text_ctrl_eval.h" #include "widgets/text_ctrl_eval.h"
#include "dialog_modedit_options_base.h" #include "dialog_modedit_options_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_MODEDIT_OPTIONS_BASE::DIALOG_MODEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) DIALOG_MODEDIT_OPTIONS_BASE::DIALOG_MODEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizerMain; wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL ); bSizerMain = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer3; wxFlexGridSizer* fgSizer3;
fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer3->AddGrowableCol( 0 ); fgSizer3->AddGrowableCol( 0 );
fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetFlexibleDirection( wxBOTH );
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxStaticBoxSizer* sbSizerNewGraphicItems; wxStaticBoxSizer* sbSizerNewGraphicItems;
sbSizerNewGraphicItems = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Graphic Items") ), wxVERTICAL ); sbSizerNewGraphicItems = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Graphic Items") ), wxVERTICAL );
wxFlexGridSizer* fgSizer1; wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizer1 = new wxFlexGridSizer( 0, 3, 5, 5 );
fgSizer1->AddGrowableCol( 1 ); fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_EdgeModEWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Graphic line width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_EdgeModEWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Graphic line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_EdgeModEWidthTitle->Wrap( -1 ); m_EdgeModEWidthTitle->Wrap( -1 );
fgSizer1->Add( m_EdgeModEWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_EdgeModEWidthTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_OptModuleGrLineWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_OptModuleGrLineWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_OptModuleGrLineWidth, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_OptModuleGrLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticTextGrLineUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextGrLineUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextGrLineUnit->Wrap( -1 ); m_staticTextGrLineUnit->Wrap( -1 );
fgSizer1->Add( m_staticTextGrLineUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer1->Add( m_staticTextGrLineUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_TextModWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Text line width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Text line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModWidthTitle->Wrap( -1 ); m_TextModWidthTitle->Wrap( -1 );
fgSizer1->Add( m_TextModWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_TextModWidthTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_OptModuleTextWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_OptModuleTextWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_OptModuleTextWidth, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_OptModuleTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticTextTextWidthUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTextWidthUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTextWidthUnit->Wrap( -1 ); m_staticTextTextWidthUnit->Wrap( -1 );
fgSizer1->Add( m_staticTextTextWidthUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer1->Add( m_staticTextTextWidthUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_TextModSizeVTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &height:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModSizeVTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &height:"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeVTitle->Wrap( -1 ); m_TextModSizeVTitle->Wrap( -1 );
fgSizer1->Add( m_TextModSizeVTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_TextModSizeVTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_OptModuleTextVSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_OptModuleTextVSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_OptModuleTextVSize, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_OptModuleTextVSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticTextTextVSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTextVSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTextVSizeUnit->Wrap( -1 ); m_staticTextTextVSizeUnit->Wrap( -1 );
fgSizer1->Add( m_staticTextTextVSizeUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer1->Add( m_staticTextTextVSizeUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_TextModSizeHTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextModSizeHTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextModSizeHTitle->Wrap( -1 ); m_TextModSizeHTitle->Wrap( -1 );
fgSizer1->Add( m_TextModSizeHTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_TextModSizeHTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_OptModuleTextHSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_OptModuleTextHSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_OptModuleTextHSize, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ); fgSizer1->Add( m_OptModuleTextHSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticTextTextHSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTextHSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTextHSizeUnit->Wrap( -1 ); m_staticTextTextHSizeUnit->Wrap( -1 );
fgSizer1->Add( m_staticTextTextHSizeUnit, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer1->Add( m_staticTextTextHSizeUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
sbSizerNewGraphicItems->Add( fgSizer1, 0, wxEXPAND, 20 ); sbSizerNewGraphicItems->Add( fgSizer1, 0, wxEXPAND, 20 );
fgSizer3->Add( sbSizerNewGraphicItems, 0, wxALL|wxEXPAND, 5 ); fgSizer3->Add( sbSizerNewGraphicItems, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerDisplayOptions; wxBoxSizer* bSizerDisplayOptions;
bSizerDisplayOptions = new wxBoxSizer( wxVERTICAL ); bSizerDisplayOptions = new wxBoxSizer( wxVERTICAL );
wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") }; wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString ); int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS ); m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
m_PolarDisplay->SetSelection( 0 ); m_PolarDisplay->SetSelection( 0 );
m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") ); m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
bSizerDisplayOptions->Add( m_PolarDisplay, 1, wxALL|wxEXPAND, 5 ); bSizerDisplayOptions->Add( m_PolarDisplay, 1, wxALL|wxEXPAND, 5 );
wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") }; wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString ); int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS ); m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
m_UnitsSelection->SetSelection( 0 ); m_UnitsSelection->SetSelection( 0 );
m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") ); m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
bSizerDisplayOptions->Add( m_UnitsSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerDisplayOptions->Add( m_UnitsSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer3->Add( bSizerDisplayOptions, 0, wxEXPAND, 5 ); fgSizer3->Add( bSizerDisplayOptions, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerNewFootprints; wxStaticBoxSizer* sbSizerNewFootprints;
sbSizerNewFootprints = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Footprints") ), wxVERTICAL ); sbSizerNewFootprints = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Footprints") ), wxVERTICAL );
wxFlexGridSizer* fgSizer2; wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 4, 0, 0 ); fgSizer2 = new wxFlexGridSizer( 0, 4, 5, 5 );
fgSizer2->AddGrowableCol( 1 ); fgSizer2->AddGrowableCol( 1 );
fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextRef = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("&Reference:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRef = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("&Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRef->Wrap( -1 ); m_staticTextRef->Wrap( -1 );
fgSizer2->Add( m_staticTextRef, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); fgSizer2->Add( m_staticTextRef, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_textCtrlRefText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlRefText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlRefText->SetToolTip( _("Default text for reference\nLeave blank to use the footprint name") ); m_textCtrlRefText->SetToolTip( _("Default text for reference\nLeave blank to use the footprint name") );
fgSizer2->Add( m_textCtrlRefText, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_textCtrlRefText, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_choiceLayerReferenceChoices[] = { _("SilkScreen"), _("Fab. Layer") }; wxString m_choiceLayerReferenceChoices[] = { _("SilkScreen"), _("Fab. Layer") };
int m_choiceLayerReferenceNChoices = sizeof( m_choiceLayerReferenceChoices ) / sizeof( wxString ); int m_choiceLayerReferenceNChoices = sizeof( m_choiceLayerReferenceChoices ) / sizeof( wxString );
m_choiceLayerReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerReferenceNChoices, m_choiceLayerReferenceChoices, 0 ); m_choiceLayerReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerReferenceNChoices, m_choiceLayerReferenceChoices, 0 );
m_choiceLayerReference->SetSelection( 0 ); m_choiceLayerReference->SetSelection( 0 );
fgSizer2->Add( m_choiceLayerReference, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_choiceLayerReference, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_choiceVisibleReferenceChoices[] = { _("Visible"), _("Invisible") }; wxString m_choiceVisibleReferenceChoices[] = { _("Visible"), _("Invisible") };
int m_choiceVisibleReferenceNChoices = sizeof( m_choiceVisibleReferenceChoices ) / sizeof( wxString ); int m_choiceVisibleReferenceNChoices = sizeof( m_choiceVisibleReferenceChoices ) / sizeof( wxString );
m_choiceVisibleReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleReferenceNChoices, m_choiceVisibleReferenceChoices, 0 ); m_choiceVisibleReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleReferenceNChoices, m_choiceVisibleReferenceChoices, 0 );
m_choiceVisibleReference->SetSelection( 0 ); m_choiceVisibleReference->SetSelection( 0 );
fgSizer2->Add( m_choiceVisibleReference, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( m_choiceVisibleReference, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextValue = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("V&alue:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextValue = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("V&alue:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextValue->Wrap( -1 ); m_staticTextValue->Wrap( -1 );
fgSizer2->Add( m_staticTextValue, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); fgSizer2->Add( m_staticTextValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_textCtrlValueText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textCtrlValueText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlValueText->SetToolTip( _("Default text for value\nLeave blank to use the footprint name") ); m_textCtrlValueText->SetToolTip( _("Default text for value\nLeave blank to use the footprint name") );
fgSizer2->Add( m_textCtrlValueText, 0, wxALL|wxEXPAND, 5 ); fgSizer2->Add( m_textCtrlValueText, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_choiceLayerValueChoices[] = { _("SilkScreen"), _("Fab. Layer") }; wxString m_choiceLayerValueChoices[] = { _("SilkScreen"), _("Fab. Layer") };
int m_choiceLayerValueNChoices = sizeof( m_choiceLayerValueChoices ) / sizeof( wxString ); int m_choiceLayerValueNChoices = sizeof( m_choiceLayerValueChoices ) / sizeof( wxString );
m_choiceLayerValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerValueNChoices, m_choiceLayerValueChoices, 0 ); m_choiceLayerValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerValueNChoices, m_choiceLayerValueChoices, 0 );
m_choiceLayerValue->SetSelection( 1 ); m_choiceLayerValue->SetSelection( 1 );
fgSizer2->Add( m_choiceLayerValue, 0, wxALL|wxEXPAND, 5 ); fgSizer2->Add( m_choiceLayerValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_choiceVisibleValueChoices[] = { _("Visible"), _("Invisible") }; wxString m_choiceVisibleValueChoices[] = { _("Visible"), _("Invisible") };
int m_choiceVisibleValueNChoices = sizeof( m_choiceVisibleValueChoices ) / sizeof( wxString ); int m_choiceVisibleValueNChoices = sizeof( m_choiceVisibleValueChoices ) / sizeof( wxString );
m_choiceVisibleValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleValueNChoices, m_choiceVisibleValueChoices, 0 ); m_choiceVisibleValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleValueNChoices, m_choiceVisibleValueChoices, 0 );
m_choiceVisibleValue->SetSelection( 0 ); m_choiceVisibleValue->SetSelection( 0 );
fgSizer2->Add( m_choiceVisibleValue, 0, wxALL|wxEXPAND, 5 ); fgSizer2->Add( m_choiceVisibleValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
sbSizerNewFootprints->Add( fgSizer2, 0, wxEXPAND, 20 ); sbSizerNewFootprints->Add( fgSizer2, 0, wxEXPAND, 20 );
m_staticTextInfo = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("Leave reference and/or value blank to use footprint name."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfo = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("Leave reference and/or value blank to use footprint name."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo->Wrap( -1 ); m_staticTextInfo->Wrap( -1 );
sbSizerNewFootprints->Add( m_staticTextInfo, 0, wxALL, 5 ); sbSizerNewFootprints->Add( m_staticTextInfo, 0, wxTOP, 5 );
fgSizer3->Add( sbSizerNewFootprints, 0, wxALL|wxEXPAND, 5 ); fgSizer3->Add( sbSizerNewFootprints, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerEditOptions; wxStaticBoxSizer* sbSizerEditOptions;
sbSizerEditOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL ); sbSizerEditOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
m_MagneticPads = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Magnetic pads"), wxDefaultPosition, wxDefaultSize, 0 ); m_MagneticPads = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Magnetic pads"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerEditOptions->Add( m_MagneticPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); sbSizerEditOptions->Add( m_MagneticPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerEditOptions->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); sbSizerEditOptions->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_Segments_45_Only_Ctrl = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); m_Segments_45_Only_Ctrl = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") ); m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
sbSizerEditOptions->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); sbSizerEditOptions->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
m_dragSelects = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 ); m_dragSelects = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 );
m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") ); m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") );
sbSizerEditOptions->Add( m_dragSelects, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); sbSizerEditOptions->Add( m_dragSelects, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer3->Add( sbSizerEditOptions, 0, wxALL|wxEXPAND, 5 ); fgSizer3->Add( sbSizerEditOptions, 0, wxALL|wxEXPAND, 5 );
bSizerMain->Add( fgSizer3, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( fgSizer3, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerColumns; wxBoxSizer* bSizerColumns;
bSizerColumns = new wxBoxSizer( wxHORIZONTAL ); bSizerColumns = new wxBoxSizer( wxHORIZONTAL );
bSizerMain->Add( bSizerColumns, 1, wxEXPAND, 5 ); bSizerMain->Add( bSizerColumns, 1, wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize(); m_sdbSizer1->Realize();
bSizerMain->Add( m_sdbSizer1, 0, wxEXPAND, 5 ); bSizerMain->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bSizerMain ); this->SetSizer( bSizerMain );
this->Layout(); this->Layout();
bSizerMain->Fit( this ); bSizerMain->Fit( this );
// Connect Events // Connect Events
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this );
} }
DIALOG_MODEDIT_OPTIONS_BASE::~DIALOG_MODEDIT_OPTIONS_BASE() DIALOG_MODEDIT_OPTIONS_BASE::~DIALOG_MODEDIT_OPTIONS_BASE()
{ {
// Disconnect Events // Disconnect Events
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this );
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,88 +1,88 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017) // C++ code generated with wxFormBuilder (version Apr 20 2018)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_MODEDIT_OPTIONS_BASE_H__ #ifndef __DIALOG_MODEDIT_OPTIONS_BASE_H__
#define __DIALOG_MODEDIT_OPTIONS_BASE_H__ #define __DIALOG_MODEDIT_OPTIONS_BASE_H__
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class TEXT_CTRL_EVAL; class TEXT_CTRL_EVAL;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.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/textctrl.h> #include <wx/textctrl.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/choice.h> #include <wx/choice.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#define wxID_POLAR_CTRL 1000 #define wxID_POLAR_CTRL 1000
#define wxID_UNITS 1001 #define wxID_UNITS 1001
#define wxID_SEGMENTS45 1002 #define wxID_SEGMENTS45 1002
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_MODEDIT_OPTIONS_BASE /// Class DIALOG_MODEDIT_OPTIONS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_MODEDIT_OPTIONS_BASE : public DIALOG_SHIM class DIALOG_MODEDIT_OPTIONS_BASE : public DIALOG_SHIM
{ {
private: private:
protected: protected:
wxStaticText* m_EdgeModEWidthTitle; wxStaticText* m_EdgeModEWidthTitle;
TEXT_CTRL_EVAL* m_OptModuleGrLineWidth; TEXT_CTRL_EVAL* m_OptModuleGrLineWidth;
wxStaticText* m_staticTextGrLineUnit; wxStaticText* m_staticTextGrLineUnit;
wxStaticText* m_TextModWidthTitle; wxStaticText* m_TextModWidthTitle;
TEXT_CTRL_EVAL* m_OptModuleTextWidth; TEXT_CTRL_EVAL* m_OptModuleTextWidth;
wxStaticText* m_staticTextTextWidthUnit; wxStaticText* m_staticTextTextWidthUnit;
wxStaticText* m_TextModSizeVTitle; wxStaticText* m_TextModSizeVTitle;
TEXT_CTRL_EVAL* m_OptModuleTextVSize; TEXT_CTRL_EVAL* m_OptModuleTextVSize;
wxStaticText* m_staticTextTextVSizeUnit; wxStaticText* m_staticTextTextVSizeUnit;
wxStaticText* m_TextModSizeHTitle; wxStaticText* m_TextModSizeHTitle;
TEXT_CTRL_EVAL* m_OptModuleTextHSize; TEXT_CTRL_EVAL* m_OptModuleTextHSize;
wxStaticText* m_staticTextTextHSizeUnit; wxStaticText* m_staticTextTextHSizeUnit;
wxRadioBox* m_PolarDisplay; wxRadioBox* m_PolarDisplay;
wxRadioBox* m_UnitsSelection; wxRadioBox* m_UnitsSelection;
wxStaticText* m_staticTextRef; wxStaticText* m_staticTextRef;
wxTextCtrl* m_textCtrlRefText; wxTextCtrl* m_textCtrlRefText;
wxChoice* m_choiceLayerReference; wxChoice* m_choiceLayerReference;
wxChoice* m_choiceVisibleReference; wxChoice* m_choiceVisibleReference;
wxStaticText* m_staticTextValue; wxStaticText* m_staticTextValue;
wxTextCtrl* m_textCtrlValueText; wxTextCtrl* m_textCtrlValueText;
wxChoice* m_choiceLayerValue; wxChoice* m_choiceLayerValue;
wxChoice* m_choiceVisibleValue; wxChoice* m_choiceVisibleValue;
wxStaticText* m_staticTextInfo; wxStaticText* m_staticTextInfo;
wxCheckBox* m_MagneticPads; wxCheckBox* m_MagneticPads;
wxCheckBox* m_Segments_45_Only_Ctrl; wxCheckBox* m_Segments_45_Only_Ctrl;
wxCheckBox* m_dragSelects; wxCheckBox* m_dragSelects;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_MODEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_MODEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_MODEDIT_OPTIONS_BASE(); ~DIALOG_MODEDIT_OPTIONS_BASE();
}; };
#endif //__DIALOG_MODEDIT_OPTIONS_BASE_H__ #endif //__DIALOG_MODEDIT_OPTIONS_BASE_H__