From b431046277922ad4f1dc8a40516311641fda14d0 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 9 Oct 2002 16:26:02 -0400 Subject: Try to add enter support --- Source/WXDialog/cmWXMainFrame.cxx | 7 +++++++ Source/WXDialog/cmWXMainFrame.h | 1 + 2 files changed, 8 insertions(+) diff --git a/Source/WXDialog/cmWXMainFrame.cxx b/Source/WXDialog/cmWXMainFrame.cxx index c478f83..f163f45 100644 --- a/Source/WXDialog/cmWXMainFrame.cxx +++ b/Source/WXDialog/cmWXMainFrame.cxx @@ -214,6 +214,8 @@ cmMainFrame::cmMainFrame(const wxString& title, const wxSize& size) (wxObjectEventFunction) &cmMainFrame::OnBinarySelected ); this->ConnectEvent( this->m_PathBinary, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) &cmMainFrame::OnBinaryUpdated ); + this->ConnectEvent( this->m_PathBinary, wxEVT_COMMAND_TEXT_ENTER, + (wxObjectEventFunction) &cmMainFrame::OnBinaryAccepted ); this->ConnectEvent( this->m_GeneratorMenu, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &cmMainFrame::OnGeneratorSelected ); this->ConnectEvent( this->m_GeneratorMenu, wxEVT_COMMAND_TEXT_UPDATED, @@ -1191,6 +1193,11 @@ void cmMainFrame::ClearCache() } +void cmMainFrame::OnBinaryAccepted(wxCommandEvent& event) +{ + std::cout << "Pressed enter in binary field" << std::endl; +} + void cmMainFrame::OnBinarySelected(wxCommandEvent&) { if ( this->BuildDirectoryChanged() ) diff --git a/Source/WXDialog/cmWXMainFrame.h b/Source/WXDialog/cmWXMainFrame.h index 9c92858..865530d 100644 --- a/Source/WXDialog/cmWXMainFrame.h +++ b/Source/WXDialog/cmWXMainFrame.h @@ -60,6 +60,7 @@ public: void OnBrowseBinary(wxCommandEvent& event); void OnBinarySelected(wxCommandEvent& event); void OnBinaryUpdated(wxCommandEvent& event); + void OnBinaryAccepted(wxCommandEvent& event); void OnShowAdvancedValues(wxCommandEvent& event); void OnResize(wxSizeEvent& event); void OnPropertyChanged(wxEvent& event); -- cgit v0.12