]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMMainFrame.cpp
#3204 crea Feature New Normal - branch mingw64
[crea.git] / lib / creaDevManagerLib / wxCDMMainFrame.cpp
index 91ffe0fbd9f5c5982f5acea39a67fcc43aa3b67d..ab6e16af43d0418e790435f5e525035e3f9e9f10 100755 (executable)
@@ -40,7 +40,7 @@
 #include "wx/statline.h"
 #include "wx/config.h"
 #include "CDMUtilities.h"
-#include "images/CIcon20.xpm"
+#include "images/CIcon64.xpm"
 
 #include "creaDevManagerIds.h"
 #include "wxCDMMainDescriptionPanel.h"
 #include "wxCDMLibraryDescriptionPanel.h"
 #include "wxCDMPackageDescriptionPanel.h"
 #include "wxCDMBlackBoxDescriptionPanel.h"
+#include "wxCDMBBSFileDescriptionPanel.h"
+#include "wxCDMBBGFileDescriptionPanel.h"
+#include "wxCDMCodeFileDescriptionPanel.h"
 #include "wxCDMCMakeListsDescriptionPanel.h"
 #include "wxCDMFolderDescriptionPanel.h"
 #include "wxCDMFileDescriptionPanel.h"
 #include "wxCDMPackageManagerPanel.h"
+#include "wxCDMProjectMapDialog.h"
 
 #include "wxCDMSettingsDialog.h"
 
 
 
 BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame)
+EVT_MENU_OPEN(wxCDMMainFrame::OnMenuBarOpen)
 EVT_MENU(ID_MENU_NEW_PROJECT, wxCDMMainFrame::OnMenuNewProject)
 EVT_MENU(ID_MENU_OPEN_PROJECT, wxCDMMainFrame::OnMenuOpenProject)
+EVT_MENU(ID_MENU_OPEN_RECENT1, wxCDMMainFrame::OnMenuOpenRecent)
+EVT_MENU(ID_MENU_OPEN_RECENT2, wxCDMMainFrame::OnMenuOpenRecent)
+EVT_MENU(ID_MENU_OPEN_RECENT3, wxCDMMainFrame::OnMenuOpenRecent)
+EVT_MENU(ID_MENU_OPEN_RECENT4, wxCDMMainFrame::OnMenuOpenRecent)
+EVT_MENU(ID_MENU_OPEN_RECENT5, wxCDMMainFrame::OnMenuOpenRecent)
 EVT_MENU(ID_MENU_CLOSE_PROJECT, wxCDMMainFrame::OnMenuCloseProject)
 EVT_MENU(ID_MENU_EXPORT_HIERARCHY, wxCDMMainFrame::OnMenuExportHierarchy)
 EVT_MENU(ID_MENU_EXIT, wxCDMMainFrame::OnMenuExit)
@@ -77,6 +87,7 @@ EVT_MENU(ID_MENU_CODE_EDITOR, wxCDMMainFrame::OnMenuCodeEditor)
 EVT_MENU(ID_MENU_COMMAND_LINE, wxCDMMainFrame::OnMenuCommandLine)
 EVT_MENU(ID_MENU_TOGGLE_HELP, wxCDMMainFrame::OnMenuToggleHelp)
 EVT_MENU(ID_MENU_HELP, wxCDMMainFrame::OnMenuHelp)
+EVT_MENU(ID_MENU_SHOW_PROJECT_MAP, wxCDMMainFrame::OnMenuShowProjectMap)
 EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug)
 EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager)
 EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis)
@@ -140,7 +151,7 @@ bool wxCDMMainFrame::Create(
 
   CreateMenus();
   CreateControls();
-  SetIcon(wxIcon(CIcon20));
+  this->SetIcon(wxIcon(CIcon64));
   return TRUE;
 }
 
@@ -174,10 +185,40 @@ void wxCDMMainFrame::CreateMenus()
 {
   wxMenuBar* menuBar = new wxMenuBar;
 
+  //Recently opened projects
+  menu_Recent = new wxMenu();
+  wxConfigBase* pConfig = wxConfigBase::Get();
+  std::string rp = crea::wx2std(pConfig->Read(wxT("RECENT1"), wxT("")));
+  if(rp != "")
+    {
+      menu_Recent->Append(ID_MENU_OPEN_RECENT1, crea::std2wx(rp));
+      rp = crea::wx2std(pConfig->Read(wxT("RECENT2"), wxT("")));
+      if(rp != "")
+        {
+          menu_Recent->Append(ID_MENU_OPEN_RECENT2, crea::std2wx(rp));
+          rp = crea::wx2std(pConfig->Read(wxT("RECENT3"), wxT("")));
+          if(rp != "")
+            {
+              menu_Recent->Append(ID_MENU_OPEN_RECENT3, crea::std2wx(rp));
+              rp = crea::wx2std(pConfig->Read(wxT("RECENT4"), wxT("")));
+              if(rp != "")
+                {
+                  menu_Recent->Append(ID_MENU_OPEN_RECENT4, crea::std2wx(rp));
+                  rp = crea::wx2std(pConfig->Read(wxT("RECENT5"), wxT("")));
+                  if(rp != "")
+                    {
+                      menu_Recent->Append(ID_MENU_OPEN_RECENT5, crea::std2wx(rp));
+                    }
+                }
+            }
+        }
+    }
+
   //FileMenu
   menu_File = new wxMenu();
   menu_File->Append(ID_MENU_NEW_PROJECT, wxT("&New Project..."));
   menu_File->Append(ID_MENU_OPEN_PROJECT, wxT("&Open Project..."));
+  menu_File->AppendSubMenu(menu_Recent,wxT("Open &Recent"),wxT("Open a recently opened project."));
   menu_File->AppendSeparator();
   menu_File->Append(ID_MENU_CLOSE_PROJECT, wxT("&Close Project"));
   menu_File->AppendSeparator();
@@ -196,10 +237,10 @@ void wxCDMMainFrame::CreateMenus()
 
   //ToolsMenu
   menu_Tools = new wxMenu();
-  menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxT("BBTK &Graphical Editor"));
-  menu_Tools->Append(ID_MENU_MINITOOLS, wxT("&MiniTools"));
-  menu_Tools->Append(ID_MENU_CODE_EDITOR, wxT("&Code Editor"));
-  menu_Tools->Append(ID_MENU_COMMAND_LINE, wxT("&Command Line"));
+  menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxT("Open BBEditor (BBTK &Graphical Editor)"));
+  menu_Tools->Append(ID_MENU_MINITOOLS, wxT("Open &CreaTools"));
+  menu_Tools->Append(ID_MENU_CODE_EDITOR, wxT("Open Code &Editor"));
+  menu_Tools->Append(ID_MENU_COMMAND_LINE, wxT("Open Command &Line"));
 
   menuBar->Append(menu_Tools, wxT("&Tools"));
 
@@ -207,6 +248,7 @@ void wxCDMMainFrame::CreateMenus()
   menu_Help = new wxMenu();
   menu_Help->AppendCheckItem(ID_MENU_TOGGLE_HELP, wxT("He&lp Dialogs"));
   menu_Help->Check(ID_MENU_TOGGLE_HELP, this->help);
+  menu_Help->Append(ID_MENU_SHOW_PROJECT_MAP, wxT("&Show Project Map"));
   menu_Help->Append(ID_MENU_HELP, wxT("&Help"));
   menu_Help->Append(ID_MENU_REPORT_BUG, wxT("Report &Bug"));
   menu_Help->Append(ID_MENU_ABOUT_CREADEVMANAGER, wxT("&About CreaDevManager"));
@@ -229,14 +271,25 @@ void wxCDMMainFrame::CreateControls()
   auiManager.SetManagedWindow(this);
 
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
   tree_Projects = new wxCDMProjectsTreeCtrl(
       this,
       ID_TREE_PROJECTS,
       wxDefaultPosition,
       wxSize(200,400),
-         wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS
-  );
+      wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS );
+  this->actualTreeItem.Unset();
+#else
+  tree_Projects = new wxCDMProjectsTreeCtrl(
+      this,
+      ID_TREE_PROJECTS,
+      wxDefaultPosition,
+      wxSize(200,400),
+      wxTR_HAS_BUTTONS  );
   this->actualTreeItem.Unset();
+#endif
+
 
   panel_Properties = new wxCDMMainDescriptionPanel(
       this,
@@ -248,7 +301,7 @@ void wxCDMMainFrame::CreateControls()
   );
 
   auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("")).CloseButton(false));
-  auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Right().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
+  auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(250,300).BestSize(250,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
   auiManager.Update();
   //auiManager.LoadPerspective(pers,true);
   wxToolTip::Enable(true);
@@ -256,6 +309,43 @@ void wxCDMMainFrame::CreateControls()
 }
 
 //Event Handlers
+
+void wxCDMMainFrame::OnMenuBarOpen(wxMenuEvent& event)
+{
+  //clean recent menu
+  int tam = menu_Recent->GetMenuItemCount();
+  for (int i = 0; i < tam; ++i) {
+    menu_Recent->Delete(menu_Recent->FindItemByPosition(0));
+  }
+  //populate recent menu
+  wxConfigBase* pConfig = wxConfigBase::Get();
+  std::string rp = crea::wx2std(pConfig->Read(wxT("RECENT1"), wxT("")));
+  if(rp != "")
+    {
+      menu_Recent->Append(ID_MENU_OPEN_RECENT1, crea::std2wx(rp));
+      rp = crea::wx2std(pConfig->Read(wxT("RECENT2"), wxT("")));
+      if(rp != "")
+        {
+          menu_Recent->Append(ID_MENU_OPEN_RECENT2, crea::std2wx(rp));
+          rp = crea::wx2std(pConfig->Read(wxT("RECENT3"), wxT("")));
+          if(rp != "")
+            {
+              menu_Recent->Append(ID_MENU_OPEN_RECENT3, crea::std2wx(rp));
+              rp = crea::wx2std(pConfig->Read(wxT("RECENT4"), wxT("")));
+              if(rp != "")
+                {
+                  menu_Recent->Append(ID_MENU_OPEN_RECENT4, crea::std2wx(rp));
+                  rp = crea::wx2std(pConfig->Read(wxT("RECENT5"), wxT("")));
+                  if(rp != "")
+                    {
+                      menu_Recent->Append(ID_MENU_OPEN_RECENT5, crea::std2wx(rp));
+                    }
+                }
+            }
+        }
+    }
+}
+
 //File menu
 void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
 {
@@ -267,7 +357,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
 
   if(userResponse == wxID_FORWARD)
     {
-      //create project
+      //close open project
       if(this->model->GetProject() != NULL)
         {
           if(!this->model->CloseProject(result))
@@ -277,6 +367,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
               event.Skip();
               return;
             }
+
           if(this->panel_Properties != NULL)
             {
               auiManager.DetachPane(this->panel_Properties);
@@ -290,7 +381,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
 
         }
 
-
+      //create project
       if(!this->model->CreateProject(
           crea::wx2std(dialog->GetProjectName()),
           crea::wx2std(dialog->GetProjectLocation()),
@@ -305,6 +396,18 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
           return;
         }
       
+      //update recently open projects
+      wxConfigBase* pConfig = wxConfigBase::Get();
+      if(pConfig->Read(wxT("RECENT1"),wxT("")) != crea::std2wx(this->model->GetProject()->GetPath()))
+        {
+          pConfig->Write(wxT("RECENT5"), pConfig->Read(wxT("RECENT4"),wxT("")));
+          pConfig->Write(wxT("RECENT4"), pConfig->Read(wxT("RECENT3"),wxT("")));
+          pConfig->Write(wxT("RECENT3"), pConfig->Read(wxT("RECENT2"),wxT("")));
+          pConfig->Write(wxT("RECENT2"), pConfig->Read(wxT("RECENT1"),wxT("")));
+          pConfig->Write(wxT("RECENT1"), crea::std2wx(this->model->GetProject()->GetPath()));
+        }
+
+
       //show project actions panel
       if(this->panel_ProjectActions != NULL)
         {
@@ -320,7 +423,12 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
           wxT("Project Actions Panel"),
           wxDefaultPosition,
           wxSize(800,200),
-          0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
       );
       
       auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("General Project Actions")).BestSize(800,70).CloseButton(false));
@@ -334,6 +442,109 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
          //wxMessageBox(wxT("ProjectSelected") ,_T("New Project - Success!"),wxOK | wxICON_ERROR);
     }
 }
+void wxCDMMainFrame::OnMenuOpenRecent(wxCommandEvent& event)
+{
+  std::string* result;
+
+  //((wxMenuItem*)(event.GetEventObject()))->GetItemLabel();
+
+  std::string path = "";
+  wxConfigBase* pConfig = wxConfigBase::Get();
+  if(event.GetId() == ID_MENU_OPEN_RECENT1)
+    path = crea::wx2std (pConfig->Read(wxT("RECENT1"),wxT("")));
+  else if(event.GetId() == ID_MENU_OPEN_RECENT2)
+    path = crea::wx2std (pConfig->Read(wxT("RECENT2"),wxT("")));
+  else if(event.GetId() == ID_MENU_OPEN_RECENT3)
+    path = crea::wx2std (pConfig->Read(wxT("RECENT3"),wxT("")));
+  else if(event.GetId() == ID_MENU_OPEN_RECENT4)
+    path = crea::wx2std (pConfig->Read(wxT("RECENT4"),wxT("")));
+  else if(event.GetId() == ID_MENU_OPEN_RECENT5)
+    path = crea::wx2std (pConfig->Read(wxT("RECENT5"),wxT("")));
+
+  std::cout << "Selection to open: " << path << std::endl;
+  std::cout.flush();
+
+
+  //populate model
+  if(this->model->GetProject() != NULL)
+    {
+      std::cout << "Project not null, closing it" << std::endl;
+      if(!this->model->CloseProject(result))
+        {
+          std::cout << "error closing project: " << *result << std::endl;
+          wxMessageBox(crea::std2wx(result->c_str()),_T("New Project - Error!"),wxOK | wxICON_ERROR);
+          event.Skip();
+          return;
+        }
+
+      if(this->panel_Properties != NULL)
+        {
+          auiManager.DetachPane(this->panel_Properties);
+          this->panel_Properties->Hide();
+        }
+      if(this->panel_ProjectActions != NULL)
+        {
+          auiManager.DetachPane(this->panel_ProjectActions);
+          this->panel_ProjectActions->Hide();
+        }
+    }
+
+  if (!this->model->OpenProject(path, result))
+    {
+      std::cout << "error opening project: " << *result << std::endl;
+      wxMessageBox( crea::std2wx(result->c_str()), wxT("Open Project - Error"), wxICON_ERROR);
+      event.Skip();
+      return;
+    };
+
+  //update recently open projects
+  if(pConfig->Read(wxT("RECENT1"),wxT("")) != crea::std2wx(this->model->GetProject()->GetPath()))
+    {
+      pConfig->Write(wxT("RECENT5"), pConfig->Read(wxT("RECENT4"),wxT("")));
+      pConfig->Write(wxT("RECENT4"), pConfig->Read(wxT("RECENT3"),wxT("")));
+      pConfig->Write(wxT("RECENT3"), pConfig->Read(wxT("RECENT2"),wxT("")));
+      pConfig->Write(wxT("RECENT2"), pConfig->Read(wxT("RECENT1"),wxT("")));
+      pConfig->Write(wxT("RECENT1"), crea::std2wx(this->model->GetProject()->GetPath()));
+    }
+
+  std::cout << "building ui" << std::endl;
+
+  //populate tree control
+  tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
+  tree_Projects->Unselect();
+  this->actualTreeItem.Unset();
+      tree_Projects->SelectItem(this->model->GetProject()->GetId().GetWxId(), true);
+
+
+  //change project's actions panel
+  if(this->panel_ProjectActions!= NULL)
+    {
+      auiManager.DetachPane(this->panel_ProjectActions);
+      this->panel_ProjectActions->Destroy();
+      this->panel_ProjectActions = NULL;
+    }
+  panel_ProjectActions = new wxCDMProjectActionsPanel(
+      this,
+      this->model->GetProject(),
+      ID_WINDOW_PROJ_ACTIONS,
+      wxT("Project Actions Panel"),
+      wxDefaultPosition,
+      wxSize(800,200),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
+  );
+  panel_ProjectActions->SetMinSize(wxSize(500, 100));
+
+
+  auiManager.AddPane(panel_ProjectActions, wxAuiPaneInfo().Bottom().MinSize(800,50).Name(wxT("panel_ProjectActions")).Caption(wxT("General Project Actions")).BestSize(800,70).CloseButton(false));
+
+  auiManager.Update();
+
+}
 void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
 {
   std::string* result;
@@ -361,6 +572,7 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
               event.Skip();
               return;
             }
+
           if(this->panel_Properties != NULL)
             {
               auiManager.DetachPane(this->panel_Properties);
@@ -381,6 +593,17 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
           return;
         };
 
+      //update recently open projects
+      wxConfigBase* pConfig = wxConfigBase::Get();
+      if(pConfig->Read(wxT("RECENT1"),wxT("")) != crea::std2wx(this->model->GetProject()->GetPath()))
+        {
+          pConfig->Write(wxT("RECENT5"), pConfig->Read(wxT("RECENT4"),wxT("")));
+          pConfig->Write(wxT("RECENT4"), pConfig->Read(wxT("RECENT3"),wxT("")));
+          pConfig->Write(wxT("RECENT3"), pConfig->Read(wxT("RECENT2"),wxT("")));
+          pConfig->Write(wxT("RECENT2"), pConfig->Read(wxT("RECENT1"),wxT("")));
+          pConfig->Write(wxT("RECENT1"), crea::std2wx(this->model->GetProject()->GetPath()));
+        }
+
       std::cout << "building ui" << std::endl;
 
       //populate tree control
@@ -404,7 +627,12 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
           wxT("Project Actions Panel"),
           wxDefaultPosition,
           wxSize(800,200),
-          0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
       );
       panel_ProjectActions->SetMinSize(wxSize(500, 100));
 
@@ -555,10 +783,18 @@ void wxCDMMainFrame::OnMenuCommandLine(wxCommandEvent& event)
     }
 }
 
+//Help Menu
+void wxCDMMainFrame::OnMenuShowProjectMap(wxCommandEvent& event)
+{
+  wxCDMProjectMapDialog* dialog = new wxCDMProjectMapDialog(this);
+
+  dialog->Show(true);
+}
+
 //Help Menu
 void wxCDMMainFrame::OnMenuHelp(wxCommandEvent& event)
 {
-  wxLaunchDefaultBrowser(_T("http://www.creatis.insa-lyon.fr/site/en/CreatoolsDocumentation"), 0);
+  wxLaunchDefaultBrowser(_T("http://www.creatis.insa-lyon.fr/~gonzalez/documentationSWDoc.html"), 0);
 }
 void wxCDMMainFrame::OnMenuReportBug(wxCommandEvent& event)
 {
@@ -671,12 +907,15 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
               wxT("Description Panel"),
               wxDefaultPosition,
               wxSize(600, 400),
-              0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
           );
 
-        }
-      else
-        {
+        } else {
           //appli
           modelCDMAppli* elementAppli = dynamic_cast<modelCDMAppli*>(element);
           if(elementAppli != NULL)
@@ -689,12 +928,15 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                   wxT("Description Panel"),
                   wxDefaultPosition,
                   wxSize(600, 400),
-                  0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
               );
 
-            }
-          else
-            {
+            } else {
               //application
               modelCDMApplication* elementApplication = dynamic_cast<modelCDMApplication*>(element);
                          if(elementApplication != NULL)
@@ -707,11 +949,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                       wxT("Description Panel"),
                       wxDefaultPosition,
                       wxSize(600, 400),
-                      0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                   );
-                }
-              else
-                {
+                } else {
                   //lib
                   modelCDMLib* elementLib = dynamic_cast<modelCDMLib*>(element);
                   if(elementLib != NULL)
@@ -724,11 +969,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                           wxT("Description Panel"),
                           wxDefaultPosition,
                           wxSize(600, 400),
-                          0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                       );
-                    }
-                  else
-                    {
+                    } else {
                       //library
                       modelCDMLibrary* elementLibrary = dynamic_cast<modelCDMLibrary*>(element);
                       if(elementLibrary != NULL)
@@ -741,11 +989,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                               wxT("Description Panel"),
                               wxDefaultPosition,
                               wxSize(600, 400),
-                              0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                           );
-                        }
-                      else
-                        {
+                        } else {
                           //package
                           modelCDMPackage* elementPackage = dynamic_cast<modelCDMPackage*>(element);
                           if(elementPackage != NULL)
@@ -757,12 +1008,17 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                                   ID_WINDOW_PROPERTIES,
                                   wxT("Description Panel"),
                                   wxDefaultPosition,
-                                  wxSize(600, 400),
-                                  0
+                                  wxSize(600, 100),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                               );
-                            }
-                          else
-                            {
+
+
+                            } else {
                               //black box
                               modelCDMBlackBox* elementBlackBox = dynamic_cast<modelCDMBlackBox*>(element);
                               if(elementBlackBox != NULL)
@@ -775,11 +1031,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                                       wxT("Description Panel"),
                                       wxDefaultPosition,
                                       wxSize(600, 400),
-                                      0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                                   );
-                                }
-                              else
-                                {
+                                } else {
                                   //CMakeLists
                                   modelCDMCMakeListsFile* elementCMakeLists = dynamic_cast<modelCDMCMakeListsFile*>(element);
                                   if(elementCMakeLists != NULL)
@@ -792,56 +1051,132 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
                                           wxT("Description Panel"),
                                           wxDefaultPosition,
                                           wxSize(600, 400),
-                                          0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                                       );
-                                    }
-                                  else
-                                    {
-                                      //folder
-                                      modelCDMFolder* elementFolder = dynamic_cast<modelCDMFolder*>(element);
-                                      if(elementFolder != NULL)
+                                    } else {
+                                      //CodeFile
+                                      modelCDMCodeFile* elementCodeFile = dynamic_cast<modelCDMCodeFile*>(element);
+                                      if(elementCodeFile != NULL)
                                         {
                                           //create element description
-                                          description = new wxCDMFolderDescriptionPanel(
+                                          description = new wxCDMCodeFileDescriptionPanel(
                                               this,
-                                              elementFolder,
+                                              elementCodeFile,
                                               ID_WINDOW_PROPERTIES,
                                               wxT("Description Panel"),
                                               wxDefaultPosition,
                                               wxSize(600, 400),
-                                              0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                                           );
-                                        }
-                                      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
+                                        } else {
+                                          //BBSFile
+                                          modelCDMBBSFile* elementBBSFile = dynamic_cast<modelCDMBBSFile*>(element);
+                                          if(elementBBSFile != NULL)
                                             {
-
-                                              //main if not any
                                               //create element description
-                                              description = new wxCDMMainDescriptionPanel(
+                                              description = new wxCDMBBSFileDescriptionPanel(
                                                   this,
+                                                  elementBBSFile,
                                                   ID_WINDOW_PROPERTIES,
                                                   wxT("Description Panel"),
                                                   wxDefaultPosition,
                                                   wxSize(600, 400),
-                                                  0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
                                               );
+                                            } else {
+                                              //BBSFile
+                                              modelCDMBBGFile* elementBBGFile = dynamic_cast<modelCDMBBGFile*>(element);
+                                              if(elementBBGFile != NULL)
+                                                {
+                                                  //create element description
+                                                  description = new wxCDMBBGFileDescriptionPanel(
+                                                      this,
+                                                      elementBBGFile,
+                                                      ID_WINDOW_PROPERTIES,
+                                                      wxT("Description Panel"),
+                                                      wxDefaultPosition,
+                                                      wxSize(600, 400),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
+                                                  );
+                                                } 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),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
+                                                      );
+                                                    } 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),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
+                                                          );
+                                                        } else {
+                                                          //main if not any
+                                                          //create element description
+                                                          description = new wxCDMMainDescriptionPanel(
+                                                              this,
+                                                              ID_WINDOW_PROPERTIES,
+                                                              wxT("Description Panel"),
+                                                              wxDefaultPosition,
+                                                              wxSize(600, 400),
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
+                                                          );
+                                                        }
+                                                    }
+                                                }
                                             }
                                         }
                                     }
@@ -866,9 +1201,7 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
       this->panel_Properties = description;
 
       auiManager.Update();
-    }
-  else
-    {
+    } else {
       event.Skip();
        }
 
@@ -903,7 +1236,12 @@ void wxCDMMainFrame::OnChangeView(wxCommandEvent& event)
             wxT("Description Panel"),
             wxDefaultPosition,
             wxSize(600, 400),
-            0
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                                                                               0
+#else
+                                                                       wxSHOW_SB_ALWAYS | wxVSCROLL
+#endif
         );
       }
     else if(event.GetString() == wxT("manage_libraries"))