]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.cpp
Revert "Merge remote-tracking branch 'refs/remotes/origin/master' into creaDevManager...
[crea.git] / lib / creaDevManagerLib / wxCDMBlackBoxHelpDialog.cpp
index 480e9d04b817f73b5b275817e7921a85f774efd2..16f436df18fba6f1397f5606ae1bafdd9996d202 100644 (file)
@@ -105,9 +105,12 @@ void wxCDMBlackBoxHelpDialog::CreateControls()
           "If you don't understand how this inputs and outputs are used, try looking at the sample black boxes available "
           "in the sample package, which is shipped with every new project.\n"
           "Also, don't forget to include the libraries your boxes use in the header and implementation files. They should "
           "If you don't understand how this inputs and outputs are used, try looking at the sample black boxes available "
           "in the sample package, which is shipped with every new project.\n"
           "Also, don't forget to include the libraries your boxes use in the header and implementation files. They should "
-          "also be pointed and included in the package's directory CMakeLists.txt file and the project's directory "
-          "CMakeLists.txt file. Again, please take a look at the sample package and its boxes to see how to include libraries "
-          "in order to use them in the boxes.\n"
+          "also be pointed and included in the package's directory CMakeLists.txt file by uncommenting the \"SET\" commands "
+          "for third party libraries or by including the library name inside the \"SET(${BBTK_PACKAGE_NAME}_LIBS\"command "
+          "and its path inside the \"SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS\" command for custom libraries. You must also "
+          "include the package your black box is in by including the command \"ADD_SUBDIRECTORY([packageName])\" in the "
+          "project's directory CMakeLists.txt file. Again, please take a look at the sample package and its boxes to see "
+          "how to include libraries in order to use them in the boxes.\n"
           "\n"
           "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
           wxDefaultPosition,
           "\n"
           "You can easily edit the CMakeLists files previously mentioned by clicking on the following buttons."),
           wxDefaultPosition,
@@ -155,12 +158,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMPackage*)node)->OpenCMakeListsFile(result))
             wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
           if(!((modelCDMPackage*)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(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
 
           if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -182,12 +184,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMProject*)node)->OpenCMakeListsFile(result))
             wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR);
 
           if(!((modelCDMProject*)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(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -210,12 +211,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
 
           if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -230,12 +230,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
 
           if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -255,12 +254,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
           }
         if (node != NULL)
           {
           }
         if (node != NULL)
           {
-            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
             if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
               {
 
             if(((modelCDMPackage*)node)->GetCMakeLists() != NULL)
               {
-                int CMId = ((modelCDMPackage*)node)->GetCMakeLists()->GetId();
-                newEvent->SetInt(CMId);
+                newEvent->SetClientData(((modelCDMPackage*)node)->GetCMakeLists());
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }
@@ -275,12 +273,11 @@ void wxCDMBlackBoxHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
           }
         if (node != NULL)
           {
           }
         if (node != NULL)
           {
-            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+            wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
             if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
               {
 
             if(((modelCDMProject*)node)->GetCMakeLists() != NULL)
               {
-                int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId();
-                newEvent->SetInt(CMId);
+                newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists());
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }
                 newEvent->SetId(0);
                 wxPostEvent(this->GetParent(), *newEvent);
               }