Support 9 comments in the page setting GUI.

Fixes: lp:1793148
* https://bugs.launchpad.net/kicad/+bug/1793148
This commit is contained in:
Jeff Young 2019-08-21 17:58:29 +01:00
parent 8576668eba
commit a6b7d4f7f6
12 changed files with 2457 additions and 2614 deletions

View File

@ -177,10 +177,15 @@ void DIALOG_PAGES_SETTINGS::initDialog()
m_TextDate->SetValue( m_tb.GetDate() );
m_TextTitle->SetValue( m_tb.GetTitle() );
m_TextCompany->SetValue( m_tb.GetCompany() );
m_TextComment1->SetValue( m_tb.GetComment1() );
m_TextComment2->SetValue( m_tb.GetComment2() );
m_TextComment3->SetValue( m_tb.GetComment3() );
m_TextComment4->SetValue( m_tb.GetComment4() );
m_TextComment1->SetValue( m_tb.GetComment( 0 ) );
m_TextComment2->SetValue( m_tb.GetComment( 1 ) );
m_TextComment3->SetValue( m_tb.GetComment( 2 ) );
m_TextComment4->SetValue( m_tb.GetComment( 3 ) );
m_TextComment5->SetValue( m_tb.GetComment( 4 ) );
m_TextComment6->SetValue( m_tb.GetComment( 5 ) );
m_TextComment7->SetValue( m_tb.GetComment( 6 ) );
m_TextComment8->SetValue( m_tb.GetComment( 7 ) );
m_TextComment9->SetValue( m_tb.GetComment( 8 ) );
#ifndef EESCHEMA
// these options have meaning only for Eeschema.
@ -193,6 +198,11 @@ void DIALOG_PAGES_SETTINGS::initDialog()
m_Comment2Export->Show( false );
m_Comment3Export->Show( false );
m_Comment4Export->Show( false );
m_Comment5Export->Show( false );
m_Comment6Export->Show( false );
m_Comment7Export->Show( false );
m_Comment8Export->Show( false );
m_Comment9Export->Show( false );
#endif
GetPageLayoutInfoFromDialog();
@ -345,7 +355,7 @@ void DIALOG_PAGES_SETTINGS::OnComment1TextUpdated( wxCommandEvent& event )
if( m_initialized && m_TextComment1->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment1( m_TextComment1->GetValue() );
m_tb.SetComment( 0, m_TextComment1->GetValue() );
UpdatePageLayoutExample();
}
}
@ -356,7 +366,7 @@ void DIALOG_PAGES_SETTINGS::OnComment2TextUpdated( wxCommandEvent& event )
if( m_initialized && m_TextComment2->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment2( m_TextComment2->GetValue() );
m_tb.SetComment( 1, m_TextComment2->GetValue() );
UpdatePageLayoutExample();
}
}
@ -367,7 +377,7 @@ void DIALOG_PAGES_SETTINGS::OnComment3TextUpdated( wxCommandEvent& event )
if( m_initialized && m_TextComment3->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment3( m_TextComment3->GetValue() );
m_tb.SetComment( 2, m_TextComment3->GetValue() );
UpdatePageLayoutExample();
}
}
@ -378,7 +388,62 @@ void DIALOG_PAGES_SETTINGS::OnComment4TextUpdated( wxCommandEvent& event )
if( m_initialized && m_TextComment4->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment4( m_TextComment4->GetValue() );
m_tb.SetComment( 3, m_TextComment4->GetValue() );
UpdatePageLayoutExample();
}
}
void DIALOG_PAGES_SETTINGS::OnComment5TextUpdated( wxCommandEvent& event )
{
if( m_initialized && m_TextComment5->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment( 4, m_TextComment5->GetValue() );
UpdatePageLayoutExample();
}
}
void DIALOG_PAGES_SETTINGS::OnComment6TextUpdated( wxCommandEvent& event )
{
if( m_initialized && m_TextComment6->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment( 5, m_TextComment6->GetValue() );
UpdatePageLayoutExample();
}
}
void DIALOG_PAGES_SETTINGS::OnComment7TextUpdated( wxCommandEvent& event )
{
if( m_initialized && m_TextComment7->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment( 6, m_TextComment7->GetValue() );
UpdatePageLayoutExample();
}
}
void DIALOG_PAGES_SETTINGS::OnComment8TextUpdated( wxCommandEvent& event )
{
if( m_initialized && m_TextComment8->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment( 7, m_TextComment8->GetValue() );
UpdatePageLayoutExample();
}
}
void DIALOG_PAGES_SETTINGS::OnComment9TextUpdated( wxCommandEvent& event )
{
if( m_initialized && m_TextComment9->IsModified() )
{
GetPageLayoutInfoFromDialog();
m_tb.SetComment( 8, m_TextComment9->GetValue() );
UpdatePageLayoutExample();
}
}
@ -493,10 +558,15 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
m_tb.SetDate( m_TextDate->GetValue() );
m_tb.SetCompany( m_TextCompany->GetValue() );
m_tb.SetTitle( m_TextTitle->GetValue() );
m_tb.SetComment1( m_TextComment1->GetValue() );
m_tb.SetComment2( m_TextComment2->GetValue() );
m_tb.SetComment3( m_TextComment3->GetValue() );
m_tb.SetComment4( m_TextComment4->GetValue() );
m_tb.SetComment( 0, m_TextComment1->GetValue() );
m_tb.SetComment( 1, m_TextComment2->GetValue() );
m_tb.SetComment( 2, m_TextComment3->GetValue() );
m_tb.SetComment( 3, m_TextComment4->GetValue() );
m_tb.SetComment( 4, m_TextComment5->GetValue() );
m_tb.SetComment( 5, m_TextComment6->GetValue() );
m_tb.SetComment( 6, m_TextComment7->GetValue() );
m_tb.SetComment( 7, m_TextComment8->GetValue() );
m_tb.SetComment( 8, m_TextComment9->GetValue() );
m_parent->SetTitleBlock( m_tb );
@ -529,16 +599,31 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
tb2.SetCompany( m_tb.GetCompany() );
if( m_Comment1Export->IsChecked() )
tb2.SetComment1( m_tb.GetComment1() );
tb2.SetComment( 0, m_tb.GetComment( 0 ) );
if( m_Comment2Export->IsChecked() )
tb2.SetComment2( m_tb.GetComment2() );
tb2.SetComment( 1, m_tb.GetComment( 1 ) );
if( m_Comment3Export->IsChecked() )
tb2.SetComment3( m_tb.GetComment3() );
tb2.SetComment( 2, m_tb.GetComment( 2 ) );
if( m_Comment4Export->IsChecked() )
tb2.SetComment4( m_tb.GetComment4() );
tb2.SetComment( 3, m_tb.GetComment( 3 ) );
if( m_Comment5Export->IsChecked() )
tb2.SetComment( 4, m_tb.GetComment( 4 ) );
if( m_Comment6Export->IsChecked() )
tb2.SetComment( 5, m_tb.GetComment( 5 ) );
if( m_Comment7Export->IsChecked() )
tb2.SetComment( 6, m_tb.GetComment( 6 ) );
if( m_Comment8Export->IsChecked() )
tb2.SetComment( 7, m_tb.GetComment( 7 ) );
if( m_Comment9Export->IsChecked() )
tb2.SetComment( 8, m_tb.GetComment( 8 ) );
screen->SetTitleBlock( tb2 );
}

View File

@ -94,6 +94,11 @@ private:
void OnComment2TextUpdated( wxCommandEvent& event ) override;
void OnComment3TextUpdated( wxCommandEvent& event ) override;
void OnComment4TextUpdated( wxCommandEvent& event ) override;
void OnComment5TextUpdated( wxCommandEvent& event ) override;
void OnComment6TextUpdated( wxCommandEvent& event ) override;
void OnComment7TextUpdated( wxCommandEvent& event ) override;
void OnComment8TextUpdated( wxCommandEvent& event ) override;
void OnComment9TextUpdated( wxCommandEvent& event ) override;
// Handle button click for setting the date from the picker
void OnDateApplyClick( wxCommandEvent& event ) override;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -12,56 +12,56 @@
DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_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 );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizerH;
bUpperSizerH = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bleftSizer;
bleftSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextPaper = new wxStaticText( this, wxID_ANY, _("Paper"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPaper->Wrap( -1 );
bleftSizer->Add( m_staticTextPaper, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bleftSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTextSize = new wxStaticText( this, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSize->Wrap( -1 );
bleftSizer->Add( m_staticTextSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_paperSizeComboBoxChoices[] = { _("dummy text") };
int m_paperSizeComboBoxNChoices = sizeof( m_paperSizeComboBoxChoices ) / sizeof( wxString );
m_paperSizeComboBox = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeComboBoxNChoices, m_paperSizeComboBoxChoices, 0 );
m_paperSizeComboBox->SetSelection( 0 );
bleftSizer->Add( m_paperSizeComboBox, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextOrient = new wxStaticText( this, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOrient->Wrap( -1 );
bleftSizer->Add( m_staticTextOrient, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_orientationComboBoxChoices[] = { _("Landscape"), _("Portrait") };
int m_orientationComboBoxNChoices = sizeof( m_orientationComboBoxChoices ) / sizeof( wxString );
m_orientationComboBox = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_orientationComboBoxNChoices, m_orientationComboBoxChoices, 0 );
m_orientationComboBox->SetSelection( 0 );
bleftSizer->Add( m_orientationComboBox, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextCustSize = new wxStaticText( this, wxID_ANY, _("Custom paper size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCustSize->Wrap( -1 );
bleftSizer->Add( m_staticTextCustSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_userSizeYLabel = new wxStaticText( this, wxID_ANY, _("Height:"), wxDefaultPosition, wxDefaultSize, 0 );
m_userSizeYLabel->Wrap( -1 );
fgSizer1->Add( m_userSizeYLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_userSizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_LEFT );
#ifdef __WXGTK__
if ( !m_userSizeYCtrl->HasFlag( wxTE_MULTILINE ) )
@ -72,17 +72,17 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_userSizeYCtrl->SetMaxLength( -1 );
#endif
m_userSizeYCtrl->SetToolTip( _("Custom paper height.") );
fgSizer1->Add( m_userSizeYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_userSizeYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_userSizeYUnits->Wrap( -1 );
fgSizer1->Add( m_userSizeYUnits, 0, wxTOP|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
m_userSizeXLabel = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_userSizeXLabel->Wrap( -1 );
fgSizer1->Add( m_userSizeXLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_userSizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_LEFT );
#ifdef __WXGTK__
if ( !m_userSizeXCtrl->HasFlag( wxTE_MULTILINE ) )
@ -93,296 +93,275 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_userSizeXCtrl->SetMaxLength( -1 );
#endif
m_userSizeXCtrl->SetToolTip( _("Custom paper width.") );
fgSizer1->Add( m_userSizeXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_userSizeXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_userSizeXUnits->Wrap( -1 );
fgSizer1->Add( m_userSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
bleftSizer->Add( fgSizer1, 0, wxEXPAND|wxBOTTOM, 5 );
m_staticTextPreview = new wxStaticText( this, wxID_ANY, _("Layout Preview"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextPreview->Wrap( -1 );
bleftSizer->Add( m_staticTextPreview, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 10 );
m_PageLayoutExampleBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxFULL_REPAINT_ON_RESIZE|wxBORDER_SIMPLE );
m_PageLayoutExampleBitmap->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
m_PageLayoutExampleBitmap->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
bleftSizer->Add( m_PageLayoutExampleBitmap, 1, wxALL|wxEXPAND, 5 );
bUpperSizerH->Add( bleftSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
m_staticTextTitleBlock = new wxStaticText( this, wxID_ANY, _("Title Block Parameters"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTitleBlock->Wrap( -1 );
bSizerRight->Add( m_staticTextTitleBlock, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerRight->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* SheetInfoSizer;
SheetInfoSizer = new wxBoxSizer( wxHORIZONTAL );
m_TextSheetCount = new wxStaticText( this, wxID_ANY, _("Number of sheets: %d"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextSheetCount->Wrap( -1 );
SheetInfoSizer->Add( m_TextSheetCount, 0, wxALL, 5 );
SheetInfoSizer->Add( 5, 5, 1, wxEXPAND, 5 );
m_TextSheetNumber = new wxStaticText( this, wxID_ANY, _("Sheet number: %d"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextSheetNumber->Wrap( -1 );
SheetInfoSizer->Add( m_TextSheetNumber, 0, wxALL, 5 );
bSizerRight->Add( SheetInfoSizer, 0, wxLEFT, 5 );
wxBoxSizer* bSizerDate;
bSizerDate = new wxBoxSizer( wxVERTICAL );
m_staticTextDate = new wxStaticText( this, wxID_ANY, _("Issue Date"), wxDefaultPosition, wxDefaultSize, 0 );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizer2->AddGrowableCol( 1 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticTextDate = new wxStaticText( this, wxID_ANY, _("Issue Date:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDate->Wrap( -1 );
bSizerDate->Add( m_staticTextDate, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerissuedate;
bSizerissuedate = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextDate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerDate;
bSizerDate = new wxBoxSizer( wxHORIZONTAL );
m_TextDate = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextDate->SetMinSize( wxSize( 100,-1 ) );
bSizerissuedate->Add( m_TextDate, 3, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerDate->Add( m_TextDate, 3, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_ApplyDate = new wxButton( this, wxID_ANY, _("<<<"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerissuedate->Add( m_ApplyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerDate->Add( m_ApplyDate, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_PickDate = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );
bSizerissuedate->Add( m_PickDate, 2, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerDate->Add( m_PickDate, 2, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( bSizerDate, 0, wxEXPAND, 5 );
m_DateExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerissuedate->Add( m_DateExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerDate->Add( bSizerissuedate, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerDate, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRev;
bSizerRev = new wxBoxSizer( wxVERTICAL );
m_staticTextRev = new wxStaticText( this, wxID_ANY, _("Revision"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_DateExport, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextRev = new wxStaticText( this, wxID_ANY, _("Revision:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRev->Wrap( -1 );
bSizerRev->Add( m_staticTextRev, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextRev, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextRevision = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextRevision->SetMinSize( wxSize( 100,-1 ) );
bSizer9->Add( m_TextRevision, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextRevision, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_RevisionExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer9->Add( m_RevisionExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerRev->Add( bSizer9, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerRev, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerTitle;
bSizerTitle = new wxBoxSizer( wxVERTICAL );
m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Title"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_RevisionExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Title:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextTitle->Wrap( -1 );
bSizerTitle->Add( m_staticTextTitle, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer12;
bSizer12 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextTitle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextTitle->SetMinSize( wxSize( 360,-1 ) );
bSizer12->Add( m_TextTitle, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_TitleExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer12->Add( m_TitleExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerTitle->Add( bSizer12, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerTitle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerCompany;
bSizerCompany = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Company"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 );
bSizerCompany->Add( m_staticText13, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer14;
bSizer14 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_TitleExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextCompany = new wxStaticText( this, wxID_ANY, _("Company:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextCompany->Wrap( -1 );
fgSizer2->Add( m_staticTextCompany, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextCompany = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextCompany->SetMinSize( wxSize( 360,-1 ) );
bSizer14->Add( m_TextCompany, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextCompany, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_CompanyExport = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer14->Add( m_CompanyExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerCompany->Add( bSizer14, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerCompany, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment1;
bSizerComment1 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment1 = new wxStaticText( this, wxID_ANY, _("Comment1"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_CompanyExport, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextComment1 = new wxStaticText( this, wxID_ANY, _("Comment1:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment1->Wrap( -1 );
bSizerComment1->Add( m_staticTextComment1, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt1;
bSizercmt1 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextComment1, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment1 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment1->SetMinSize( wxSize( 360,-1 ) );
bSizercmt1->Add( m_TextComment1, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextComment1, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Comment1Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizercmt1->Add( m_Comment1Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerComment1->Add( bSizercmt1, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerComment1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment2;
bSizerComment2 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment2 = new wxStaticText( this, wxID_ANY, _("Comment2"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment1Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextComment2 = new wxStaticText( this, wxID_ANY, _("Comment2:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment2->Wrap( -1 );
bSizerComment2->Add( m_staticTextComment2, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt2;
bSizercmt2 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextComment2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment2 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment2->SetMinSize( wxSize( 360,-1 ) );
bSizercmt2->Add( m_TextComment2, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextComment2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Comment2Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizercmt2->Add( m_Comment2Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerComment2->Add( bSizercmt2, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerComment2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment12;
bSizerComment12 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment3 = new wxStaticText( this, wxID_ANY, _("Comment3"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment2Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextComment3 = new wxStaticText( this, wxID_ANY, _("Comment3:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment3->Wrap( -1 );
bSizerComment12->Add( m_staticTextComment3, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt3;
bSizercmt3 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextComment3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment3 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment3->SetMinSize( wxSize( 360,-1 ) );
bSizercmt3->Add( m_TextComment3, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextComment3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Comment3Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizercmt3->Add( m_Comment3Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerComment12->Add( bSizercmt3, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerComment12, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerComment4;
bSizerComment4 = new wxBoxSizer( wxVERTICAL );
m_staticTextComment4 = new wxStaticText( this, wxID_ANY, _("Comment4"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment3Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextComment4 = new wxStaticText( this, wxID_ANY, _("Comment4:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment4->Wrap( -1 );
bSizerComment4->Add( m_staticTextComment4, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizercmt4;
bSizercmt4 = new wxBoxSizer( wxHORIZONTAL );
fgSizer2->Add( m_staticTextComment4, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment4 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment4->SetMinSize( wxSize( 360,-1 ) );
bSizercmt4->Add( m_TextComment4, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer2->Add( m_TextComment4, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Comment4Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
bSizercmt4->Add( m_Comment4Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerComment4->Add( bSizercmt4, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerComment4, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( m_Comment4Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_staticTextComment5 = new wxStaticText( this, wxID_ANY, _("Comment5:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment5->Wrap( -1 );
fgSizer2->Add( m_staticTextComment5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment5 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment5->SetMinSize( wxSize( 360,-1 ) );
fgSizer2->Add( m_TextComment5, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Comment5Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment5Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextComment6 = new wxStaticText( this, wxID_ANY, _("Comment6:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment6->Wrap( -1 );
fgSizer2->Add( m_staticTextComment6, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment6 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment6->SetMinSize( wxSize( 360,-1 ) );
fgSizer2->Add( m_TextComment6, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Comment6Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment6Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextComment7 = new wxStaticText( this, wxID_ANY, _("Comment7:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment7->Wrap( -1 );
fgSizer2->Add( m_staticTextComment7, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment7 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment7->SetMinSize( wxSize( 360,-1 ) );
fgSizer2->Add( m_TextComment7, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Comment7Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment7Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextComment8 = new wxStaticText( this, wxID_ANY, _("Comment8:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment8->Wrap( -1 );
fgSizer2->Add( m_staticTextComment8, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment8->SetMinSize( wxSize( 360,-1 ) );
fgSizer2->Add( m_TextComment8, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Comment8Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment8Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextComment9 = new wxStaticText( this, wxID_ANY, _("Comment9:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextComment9->Wrap( -1 );
fgSizer2->Add( m_staticTextComment9, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TextComment9 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_TextComment9->SetMinSize( wxSize( 360,-1 ) );
fgSizer2->Add( m_TextComment9, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Comment9Export = new wxCheckBox( this, wxID_ANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_Comment9Export, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerRight->Add( fgSizer2, 0, wxEXPAND|wxALL, 5 );
wxBoxSizer* bSizerFilename;
bSizerFilename = new wxBoxSizer( wxVERTICAL );
m_staticTextfilename = new wxStaticText( this, wxID_ANY, _("Page layout description file"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextfilename->Wrap( -1 );
bSizerFilename->Add( m_staticTextfilename, 0, wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerfileSelection;
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerfileSelection->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizerFilename, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bUpperSizerH->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bUpperSizerH, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bMainSizer->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
m_paperSizeComboBox->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnPaperSizeChoice ), NULL, this );
m_orientationComboBox->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnPageOrientationChoice ), NULL, this );
@ -398,6 +377,11 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
m_TextComment2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
m_TextComment3->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
m_TextComment4->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
m_TextComment5->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment5TextUpdated ), NULL, this );
m_TextComment6->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment6TextUpdated ), NULL, this );
m_TextComment7->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment7TextUpdated ), NULL, this );
m_TextComment8->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment8TextUpdated ), NULL, this );
m_TextComment9->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment9TextUpdated ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
}
@ -419,7 +403,12 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
m_TextComment2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
m_TextComment3->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
m_TextComment4->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
m_TextComment5->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment5TextUpdated ), NULL, this );
m_TextComment6->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment6TextUpdated ), NULL, this );
m_TextComment7->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment7TextUpdated ), NULL, this );
m_TextComment8->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment8TextUpdated ), NULL, this );
m_TextComment9->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment9TextUpdated ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PAGE_SETTINGS_BASE_H__
#define __DIALOG_PAGE_SETTINGS_BASE_H__
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
@ -42,7 +41,7 @@
class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
{
private:
protected:
wxStaticText* m_staticTextPaper;
wxStaticLine* m_staticline2;
@ -74,7 +73,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextTitle;
wxTextCtrl* m_TextTitle;
wxCheckBox* m_TitleExport;
wxStaticText* m_staticText13;
wxStaticText* m_staticTextCompany;
wxTextCtrl* m_TextCompany;
wxCheckBox* m_CompanyExport;
wxStaticText* m_staticTextComment1;
@ -89,13 +88,28 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
wxStaticText* m_staticTextComment4;
wxTextCtrl* m_TextComment4;
wxCheckBox* m_Comment4Export;
wxStaticText* m_staticTextComment5;
wxTextCtrl* m_TextComment5;
wxCheckBox* m_Comment5Export;
wxStaticText* m_staticTextComment6;
wxTextCtrl* m_TextComment6;
wxCheckBox* m_Comment6Export;
wxStaticText* m_staticTextComment7;
wxTextCtrl* m_TextComment7;
wxCheckBox* m_Comment7Export;
wxStaticText* m_staticTextComment8;
wxTextCtrl* m_TextComment8;
wxCheckBox* m_Comment8Export;
wxStaticText* m_staticTextComment9;
wxTextCtrl* m_TextComment9;
wxCheckBox* m_Comment9Export;
wxStaticText* m_staticTextfilename;
wxTextCtrl* m_textCtrlFilePicker;
wxButton* m_buttonBrowse;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnPaperSizeChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPageOrientationChoice( wxCommandEvent& event ) { event.Skip(); }
@ -111,15 +125,19 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment4TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment5TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment6TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment7TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment8TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnComment9TextUpdated( wxCommandEvent& event ) { event.Skip(); }
virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Page Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PAGES_SETTINGS_BASE();
};
#endif //__DIALOG_PAGE_SETTINGS_BASE_H__

View File

@ -229,7 +229,7 @@ void TITLE_BLOCK::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aCont
aFormatter->Print( aNestLevel+1, "(company %s)\n",
aFormatter->Quotew( GetCompany() ).c_str() );
for( int ii = 0; ii < 4; ii++ )
for( int ii = 0; ii < 9; ii++ )
{
if( !GetComment(ii).IsEmpty() )
aFormatter->Print( aNestLevel+1, "(comment %d %s)\n", ii+1,

View File

@ -320,19 +320,39 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeDesignHeader()
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "1" );
xcomment->AddAttribute( "value", tb.GetComment1() );
xcomment->AddAttribute( "value", tb.GetComment( 0 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "2" );
xcomment->AddAttribute( "value", tb.GetComment2() );
xcomment->AddAttribute( "value", tb.GetComment( 1 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "3" );
xcomment->AddAttribute( "value", tb.GetComment3() );
xcomment->AddAttribute( "value", tb.GetComment( 2 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "4" );
xcomment->AddAttribute( "value", tb.GetComment4() );
xcomment->AddAttribute( "value", tb.GetComment( 3 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "5" );
xcomment->AddAttribute( "value", tb.GetComment( 4 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "6" );
xcomment->AddAttribute( "value", tb.GetComment( 5 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "7" );
xcomment->AddAttribute( "value", tb.GetComment( 6 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "8" );
xcomment->AddAttribute( "value", tb.GetComment( 7 ) );
xtitleBlock->AddChild( xcomment = node( "comment" ) );
xcomment->AddAttribute( "number", "9" );
xcomment->AddAttribute( "value", tb.GetComment( 8 ) );
}
return xdesign;

View File

@ -907,22 +907,47 @@ void SCH_LEGACY_PLUGIN::loadPageSettings( LINE_READER& aReader, SCH_SCREEN* aScr
else if( strCompare( "Comment1", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment1( buf );
tb.SetComment( 0, buf );
}
else if( strCompare( "Comment2", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment2( buf );
tb.SetComment( 1, buf );
}
else if( strCompare( "Comment3", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment3( buf );
tb.SetComment( 2, buf );
}
else if( strCompare( "Comment4", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment4( buf );
tb.SetComment( 3, buf );
}
else if( strCompare( "Comment5", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment( 4, buf );
}
else if( strCompare( "Comment6", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment( 5, buf );
}
else if( strCompare( "Comment7", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment( 6, buf );
}
else if( strCompare( "Comment8", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment( 7, buf );
}
else if( strCompare( "Comment9", line, &line ) )
{
parseQuotedString( buf, aReader, line, &line, true );
tb.SetComment( 8, buf );
}
else if( strCompare( "$EndDescr", line ) )
{
@ -1814,10 +1839,15 @@ void SCH_LEGACY_PLUGIN::Format( SCH_SCREEN* aScreen )
m_out->Print( 0, "Date %s\n", EscapedUTF8( tb.GetDate() ).c_str() );
m_out->Print( 0, "Rev %s\n", EscapedUTF8( tb.GetRevision() ).c_str() );
m_out->Print( 0, "Comp %s\n", EscapedUTF8( tb.GetCompany() ).c_str() );
m_out->Print( 0, "Comment1 %s\n", EscapedUTF8( tb.GetComment1() ).c_str() );
m_out->Print( 0, "Comment2 %s\n", EscapedUTF8( tb.GetComment2() ).c_str() );
m_out->Print( 0, "Comment3 %s\n", EscapedUTF8( tb.GetComment3() ).c_str() );
m_out->Print( 0, "Comment4 %s\n", EscapedUTF8( tb.GetComment4() ).c_str() );
m_out->Print( 0, "Comment1 %s\n", EscapedUTF8( tb.GetComment( 0 ) ).c_str() );
m_out->Print( 0, "Comment2 %s\n", EscapedUTF8( tb.GetComment( 1 ) ).c_str() );
m_out->Print( 0, "Comment3 %s\n", EscapedUTF8( tb.GetComment( 2 ) ).c_str() );
m_out->Print( 0, "Comment4 %s\n", EscapedUTF8( tb.GetComment( 3 ) ).c_str() );
m_out->Print( 0, "Comment5 %s\n", EscapedUTF8( tb.GetComment( 4 ) ).c_str() );
m_out->Print( 0, "Comment6 %s\n", EscapedUTF8( tb.GetComment( 5 ) ).c_str() );
m_out->Print( 0, "Comment7 %s\n", EscapedUTF8( tb.GetComment( 6 ) ).c_str() );
m_out->Print( 0, "Comment8 %s\n", EscapedUTF8( tb.GetComment( 7 ) ).c_str() );
m_out->Print( 0, "Comment9 %s\n", EscapedUTF8( tb.GetComment( 8 ) ).c_str() );
m_out->Print( 0, "$EndDescr\n" );
for( auto alias : aScreen->GetBusAliases() )

View File

@ -101,7 +101,7 @@ public:
return getTbText( companyIdx );
}
void SetComment( int aIdx, const wxString& aComment )
void SetComment( int aIdx, const wxString& aComment )
{
aIdx += m_commentIdx;
return setTbText( aIdx, aComment );
@ -113,17 +113,6 @@ public:
return getTbText( aIdx );
}
// Only for old code compatibility. Will be removed later
void SetComment1( const wxString& aComment ) { SetComment( 0, aComment ); }
void SetComment2( const wxString& aComment ) { SetComment( 1, aComment ); }
void SetComment3( const wxString& aComment ) { SetComment( 2, aComment ); }
void SetComment4( const wxString& aComment ) { SetComment( 3, aComment ); }
const wxString& GetComment1( ) const { return GetComment( 0 ); }
const wxString& GetComment2( ) const { return GetComment( 1 ); }
const wxString& GetComment3( ) const { return GetComment( 2 ); }
const wxString& GetComment4( ) const { return GetComment( 3 ); }
void Clear()
{
m_tbTexts.Clear();

View File

@ -793,25 +793,55 @@ void LEGACY_PLUGIN::loadSHEET()
else if( TESTLINE( "Comment1" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment1( FROM_UTF8( buf ) );
tb.SetComment( 0, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment2" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment2( FROM_UTF8( buf ) );
tb.SetComment( 1, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment3" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment3( FROM_UTF8( buf ) );
tb.SetComment( 2, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment4" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment4( FROM_UTF8( buf ) );
tb.SetComment( 3, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment5" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment( 4, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment6" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment( 5, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment7" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment( 6, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment8" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment( 7, FROM_UTF8( buf ) );
}
else if( TESTLINE( "Comment9" ) )
{
ReadDelimitedText( buf, line, sizeof(buf) );
tb.SetComment( 8, FROM_UTF8( buf ) );
}
else if( TESTLINE( "$EndSHEETDESCR" ) )

View File

@ -849,22 +849,47 @@ void PCB_PARSER::parseTITLE_BLOCK()
{
case 1:
NextTok();
titleBlock.SetComment1( FromUTF8() );
titleBlock.SetComment( 0, FromUTF8() );
break;
case 2:
NextTok();
titleBlock.SetComment2( FromUTF8() );
titleBlock.SetComment( 1, FromUTF8() );
break;
case 3:
NextTok();
titleBlock.SetComment3( FromUTF8() );
titleBlock.SetComment( 2, FromUTF8() );
break;
case 4:
NextTok();
titleBlock.SetComment4( FromUTF8() );
titleBlock.SetComment( 3, FromUTF8() );
break;
case 5:
NextTok();
titleBlock.SetComment( 4, FromUTF8() );
break;
case 6:
NextTok();
titleBlock.SetComment( 5, FromUTF8() );
break;
case 7:
NextTok();
titleBlock.SetComment( 6, FromUTF8() );
break;
case 8:
NextTok();
titleBlock.SetComment( 7, FromUTF8() );
break;
case 9:
NextTok();
titleBlock.SetComment( 8, FromUTF8() );
break;
default:

View File

@ -39,10 +39,10 @@ struct TitleBlockFixture
//m_tb.SetRevision( "revision" );
// set more than one comment to make sure the indexing of comments works
m_tb.SetComment1( "comment1" );
m_tb.SetComment2( "comment2" );
m_tb.SetComment3( "comment3" );
m_tb.SetComment4( "comment4" );
m_tb.SetComment( 0, "comment1" );
m_tb.SetComment( 1, "comment2" );
m_tb.SetComment( 2, "comment3" );
m_tb.SetComment( 3, "comment4" );
}
TITLE_BLOCK m_tb;
@ -66,10 +66,10 @@ BOOST_AUTO_TEST_CASE( SimpleAccess )
// This one is blank
BOOST_CHECK_EQUAL( "", m_tb.GetRevision() );
BOOST_CHECK_EQUAL( "comment1", m_tb.GetComment1() );
BOOST_CHECK_EQUAL( "comment2", m_tb.GetComment2() );
BOOST_CHECK_EQUAL( "comment3", m_tb.GetComment3() );
BOOST_CHECK_EQUAL( "comment4", m_tb.GetComment4() );
BOOST_CHECK_EQUAL( "comment1", m_tb.GetComment( 0 ) );
BOOST_CHECK_EQUAL( "comment2", m_tb.GetComment( 1 ) );
BOOST_CHECK_EQUAL( "comment3", m_tb.GetComment( 2 ) );
BOOST_CHECK_EQUAL( "comment4", m_tb.GetComment( 3 ) );
}
/*
@ -81,8 +81,8 @@ BOOST_AUTO_TEST_CASE( Copy )
// Check that values came through
BOOST_CHECK_EQUAL( "title", tb_cpy.GetTitle() );
BOOST_CHECK_EQUAL( "comment1", tb_cpy.GetComment1() );
BOOST_CHECK_EQUAL( "comment2", tb_cpy.GetComment2() );
BOOST_CHECK_EQUAL( "comment1", tb_cpy.GetComment( 0 ) );
BOOST_CHECK_EQUAL( "comment2", tb_cpy.GetComment( 1 ) );
}