From 5ba3e43d312df7ad808dfdaf99b1220e80b60a8a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 19 Mar 2018 15:36:21 +0100 Subject: [PATCH] Converted STEP exporter dialog to use WX_HTML_REPORT_PANEL --- pcbnew/dialogs/dialog_export_step.cpp | 302 +++++++++---------- pcbnew/dialogs/dialog_export_step_base.cpp | 31 +- pcbnew/dialogs/dialog_export_step_base.fbp | 333 ++++++++++++++++++--- pcbnew/dialogs/dialog_export_step_base.h | 14 +- 4 files changed, 475 insertions(+), 205 deletions(-) diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index b61cdb948a..8bda59b4d1 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -32,11 +32,13 @@ #include "pcb_edit_frame.h" #include "kiface_i.h" #include "confirm.h" +#include "reporter.h" #include "pcbnew.h" #include "class_board.h" #include "dialog_export_step_base.h" #include +#include #define OPTKEY_STEP_ORIGIN_OPT "STEP_Origin_Opt" #define OPTKEY_STEP_UORG_UNITS "STEP_UserOriginUnits" @@ -66,38 +68,20 @@ private: int m_OrgUnits; // remember last units for User Origin double m_XOrg; // remember last User Origin X value double m_YOrg; // remember last User Origin Y value + wxString m_boardPath; // path to the exported board file protected: void onUpdateUnits( wxUpdateUIEvent& aEvent ) override; void onUpdateXPos( wxUpdateUIEvent& aEvent ) override; void onUpdateYPos( wxUpdateUIEvent& aEvent ) override; + void onExportButton( wxCommandEvent& aEvent ) override; -public: - DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ); - - ~DIALOG_EXPORT_STEP() - { - GetOriginOption(); // Update m_STEP_org_opt member. - m_config->Write( OPTKEY_STEP_ORIGIN_OPT, (int)m_STEP_org_opt ); - - m_config->Write( OPTKEY_STEP_NOVIRT, m_cbRemoveVirtual->GetValue() ); - - m_config->Write( OPTKEY_STEP_UORG_UNITS, m_STEP_OrgUnitChoice->GetSelection() ); - m_config->Write( OPTKEY_STEP_UORG_X, m_STEP_Xorg->GetValue() ); - m_config->Write( OPTKEY_STEP_UORG_Y, m_STEP_Yorg->GetValue() ); - } - - wxFilePickerCtrl* FilePicker() - { - return m_filePickerSTEP; - } - - int GetOrgUnitsChoice() + int GetOrgUnitsChoice() const { return m_STEP_OrgUnitChoice->GetSelection(); } - double GetXOrg() + double GetXOrg() const { return DoubleValueFromString( UNSCALED_UNITS, m_STEP_Xorg->GetValue() ); } @@ -114,15 +98,33 @@ public: return m_cbRemoveVirtual->GetValue(); } - bool TransferDataFromWindow() override; +public: + DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString& aBoardPath ); + + ~DIALOG_EXPORT_STEP() + { + GetOriginOption(); // Update m_STEP_org_opt member. + m_config->Write( OPTKEY_STEP_ORIGIN_OPT, (int)m_STEP_org_opt ); + m_config->Write( OPTKEY_STEP_NOVIRT, m_cbRemoveVirtual->GetValue() ); + m_config->Write( OPTKEY_STEP_UORG_UNITS, m_STEP_OrgUnitChoice->GetSelection() ); + m_config->Write( OPTKEY_STEP_UORG_X, m_STEP_Xorg->GetValue() ); + m_config->Write( OPTKEY_STEP_UORG_Y, m_STEP_Yorg->GetValue() ); + } }; -DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ) : - DIALOG_EXPORT_STEP_BASE( parent ) +DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString& aBoardPath ) : + DIALOG_EXPORT_STEP_BASE( aParent ) { - m_parent = parent; + m_parent = aParent; + m_boardPath = aBoardPath; m_config = Kiface().KifaceSettings(); + + // Build default output file name + wxFileName brdFile = m_parent->GetBoard()->GetFileName(); + brdFile.SetExt( "stp" ); + m_filePickerSTEP->SetPath( brdFile.GetFullPath() ); + SetFocus(); m_STEP_org_opt = STEP_ORG_0;; @@ -154,35 +156,11 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* parent ) : tmpStr << m_YOrg; m_STEP_Yorg->SetValue( tmpStr ); - m_sdbSizerOK->SetDefault(); - // Now all widgets have the size fixed, call FinishDialogSettings FinishDialogSettings(); } -bool DIALOG_EXPORT_STEP::TransferDataFromWindow() -{ - if( !wxDialog::TransferDataFromWindow() ) - return false; - - wxFileName fn = m_filePickerSTEP->GetFileName(); - - if( fn.FileExists() ) - { - wxString msg; - msg.Printf( _( "File: %s\n" - "already exists. Do you want overwrite this file?" ), - fn.GetFullPath().GetData() ); - - if( wxMessageBox( msg, _( "STEP Export" ), wxYES_NO | wxICON_QUESTION, this ) == wxNO ) - return false; - } - - return true; -} - - DIALOG_EXPORT_STEP::STEP_ORG_OPT DIALOG_EXPORT_STEP::GetOriginOption() { m_STEP_org_opt = STEP_ORG_0; @@ -202,9 +180,7 @@ DIALOG_EXPORT_STEP::STEP_ORG_OPT DIALOG_EXPORT_STEP::GetOriginOption() void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) { - wxFileName brdFile = GetBoard()->GetFileName(); - wxString brdName; if( GetScreen()->IsModify() || brdFile.GetFullPath().empty() ) { @@ -215,106 +191,12 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) return; } - brdFile = GetBoard()->GetFileName(); - brdName = GetAutoSaveFilePrefix(); - brdName.append( brdFile.GetName() ); - brdFile.SetName( brdName ); + // Use auto-saved board for export + brdFile.SetName( GetAutoSaveFilePrefix() + brdFile.GetName() ); } - brdName = "\""; - brdName.Append( brdFile.GetFullPath() ); - brdName.Append( "\"" ); - - // Build default output file name - brdFile = GetBoard()->GetFileName(); - wxString brdExt = brdFile.GetExt(); - brdFile.SetExt( "stp" ); - - DIALOG_EXPORT_STEP dlg( this ); - dlg.FilePicker()->SetPath( brdFile.GetFullPath() ); - - if ( dlg.ShowModal() != wxID_OK ) - return; - - wxString outputFile = dlg.FilePicker()->GetPath(); - brdFile.SetExt( brdExt ); - outputFile.Prepend( "\"" ); - outputFile.Append( "\"" ); - - DIALOG_EXPORT_STEP::STEP_ORG_OPT orgOpt = dlg.GetOriginOption(); - double xOrg = 0.0; - double yOrg = 0.0; - - wxFileName appK2S( wxStandardPaths::Get().GetExecutablePath() ); - appK2S.SetName( "kicad2step" ); - - wxString cmdK2S = "\""; - cmdK2S.Append( appK2S.GetFullPath() ); - cmdK2S.Append( "\"" ); - - if( dlg.GetNoVirtOption() ) - cmdK2S.Append( " --no-virtual" ); - - switch( orgOpt ) - { - case DIALOG_EXPORT_STEP::STEP_ORG_0: - break; - - case DIALOG_EXPORT_STEP::STEP_ORG_PLOT_AXIS: - cmdK2S.Append( " --drill-origin" ); - break; - - case DIALOG_EXPORT_STEP::STEP_ORG_GRID_AXIS: - cmdK2S.Append( " --grid-origin" ); - break; - - case DIALOG_EXPORT_STEP::STEP_ORG_USER: - { - xOrg = dlg.GetXOrg(); - yOrg = dlg.GetYOrg(); - - if( dlg.GetOrgUnitsChoice() == 1 ) - { - // selected reference unit is in inches, and STEP units are mm - xOrg *= 25.4; - yOrg *= 25.4; - } - - LOCALE_IO dummy; - cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); - } - break; - - case DIALOG_EXPORT_STEP::STEP_ORG_BOARD_CENTER: - { - EDA_RECT bbox = GetBoard()->ComputeBoundingBox( true ); - xOrg = Iu2Millimeter( bbox.GetCenter().x ); - yOrg = Iu2Millimeter( bbox.GetCenter().y ); - LOCALE_IO dummy; - cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); - } - break; - } - - cmdK2S.Append( " -f -o " ); - cmdK2S.Append( outputFile ); - - cmdK2S.Append( " " ); - cmdK2S.Append( brdName ); - - int result = 0; - - do - { - wxBusyCursor dummy; - result = wxExecute( cmdK2S, wxEXEC_SYNC | wxEXEC_HIDE_CONSOLE ); - } while( 0 ); - - if( result ) - { - DisplayErrorMessage( this, _( "Unable to create STEP file. Check that the board has a " - "valid outline and models." ), cmdK2S ); - } + DIALOG_EXPORT_STEP dlg( this, brdFile.GetFullPath() ); + dlg.ShowModal(); } @@ -334,3 +216,123 @@ void DIALOG_EXPORT_STEP::onUpdateYPos( wxUpdateUIEvent& aEvent ) { aEvent.Enable( m_rbUserDefinedOrigin->GetValue() ); } + + +void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent ) +{ + wxFileName fn = m_filePickerSTEP->GetFileName(); + + if( fn.FileExists() ) + { + wxString msg; + msg.Printf( _( "File '%s' already exists. Do you want overwrite this file?" ), + fn.GetFullPath().GetData() ); + + if( wxMessageBox( msg, _( "STEP Export" ), wxYES_NO | wxICON_QUESTION, this ) == wxNO ) + return; + } + + DIALOG_EXPORT_STEP::STEP_ORG_OPT orgOpt = GetOriginOption(); + double xOrg = 0.0; + double yOrg = 0.0; + + wxFileName appK2S( wxStandardPaths::Get().GetExecutablePath() ); + appK2S.SetName( "kicad2step" ); + + wxString cmdK2S = "\""; + cmdK2S.Append( appK2S.GetFullPath() ); + cmdK2S.Append( "\"" ); + + if( GetNoVirtOption() ) + cmdK2S.Append( " --no-virtual" ); + + switch( orgOpt ) + { + case DIALOG_EXPORT_STEP::STEP_ORG_0: + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_PLOT_AXIS: + cmdK2S.Append( " --drill-origin" ); + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_GRID_AXIS: + cmdK2S.Append( " --grid-origin" ); + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_USER: + { + xOrg = GetXOrg(); + yOrg = GetYOrg(); + + if( GetOrgUnitsChoice() == 1 ) + { + // selected reference unit is in inches, and STEP units are mm + xOrg *= 25.4; + yOrg *= 25.4; + } + + LOCALE_IO dummy; + cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + } + break; + + case DIALOG_EXPORT_STEP::STEP_ORG_BOARD_CENTER: + { + EDA_RECT bbox = m_parent->GetBoard()->ComputeBoundingBox( true ); + xOrg = Iu2Millimeter( bbox.GetCenter().x ); + yOrg = Iu2Millimeter( bbox.GetCenter().y ); + LOCALE_IO dummy; + cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + } + break; + } + + cmdK2S.Append( " -f -o " ); + cmdK2S.Append( wxString::Format("\"%s\"", m_filePickerSTEP->GetPath() ) ); // input file path + + cmdK2S.Append( " " ); + cmdK2S.Append( wxString::Format("\"%s\"", m_boardPath ) ); // output file path + + int result = 0; + bool success = false; + wxArrayString output, errors; + REPORTER& reporter = m_messagesPanel->Reporter(); + reporter.Report( wxString::Format( _( "Executing '%s'" ), cmdK2S ), REPORTER::RPT_ACTION ); + + { + wxBusyCursor dummy; + result = wxExecute( cmdK2S, output, errors, wxEXEC_SYNC | wxEXEC_HIDE_CONSOLE ); + } + + // Check the output log for an indication of success, + // the value returned by wxExecute is not conclusive + for( auto& l : output ) + { + if( l.Contains( "Done" ) ) + { + success = true; + break; + } + } + + for( auto& err : errors ) + reporter.Report( err, REPORTER::RPT_WARNING ); + + if( result ) // Any troubles? + { + if( !success ) + { + reporter.Report( _( "Unable to create STEP file. Check that the board has a " + "valid outline and models." ), REPORTER::RPT_ERROR ); + } + else + { + reporter.Report( _( "STEP file has been created, but there are warnings." ), + REPORTER::RPT_INFO ); + } + } + else + { + reporter.Report( _( "STEP file has been created succesfully." ), REPORTER::RPT_INFO ); + } +} diff --git a/pcbnew/dialogs/dialog_export_step_base.cpp b/pcbnew/dialogs/dialog_export_step_base.cpp index a9d51b945a..34949152d4 100644 --- a/pcbnew/dialogs/dialog_export_step_base.cpp +++ b/pcbnew/dialogs/dialog_export_step_base.cpp @@ -1,11 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version Oct 17 2016) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "widgets/text_ctrl_eval.h" +#include "wx_html_report_panel.h" #include "dialog_export_step_base.h" @@ -153,17 +154,27 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i bSizerSTEPFile->Add( bSizer2, 1, wxEXPAND, 5 ); + m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + bSizerSTEPFile->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 ); + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizerSTEPFile->Add( m_staticline1, 0, wxEXPAND | wxALL, 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(); + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); - bSizerSTEPFile->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + bSizer6->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_btnClose, 0, wxALL, 5 ); + + m_btnExport = new wxButton( this, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btnExport->SetDefault(); + bSizer6->Add( m_btnExport, 0, wxALL, 5 ); + + + bSizerSTEPFile->Add( bSizer6, 0, wxALL|wxEXPAND, 5 ); this->SetSizer( bSizerSTEPFile ); @@ -176,6 +187,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this ); m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this ); m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this ); + m_btnExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this ); } DIALOG_EXPORT_STEP_BASE::~DIALOG_EXPORT_STEP_BASE() @@ -184,5 +196,6 @@ DIALOG_EXPORT_STEP_BASE::~DIALOG_EXPORT_STEP_BASE() m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this ); m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this ); m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this ); + m_btnExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_export_step_base.fbp b/pcbnew/dialogs/dialog_export_step_base.fbp index 246caf8b43..8a7fea51c6 100644 --- a/pcbnew/dialogs/dialog_export_step_base.fbp +++ b/pcbnew/dialogs/dialog_export_step_base.fbp @@ -805,7 +805,7 @@ 5 wxEXPAND|wxRIGHT|wxLEFT 0 - + bSizer3 wxVERTICAL @@ -893,11 +893,11 @@ - + 5 wxEXPAND 1 - + 3 wxBOTH @@ -909,11 +909,11 @@ none 0 0 - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + 0 protected 0 @@ -1090,11 +1090,11 @@ onUpdateUnits - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + 0 protected 0 @@ -1274,11 +1274,11 @@ onUpdateXPos - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + 0 protected 0 @@ -1367,11 +1367,11 @@ - + 5 wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 - + 1 1 1 @@ -1466,16 +1466,16 @@ 5 wxEXPAND|wxRIGHT|wxLEFT 0 - + bSizer8 wxVERTICAL none - + 5 wxALL 0 - + 1 1 1 @@ -1554,11 +1554,11 @@ - + 5 wxEXPAND 1 - + 2 wxBOTH @@ -1570,21 +1570,21 @@ none 0 0 - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + 0 protected 0 - + 5 wxALL 0 - + 1 1 1 @@ -1674,6 +1674,86 @@ + + 5 + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_messagesPanel + 1 + + + protected + 1 + + Resizable + 1 + + WX_HTML_REPORT_PANEL; wx_html_report_panel.h + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND | wxALL @@ -1755,30 +1835,201 @@ - + 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + wxALL|wxEXPAND 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 + - m_sdbSizer - protected - - - - - - - - + bSizer6 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Close + + 0 + + + 0 + + 1 + m_btnClose + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Export + + 0 + + + 0 + + 1 + m_btnExport + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onExportButton + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_export_step_base.h b/pcbnew/dialogs/dialog_export_step_base.h index 2dbd5059e8..19e63bdc84 100644 --- a/pcbnew/dialogs/dialog_export_step_base.h +++ b/pcbnew/dialogs/dialog_export_step_base.h @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version Oct 17 2016) // http://www.wxformbuilder.org/ // -// PLEASE DO *NOT* EDIT THIS FILE! +// PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #ifndef __DIALOG_EXPORT_STEP_BASE_H__ @@ -11,7 +11,9 @@ #include #include #include +class DIALOG_SHIM; class TEXT_CTRL_EVAL; +class WX_HTML_REPORT_PANEL; #include "dialog_shim.h" #include @@ -28,6 +30,7 @@ class TEXT_CTRL_EVAL; #include #include #include +#include #include #include @@ -58,15 +61,16 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM TEXT_CTRL_EVAL* m_STEP_Yorg; wxStaticText* m_staticText7; wxCheckBox* m_cbRemoveVirtual; + WX_HTML_REPORT_PANEL* m_messagesPanel; wxStaticLine* m_staticline1; - wxStdDialogButtonSizer* m_sdbSizer; - wxButton* m_sdbSizerOK; - wxButton* m_sdbSizerCancel; + wxButton* m_btnClose; + wxButton* m_btnExport; // Virtual event handlers, overide them in your derived class virtual void onUpdateUnits( wxUpdateUIEvent& event ) { event.Skip(); } virtual void onUpdateXPos( wxUpdateUIEvent& event ) { event.Skip(); } virtual void onUpdateYPos( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void onExportButton( wxCommandEvent& event ) { event.Skip(); } public: