From fc13e5d65128320724d866facef517ec4ac3bb70 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 13 Aug 2014 09:15:15 -0400 Subject: [PATCH] Footprint text properties dialog improvements and coding policy fixes. * Improve footprint text properties layout. * Use wxStdDialogButtonSizer instead of manually laid out buttons to improve platform UI consistency. --- eeschema/eeschema_config.cpp | 20 +- pcbnew/dialogs/dialog_edit_module_text.cpp | 17 +- .../dialogs/dialog_edit_module_text_base.cpp | 147 +- .../dialogs/dialog_edit_module_text_base.fbp | 2484 ++++++++--------- pcbnew/dialogs/dialog_edit_module_text_base.h | 19 +- 5 files changed, 1333 insertions(+), 1354 deletions(-) diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 7f29dc041c..219fad72c4 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -60,11 +60,13 @@ static EDA_COLOR_T s_layerColor[NB_SCH_LAYERS]; /// The width to draw busses that do not have a specific width static int s_defaultBusThickness; + int GetDefaultBusThickness() { return s_defaultBusThickness; } + void SetDefaultBusThickness( int aThickness) { if( aThickness >= 1 ) @@ -73,6 +75,7 @@ void SetDefaultBusThickness( int aThickness) s_defaultBusThickness = 1; } + /// Default size for text (not only labels) static int s_defaultTextSize; @@ -81,22 +84,26 @@ int GetDefaultTextSize() return s_defaultTextSize; } + void SetDefaultTextSize( int aTextSize ) { s_defaultTextSize = aTextSize; } + /* * Default line (in Eeschema units) thickness used to draw/plot items having a * default thickness line value (i.e. = 0 ). */ static int s_drawDefaultLineThickness; + int GetDefaultLineThickness() { return s_drawDefaultLineThickness; } + void SetDefaultLineThickness( int aThickness ) { if( aThickness >=1 ) @@ -105,37 +112,44 @@ void SetDefaultLineThickness( int aThickness ) s_drawDefaultLineThickness = 1; } + /* * Default pin length */ static int s_defaultPinLength; + int GetDefaultPinLength() { return s_defaultPinLength; } + void SetDefaultPinLength( int aLength ) { s_defaultPinLength = aLength; } + EDA_COLOR_T GetLayerColor( LayerNumber aLayer ) { return s_layerColor[aLayer]; } + void SetLayerColor( EDA_COLOR_T aColor, int aLayer ) { s_layerColor[aLayer] = aColor; } + // Color to draw selected items EDA_COLOR_T GetItemSelectedColor() { return BROWN; } + // Color to draw items flagged invisible, in libedit (they are invisible // in Eeschema EDA_COLOR_T GetInvisibleItemColor() @@ -335,8 +349,9 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) int sep, firstId; dlg.GetRefIdSeparator( sep, firstId); - if( sep != (int)LIB_COMPONENT::GetSubpartIdSeparator() || - firstId != (int)LIB_COMPONENT::GetSubpartFirstId() ) + + if( sep != (int)LIB_COMPONENT::GetSubpartIdSeparator() + || firstId != (int)LIB_COMPONENT::GetSubpartFirstId() ) { LIB_COMPONENT::SetSubpartIdNotation( sep, firstId ); SaveProjectSettings( true ); @@ -710,6 +725,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg ) if( !templateFieldNames.IsEmpty() ) { TEMPLATE_FIELDNAMES_LEXER lexer( TO_UTF8( templateFieldNames ) ); + try { m_TemplateFieldNames.Parse( &lexer ); diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp index 05ec826763..781b3147ac 100644 --- a/pcbnew/dialogs/dialog_edit_module_text.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text.cpp @@ -72,9 +72,13 @@ DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* aParent, if( m_currentText ) m_module = (MODULE*) m_currentText->GetParent(); - initDlg( ); + initDlg(); + + wxButton* okButton = (wxButton*) FindWindowById( wxID_OK ); + + if( okButton ) + SetDefaultItem( okButton ); - m_buttonOK->SetDefault(); GetSizer()->Fit( this ); GetSizer()->SetSizeHints( this ); @@ -84,7 +88,7 @@ DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* aParent, void DialogEditModuleText::OnCancelClick( wxCommandEvent& event ) { - EndModal(0); + EndModal( 0 ); } @@ -185,9 +189,10 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) wxSize textSize( wxSize( ValueFromString( g_UserUnit, m_TxtSizeCtrlX->GetValue() ), ValueFromString( g_UserUnit, m_TxtSizeCtrlY->GetValue() ) ) ); - // Test for a reasonnable size: + // Test for a reasonable size: if( textSize.x < TEXTS_MIN_SIZE ) textSize.x = TEXTS_MIN_SIZE; + if( textSize.y < TEXTS_MIN_SIZE ) textSize.y = TEXTS_MIN_SIZE; @@ -196,7 +201,7 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) msg = m_TxtWidthCtlr->GetValue(); int width = ValueFromString( g_UserUnit, msg ); - // Test for a reasonnable width: + // Test for a reasonable width: if( width <= 1 ) width = 1; @@ -233,5 +238,5 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) if( m_module ) m_module->SetLastEditTime(); - EndModal(1); + EndModal( 1 ); } diff --git a/pcbnew/dialogs/dialog_edit_module_text_base.cpp b/pcbnew/dialogs/dialog_edit_module_text_base.cpp index 6ba3e36773..f0d0724a9a 100644 --- a/pcbnew/dialogs/dialog_edit_module_text_base.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -16,120 +16,135 @@ DialogEditModuleText_base::DialogEditModuleText_base( wxWindow* parent, wxWindow wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - m_ModuleInfoText = new wxStaticText( this, wxID_ANY, _("Module %s (%s) orient %.1f"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ModuleInfoText = new wxStaticText( this, wxID_ANY, _("Footprint %s (%s) orientation %.1f"), wxDefaultPosition, wxDefaultSize, 0 ); m_ModuleInfoText->Wrap( -1 ); + m_ModuleInfoText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); + bMainSizer->Add( m_ModuleInfoText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 ); + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 6, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_TextDataTitle = new wxStaticText( this, wxID_ANY, _("Reference:"), wxDefaultPosition, wxDefaultSize, 0 ); m_TextDataTitle->Wrap( -1 ); - bMainSizer->Add( m_TextDataTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_TextDataTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_Name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bMainSizer->Add( m_Name, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_Name->SetMaxLength( 0 ); + fgSizer1->Add( m_Name, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer3; - bSizer3 = new wxBoxSizer( wxVERTICAL ); - - m_SizeXTitle = new wxStaticText( this, wxID_ANY, _("Size X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeXTitle = new wxStaticText( this, wxID_ANY, _("Width"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeXTitle->Wrap( -1 ); - bSizer3->Add( m_SizeXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_SizeXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_TxtSizeCtrlX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3->Add( m_TxtSizeCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_TxtSizeCtrlX->SetMaxLength( 0 ); + fgSizer1->Add( m_TxtSizeCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - m_SizeYTitle = new wxStaticText( this, wxID_ANY, _("Size Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeYTitle = new wxStaticText( this, wxID_ANY, _("Height"), wxDefaultPosition, wxDefaultSize, 0 ); m_SizeYTitle->Wrap( -1 ); - bSizer3->Add( m_SizeYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_SizeYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_TxtSizeCtrlY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3->Add( m_TxtSizeCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_PosXTitle = new wxStaticText( this, wxID_ANY, _("Offset X"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PosXTitle->Wrap( -1 ); - bSizer3->Add( m_PosXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_TxtPosCtrlX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3->Add( m_TxtPosCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - m_PosYTitle = new wxStaticText( this, wxID_ANY, _("Offset Y"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PosYTitle->Wrap( -1 ); - bSizer3->Add( m_PosYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_TxtPosCtrlY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer3->Add( m_TxtPosCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - bSizer2->Add( bSizer3, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer4; - bSizer4 = new wxBoxSizer( wxVERTICAL ); + m_TxtSizeCtrlY->SetMaxLength( 0 ); + fgSizer1->Add( m_TxtSizeCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_WidthTitle = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); m_WidthTitle->Wrap( -1 ); - bSizer4->Add( m_WidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_WidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_TxtWidthCtlr = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer4->Add( m_TxtWidthCtlr, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_TxtWidthCtlr->SetMaxLength( 0 ); + fgSizer1->Add( m_TxtWidthCtlr, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - wxString m_OrientChoices[] = { _("horizontal"), _("vertical") }; - int m_OrientNChoices = sizeof( m_OrientChoices ) / sizeof( wxString ); - m_Orient = new wxRadioBox( this, wxID_ANY, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientNChoices, m_OrientChoices, 1, wxRA_SPECIFY_COLS ); - m_Orient->SetSelection( 0 ); - bSizer4->Add( m_Orient, 0, wxALL|wxEXPAND, 5 ); + m_PosXTitle = new wxStaticText( this, wxID_ANY, _("Offset X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PosXTitle->Wrap( -1 ); + fgSizer1->Add( m_PosXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - wxString m_ShowChoices[] = { _("Visible"), _("Invisible") }; - int m_ShowNChoices = sizeof( m_ShowChoices ) / sizeof( wxString ); - m_Show = new wxRadioBox( this, wxID_ANY, _("Display"), wxDefaultPosition, wxDefaultSize, m_ShowNChoices, m_ShowChoices, 1, wxRA_SPECIFY_COLS ); - m_Show->SetSelection( 0 ); - bSizer4->Add( m_Show, 0, wxALL|wxEXPAND, 5 ); + m_TxtPosCtrlX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TxtPosCtrlX->SetMaxLength( 0 ); + fgSizer1->Add( m_TxtPosCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + m_PosYTitle = new wxStaticText( this, wxID_ANY, _("Offset Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_PosYTitle->Wrap( -1 ); + fgSizer1->Add( m_PosYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_TxtPosCtrlY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TxtPosCtrlY->SetMaxLength( 0 ); + fgSizer1->Add( m_TxtPosCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bSizer2->Add( bSizer4, 1, wxEXPAND, 5 ); + bSizer10->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 ); - wxBoxSizer* bSizer5; - bSizer5 = new wxBoxSizer( wxVERTICAL ); + + bSizer9->Add( bSizer10, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); wxString m_StyleChoices[] = { _("Normal"), _("Italic") }; int m_StyleNChoices = sizeof( m_StyleChoices ) / sizeof( wxString ); m_Style = new wxRadioBox( this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, m_StyleNChoices, m_StyleChoices, 1, wxRA_SPECIFY_COLS ); m_Style->SetSelection( 0 ); - bSizer5->Add( m_Style, 0, wxALL|wxEXPAND, 5 ); + bSizer4->Add( m_Style, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxString m_OrientChoices[] = { _("Horizontal"), _("Vertical") }; + int m_OrientNChoices = sizeof( m_OrientChoices ) / sizeof( wxString ); + m_Orient = new wxRadioBox( this, wxID_ANY, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientNChoices, m_OrientChoices, 1, wxRA_SPECIFY_COLS ); + m_Orient->SetSelection( 0 ); + bSizer4->Add( m_Orient, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + wxString m_ShowChoices[] = { _("Visible"), _("Invisible") }; + int m_ShowNChoices = sizeof( m_ShowChoices ) / sizeof( wxString ); + m_Show = new wxRadioBox( this, wxID_ANY, _("Display"), wxDefaultPosition, wxDefaultSize, m_ShowNChoices, m_ShowChoices, 1, wxRA_SPECIFY_COLS ); + m_Show->SetSelection( 0 ); + bSizer4->Add( m_Show, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - bSizer5->Add( 10, 10, 0, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonOK->SetDefault(); - bSizer5->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer5->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizer9->Add( bSizer4, 0, wxEXPAND, 5 ); - bSizer2->Add( bSizer5, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + bMainSizer->Add( bSizer9, 0, wxALL|wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); - bMainSizer->Add( bSizer2, 1, wxEXPAND, 5 ); + bMainSizer->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_sdbSizer1 = new wxStdDialogButtonSizer(); + m_sdbSizer1OK = new wxButton( this, wxID_OK ); + m_sdbSizer1->AddButton( m_sdbSizer1OK ); + m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); + m_sdbSizer1->Realize(); + + bMainSizer->Add( m_sdbSizer1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); this->SetSizer( bMainSizer ); this->Layout(); + bMainSizer->Fit( this ); // Connect Events - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this ); } DialogEditModuleText_base::~DialogEditModuleText_base() { // Disconnect Events - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this ); - m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_edit_module_text_base.fbp b/pcbnew/dialogs/dialog_edit_module_text_base.fbp index 0309ff55df..f00e2340b3 100644 --- a/pcbnew/dialogs/dialog_edit_module_text_base.fbp +++ b/pcbnew/dialogs/dialog_edit_module_text_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -42,10 +44,10 @@ DialogEditModuleText_base - 357,299 + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Footprint text properties + Footprint Text Properties @@ -119,11 +121,11 @@ 1 1 - + ,90,92,-1,70,0 0 0 wxID_ANY - Module %s (%s) orient %.1f + Footprint %s (%s) orientation %.1f 0 @@ -257,890 +259,1082 @@ 5 - wxTOP|wxRIGHT|wxLEFT + wxALL|wxEXPAND 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Reference: - - 0 - - - 0 - - 1 - m_TextDataTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_Name - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - bSizer2 - wxHORIZONTAL + bSizer9 + wxVERTICAL none 5 wxEXPAND - 1 + 0 - bSizer3 - wxVERTICAL + bSizer10 + wxHORIZONTAL none 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size X - - 0 - - - 0 + wxALL|wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 - 1 - m_SizeXTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_TxtSizeCtrlX - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Size Y - - 0 - - - 0 - - 1 - m_SizeYTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_TxtSizeCtrlY - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Offset X - - 0 - - - 0 - - 1 - m_PosXTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_TxtPosCtrlX - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Offset Y - - 0 - - - 0 - - 1 - m_PosYTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_TxtPosCtrlY - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 6 + 0 + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Reference: + + 0 + + + 0 + + 1 + m_TextDataTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_Name + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Width + + 0 + + + 0 + + 1 + m_SizeXTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TxtSizeCtrlX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Height + + 0 + + + 0 + + 1 + m_SizeYTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TxtSizeCtrlY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Thickness + + 0 + + + 0 + + 1 + m_WidthTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TxtWidthCtlr + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Offset X + + 0 + + + 0 + + 1 + m_PosXTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TxtPosCtrlX + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Offset Y + + 0 + + + 0 + + 1 + m_PosYTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TxtPosCtrlY + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1148,381 +1342,16 @@ 5 wxEXPAND - 1 - - - bSizer4 - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Thickness - - 0 - - - 0 - - 1 - m_WidthTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_TxtWidthCtlr - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "horizontal" "vertical" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Orientation - 1 - - 0 - - - 0 - - 1 - m_Orient - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Visible" "Invisible" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Display - 1 - - 0 - - - 0 - - 1 - m_Show - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND 0 - bSizer5 - wxVERTICAL + bSizer4 + wxHORIZONTAL none 5 - wxALL|wxEXPAND - 0 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 1 1 1 @@ -1611,19 +1440,9 @@ 5 - - 0 - - 10 - protected - 10 - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 1 + 1 1 1 @@ -1637,10 +1456,10 @@ 1 0 + "Horizontal" "Vertical" 1 1 - 1 0 Dock 0 @@ -1651,8 +1470,9 @@ 0 0 - wxID_OK - OK + wxID_ANY + Orientation + 1 0 @@ -1660,7 +1480,7 @@ 0 1 - m_buttonOK + m_Orient 1 @@ -1668,9 +1488,10 @@ 1 Resizable + 0 1 - + wxRA_SPECIFY_COLS 0 @@ -1681,7 +1502,6 @@ - OnOkClick @@ -1699,6 +1519,7 @@ + @@ -1709,9 +1530,9 @@ 5 - wxALL|wxALIGN_CENTER_HORIZONTAL - 0 - + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 1 + 1 1 1 @@ -1725,10 +1546,10 @@ 1 0 + "Visible" "Invisible" 1 1 - 0 0 Dock 0 @@ -1739,8 +1560,9 @@ 0 0 - wxID_CANCEL - Cancel + wxID_ANY + Display + 1 0 @@ -1748,7 +1570,7 @@ 0 1 - m_buttonCANCEL + m_Show 1 @@ -1756,9 +1578,10 @@ 1 Resizable + 0 1 - + wxRA_SPECIFY_COLS 0 @@ -1769,7 +1592,6 @@ - OnCancelClick @@ -1787,6 +1609,7 @@ + @@ -1799,6 +1622,123 @@ + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer1 + protected + + + + + + OnOkClick + + + + diff --git a/pcbnew/dialogs/dialog_edit_module_text_base.h b/pcbnew/dialogs/dialog_edit_module_text_base.h index ad578b5f6a..8a78fc2faf 100644 --- a/pcbnew/dialogs/dialog_edit_module_text_base.h +++ b/pcbnew/dialogs/dialog_edit_module_text_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include @@ -43,26 +45,27 @@ class DialogEditModuleText_base : public DIALOG_SHIM wxTextCtrl* m_TxtSizeCtrlX; wxStaticText* m_SizeYTitle; wxTextCtrl* m_TxtSizeCtrlY; + wxStaticText* m_WidthTitle; + wxTextCtrl* m_TxtWidthCtlr; wxStaticText* m_PosXTitle; wxTextCtrl* m_TxtPosCtrlX; wxStaticText* m_PosYTitle; wxTextCtrl* m_TxtPosCtrlY; - wxStaticText* m_WidthTitle; - wxTextCtrl* m_TxtWidthCtlr; + wxRadioBox* m_Style; wxRadioBox* m_Orient; wxRadioBox* m_Show; - wxRadioBox* m_Style; - wxButton* m_buttonOK; - wxButton* m_buttonCANCEL; + wxStaticLine* m_staticline2; + wxStdDialogButtonSizer* m_sdbSizer1; + wxButton* m_sdbSizer1OK; + wxButton* m_sdbSizer1Cancel; // Virtual event handlers, overide them in your derived class virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } public: - DialogEditModuleText_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint text properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 357,299 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DialogEditModuleText_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DialogEditModuleText_base(); };