]> Creatis software - crea.git/commitdiff
Feature #1711 CreaDevManager application implementation
authorDaniel Gonzalez <daniel@daniel.laptop>
Sat, 6 Apr 2013 10:32:24 +0000 (12:32 +0200)
committerDaniel Gonzalez <daniel@daniel.laptop>
Sat, 6 Apr 2013 10:32:24 +0000 (12:32 +0200)
Fix: Auto include in corresponding CMakeLists files when creating: Libraries, Applications, Packages. It was creating additional line break characters.
Feature: Show included libraries (3rd Party and custom) and checkboxes to include them in: Applications and Libraries. Just shows a test library that doesn't really exist.

13 files changed:
lib/creaDevManagerLib/creaDevManagerIds.h
lib/creaDevManagerLib/modelCDMAppli.cpp
lib/creaDevManagerLib/modelCDMApplication.cpp
lib/creaDevManagerLib/modelCDMApplication.h
lib/creaDevManagerLib/modelCDMLib.cpp
lib/creaDevManagerLib/modelCDMLibrary.cpp
lib/creaDevManagerLib/modelCDMLibrary.h
lib/creaDevManagerLib/modelCDMProject.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.h
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.h
lib/creaDevManagerLib/wxCDMMainFrame.cpp

index 2bf0dba68bb356634ad3f33818fb9ed226182fc2..b8526d02dea697c297281e2f8310d1f3bb339a31 100644 (file)
 #define ID_LINK_SELECT_BLACKBOX         10333
 
 #define ID_CHECK_INCLUDE_LIBRARY        10334
-#define ID_CHECK_INCLUDE_PACKAGE        10335
-#define ID_CHECK_INCLUDE_APPLICATION    10336
+#define ID_CHECK_INCLUDE_3RDLIBRARY     10335
+#define ID_CHECK_INCLUDE_PACKAGE        10336
+#define ID_CHECK_INCLUDE_APPLICATION    10337
 
-#define ID_CHECKBOX_ENABLE_HELP         10337
-#define ID_CHECKBOX_DISABLE_HELP        10338
-#define ID_CHECKBOX_TOGGLE_HELP         10339
+#define ID_CHECKBOX_ENABLE_HELP         10338
+#define ID_CHECKBOX_DISABLE_HELP        10339
+#define ID_CHECKBOX_TOGGLE_HELP         10340
 
-#define ID_BUTTON_CHECK_PROJECT         10340
+#define ID_BUTTON_CHECK_PROJECT         10341
 
 #endif /* CREADEVMANAGERIDS_H_ */
index 62d02a9c0191fdcf0276644de409673479924388..9e588df4e205fb48c3f38e1f0747e6fbeb3b3735 100644 (file)
@@ -527,6 +527,9 @@ bool modelCDMAppli::SetApplicationInclude(const std::string& application_name, c
           while(!CMFile.eof())
             {
               std::getline(CMFile, line);
+              if (CMFile.eof()) {
+                break;
+              }
               if(line != "")
                 {
                   std::vector<std::string> segs;
index 7083c4738cb9e778fc26d04cf9bb14d9f4b676d7..1a9c3ad4c8c1f84e3d9658397948c4d912d072a6 100644 (file)
@@ -514,3 +514,27 @@ void modelCDMApplication::CheckStructure(std::map<std::string, bool>& properties
 
     }
 }
+
+std::map<std::string, bool> modelCDMApplication::Get3rdPartyLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMApplication::Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude)
+{
+  return false;
+}
+
+std::map<std::string, bool> modelCDMApplication::GetCustomLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMApplication::SetCustomLibrary(const std::string& library_name, const bool& toInclude)
+{
+  return false;
+}
index e471ec9289fd8a93c36f2b42efdf5d47c05773f7..18cb7c52bde7edd9ea52b7c2199caf03c2487315 100644 (file)
@@ -105,6 +105,30 @@ public:
    */
   void CheckStructure(std::map<std::string, bool>& properties);
 
+  /**
+   * Checks the application'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 application's CMakeLists file.
+   * @return if the operation was successful.
+   */
+  bool Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude);
+
+  /**
+   * Checks the application's 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 application's CMakeLists file.
+   * @return if the operation was successful.
+   */
+  bool SetCustomLibrary(const std::string& library_name, const bool& toInclude);
+
 private:
   /**
    * Name of the application executable file.
index 69bfcff7d3f92a023c8c8590bdf341b39ecf7ccc..5cfc702a11d4aa945ac1b3940d5d323cd053641e 100644 (file)
@@ -451,6 +451,9 @@ bool modelCDMLib::SetLibraryInclude(const std::string& library_name, const bool&
           while(!CMFile.eof())
             {
               std::getline(CMFile, line);
+              if (CMFile.eof()) {
+                break;
+              }
               if(line != "")
                 {
                   std::vector<std::string> segs;
@@ -504,6 +507,7 @@ bool modelCDMLib::SetLibraryInclude(const std::string& library_name, const bool&
                 {
                   outs << "\n";
                 }
+
             }
 
           CMFile.close();
index 7b99318b58333425375949bdd6d8b689dd4d5fe8..524f14257b6ac6e804a6dc0442005c35fd8bc21b 100644 (file)
@@ -433,3 +433,27 @@ void modelCDMLibrary::CheckStructure(std::map<std::string, bool>& properties)
 
     }
 }
+
+std::map<std::string, bool> modelCDMLibrary::Get3rdPartyLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMLibrary::Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude)
+{
+  return false;
+}
+
+std::map<std::string, bool> modelCDMLibrary::GetCustomLibraries()
+{
+  std::map<std::string, bool> res;
+  res["Test"] = false;
+  return res;
+}
+
+bool modelCDMLibrary::SetCustomLibrary(const std::string& library_name, const bool& toInclude)
+{
+  return false;
+}
index ae37ec9d2a7ca83d01e80f5377860d17bd16b4e8..bec12783c504f0c602063b53a0eabe2f5f6e71a9 100644 (file)
@@ -98,6 +98,30 @@ public:
    */
   void CheckStructure(std::map<std::string, bool>& properties);
 
+  /**
+   * Checks the library 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 library 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:
   /**
    * Name of the library node. The name of a library can be different than the library folder name.
index 30203265940ccf2d3f005ce0bf01035bcc19ebbd..5bc14e4d4b4ed8460aaef0b6cdab11dd3f578487 100644 (file)
@@ -1053,6 +1053,9 @@ bool modelCDMProject::SetPackageInclude(const std::string& package_name, const b
           while(!CMFile.eof())
             {
               std::getline(CMFile, line);
+              if (CMFile.eof()) {
+                break;
+              }
               if(line != "")
                 {
                   std::vector<std::string> segs;
index 26c6ce0f124d3c8b00b05c469047d97e0d914766..e37085611a6f569e8cfaf1fd20e211cde3d7446b 100644 (file)
@@ -50,6 +50,8 @@ EVT_BUTTON(ID_BUTTON_CREATE_FOLDER, wxCDMApplicationDescriptionPanel::OnBtnCreat
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMApplicationDescriptionPanel::OnBtnEditCMakeLists)
 EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMApplicationDescriptionPanel::OnBtnOpenFolder)
 EVT_BUTTON(ID_BUTTON_OPEN_CXX, wxCDMApplicationDescriptionPanel::OnBtnOpenMain)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_3RDLIBRARY, wxCDMApplicationDescriptionPanel::On3rdLibraryChBChange)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_LIBRARY, wxCDMApplicationDescriptionPanel::OnLibraryChBChange)
 END_EVENT_TABLE()
 
 wxCDMApplicationDescriptionPanel::wxCDMApplicationDescriptionPanel(
@@ -143,6 +145,116 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
   propertiesBox->Add(propertiesPanel, 0, wxEXPAND);
   sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
    */
+
+  //Includes
+  wxStaticBoxSizer* includesBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Used Libraries"));
+  wxPanel* includesPanel = new wxPanel(this);
+  wxBoxSizer* includesPanelSizer = new wxBoxSizer(wxVERTICAL);
+
+  //Third Party Libraries
+  wxStaticText* Title1 = new wxStaticText(includesPanel, 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->application->Get3rdPartyLibraries();
+  //includesGrid Sizer
+  wxFlexGridSizer* includesGridSizer = new wxFlexGridSizer(inclusions.size()+1, 2, 0, 5);
+
+  wxStaticText* ChBTitle = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Included"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_CENTER
+    );
+  wxStaticText* LNmTitle = new wxStaticText(
+      includesPanel,
+      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(
+        includesPanel, 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 application."));
+    ChBIncl->SetName(crea::std2wx(it->first));
+    ChBIncl->SetValue(it->second);
+    includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
+
+    wxStaticText* LNmIncl = new wxStaticText(includesPanel, 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(includesPanel, 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->application->GetCustomLibraries();
+  //includesGrid Sizer
+  wxFlexGridSizer* includesLibGridSizer = new wxFlexGridSizer(inclusionsLibs.size()+1, 2, 0, 5);
+
+  wxStaticText* ChBTitle1 = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Included"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_CENTER
+    );
+  wxStaticText* LNmTitle1 = new wxStaticText(
+      includesPanel,
+      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(
+        includesPanel, 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 application."));
+    ChBIncl->SetName(crea::std2wx(it->first));
+    ChBIncl->SetValue(it->second);
+    includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
+
+    wxStaticText* LNmIncl = new wxStaticText(includesPanel, wxID_ANY, crea::std2wx(it->first));
+    includesLibGridSizer->Add(LNmIncl, 1, wxEXPAND);
+  }
+
+  includesLibGridSizer->AddGrowableCol(1,1);
+
+  includesPanelSizer->Add(includesLibGridSizer, 1, wxEXPAND, 0);
+
+  includesPanel->SetSizer(includesPanelSizer);
+  includesPanelSizer->Fit(includesPanel);
+  includesBox->Add(includesPanel, 1, wxEXPAND);
+  sizer -> Add(includesBox, 0, wxALL | wxEXPAND, 10);
+
+
   //Actions
   //actions StaticBoxSizer
   wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Actions"));
@@ -239,6 +351,16 @@ void wxCDMApplicationDescriptionPanel::OnBtnSetExeName(wxCommandEvent& event)
   this->executableNametc->SetLabel(crea::std2wx(this->application->GetExecutableName()));
 }
 
+void wxCDMApplicationDescriptionPanel::On3rdLibraryChBChange(wxCommandEvent& event)
+{
+  this->application->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+}
+
+void wxCDMApplicationDescriptionPanel::OnLibraryChBChange(wxCommandEvent& event)
+{
+  this->application->SetCustomLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+}
+
 void wxCDMApplicationDescriptionPanel::OnBtnCreateClass(wxCommandEvent& event)
 {
   //get class name from user
index 741eb44e9c4d4aaffd7966291b580dc820a0aab6..027db4f50020680e48b9b71a2b9ccc1641ada75b 100644 (file)
@@ -118,8 +118,19 @@ protected:
 
   /**
    * Handles when the set executable name button is pressed.
+   * @param event Unused
    */
   void OnBtnSetExeName(wxCommandEvent& event);
+  /**
+   * Handles when a 3rd Party Library checkbox state is changed. It calls to include/exclude the selected application.
+   * @param event CheckBox event.
+   */
+  void On3rdLibraryChBChange(wxCommandEvent& event);
+  /**
+   * Handles when a Custom Library checkbox state is changed. It calls to include/exclude the selected application.
+   * @param event CheckBox event.
+   */
+  void OnLibraryChBChange(wxCommandEvent& event);
   /**
    * Handles when the create class button is pressed.
    */
index 4892b64a8c6cc3f71ca9d8a269eee6cf71125268..1b78ba04b61b341af921019dddaa0e9024fd2cf1 100644 (file)
@@ -49,6 +49,8 @@ EVT_BUTTON(ID_BUTTON_CREATE_CLASS, wxCDMLibraryDescriptionPanel::OnBtnCreateClas
 EVT_BUTTON(ID_BUTTON_CREATE_FOLDER, wxCDMLibraryDescriptionPanel::OnBtnCreateFolder)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMLibraryDescriptionPanel::OnBtnEditCMakeLists)
 EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMLibraryDescriptionPanel::OnBtnOpenFolder)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_3RDLIBRARY, wxCDMLibraryDescriptionPanel::On3rdLibraryChBChange)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_LIBRARY, wxCDMLibraryDescriptionPanel::OnLibraryChBChange)
 END_EVENT_TABLE()
 
 wxCDMLibraryDescriptionPanel::wxCDMLibraryDescriptionPanel(
@@ -144,6 +146,117 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   propertiesBox->Add(propertiesPanel, 0, wxEXPAND);
   sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
    */
+
+  //Includes
+  wxStaticBoxSizer* includesBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Used Libraries"));
+  wxPanel* includesPanel = new wxPanel(this);
+  wxBoxSizer* includesPanelSizer = new wxBoxSizer(wxVERTICAL);
+
+  //Third Party Libraries
+  wxStaticText* Title1 = new wxStaticText(includesPanel, 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->library->Get3rdPartyLibraries();
+  //includesGrid Sizer
+  wxFlexGridSizer* includesGridSizer = new wxFlexGridSizer(inclusions.size()+1, 2, 0, 5);
+
+  wxStaticText* ChBTitle = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Included"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_CENTER
+    );
+  wxStaticText* LNmTitle = new wxStaticText(
+      includesPanel,
+      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(
+        includesPanel, 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(includesPanel, 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(includesPanel, 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->library->GetCustomLibraries();
+  //includesGrid Sizer
+  wxFlexGridSizer* includesLibGridSizer = new wxFlexGridSizer(inclusionsLibs.size()+1, 2, 0, 5);
+
+  wxStaticText* ChBTitle1 = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Included"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_CENTER
+    );
+  wxStaticText* LNmTitle1 = new wxStaticText(
+      includesPanel,
+      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(
+        includesPanel, 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(includesPanel, wxID_ANY, crea::std2wx(it->first));
+    includesLibGridSizer->Add(LNmIncl, 1, wxEXPAND);
+  }
+
+  includesLibGridSizer->AddGrowableCol(1,1);
+
+  includesPanelSizer->Add(includesLibGridSizer, 1, wxEXPAND, 0);
+
+  includesPanel->SetSizer(includesPanelSizer);
+  includesPanelSizer->Fit(includesPanel);
+  includesBox->Add(includesPanel, 1, wxEXPAND);
+  sizer -> Add(includesBox, 0, wxALL | wxEXPAND, 10);
+
+
+
   //Actions
   wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions"));
   wxPanel* actionsPanel = new wxPanel(this);
@@ -228,6 +341,16 @@ void wxCDMLibraryDescriptionPanel::OnBtnSetExeName(wxCommandEvent& event)
   this->libraryNametc->SetLabel(crea::std2wx(this->library->GetNameLibrary()));
 }
 
+void wxCDMLibraryDescriptionPanel::On3rdLibraryChBChange(wxCommandEvent& event)
+{
+  this->library->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+}
+
+void wxCDMLibraryDescriptionPanel::OnLibraryChBChange(wxCommandEvent& event)
+{
+  this->library->SetCustomLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue());
+}
+
 void wxCDMLibraryDescriptionPanel::OnBtnCreateClass(wxCommandEvent& event)
 {
   //get class name from user
index 724e4850135a83a9f4ee494cc7547b1d53592857..cf05cd9e2817537fa6625da192fad9b6e48fde50 100644 (file)
@@ -122,6 +122,16 @@ protected:
    * @param event Unused.
    */
   void OnBtnSetExeName(wxCommandEvent& event);
+  /**
+   * Handles when a 3rd Party Library checkbox state is changed. It calls to include/exclude the selected library.
+   * @param event CheckBox event.
+   */
+  void On3rdLibraryChBChange(wxCommandEvent& event);
+  /**
+   * Handles when a Custom Library checkbox state is changed. It calls to include/exclude the selected library.
+   * @param event CheckBox event.
+   */
+  void OnLibraryChBChange(wxCommandEvent& event);
   /**
    * Handles when the create class button is pressed.
    * @param event Unused.
index 5aa7997b0b6314a14098558a9c3c5d5644c3efa8..019c0ac25c47e0cf39236f433c59b33b8b606f79 100755 (executable)
@@ -246,7 +246,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(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
   auiManager.Update();
   //auiManager.LoadPerspective(pers,true);
   wxToolTip::Enable(true);