]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMLibraryHelpDialog.cpp
Fixes:
[crea.git] / lib / creaDevManagerLib / wxCDMLibraryHelpDialog.cpp
index 9f01d42119468804a36ce74698a9245544377e36..e027d60d9eecd5685a1e149e4f3278d0d3cb6479 100644 (file)
@@ -103,8 +103,12 @@ void wxCDMLibraryHelpDialog::CreateControls()
           "functionalities of your project inside the created files.\n"
           "If you need to separate classes in folders you can do it by creating a folder with the \"Create Folder\" button.\n"
           "Then, in order to include your libraries in the project correctly you must include them in the lib's folder "
-          "\"CMakeLists.txt\" file. Also, if you create additional folders in your library you should include them in the library's "
-          "\"CMakeLists.txt\" file.\n"
+          "\"CMakeLists.txt\" file by using the \"ADD_SUBDIRECTORY([libraryName])\". Also, if you use third party libraries in your "
+          "library you must include them in the library's \"CMakeLists.txt\" file by uncommenting them in the "
+          "\"SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\" command; if you use custom libraries in your library you must also include them "
+          "in the library's \"CMakeLists.txt\" file by including them in the \"SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\" command. Or, "
+          "if you create additional folders in your library you must include them in the library's \"CMakeLists.txt\" file by using "
+          "the \"ADD_SUBDIRECTORY([folderName])\" command.\n"
           "\n"
           "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
           wxDefaultPosition,
@@ -146,12 +150,11 @@ void wxCDMLibraryHelpDialog::OnCMakeLists(wxCommandEvent& event)
       if(!this->library->OpenCMakeListsFile(result))
         wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
       if(this->library->GetCMakeLists() != NULL)
         {
-          int CMId = this->library->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->library->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -168,12 +171,11 @@ void wxCDMLibraryHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMLib*)node)->OpenCMakeListsFile(result))
             wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
           if(((modelCDMLib*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMLib*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMLib*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -189,12 +191,11 @@ void wxCDMLibraryHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
 {
   if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE)
     {
-      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+      wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
       if(this->library->GetCMakeLists() != NULL)
         {
-          int CMId = this->library->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->library->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -208,12 +209,11 @@ void wxCDMLibraryHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMLib*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMLib*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMLib*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -226,12 +226,11 @@ void wxCDMLibraryHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
 {
   if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE)
       {
-        wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+        wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
         if(this->library->GetCMakeLists() != NULL)
           {
-            int CMId = this->library->GetCMakeLists()->GetId();
-            newEvent->SetInt(CMId);
+            newEvent->SetClientData(this->library->GetCMakeLists());
             newEvent->SetId(0);
             wxPostEvent(this->GetParent(), *newEvent);
           }
@@ -245,12 +244,11 @@ void wxCDMLibraryHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
           }
         if (node != NULL)
           {
-            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
             if(((modelCDMLib*)node)->GetCMakeLists() != NULL)
               {
-                int CMId = ((modelCDMLib*)node)->GetCMakeLists()->GetId();
-                newEvent->SetInt(CMId);
+                newEvent->SetClientData(((modelCDMLib*)node)->GetCMakeLists());
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }