+ }
+ else
+ {
+ //application
+ modelCDMApplication* elementApplication = dynamic_cast<modelCDMApplication*>(element);
+ if(elementApplication != NULL)
+ {
+ //create element description
+ description = new wxCDMApplicationDescriptionPanel(
+ this,
+ elementApplication,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //lib
+ modelCDMLib* elementLib = dynamic_cast<modelCDMLib*>(element);
+ if(elementLib != NULL)
+ {
+ //create element description
+ description = new wxCDMLibDescriptionPanel(
+ this,
+ elementLib,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //library
+ modelCDMLibrary* elementLibrary = dynamic_cast<modelCDMLibrary*>(element);
+ if(elementLibrary != NULL)
+ {
+ //create element description
+ description = new wxCDMLibraryDescriptionPanel(
+ this,
+ elementLibrary,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //package
+ modelCDMPackage* elementPackage = dynamic_cast<modelCDMPackage*>(element);
+ if(elementPackage != NULL)
+ {
+ //create element description
+ description = new wxCDMPackageDescriptionPanel(
+ this,
+ elementPackage,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //black box
+ modelCDMBlackBox* elementBlackBox = dynamic_cast<modelCDMBlackBox*>(element);
+ if(elementBlackBox != NULL)
+ {
+ //create element description
+ description = new wxCDMBlackBoxDescriptionPanel(
+ this,
+ elementBlackBox,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //CMakeLists
+ modelCDMCMakeListsFile* elementCMakeLists = dynamic_cast<modelCDMCMakeListsFile*>(element);
+ if(elementCMakeLists != NULL)
+ {
+ //create element description
+ description = new wxCDMCMakeListsDescriptionPanel(
+ this,
+ elementCMakeLists,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //folder
+ modelCDMFolder* elementFolder = dynamic_cast<modelCDMFolder*>(element);
+ if(elementFolder != NULL)
+ {
+ //create element description
+ description = new wxCDMFolderDescriptionPanel(
+ this,
+ elementFolder,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+ //file
+ modelCDMFile* elementFile = dynamic_cast<modelCDMFile*>(element);
+ if(elementFile != NULL)
+ {
+ //create element description
+ description = new wxCDMFileDescriptionPanel(
+ this,
+ elementFile,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ else
+ {
+
+ //main if not any
+ //create element description
+ description = new wxCDMMainDescriptionPanel(
+ this,
+ ID_WINDOW_PROPERTIES,
+ wxT("Description Panel"),
+ wxDefaultPosition,
+ wxSize(600, 400),
+ 0
+ );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //delete old view
+ if(this->panel_Properties!= NULL)
+ {
+ this->panel_Properties->Hide();
+ auiManager.DetachPane(this->panel_Properties);
+ this->panel_Properties->Destroy();
+ this->panel_Properties = NULL;
+ }
+ //set new view
+ auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
+ this->panel_Properties = description;