]> Creatis software - crea.git/commitdiff
Feature #1711 CreaDevManager application implementation
authorDaniel Gonzalez <daniel@daniel.laptop>
Sat, 6 Apr 2013 13:01:51 +0000 (15:01 +0200)
committerDaniel Gonzalez <daniel@daniel.laptop>
Sat, 6 Apr 2013 13:01:51 +0000 (15:01 +0200)
Fix: Scrollbars included for all description panels
Feature: Show included libraries (3rd Party and custom) and checkboxes to include them in: Packages. Just shows a test library that doesn't really exist.

30 files changed:
lib/creaDevManagerLib/modelCDMPackage.cpp
lib/creaDevManagerLib/modelCDMPackage.h
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.h
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.h
lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.h
lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.h
lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMFileDescriptionPanel.h
lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.h
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.h
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.h
lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMMainDescriptionPanel.h
lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.h [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.h
lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp
lib/creaDevManagerLib/wxCDMPackageManagerPanel.h
lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp
lib/creaDevManagerLib/wxCDMProjectActionsPanel.h
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h

index 66c5e22fdac803ba73e4cc655fe2a3e87cae16ec..43d169abb13bfbbefb5b209424cc84f268447959 100644 (file)
@@ -689,3 +689,29 @@ void modelCDMPackage::CheckStructure(std::map<std::string, bool>& properties)
 
     }
 }
+
+std::map<std::string, bool> modelCDMPackage::Get3rdPartyLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMPackage::Set3rdPartyLibrary(const std::string& library_name,
+    const bool& toInclude)
+{
+  return false;
+}
+
+std::map<std::string, bool> modelCDMPackage::GetCustomLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMPackage::SetCustomLibrary(const std::string& library_name,
+    const bool& toInclude)
+{
+  return false;
+}
index 05e24739014b69c8752d840ec9e57bb4a9b8b63d..198e68bafb44e148097783444fba3af93452ae25 100644 (file)
@@ -161,6 +161,30 @@ public:
    */
   void CheckStructure(std::map<std::string, bool>& properties);
 
+  /**
+   * Checks the package's CMakeLists file to check which third party libraries are enabled.
+   * @return A map with the name of the library and if it's included in the CMakeLists file.
+   */
+  std::map<std::string, bool> Get3rdPartyLibraries();
+
+  /**
+   * Sets the 3rd party library inclusion in the CMakeLists file.
+   * @return if the operation was successful.
+   */
+  bool Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude);
+
+  /**
+   * Checks the package CMakeLists file to check which custom libraries are enabled.
+   * @return A map with the name of the library and if it's included in the CMakeLists file.
+   */
+  std::map<std::string, bool> GetCustomLibraries();
+
+  /**
+   * Sets the custom library inclusion in the CMakeLists file.
+   * @return if the operation was successful.
+   */
+  bool SetCustomLibrary(const std::string& library_name, const bool& toInclude);
+
 private:
   /**
    * Package name.
index 00488bafd21ff7a3383e2e0019179352a48f59cf..710d1eefdc1bc344fcd192bcb89a75d7095ec16b 100644 (file)
@@ -80,6 +80,11 @@ bool wxCDMAppliDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->appli = appli;
   CreateControls();
   return TRUE;
@@ -177,12 +182,12 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("A. Create Application"));
   createApplicationbt->SetToolTip(wxT("Create a new application for this project."));
   actionsGridSizer->Add(createApplicationbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
+  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."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseExit,NULL,this);
   actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Applications Folder"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Applications Folder"));
   openFolderbt->SetToolTip(wxT("Open the appli folder in the file explorer."));
   actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
 
index 99c8f59944c4b2c0967a2ae6442717f137d97111..a12c31f459521906559fb430e1657c70caf4d5fe 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMAPPLIDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMAppli.h"
@@ -44,7 +43,7 @@
 /**
  * Application manager description panel. Shows the available applications in the project and the actions corresponding to application management.
  */
-class wxCDMAppliDescriptionPanel : public wxPanel
+class wxCDMAppliDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index e37085611a6f569e8cfaf1fd20e211cde3d7446b..45d7b7e242b6dae341e612f0281e2bad122a181a 100644 (file)
@@ -82,6 +82,11 @@ bool wxCDMApplicationDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->application = application;
   CreateControls();
   return TRUE;
@@ -266,19 +271,19 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
   //actionsGrid Sizer
   wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(3, 2, 9, 15);
 
-  wxButton* createClassbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_CLASS, _T("Create Class (Optional)"));
+  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(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder (Optional)"));
+  wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder"));
   createFolderbt->SetToolTip(wxT("Create a new Folder inside the application folder."));
   wxButton* openMainbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_CXX, _T("A. Open Main File"));
   openMainbt->SetToolTip(wxT("Open the main file in the application folder with the default code editor."));
   openMainbt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnMainMouseEnter,NULL,this);
   openMainbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnMainMouseExit,NULL,this);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("C. 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."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMApplicationDescriptionPanel::OnCMakeMouseExit,NULL,this);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("B. Open Application Folder"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Application Folder"));
   openFolderbt->SetToolTip(wxT("Open the application folder in the file explorer."));
 
 
index 027db4f50020680e48b9b71a2b9ccc1641ada75b..d3117f8d0d34ac4bf96cc57a5473f28b0bcdf287 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMAPPLICATIONDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMApplication.h"
@@ -44,7 +43,7 @@
 /**
  * Application description panel. Shows the properties and actions available for the described application.
  */
-class wxCDMApplicationDescriptionPanel : public wxPanel
+class wxCDMApplicationDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 959d27a4adab7a256faa41b838771dd35ecfdeff..c562ef74054392b4e6c70c6b3ca60baa5057d228 100644 (file)
@@ -79,6 +79,11 @@ bool wxCDMBlackBoxDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->blackBox = blackBox;
   CreateControls();
   return TRUE;
@@ -186,7 +191,7 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls()
   openCxxbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMBlackBoxDescriptionPanel::OnCxxMouseExit,NULL,this);
   openCxxbt->SetToolTip(wxT("Open the .cxx file in the default text editor."));
   actionsGridSizer->Add(openCxxbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Source Folder"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Source Folder"));
   openFolderbt->SetToolTip(wxT("Open the source folder in the file explorer."));
   actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
 
index 94d3071a422d9f7271d69e4a151618c57be6b1c5..fb0291ba24a1ab535c6b5920d9e5755775004cd0 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMBLACKBOXDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMBlackBox.h"
@@ -44,7 +43,7 @@
 /**
  * Black box description panel. Shows the properties and available actions for the described black box.
  */
-class wxCDMBlackBoxDescriptionPanel : public wxPanel
+class wxCDMBlackBoxDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 07316246549510d940cad80819d97879080a7398..40c2c336d65d0c0dbbe0576274bb88d61f0e6610 100644 (file)
@@ -73,6 +73,9 @@ bool wxCDMCMakeListsDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
   this->cMakeLists = makefile;
   CreateControls();
   return TRUE;
index ac6f73ffd7c8217423610de3f221b895a934e0a4..e2ca8426dbd19de847ca558c0febc34542bc348a 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMCMAKELISTSDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMCMakeListsFile.h"
@@ -44,7 +43,7 @@
 /**
  * CMakeLists File description panel. Shows the file properties and the available actions for it.
  */
-class wxCDMCMakeListsDescriptionPanel : public wxPanel
+class wxCDMCMakeListsDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index fac03fa10c5474b077157443b2266f9b7a85dd33..81768a97aaaded19ee78ee99074362f539c84998 100644 (file)
@@ -75,6 +75,10 @@ bool wxCDMFileDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->file = file;
   CreateControls();
   return TRUE;
@@ -124,16 +128,16 @@ void wxCDMFileDescriptionPanel::CreateControls()
   wxStaticText *pLength = new wxStaticText(propertiesPanel, -1, wxT("File Size"));
 
   wxStaticText* pLocationtc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->file->GetPath()));
-  pLocationtc->SetMaxSize(wxSize(350,-1));
+  pLocationtc->SetMaxSize(wxSize(300,-1));
   int lgth = this->file->GetLength();
   std::stringstream ss;
   ss << lgth / 1024;
   std::string lgths = ss.str() + " KB";
   wxStaticText* pLengthtc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(lgths));
 
-  propertiesGridSizer->Add(pLocation, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  propertiesGridSizer->Add(pLocation, 0, wxALIGN_RIGHT | wxALIGN_TOP);
   propertiesGridSizer->Add(pLocationtc, 1, wxEXPAND);
-  propertiesGridSizer->Add(pLength, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  propertiesGridSizer->Add(pLength, 0, wxALIGN_RIGHT | wxALIGN_TOP);
   propertiesGridSizer->Add(pLengthtc, 1, wxEXPAND);
 
   propertiesGridSizer->AddGrowableCol(1,1);
index 09cc1048f211391a72d0c9ac58c6549ffbed689c..8eee2eeeb8419877620a430b6bca8194e69a3cd7 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMFILEDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMFile.h"
@@ -44,7 +43,7 @@
 /**
  * File description panel. Shows the File properties and the available options for it.
  */
-class wxCDMFileDescriptionPanel : public wxPanel
+class wxCDMFileDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 7acc023142a9a9f95da5fc01ebf7f7e53b08fb4b..7f95533059e6dc0f3d4d49cb191b552851b85d8d 100644 (file)
@@ -76,6 +76,10 @@ bool wxCDMFolderDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->folder = folder;
   CreateControls();
   return TRUE;
index fafe66ed5cfd2985b3d25900cfa8a1369d7511b9..f06f0ce692052f62c118e5f38f078339e69ef02e 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMFOLDERDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMFolder.h"
@@ -44,7 +43,7 @@
 /**
  * Folder description panel. Shows the properties of the referenced folder and the available actions.
  */
-class wxCDMFolderDescriptionPanel : public wxPanel
+class wxCDMFolderDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index cc635285c15fa9d6b082e7e862a7b06abc5f8b31..039c45a37cfd78b55f68bf8ebb9ec2b964a87b4c 100644 (file)
@@ -78,6 +78,10 @@ bool wxCDMLibDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->lib = lib;
   CreateControls();
   return TRUE;
@@ -175,12 +179,12 @@ void wxCDMLibDescriptionPanel::CreateControls()
   wxButton* createLibrarybt = new wxButton(actionsPanel, ID_BUTTON_CREATE_LIBRARY, _T("A. Create Library"));
   createLibrarybt->SetToolTip(wxT("Create a new library for this project."));
   actionsGridSizer->Add(createLibrarybt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
+  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 Lib's CMakeLists.txt file."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibDescriptionPanel::OnCMakeMouseExit,NULL,this);
   actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Libraries Folder"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Libraries Folder"));
   openFolderbt->SetToolTip(wxT("Open the lib folder in the file explorer."));
   actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
 
index 630c7b402291c33c28cec307ba8acc9ae7479912..15c9ec49e9a1dbb9c97450f22f5aac7ec2b2b2ac 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMLIBDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMLib.h"
@@ -44,7 +43,7 @@
 /**
  * Library manager description panel. Shows the available libraries in the project and the actions corresponding to library management.
  */
-class wxCDMLibDescriptionPanel : public wxPanel
+class wxCDMLibDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 1b78ba04b61b341af921019dddaa0e9024fd2cf1..47efd9c86b95d9621c90dfac33db844034532333 100644 (file)
@@ -81,6 +81,10 @@ bool wxCDMLibraryDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->library = library;
   CreateControls();
   return TRUE;
@@ -271,12 +275,12 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("B. Open Library Folder"));
   openFolderbt->SetToolTip(wxT("Open the library folder in the file explorer."));
   actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("C. Edit CMakeLists File"));
+  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."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMLibraryDescriptionPanel::OnCMakeMouseExit,NULL,this);
   actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
-  wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder (Optional)"));
+  wxButton* createFolderbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_FOLDER, _T("Create Folder"));
   createFolderbt->SetToolTip(wxT("Create a new folder for this library."));
   actionsGridSizer->Add(createFolderbt, 1, wxALL | wxEXPAND, 5);
 
index cf05cd9e2817537fa6625da192fad9b6e48fde50..0fcc262c49f79c4d75a7e9af4e4e8d2bdac32497 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMLIBRARYDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMLibrary.h"
@@ -44,7 +43,7 @@
 /**
  * Library description panel. Shows the available actions on the described library.
  */
-class wxCDMLibraryDescriptionPanel : public wxPanel
+class wxCDMLibraryDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index d7f10aed26ef61fd6f3bebf402ecca8a7744247c..41daf68640a7484c386aba72f6255635b0e75b87 100644 (file)
@@ -74,6 +74,10 @@ bool wxCDMMainDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  //to scroll
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   CreateControls();
   return TRUE;
 }
index fb0defaa7b1fac0d60af5fc83bfa4187e02a8616..08490f77a45c4141a4ead2cec04ad1159445ad1d 100644 (file)
 #define WXCDMMAINDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 /**
  * Main View description panel. Shows the welcome message and allows to open or create Crea projects.
  */
-class wxCDMMainDescriptionPanel : public wxPanel
+class wxCDMMainDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 
diff --git a/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp b/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp
new file mode 100644 (file)
index 0000000..af407bf
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ 
+ */
+
+
+/*
+ * wxCDMPackageConfigurationDialog.cpp
+ *
+ *  Created on: 6/4/2013
+ *      Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMPackageConfigurationDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMPackageConfigurationDialog, wxDialog)
+EVT_BUTTON(wxID_OK, wxCDMPackageConfigurationDialog::OnFinish)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_3RDLIBRARY, wxCDMPackageConfigurationDialog::On3rdLibraryIncludeChange)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_LIBRARY, wxCDMPackageConfigurationDialog::OnCustomLibraryIncludeChange)
+END_EVENT_TABLE()
+
+wxCDMPackageConfigurationDialog::wxCDMPackageConfigurationDialog(
+    wxWindow* parent,
+    modelCDMPackage* package,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& position,
+    const wxSize& size,
+    long style
+)
+{
+  wxCDMPackageConfigurationDialog::Create(parent, id, caption, position, size, style);
+  this->package = package;
+}
+
+wxCDMPackageConfigurationDialog::~wxCDMPackageConfigurationDialog()
+{
+}
+
+bool wxCDMPackageConfigurationDialog::Create(
+    wxWindow* parent,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& position,
+    const wxSize& size,
+    long int style
+)
+{
+  wxDialog::Create(parent, id, caption, position, size, style);
+
+  this->CreateControls();
+
+  return TRUE;
+}
+
+void wxCDMPackageConfigurationDialog::CreateControls()
+{
+
+  wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+  wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Please select the libraries that are used in this package."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+  v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL, 5);
+
+  wxBoxSizer* includesPanelSizer = new wxBoxSizer(wxVERTICAL);
+
+    //Third Party Libraries
+    wxStaticText* Title1 = new wxStaticText(this, wxID_ANY, wxT("Third Party Libraries:"));
+    wxFont font = Title1->GetFont();
+    font.SetWeight(wxFONTWEIGHT_BOLD);
+    Title1->SetFont(font);
+    includesPanelSizer->Add(Title1, 0, wxEXPAND | wxALL, 5);
+
+    //inclusion data
+    std::map<std::string, bool> inclusions = this->package->Get3rdPartyLibraries();
+    //includesGrid Sizer
+    wxFlexGridSizer* includesGridSizer = new wxFlexGridSizer(inclusions.size()+1, 2, 0, 5);
+
+    wxStaticText* ChBTitle = new wxStaticText(
+        this,
+        wxID_ANY,
+        wxT("Included"),
+        wxDefaultPosition,
+        wxDefaultSize,
+        wxALIGN_CENTER
+      );
+    wxStaticText* LNmTitle = new wxStaticText(
+        this,
+        wxID_ANY,
+        wxT("Library Name"),
+        wxDefaultPosition,
+        wxDefaultSize,
+        wxALIGN_LEFT
+      );
+
+    includesGridSizer->Add(ChBTitle, 1, wxEXPAND);
+    includesGridSizer->Add(LNmTitle, 1, wxEXPAND);
+
+    for (std::map<std::string, bool>::iterator it = inclusions.begin(); it != inclusions.end(); ++it) {
+      wxCheckBox* ChBIncl = new wxCheckBox(
+          this, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
+        );
+      ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library."));
+      ChBIncl->SetName(crea::std2wx(it->first));
+      ChBIncl->SetValue(it->second);
+      includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
+
+      wxStaticText* LNmIncl = new wxStaticText(this, wxID_ANY, crea::std2wx(it->first));
+      includesGridSizer->Add(LNmIncl, 1, wxEXPAND);
+    }
+
+    includesGridSizer->AddGrowableCol(1,1);
+
+    includesPanelSizer->Add(includesGridSizer, 1, wxEXPAND, 0);
+
+    //Custom Libraries
+    wxStaticText* Title2 = new wxStaticText(this, wxID_ANY, wxT("Custom Libraries:"));
+    font = Title2->GetFont();
+    font.SetWeight(wxFONTWEIGHT_BOLD);
+    Title2->SetFont(font);
+    includesPanelSizer->Add(Title2, 0, wxEXPAND | wxALL, 5);
+
+    //inclusion data
+    std::map<std::string, bool> inclusionsLibs = this->package->GetCustomLibraries();
+    //includesGrid Sizer
+    wxFlexGridSizer* includesLibGridSizer = new wxFlexGridSizer(inclusionsLibs.size()+1, 2, 0, 5);
+
+    wxStaticText* ChBTitle1 = new wxStaticText(
+        this,
+        wxID_ANY,
+        wxT("Included"),
+        wxDefaultPosition,
+        wxDefaultSize,
+        wxALIGN_CENTER
+      );
+    wxStaticText* LNmTitle1 = new wxStaticText(
+        this,
+        wxID_ANY,
+        wxT("Library Name"),
+        wxDefaultPosition,
+        wxDefaultSize,
+        wxALIGN_LEFT
+      );
+
+    includesLibGridSizer->Add(ChBTitle1, 1, wxEXPAND);
+    includesLibGridSizer->Add(LNmTitle1, 1, wxEXPAND);
+
+    for (std::map<std::string, bool>::iterator it = inclusionsLibs.begin(); it != inclusionsLibs.end(); ++it) {
+      wxCheckBox* ChBIncl = new wxCheckBox(
+          this, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
+        );
+      ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library."));
+      ChBIncl->SetName(crea::std2wx(it->first));
+      ChBIncl->SetValue(it->second);
+      includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
+
+      wxStaticText* LNmIncl = new wxStaticText(this, wxID_ANY, crea::std2wx(it->first));
+      includesLibGridSizer->Add(LNmIncl, 1, wxEXPAND);
+    }
+
+    includesLibGridSizer->AddGrowableCol(1,1);
+
+    includesPanelSizer->Add(includesLibGridSizer, 1, wxEXPAND, 0);
+
+    v_sizer1->Add(includesPanelSizer, 1, wxEXPAND);
+
+  v_sizer1->Add(new wxButton(this, wxID_OK, wxT("Close")), 0, wxALIGN_CENTER | wxRIGHT | wxBOTTOM, 30);
+
+  SetSizer(v_sizer1);
+}
+
+void wxCDMPackageConfigurationDialog::OnFinish(wxCommandEvent& event)
+{
+  this->EndModal(wxID_OK);
+}
+
+void wxCDMPackageConfigurationDialog::On3rdLibraryIncludeChange(
+    wxCommandEvent& event)
+{
+  this->package->Set3rdPartyLibrary(
+    crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()),
+    ((wxCheckBox*)event.GetEventObject())->GetValue()
+  );
+}
+
+void wxCDMPackageConfigurationDialog::OnCustomLibraryIncludeChange(
+    wxCommandEvent& event)
+{
+  this->package->SetCustomLibrary(
+    crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()),
+    ((wxCheckBox*)event.GetEventObject())->GetValue()
+  );
+}
diff --git a/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.h b/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.h
new file mode 100644 (file)
index 0000000..03e02a3
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ 
+*/ 
+
+
+/*
+ * wxCDMPackageConfigurationDialog.h
+ *
+ *  Created on: 6/4/2013
+ *      Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMPACKAGECONFIGURATIONDIALOG_H_
+#define WXCDMPACKAGECONFIGURATIONDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMPackage.h"
+
+/**
+ * Package Configuration Dialog
+ */
+class wxCDMPackageConfigurationDialog : public wxDialog
+{
+  DECLARE_EVENT_TABLE()
+public:
+  /**
+   * Package Configuration Dialog Constructor.
+   * @param parent Parent window.
+   * @param package Package Description reference.
+   * @param id Dialog ID. By default wxID_ANY.
+   * @param caption Dialog label. By default "Package Library Configuration".
+   * @param position Dialog position. By default wxDefaultPosition.
+   * @param size Dialog size. By default 350, 370.
+   * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE.
+   */
+  wxCDMPackageConfigurationDialog(
+      wxWindow* parent,
+      modelCDMPackage * package,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxT("Package Library Configuration"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(350,370),
+      long style = wxDEFAULT_DIALOG_STYLE
+  );
+  /**
+   * Destructor.
+   */
+  ~wxCDMPackageConfigurationDialog();
+  /**
+   * Package Configuration Dialog Creator.
+   * @param parent Parent window.
+   * @param id Dialog ID. By default wxID_ANY.
+   * @param caption Dialog label. By default "Package Library Configuration".
+   * @param position Dialog position. By default wxDefaultPosition.
+   * @param size Dialog size. By default 350, 370.
+   * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE.
+   * @return if the creation was successful.
+   */
+  bool Create(
+      wxWindow* parent,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxT("Package Library Configuration"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(350,370),
+      long style = wxDEFAULT_DIALOG_STYLE
+  );
+
+protected:
+  /**
+   * Creates the help controls (text and buttons).
+   */
+  void CreateControls();
+
+//attributes
+private:
+  /**
+   * Main panel reference.
+   */
+  modelCDMPackage* package;
+
+//handlers
+protected:
+  /**
+   * Handler to close configuration dialog.
+   * @param event Unused.
+   */
+  void OnFinish(wxCommandEvent& event);
+
+  /**
+   * Handler when a third party library include is pressed.
+   * @param event checkbox event.
+   */
+  void On3rdLibraryIncludeChange(wxCommandEvent& event);
+
+  /**
+   * Handler when a custom library include is pressed.
+   * @param event checkbox event.
+   */
+  void OnCustomLibraryIncludeChange(wxCommandEvent& event);
+};
+
+#endif /* WXCDMPACKAGECONFIGURATIONDIALOG_H_ */
index e2e452c0ae82a126cf657d17c2bc697067d89ebe..5ac469193a929be3c6b55f486a63caffd56a7680 100644 (file)
@@ -40,6 +40,7 @@
 #include "images/PkIcon64.xpm"
 
 #include "wxCDMNewBlackBoxDialog.h"
+#include "wxCDMPackageConfigurationDialog.h"
 #include <wx/textdlg.h>
 #include "CDMUtilities.h"
 
@@ -57,6 +58,7 @@ EVT_HYPERLINK(ID_LINK_SELECT_BLACKBOX, wxCDMPackageDescriptionPanel::OnLnkBlackB
 EVT_BUTTON(ID_BUTTON_CREATE_BLACKBOX, wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists)
 EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMPackageDescriptionPanel::OnBtnOpenFolder)
+EVT_BUTTON(ID_BUTTON_CHOOSE, wxCDMPackageDescriptionPanel::OnBtnConfigurePackage)
 END_EVENT_TABLE()
 
 wxCDMPackageDescriptionPanel::wxCDMPackageDescriptionPanel(
@@ -87,6 +89,10 @@ bool wxCDMPackageDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->package = package;
   CreateControls();
   return TRUE;
@@ -215,12 +221,15 @@ void wxCDMPackageDescriptionPanel::CreateControls()
   wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("A. Create Black Box"));
   createBBbt->SetToolTip(wxT("Create a new black box for the active project inside this package."));
   actionsGridSizer->Add(createBBbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
+  wxButton* editConfbt = new wxButton(actionsPanel, ID_BUTTON_CHOOSE, _T("B. Configure Package"));
+  editConfbt->SetToolTip(wxT("Select the libraries your package is going to use. This procedure changes the package's CMakeLists file."));
+  actionsGridSizer->Add(editConfbt, 1, wxALL | wxEXPAND, 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 package's CMakeLists.txt file."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseExit,NULL,this);
   actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Package Folder"));
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder"));
   openFolderbt->SetToolTip(wxT("Open the package folder in the file explorer."));
   actionsGridSizer->Add(openFolderbt, 1, wxALL | wxEXPAND, 5);
 
@@ -407,6 +416,14 @@ void wxCDMPackageDescriptionPanel::OnBtnCreateBlackBox(wxCommandEvent& event)
     }
 }
 
+void
+wxCDMPackageDescriptionPanel::OnBtnConfigurePackage(wxCommandEvent& event)
+{
+  wxCDMPackageConfigurationDialog* dialog = new wxCDMPackageConfigurationDialog(this,this->package);
+  long userResponse;
+  userResponse = dialog->ShowModal();
+}
+
 void wxCDMPackageDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
 {
   std::string* result;
index 8e88f9a5b79a5690771639edaa5fd635f268e846..6e992bda4e56fa7c26293738073b03e6c0e9f6d2 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMPACKAGEDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 
 #include "modelCDMPackage.h"
@@ -44,7 +43,7 @@
 /**
  * Package description panel. Shows the package's properties and the available actions for a package.
  */
-class wxCDMPackageDescriptionPanel : public wxPanel
+class wxCDMPackageDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
@@ -146,6 +145,10 @@ protected:
    * Handles when the create black box button is pressed.
    */
   void OnBtnCreateBlackBox(wxCommandEvent& event);
+  /**
+   * Handles when the configure package button is pressed.
+   */
+  void OnBtnConfigurePackage(wxCommandEvent& event);
   /**
    * Handles when the edit cmakelists file button is pressed.
    */
index 871b20b98d715f8861facd2fda7b2ed6011115bf..a706c175ca2c5021e182aaee68b75c6298a8bae8 100644 (file)
@@ -80,6 +80,10 @@ bool wxCDMPackageManagerPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->project = project;
   CreateControls();
   return TRUE;
@@ -170,7 +174,7 @@ void wxCDMPackageManagerPanel::CreateControls()
   wxButton* createPkgbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_PACKAGE, _T("A. Create Package"));
   createPkgbt->SetToolTip(wxT("Create a new package for this project."));
   actionsGridSizer->Add(createPkgbt, 1, wxALL | wxEXPAND, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseExit,NULL,this);
index 3c5dc99e274d0e40f0b5f059a1cf02e49f260d82..245ebf9640a774a2dd1a3e5c323d38935f505467 100644 (file)
@@ -36,7 +36,6 @@
 #define WXCDMPACKAGEMANAGERPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 #include <wx/event.h>
 
@@ -45,7 +44,7 @@
 /**
  * Package manager description panel. Shows the available packages in the project and the actions corresponding to package management.
  */
-class wxCDMPackageManagerPanel : public wxPanel
+class wxCDMPackageManagerPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 0b33c8c311532189a2307eb194091ad78f5ad816..5b5510e77a9568c4a241d90952ee932a221652d1 100755 (executable)
@@ -75,6 +75,10 @@ bool wxCDMProjectActionsPanel::Create(
 )
 {
   wxPanel::Create(parent,id,pos,size,style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
   this->SetSizer(sizer);
 
index 93850e277860202f560ffab39f7b6a095c701087..cd60d7572395c466c02d32cb826de959a06b5fa8 100755 (executable)
 #define WXCDMPROJECTACTIONSPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 
 #include "modelCDMProject.h"
 
 /**
  * Panel with common actions for an open Crea project.
  */
-class wxCDMProjectActionsPanel : public wxPanel
+class wxCDMProjectActionsPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
index 76aa9bbf99016d3f1ec30f77b2f780735cf14fdd..503d51113b292c6e874a048b1971cca1e3894c0d 100644 (file)
@@ -81,6 +81,10 @@ bool wxCDMProjectDescriptionPanel::Create(
 )
 {
   wxPanel::Create(parent, id, pos, size, style);
+  // this part makes the scrollbars show up
+  this->FitInside(); // ask the sizer about the needed size
+  this->SetScrollRate(5, 5);
+
   this->project = project;
   CreateControls();
   return TRUE;
@@ -135,7 +139,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   // sourceLocation
   wxBoxSizer* pSourceLocationsz = new wxBoxSizer(wxHORIZONTAL);
   wxStaticText* pSourceLocationtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetPath()));
-  //pSourceLocationtc->SetMaxSize(wxSize(350,-1));
+  pSourceLocationtc->SetMaxSize(wxSize(200,-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, 1, wxALIGN_CENTER, 1);
@@ -143,7 +147,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   // buildLocation
   wxBoxSizer* pBuildLocationsz = new wxBoxSizer(wxHORIZONTAL);
   this->buildPathtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetBuildPath()));
-  //this->buildPathtc->SetMaxSize(wxSize(350,-1));
+  this->buildPathtc->SetMaxSize(wxSize(200,-1));
   wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose"));
   pBuildLocationbt->SetToolTip(wxT("Select a new location for compiling the project."));
   pBuildLocationsz->Add(this->buildPathtc, 1, wxALIGN_CENTER, 1);
@@ -206,7 +210,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
       actionsGridSizer->Add(appliMgrbt, 1, wxALL | wxEXPAND, 5);
     }
   // edit CMakeLists file
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("D. Edit CMakeLists File"));
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseExit,NULL,this);
index 86726c5dd1296b479776b341abffc827f2725f0a..74a71d79b5f35ef885a921d1c0ebb82d22984b58 100644 (file)
 #define WXCDMPROJECTDESCRIPTIONPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 
 #include "modelCDMProject.h"
 
 /**
  * Project Description Panel. Shows the project properties and the principal actions for the project.
  */
-class wxCDMProjectDescriptionPanel : public wxPanel
+class wxCDMProjectDescriptionPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public: