]> Creatis software - crea.git/commitdiff
Feature #1711
authorDaniel Gonzalez <daniel@daniel.creatis>
Tue, 11 Dec 2012 15:19:54 +0000 (16:19 +0100)
committerDaniel Gonzalez <daniel@daniel.creatis>
Tue, 11 Dec 2012 15:19:54 +0000 (16:19 +0100)
CreaDevManager application implementation

- Fixing up tooltips and flow control with libraries and applications
- Fixed bug in Lib, Appli, Library, Application Description views for tooltips. Still presented in Package manager and Black Box Description views.

14 files changed:
lib/creaDevManagerLib/modelCDMApplication.cpp
lib/creaDevManagerLib/modelCDMLibrary.cpp
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.h
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.h
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.h
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.h
lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMMainFrame.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h

index a816a96fa188eb08cce1b411f1ae9401f55622b0..17a660a4c6aa8e6d6a60f58249a2153ed68dc464 100644 (file)
@@ -49,7 +49,7 @@ modelCDMApplication::modelCDMApplication(const std::string& path, const int& lev
   //TODO::fix for windows
   delimiters = "/";
   CDMUtilities::splitter::split(words, path, delimiters, CDMUtilities::splitter::no_empties);
-  this->name = words[words.size()-1];
+  this->name = this->nameApplication = words[words.size()-1];
 
   this->path = path;
   this->type = wxDIR_DIRS;
index cfd04119528f70e3dc72830a3b09bc68f6e45e6c..66f8ee45b5c822aa9647dc3c6e5ef82ea0fa006f 100644 (file)
@@ -49,7 +49,7 @@ modelCDMLibrary::modelCDMLibrary(const std::string& path, const int& level)
   //TODO::fix for windows
   delimiters = "/";
   CDMUtilities::splitter::split(words, path, delimiters, CDMUtilities::splitter::no_empties);
-  this->name = words[words.size()-1];
+  this->name = this->nameLibrary = words[words.size()-1];
 
   this->path = path;
   this->type = wxDIR_DIRS;
index 249ddfef5943a9e8aaa291b3ca015171938db968..778525fe842d8b309ea8a5017bb5a4daedc904de 100644 (file)
@@ -44,6 +44,7 @@ EVT_BUTTON(ID_BUTTON_PREV, wxCDMAppliDescriptionPanel::OnBtnReturn)
 EVT_HYPERLINK(ID_LINK_SELECT_APPLICATION, wxCDMAppliDescriptionPanel::OnLnkApplicationSelect)
 EVT_BUTTON(ID_BUTTON_CREATE_APPLICATION, wxCDMAppliDescriptionPanel::OnBtnCreateApplication)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMAppliDescriptionPanel::OnBtnEditCMakeLists)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMAppliDescriptionPanel::OnBtnOpenFolder)
 END_EVENT_TABLE()
 
 wxCDMAppliDescriptionPanel::wxCDMAppliDescriptionPanel(
@@ -89,39 +90,54 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5);
 
   //Title
-  sizer->Add(new wxStaticText(this, -1, _("Applications")),0, wxALIGN_CENTER, 0);
+  sizer->Add(new wxStaticText(this, -1, _("Application Management")),0, wxALIGN_CENTER, 0);
 
   //Image
   sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(ApIcon64)),0, wxALIGN_CENTER, 0);
 
   //Applications
-  wxStaticBox* propertiesBox = new wxStaticBox(this, -1, _T("&Available Applications"));
-  wxStaticBoxSizer* propertiesBoxInnerSizer = new wxStaticBoxSizer(propertiesBox, wxVERTICAL);
+  wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Applications"));
+  propertiesBox->GetStaticBox()->SetToolTip(wxT("Select any of the available applications to see its details or the modify them."));
+  wxPanel* propertiesPanel = new wxPanel(this);
+  wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
 
   std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
   for (int i = 0; i < applications.size(); i++)
     {
-      wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(this,ID_LINK_SELECT_APPLICATION, crea::std2wx(applications[i]->GetName().c_str()), crea::std2wx(applications[i]->GetName().c_str()));
-      propertiesBoxInnerSizer -> Add(pLibrarylk, 0, wxALIGN_LEFT | wxALL, 5);
+      wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_APPLICATION, crea::std2wx(applications[i]->GetName().c_str()), crea::std2wx(applications[i]->GetName().c_str()));
+      std::string tt = "Name: " + applications[i]->GetName() + "\n";
+      tt += "Location: " + applications[i]->GetPath();
+      pLibrarylk->SetToolTip(crea::std2wx(tt.c_str()));
+      propertiesPanelSizer -> Add(pLibrarylk, 0, wxALIGN_LEFT | wxALL, 5);
     }
 
-  sizer -> Add(propertiesBoxInnerSizer, 0, wxEXPAND | wxALL, 10);
+  propertiesPanel->SetSizer(propertiesPanelSizer);
+  propertiesPanelSizer->Fit(propertiesPanel);
+  propertiesBox->Add(propertiesPanel, 0, wxALL, 5);
+  sizer -> Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
 
   //Actions
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+  wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions"));
+  actionsBox->GetStaticBox()->SetToolTip(wxT("Create a new application or make any change to the appli's CMakeLists.txt file by selecting the desired action."));
+  wxPanel* actionsPanel = new wxPanel(this);
+  wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
 
-  wxButton* createApplicationbt = new wxButton(this, ID_BUTTON_CREATE_APPLICATION, _T("Create Application"));
+  wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("Create Application"));
   createApplicationbt->SetToolTip(wxT("Create a new application for this project."));
-  actionsBoxInnerSizer->Add(createApplicationbt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  wxButton* editCMakebt = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+  actionsPanelSizer->Add(createApplicationbt, 0, wxALL, 5);
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the CMakeLists.txt file."));
-  actionsBoxInnerSizer->Add(editCMakebt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+  actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Applications Folder"));
+  openFolderbt->SetToolTip(wxT("Open the appli folder in the file explorer."));
+  actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5);
 
-  //Assign sizer
-  actionsBoxInnerSizer->SetSizeHints(this);
+  actionsPanel->SetSizer(actionsPanelSizer);
+  actionsPanelSizer->Fit(actionsPanel);
+  actionsBox->Add(actionsPanel, 0, wxALL, 5);
+  sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
 
+  //Assign sizer
   SetSizer(sizer);
   sizer->SetSizeHints(this);
 }
@@ -194,3 +210,11 @@ void wxCDMAppliDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
   newEvent->SetId(0);
   wxPostEvent(this->GetParent(), *newEvent);
 }
+
+void
+wxCDMAppliDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnOpenFolder not implemented" << std::endl;
+  event.Skip();
+}
index b77b3fdcd9fa7ad239bb18b5fe88fe9199fbe506..01d4c78033d193a7ff5642a6f2108ab7d41bde35 100644 (file)
@@ -78,6 +78,7 @@ protected:
   void OnBtnEditCMakeLists(wxCommandEvent& event);
   void OnLnkApplicationSelect(wxHyperlinkEvent& event);
   void OnBtnReturn(wxCommandEvent& event);
+  void OnBtnOpenFolder(wxCommandEvent& event);
 
 };
 
index 3e931b192360119a852300c7f2d6693ced52003b..03142d089ed3f8605605aad3eea653a8442443e6 100644 (file)
 
 #include "wxCDMApplicationDescriptionPanel.h"
 
+#include "wxCDMMainFrame.h"
+
 #include "creaDevManagerIds.h"
 #include "images/AIcon64.xpm"
 
 BEGIN_EVENT_TABLE(wxCDMApplicationDescriptionPanel, wxPanel)
+EVT_BUTTON(ID_BUTTON_PREV, wxCDMApplicationDescriptionPanel::OnBtnReturn)
 EVT_BUTTON(ID_BUTTON_CREATE_CLASS, wxCDMApplicationDescriptionPanel::OnBtnCreateClass)
 EVT_BUTTON(ID_BUTTON_CREATE_FOLDER, wxCDMApplicationDescriptionPanel::OnBtnCreateFolder)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMApplicationDescriptionPanel::OnBtnEditCMakeLists)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMApplicationDescriptionPanel::OnBtnOpenFolder)
 END_EVENT_TABLE()
 
 wxCDMApplicationDescriptionPanel::wxCDMApplicationDescriptionPanel(
@@ -80,6 +84,11 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
 {
   wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
 
+  //Link to return
+  wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project"));
+  returnbt->SetToolTip(wxT("Return to the active project description."));
+  sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5);
+
   //Welcome
   sizer->Add(new wxStaticText(this, -1, _("Application")),0, wxALIGN_CENTER, 0);
 
@@ -90,44 +99,74 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
   sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->application->GetNameApplication())),0, wxALIGN_CENTER, 0);
 
   //Project Properties
-  wxStaticBox* propertiesBox = new wxStaticBox(this, -1, _T("&Properties"));
-  wxStaticBoxSizer* propertiesBoxInnerSizer = new wxStaticBoxSizer(propertiesBox, wxVERTICAL);
+  wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties"));
+  wxPanel* propertiesPanel = new wxPanel(this);
+  wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
 
-  wxFlexGridSizer* flexGridSizer = new wxFlexGridSizer(4, 2, 9, 15);
+  wxFlexGridSizer* propertiesGridSizer = new wxFlexGridSizer(4, 2, 9, 15);
 
-  wxStaticText *pMainFile = new wxStaticText(this, -1, wxT("Main File"));
+  wxStaticText *pMainFile = new wxStaticText(propertiesPanel, -1, wxT("Main File"));
+  wxBoxSizer* pMainFilesz = new wxBoxSizer(wxHORIZONTAL);
+  wxStaticText* pMainFiletc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->application->GetMainFile()));
+  wxButton* pMainFilebt = new wxButton(propertiesPanel, ID_BUTTON_SET_VERSION, wxT("Choose"));
+  pMainFilebt->SetToolTip(wxT("Choose the main file for the application."));
+  pMainFilesz->Add(pMainFiletc, 0, wxALIGN_CENTER_VERTICAL, 0);
+  pMainFilesz->Add(pMainFilebt, 0, wxALIGN_CENTER | wxLEFT, 10);
 
-  wxTextCtrl *pMainFiletc = new wxTextCtrl(this, -1, crea::std2wx(this->application->GetMainFile()));
+  propertiesGridSizer->Add(pMainFile, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  propertiesGridSizer->Add(pMainFilesz, 1, wxEXPAND);
 
-  flexGridSizer->Add(pMainFile, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  flexGridSizer->Add(pMainFiletc, 1, wxEXPAND);
+  propertiesGridSizer->AddGrowableCol(1,1);
 
-  propertiesBoxInnerSizer -> Add(flexGridSizer, 0, wxEXPAND);
-  sizer -> Add(propertiesBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+  propertiesPanelSizer->Add(propertiesGridSizer, 0, wxEXPAND);
+  propertiesPanel->SetSizer(propertiesPanelSizer);
+  propertiesPanelSizer->Fit(propertiesPanel);
+  propertiesBox->Add(propertiesPanel, 0, wxEXPAND);
+  sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
 
   //Actions
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
-
-  wxButton* createClassbt = new wxButton(this, ID_BUTTON_CREATE_CLASS, _T("Create Class"));
+  //actions StaticBoxSizer
+  wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions"));
+  actionsBox->GetStaticBox()->SetToolTip(wxT("Create classes or edit them for this application, as well as editing the application's CMakeLists.txt file by selecting the desired action."));
+  //actions Panel
+  wxPanel* actionsPanel = new wxPanel(this);
+  //actions Sizer
+  wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
+
+  wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class"));
   createClassbt->SetToolTip(wxT("Create a new Class (.h and .cxx files)."));
-  wxButton* createFolderbt = new wxButton(this, ID_BUTTON_CREATE_FOLDER, _T("Create Folder"));
+  wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder"));
   createFolderbt->SetToolTip(wxT("Create a new Folder inside the application folder."));
-  wxButton* editCMakebt = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file inside this application."));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Application Folder"));
+  openFolderbt->SetToolTip(wxT("Open the application folder in the file explorer."));
 
-  actionsBoxInnerSizer->Add(createClassbt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(createFolderbt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(editCMakebt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
 
-  //Assign sizer
-  actionsBoxInnerSizer->SetSizeHints(this);
+  actionsPanelSizer->Add(createClassbt, 0, wxALL, 5);
+  actionsPanelSizer->Add(createFolderbt, 0, wxALL, 5);
+  actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
+  actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5);
 
+  //SetPanel sizer and box
+  actionsPanel->SetSizer(actionsPanelSizer);
+  actionsPanelSizer->Fit(actionsPanel);
+  actionsBox->Add(actionsPanel, 0, wxALL, 5);
+  sizer->Add(actionsBox, 0, wxEXPAND | wxALL, 10);
+
+  //Assign sizer
   SetSizer(sizer);
   sizer->SetSizeHints(this);
 }
 
+void wxCDMApplicationDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
+{
+  wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
+  newEvent->SetInt(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetId());
+  newEvent->SetId(0);
+  wxPostEvent(this->GetParent(), *newEvent);
+}
+
 void wxCDMApplicationDescriptionPanel::OnBtnCreateClass(wxCommandEvent& event)
 {
   //TODO: implement method
@@ -148,3 +187,10 @@ void wxCDMApplicationDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event
   std::cerr << "Event OnBtnEditCMakeLists not implemented" << std::endl;
   event.Skip();
 }
+
+void wxCDMApplicationDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnOpenFolder not implemented" << std::endl;
+  event.Skip();
+}
index c827fbd719821e490750c051394dd109dc23768f..7611d5b192979e7a383b0ef81ab3a8f2abb3295c 100644 (file)
@@ -73,9 +73,11 @@ private:
 
   //handlers
 protected:
+  void OnBtnReturn(wxCommandEvent& event);
   void OnBtnCreateClass(wxCommandEvent& event);
   void OnBtnCreateFolder(wxCommandEvent& event);
   void OnBtnEditCMakeLists(wxCommandEvent& event);
+  void OnBtnOpenFolder(wxCommandEvent& event);
 
 };
 
index f6301907c46bd75488ef00d026f7671418728722..e7b1379c98e5f02593a3a1d4c8ac527bf1ebf313 100644 (file)
@@ -44,6 +44,7 @@ EVT_BUTTON(ID_BUTTON_PREV, wxCDMLibDescriptionPanel::OnBtnReturn)
 EVT_HYPERLINK(ID_LINK_SELECT_LIBRARY, wxCDMLibDescriptionPanel::OnLnkLibrarySelect)
 EVT_BUTTON(ID_BUTTON_CREATE_LIBRARY, wxCDMLibDescriptionPanel::OnBtnCreateLibrary)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibDescriptionPanel::OnBtnEditCMakeLists)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMLibDescriptionPanel::OnBtnOpenFolder)
 END_EVENT_TABLE()
 
 wxCDMLibDescriptionPanel::wxCDMLibDescriptionPanel(
@@ -95,33 +96,48 @@ void wxCDMLibDescriptionPanel::CreateControls()
   sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(LbIcon64)),0, wxALIGN_CENTER, 0);
 
   //Libraries
-  wxStaticBox* propertiesBox = new wxStaticBox(this, -1, _T("&Available Libraries"));
-  wxStaticBoxSizer* propertiesBoxInnerSizer = new wxStaticBoxSizer(propertiesBox, wxVERTICAL);
+  wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Libraries"));
+  propertiesBox->GetStaticBox()->SetToolTip(wxT("Select any of the available libraries to see its details or the modify them."));
+  wxPanel* propertiesPanel = new wxPanel(this);
+  wxBoxSizer* propertiesPanelSizer = new wxBoxSizer(wxVERTICAL);
 
   std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
   for (int i = 0; i < libraries.size(); i++)
     {
-      wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(this,ID_LINK_SELECT_LIBRARY, crea::std2wx(libraries[i]->GetName().c_str()), crea::std2wx(libraries[i]->GetName().c_str()));
-      propertiesBoxInnerSizer -> Add(pLibrarylk, 0, wxALIGN_LEFT | wxALL, 5);
+      wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(propertiesPanel, ID_LINK_SELECT_LIBRARY, crea::std2wx(libraries[i]->GetName().c_str()), crea::std2wx(libraries[i]->GetName().c_str()));
+      std::string tt = "Name: " + libraries[i]->GetName() + "\n";
+      tt += "Location: " + libraries[i]->GetPath();
+      pLibrarylk->SetToolTip(crea::std2wx(tt.c_str()));
+      propertiesPanelSizer -> Add(pLibrarylk, 0, wxALIGN_LEFT | wxALL, 5);
     }
 
-  sizer -> Add(propertiesBoxInnerSizer, 0, wxEXPAND | wxALL, 10);
+  propertiesPanel->SetSizer(propertiesPanelSizer);
+  propertiesPanelSizer->Fit(propertiesPanel);
+  propertiesBox->Add(propertiesPanel, 0, wxALL, 5);
+  sizer -> Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
 
   //Actions
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
+  wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions"));
+  actionsBox->GetStaticBox()->SetToolTip(wxT("Create a new library or make any change to the lib's CMakeLists.txt file by selecting the desired action."));
+  wxPanel* actionsPanel = new wxPanel(this);
+  wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
 
-  wxButton* createLibrarybt = new wxButton(this, ID_BUTTON_CREATE_LIBRARY, _T("Create Library"));
+  wxButton* createLibrarybt = new wxButton(actionsPanel, ID_BUTTON_CREATE_LIBRARY, _T("Create Library"));
   createLibrarybt->SetToolTip(wxT("Create a new library for this project."));
-  actionsBoxInnerSizer->Add(createLibrarybt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  wxButton* editCMakebt = new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+  actionsPanelSizer->Add(createLibrarybt, 0, wxALL, 5);
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the CMakeLists.txt file."));
-  actionsBoxInnerSizer->Add(editCMakebt, 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
+  actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Libraries Folder"));
+  openFolderbt->SetToolTip(wxT("Open the lib folder in the file explorer."));
+  actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5);
 
-  //Assign sizer
-  actionsBoxInnerSizer->SetSizeHints(this);
+  actionsPanel->SetSizer(actionsPanelSizer);
+  actionsPanelSizer->Fit(actionsPanel);
+  actionsBox->Add(actionsPanel, 0, wxALL, 5);
+  sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
 
+  //Assign sizer
   SetSizer(sizer);
   sizer->SetSizeHints(this);
 }
@@ -193,3 +209,11 @@ void wxCDMLibDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
   newEvent->SetId(0);
   wxPostEvent(this->GetParent(), *newEvent);
 }
+
+void
+wxCDMLibDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnOpenFolder not implemented" << std::endl;
+  event.Skip();
+}
index 039ca73b5b48f67f559839c48d0fa86d202cb07d..b059a5cf441112a85c5b09157bffbbe91649ceff 100644 (file)
@@ -78,6 +78,7 @@ protected:
   void OnBtnEditCMakeLists(wxCommandEvent& event);
   void OnLnkLibrarySelect(wxHyperlinkEvent& event);
   void OnBtnReturn(wxCommandEvent& event);
+  void OnBtnOpenFolder(wxCommandEvent& event);
 
 };
 
index ac47c517a2327bb01d50bb55e41680f257538202..38c67cc91d6d24fe7fc9f38a862ba06884f59dd2 100644 (file)
 
 #include "wxCDMLibraryDescriptionPanel.h"
 
+#include "wxCDMMainFrame.h"
+
 #include "creaDevManagerIds.h"
 #include "images/LIcon64.xpm"
 
 BEGIN_EVENT_TABLE(wxCDMLibraryDescriptionPanel, wxPanel)
+EVT_BUTTON(ID_BUTTON_PREV, wxCDMLibraryDescriptionPanel::OnBtnReturn)
 EVT_BUTTON(ID_BUTTON_CREATE_CLASS, wxCDMLibraryDescriptionPanel::OnBtnCreateClass)
 EVT_BUTTON(ID_BUTTON_CREATE_FOLDER, wxCDMLibraryDescriptionPanel::OnBtnCreateFolder)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibraryDescriptionPanel::OnBtnEditCMakeLists)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMLibraryDescriptionPanel::OnBtnOpenFolder)
 END_EVENT_TABLE()
 
 wxCDMLibraryDescriptionPanel::wxCDMLibraryDescriptionPanel(
@@ -80,7 +84,12 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
 {
   wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
 
-  //Welcome
+  //Link to return
+  wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project"));
+  returnbt->SetToolTip(wxT("Return to the active project description."));
+  sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5);
+
+  //Title
   sizer->Add(new wxStaticText(this, -1, _("Library")),0, wxALIGN_CENTER, 0);
 
   //Image
@@ -90,22 +99,41 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->library->GetNameLibrary())),0, wxALIGN_CENTER, 0);
 
   //Actions
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 1, wxEXPAND | wxALL, 20);
-
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_CREATE_CLASS, _T("Create Class")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_CREATE_FOLDER, _T("Create Folder")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")), 0, wxEXPAND | wxRIGHT | wxLEFT, 20);
-
+  wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions"));
+  wxPanel* actionsPanel = new wxPanel(this);
+  wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
+
+  wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class"));
+  createClassbt->SetToolTip(wxT("Create a new class for this library."));
+  actionsPanelSizer->Add(createClassbt, 0, wxALL, 5);
+  wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder"));
+  createFolderbt->SetToolTip(wxT("Create a new folder for this library."));
+  actionsPanelSizer->Add(createFolderbt, 0, wxALL, 5);
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+  editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt of this library in the default text editor."));
+  actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Library Folder"));
+  openFolderbt->SetToolTip(wxT("Open the library folder in the file explorer."));
+  actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5);
+
+  actionsPanel->SetSizer(actionsPanelSizer);
+  actionsPanelSizer->Fit(actionsPanel);
+  actionsBox->Add(actionsPanel, 1, wxEXPAND);
+  sizer -> Add(actionsBox, 0, wxALL | wxEXPAND, 10);
 
   //Assign sizer
-  actionsBoxInnerSizer->SetSizeHints(this);
-
   SetSizer(sizer);
   sizer->SetSizeHints(this);
 }
 
+void wxCDMLibraryDescriptionPanel::OnBtnReturn(wxCommandEvent& event)
+{
+  wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
+  newEvent->SetInt(((wxCDMMainFrame*)this->GetParent())->GetModel()->GetProject()->GetId());
+  newEvent->SetId(0);
+  wxPostEvent(this->GetParent(), *newEvent);
+}
+
 void wxCDMLibraryDescriptionPanel::OnBtnCreateClass(wxCommandEvent& event)
 {
   //TODO: implement method
@@ -126,3 +154,11 @@ void wxCDMLibraryDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
   std::cerr << "Event OnBtnEditCMakeLists not implemented" << std::endl;
   event.Skip();
 }
+
+void
+wxCDMLibraryDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnOpenFolder not implemented" << std::endl;
+  event.Skip();
+}
index 1b45877c739f08c955da25a88055cac2e00ae69c..8ae6abd3e234550010f47d34ef491190275b5938 100644 (file)
@@ -73,9 +73,11 @@ private:
 
   //handlers
 protected:
+  void OnBtnReturn(wxCommandEvent& event);
   void OnBtnCreateClass(wxCommandEvent& event);
   void OnBtnCreateFolder(wxCommandEvent& event);
   void OnBtnEditCMakeLists(wxCommandEvent& event);
+  void OnBtnOpenFolder(wxCommandEvent& event);
 
 };
 
index 63b45c562f50bb0337e151c145c0c85c7863d585..bb2c3eb0f69ee6f41b9d98e9b4448633530b1643 100644 (file)
@@ -87,12 +87,22 @@ void wxCDMMainDescriptionPanel::CreateControls()
   sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0);
 
   //Actions
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 2, wxEXPAND | wxALL, 20);
-
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_NEWPROJECT, _T("New Project")), 0, wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPENPROJECT, _T("Open Project")), 0, wxRIGHT | wxLEFT, 20);
+  wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions"));
+  actionsBox->GetStaticBox()->SetToolTip(wxT("Create a new crea project or open an existing one selection any of the available actions."));
+  wxPanel* actionsPanel = new wxPanel(this);
+  wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
+
+  wxButton* newProjectbt = new wxButton(actionsPanel, ID_BUTTON_NEWPROJECT, _T("New Project"));
+  newProjectbt->SetToolTip(wxT("Create a new crea project"));
+  actionsPanelSizer->Add(newProjectbt, 0, wxRIGHT | wxLEFT, 20);
+  wxButton* openProjectbt = new wxButton(actionsPanel, ID_BUTTON_OPENPROJECT, _T("Open Project"));
+  openProjectbt->SetToolTip(wxT("Open an existing crea project"));
+  actionsPanelSizer->Add(openProjectbt, 0, wxRIGHT | wxLEFT, 20);
+
+  actionsPanel->SetSizer(actionsPanelSizer);
+  actionsPanelSizer->Fit(actionsPanel);
+  actionsBox->Add(actionsPanel, 0, wxALIGN_CENTER | wxALL, 10);
+  sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 20);
 
   //Asign sizer
   sizer->SetSizeHints(this);
@@ -101,13 +111,11 @@ void wxCDMMainDescriptionPanel::CreateControls()
 
 void wxCDMMainDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
 {
-  event.ResumePropagation(1);
   event.Skip();
 }
 
 void wxCDMMainDescriptionPanel::OnBtnOpenProject(wxCommandEvent& event)
 {
-  event.ResumePropagation(1);
   event.Skip();
 }
 
index 1785342da270b2599f7663822a2c27c36bd88415..7c2bf5aab6e418596b447b2172133b183ecd6f44 100755 (executable)
@@ -279,6 +279,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
         {
           auiManager.DetachPane(this->panel_Properties);
           this->panel_Properties->Destroy();
+          this->panel_Properties = NULL;
         }
 
       this->panel_Properties = new wxCDMProjectDescriptionPanel(
@@ -294,6 +295,7 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
         {
           auiManager.DetachPane(this->panel_Properties);
           this->panel_ProjectActions->Destroy();
+          this->panel_ProjectActions = NULL;
         }
 
       panel_ProjectActions = new wxCDMProjectActionsPanel(
@@ -366,6 +368,7 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
         {
           auiManager.DetachPane(this->panel_Properties);
           this->panel_Properties->Destroy();
+          this->panel_Properties = NULL;
         }
 
       this->panel_Properties = new wxCDMProjectDescriptionPanel(
@@ -383,6 +386,7 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
         {
           auiManager.DetachPane(this->panel_ProjectActions);
           this->panel_ProjectActions->Destroy();
+          this->panel_ProjectActions = NULL;
         }
       panel_ProjectActions = new wxCDMProjectActionsPanel(
           this,
@@ -424,11 +428,13 @@ void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
     {
       auiManager.DetachPane(this->panel_Properties);
       this->panel_Properties->Destroy();
+      this->panel_Properties = NULL;
     }
   if(this->panel_ProjectActions != NULL)
     {
       auiManager.DetachPane(this->panel_ProjectActions);
       this->panel_ProjectActions->Destroy();
+      this->panel_ProjectActions = NULL;
     }
 
   this->panel_Properties = new wxCDMMainDescriptionPanel(
@@ -460,11 +466,13 @@ void wxCDMMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event)
     {
       auiManager.DetachPane(this->panel_Properties);
       this->panel_Properties->Destroy();
+      this->panel_Properties = NULL;
     }
   if(this->panel_ProjectActions != NULL)
     {
       auiManager.DetachPane(this->panel_ProjectActions);
       this->panel_ProjectActions->Destroy();
+      this->panel_ProjectActions = NULL;
     }
 
   this->panel_Properties = new wxCDMMainDescriptionPanel(
@@ -490,7 +498,7 @@ void wxCDMMainFrame::OnMenuExit(wxCommandEvent& event)
 {
   std::cout << "Closing CreaDevManager..." << std::endl;
   std::string* result;
-  if(!this->model->CloseProject(result))
+  if(this->model->GetProject() != NULL && !this->model->CloseProject(result))
     {
       std::cout << "error closing project: " << *result << std::endl;
       wxMessageBox( crea::std2wx(result->c_str()), wxT("Close Project - Error"), wxICON_ERROR);
@@ -501,21 +509,16 @@ void wxCDMMainFrame::OnMenuExit(wxCommandEvent& event)
     {
       auiManager.DetachPane(this->panel_Properties);
       this->panel_Properties->Destroy();
+      this->panel_Properties = NULL;
     }
+
   if(this->panel_ProjectActions != NULL)
     {
       auiManager.DetachPane(this->panel_ProjectActions);
       this->panel_ProjectActions->Destroy();
+      this->panel_ProjectActions = NULL;
     }
 
-  this->panel_Properties = new wxCDMMainDescriptionPanel(
-      this,
-      ID_WINDOW_PROPERTIES,
-      wxT("Description Panel"),
-      wxDefaultPosition,
-      wxSize(600, 400),
-      0
-  );
   Close();
   event.Skip();
 }
@@ -615,14 +618,6 @@ void wxCDMMainFrame::OnMenuAboutCreatis(wxCommandEvent& event)
 
 void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
 {
-  std::cout << "New Tree Selection" << std::endl;
-
-  if(event.GetId() != 0)
-    {
-      event.Skip();
-    }
-
-
   //get selected element
   wxTreeItemId elementId = event.GetItem();
 
@@ -834,8 +829,9 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
   //delete old view
   if(this->panel_Properties!= NULL)
     {
-      this->panel_Properties->Destroy();
       auiManager.DetachPane(this->panel_Properties);
+      this->panel_Properties->Destroy();
+      this->panel_Properties = NULL;
     }
   //set new view
 
@@ -849,18 +845,17 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
 
 void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event)
 {
-  std::cout << "inMainFrame id: " << event.GetId() << ", tree element: "<< event.GetInt() << std::endl;
   switch(event.GetId() != 0)
   {
   case 0:
     //select out old one to generate selection event
-    this->tree_Projects->SelectItem(event.GetInt(), false);
     this->tree_Projects->SelectItem(event.GetInt(), true);
     break;
   case 1:
     wxPanel* description = NULL;
     if(event.GetString() == wxT("manage_packages"))
       {
+        this->tree_Projects->SelectItem(this->model->GetProject()->GetId(), false);
         description = new wxCDMPackageManagerPanel(
             this,
             this->model->GetProject(),
@@ -873,13 +868,11 @@ void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event)
       }
     else if(event.GetString() == wxT("manage_libraries"))
       {
-        this->tree_Projects->SelectItem(this->model->GetProject()->GetLib()->GetId(), false);
         this->tree_Projects->SelectItem(this->model->GetProject()->GetLib()->GetId(), true);
         break;
       }
     else if(event.GetString() == wxT("manage_applications"))
       {
-        this->tree_Projects->SelectItem(this->model->GetProject()->GetAppli()->GetId(), false);
         this->tree_Projects->SelectItem(this->model->GetProject()->GetAppli()->GetId(), true);
         break;
       }
@@ -893,8 +886,9 @@ void wxCDMMainFrame::OnCreationComplete(wxCommandEvent& event)
     //delete old view
     if(this->panel_Properties!= NULL)
       {
-        this->panel_Properties->Destroy();
         auiManager.DetachPane(this->panel_Properties);
+        this->panel_Properties->Destroy();
+        this->panel_Properties = NULL;
       }
     //set new view
 
index e293f8b625bb775864e82bf788dd5efca2f0fa20..ecd4e894b9ed75029418effb088dc6d31e176515 100644 (file)
@@ -45,7 +45,9 @@ EVT_BUTTON(ID_BUTTON_GOTO_PACKAGE_MANAGER, wxCDMProjectDescriptionPanel::OnBtnMa
 EVT_BUTTON(ID_BUTTON_GOTO_LIB_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageLibraries)
 EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageApplications)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
-
+EVT_BUTTON(ID_BUTTON_SET_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnSetBuildPath)
+EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMProjectDescriptionPanel::OnBtnOpenFolder)
+EVT_BUTTON(ID_BUTTON_SET_VERSION, wxCDMProjectDescriptionPanel::OnBtnSetVersion)
 END_EVENT_TABLE()
 
 wxCDMProjectDescriptionPanel::wxCDMProjectDescriptionPanel(
@@ -120,8 +122,13 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   // versionDate
   wxStaticText* pVersionDatetc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetVersionDate()));
   // sourceLocation
+  wxBoxSizer* pSourceLocationsz = new wxBoxSizer(wxHORIZONTAL);
   wxStaticText* pSourceLocationtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetPath()));
   pSourceLocationtc->SetMaxSize(wxSize(350,-1));
+  wxButton* pSourceLocationbt = new wxButton(propertiesPanel, ID_BUTTON_OPEN_FOLDER, wxT("Open"));
+  pSourceLocationbt->SetToolTip(wxT("Open the source folder in the file explorer."));
+  pSourceLocationsz->Add(pSourceLocationtc, 0, wxALIGN_CENTER, 0);
+  pSourceLocationsz->Add(pSourceLocationbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
   // buildLocation
   wxBoxSizer* pBuildLocationsz = new wxBoxSizer(wxHORIZONTAL);
   wxStaticText* pBuildLocationtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetBuildPath()));
@@ -136,7 +143,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   propertiesGridSizer->Add(pVersionDate, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   propertiesGridSizer->Add(pVersionDatetc, 1, wxEXPAND);
   propertiesGridSizer->Add(pSourceLocation, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  propertiesGridSizer->Add(pSourceLocationtc, 1, wxEXPAND);
+  propertiesGridSizer->Add(pSourceLocationsz, 1, wxEXPAND);
   propertiesGridSizer->Add(pBuildLocation, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   propertiesGridSizer->Add(pBuildLocationsz, 1, wxEXPAND);
 
@@ -147,12 +154,13 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   //SetPanel sizer and box
   propertiesPanel->SetSizer(propertiesPanelSizer);
   propertiesPanelSizer->Fit(propertiesPanel);
-  propertiesBox->Add(propertiesPanel, 1, wxEXPAND);
+  propertiesBox->Add(propertiesPanel, 0, wxEXPAND);
   sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
 
   //----------------------------------Project Actions--------------------------------------
   //actions StaticBoxSizer
   wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL,this, _T("&Actions"));
+  actionsBox->GetStaticBox()->SetToolTip(wxT("Go to any of the content managers of the project or edit the project's CMakeLists.txt file by selecting any of the available actions."));
   //actions Panel
   wxPanel* actionsPanel = new wxPanel(this);
   //actions Sizer
@@ -186,7 +194,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   //SetPanel sizer and box
   actionsPanel->SetSizer(actionsPanelSizer);
   actionsPanelSizer->Fit(actionsPanel);
-  actionsBox->Add(actionsPanel, 1, wxEXPAND);
+  actionsBox->Add(actionsPanel, 0, wxALL, 5);
   sizer->Add(actionsBox, 0, wxEXPAND | wxALL, 10);
 
 
@@ -195,84 +203,6 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   sizer->SetSizeHints(this);
 }
 
-
-void wxCDMProjectDescriptionPanel::OnBtnCreateLibrary(wxCommandEvent& event)
-{
-  //get name
-  wxString libraryName = wxGetTextFromUser(
-      _T("Enter the new library name"),
-      _T("New Library - creaDevManager"),
-      _T("")
-  );
-  //check name
-  if(libraryName.Len() > 0)
-    {
-      std::string* result;
-      //create library
-      modelCDMIProjectTreeNode* library = this->project->CreateLibrary(crea::wx2std(libraryName),result);
-      //check library created
-      if(library == NULL)
-        {
-          wxMessageBox(crea::std2wx(*result),_T("New Library - Error!"),wxOK | wxICON_ERROR);
-          event.Skip();
-          return;
-        }
-      wxMessageBox(crea::std2wx("Library successfully created."),_T("New Library - Success!"),wxOK | wxICON_INFORMATION);
-
-      //refreshing tree and description
-      //send event instead of calling parent to avoid crashing
-
-      ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
-
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
-      newEvent->SetInt(library->GetId());
-      wxPostEvent(this->GetParent(), *newEvent);
-      event.Skip();
-    }
-}
-
-void wxCDMProjectDescriptionPanel::OnBtnCreateApplication(wxCommandEvent& event)
-{
-  //get name
-  wxString applicationName = wxGetTextFromUser(
-      _T("Enter the new application name"),
-      _T("New Application - creaDevManager"),
-      _T("")
-  );
-  //check name
-  if(applicationName.Len() > 0)
-    {
-      std::string* result;
-      //create library
-      modelCDMIProjectTreeNode* application = this->project->CreateApplication(crea::wx2std(applicationName),result);
-      //check library created
-      if(application == NULL)
-        {
-          wxMessageBox(crea::std2wx(*result),_T("New Application - Error!"),wxOK | wxICON_ERROR);
-          event.Skip();
-          return;
-        }
-      wxMessageBox(crea::std2wx("Application successfully created."),_T("New Application - Success!"),wxOK | wxICON_INFORMATION);
-
-      //refreshing tree and description
-      //send event instead of calling parent to avoid crashing
-
-      ((wxCDMMainFrame*)this->GetParent())->RefreshProject();
-
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED);
-      newEvent->SetInt(application->GetId());
-      wxPostEvent(this->GetParent(), *newEvent);
-      event.Skip();
-    }
-}
-
-void wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
-{
-  //TODO: implement method
-  std::cerr << "Event OnBtnEditCMakeLists not implemented" << std::endl;
-  event.Skip();
-}
-
 void
 wxCDMProjectDescriptionPanel::OnBtnManagePackages(wxCommandEvent& event)
 {
@@ -303,3 +233,34 @@ wxCDMProjectDescriptionPanel::OnBtnManageApplications(wxCommandEvent& event)
   wxPostEvent(this->GetParent(), *newEvent);
   event.Skip();
 }
+
+void wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnEditCMakeLists not implemented" << std::endl;
+  event.Skip();
+}
+
+void
+wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnSetBuildPath not implemented" << std::endl;
+  event.Skip();
+}
+
+void
+wxCDMProjectDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnOpenFolder not implemented" << std::endl;
+  event.Skip();
+}
+
+void
+wxCDMProjectDescriptionPanel::OnBtnSetVersion(wxCommandEvent& event)
+{
+  //TODO: implement method
+  std::cerr << "Event OnBtnSetVersion not implemented" << std::endl;
+  event.Skip();
+}
index 1b2c63bece54de3209a8f01a5c02c3884e4f1015..0c347d8ebd3c1fd00db1db04728427c158ee1dcf 100644 (file)
@@ -74,13 +74,13 @@ private:
 
   //handlers
 protected:
-  void OnBtnCreateLibrary(wxCommandEvent& event);
-  void OnBtnCreateApplication(wxCommandEvent& event);
-  void OnBtnEditCMakeLists(wxCommandEvent& event);
-
   void OnBtnManagePackages(wxCommandEvent& event);
   void OnBtnManageLibraries(wxCommandEvent& event);
   void OnBtnManageApplications(wxCommandEvent& event);
+  void OnBtnEditCMakeLists(wxCommandEvent& event);
+  void OnBtnSetBuildPath(wxCommandEvent& event);
+  void OnBtnOpenFolder(wxCommandEvent& event);
+  void OnBtnSetVersion(wxCommandEvent& event);
 };
 
 #endif /* WXCDMPROJECTDESCRIPTIONPANEL_H_ */