From 46fa5cac1a169b7c987bf954e7df39a8bceb1dc4 Mon Sep 17 00:00:00 2001 From: espinosa Date: Tue, 3 Feb 2015 00:03:35 +0100 Subject: [PATCH] #2516 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel with events 2 --- .../creaButtonContainer/view/listConfigDialog.cxx | 9 ++++++++- .../creaButtonContainer/view/listConfigDialog.h | 3 +++ .../creaPanelButtonContainer.cxx | 12 +++++++++++- .../creaPanelButtonContainer.h | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx index d1b1776..154bac4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.cxx @@ -43,6 +43,7 @@ namespace creaButtonContainer this->m_CurrentListWx->Reparent(this); this->m_CurrentListWx->SetFunctorEnabled(false); this->m_CurrentListWx->Show(true); + this->m_LastStatus = this->m_CurrentListWx->GetListBox()->GetStrings(); wxGridBagSizer* dialogSizer = new wxGridBagSizer(0, 0); dialogSizer->AddGrowableCol(0); @@ -90,6 +91,8 @@ namespace creaButtonContainer wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5); + //Bottom Sizer + wxBoxSizer* bottomSizer = new wxBoxSizer(wxHORIZONTAL); bottomSizer->Add(0, 0, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5); @@ -211,11 +214,15 @@ namespace creaButtonContainer } void ListConfigDialog::OnOk(wxCommandEvent& event) { + this->EndModal(1); } void ListConfigDialog::OnCancel(wxCommandEvent& event) { - Close(); + + this->m_CurrentListWx->GetListBox()->Clear(); + this->m_CurrentListWx->GetListBox()->Append(this->m_LastStatus); + this->Close(); } } } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.h index f878bd6..7c34317 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listConfigDialog.h @@ -38,6 +38,8 @@ #include #include #include +#include + #include #include @@ -147,6 +149,7 @@ namespace creaButtonContainer wxButton* m_CancelButton; //!< "Cancel" Remove button. wxBitmapButton* m_UpButton; //!< "/\" Remove button. wxBitmapButton* m_DownButton; //!< "\/" Remove button. + wxArrayString m_LastStatus; //!m_EventPanel = new wxPanel(this); + this->m_EmptyPanel = new wxPanel(this); + this->m_EventPanel = this->m_EmptyPanel; this->m_PanelUp = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ListConfigContainerPanel")); @@ -242,14 +243,23 @@ namespace creaPanelButtonContainer std::cout << "Button Event" << std::endl; + this->m_EventPanel->Show(false); + this->m_ListConfigDialog->ShowModal(); //Show Dialog this->m_CurrentWxPanel->Reparent(this->m_PanelUp); this->m_CurrentWxPanel->Show(true); this->m_CurrentWxPanel->SetFunctorEnabled(true); + + this->m_CurrentWxPanel->GetListBox()->Deselect( + this->m_CurrentWxPanel->GetListBox()->GetSelection()); this->m_CurrentWxPanel->Update(); this->m_ListWxPanel->Show(false); this->m_EventPanel->Show(false); + this->m_EventPanel = this->m_EmptyPanel; + + this->m_AuiManager->GetPane(_T("EventPanel")).window = this->m_EventPanel; this->m_AuiManager->Update(); + } //End MLER // ---------------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h index b0cb014..5afb5dc 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/creaPanelButtonContainer.h @@ -156,6 +156,7 @@ namespace creaPanelButtonContainer ListConfigDialog* m_ListConfigDialog;//!