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);
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);
}
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();
}
}
}
#include <wx/gbsizer.h>
#include <wx/wx.h>
#include <wx/bmpbuttn.h>
+#include <wx/msgdlg.h>
+
#include <string>
#include <vector>
wxButton* m_CancelButton; //!< "Cancel" Remove button.
wxBitmapButton* m_UpButton; //!< "/\" Remove button.
wxBitmapButton* m_DownButton; //!< "\/" Remove button.
+ wxArrayString m_LastStatus; //!<Last status array.
ListWx* m_OriginalListWx; //!< The Original list.
ListWx* m_CurrentListWx; //!<The Configurable list.
TConcreteFunctor* lFunctor = new TConcreteFunctor(this,
&PanelButtonContainer::GenericListEvent);
- this->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"));
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
// ----------------------------------------------------------------------------------
ListConfigDialog* m_ListConfigDialog;//!<This wxDialog shows the list of the elements and allows modifications.
wxPanel* m_PanelUp;//!<This panel contains the list of the elements empty,full and the config button.
+ wxPanel* m_EmptyPanel; //!<This panel is empty.
ListWx* m_CurrentWxPanel;//!<This panel contains the final list of the elements .
wxBitmapButton* m_ConfigButton;//!< "Config" Settings button.