]> Creatis software - crea.git/commitdiff
Feature #1711
authorDaniel Felipe Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Tue, 29 Jan 2013 17:15:03 +0000 (18:15 +0100)
committerDaniel Felipe Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Tue, 29 Jan 2013 17:15:03 +0000 (18:15 +0100)
CreaDevManager application implementation

- Changes for windows compatibility. Fixed change selection in treectrl and details show.

13 files changed:
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMBlackBoxDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMCMakeListsDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMFolderDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMMainFrame.cpp
lib/creaDevManagerLib/wxCDMMainFrame.h
lib/creaDevManagerLib/wxCDMPackageDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp
lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.cxx

index 7c087cbbda62cf5702397d6536db2f1c922cee8e..1378f60efb7da213b4c938143d1c0fac8b876f3d 100644 (file)
@@ -93,7 +93,8 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->appli->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
@@ -125,8 +126,8 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   std::vector<modelCDMApplication*> applications = this->appli->GetApplications();
   for (int i = 0; i < (int)(applications.size()); i++)
     {
-      wxHyperlinkCtrl* pApplicationlk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_APPLICATION, crea::std2wx(applications[i]->GetName().c_str()), crea::std2wx(applications[i]->GetName().c_str()));
-      pApplicationlk->SetWindowStyle(wxALIGN_LEFT);
+               wxHyperlinkCtrl* pApplicationlk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_APPLICATION, crea::std2wx(applications[i]->GetName().c_str()), crea::std2wx(applications[i]->GetName().c_str()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      pApplicationlk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
       std::string tt = "Name: " + applications[i]->GetName() + "\n";
       tt += "Location: " + applications[i]->GetPath();
       pApplicationlk->SetToolTip(crea::std2wx(tt.c_str()));
index ec904c7b2333e11140af82e0c1e8a4131920e552..682236c9a7ceeb5ccab78483df88f945e035a48f 100644 (file)
@@ -94,7 +94,8 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->application->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+               wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
index 0d2eb5df1fc34afb4bc222db75a0248cc91ee76c..c511afff2a4bb27babc9d6678dd6ed4e2b513e2e 100644 (file)
@@ -93,7 +93,8 @@ void wxCDMBlackBoxDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->blackBox->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
index da4047ded480625544b87eddf0743c0a46e7d2f3..9b61ae241ebf8633d66f55bbbab831fa77495074 100644 (file)
@@ -87,7 +87,8 @@ void wxCDMCMakeListsDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->cMakeLists->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
index 3f0e5f5823d9ede13509452f27cfc9a276a22b66..2c54eae074e9320e717f8376e6d14611a86d3849 100644 (file)
@@ -89,7 +89,8 @@ void wxCDMFileDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->file->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
index 1da28aaf2111aed407704fe78a12c77e436ec04b..69a5146edec69b315169cf5c78c8802f084eec43 100644 (file)
@@ -90,7 +90,8 @@ void wxCDMFolderDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->folder->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
       returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
index 4cb283744c80979fa5d7cd8e5d8d9bc1b1f38d9b..abc0a8e2bd11328ff97c475c133a16c28ad3a281 100644 (file)
@@ -91,8 +91,9 @@ void wxCDMLibDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->lib->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
-      returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
+         returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
         {
@@ -122,8 +123,8 @@ void wxCDMLibDescriptionPanel::CreateControls()
   std::vector<modelCDMLibrary*> libraries = this->lib->GetLibraries();
   for (int i = 0; i < (int)(libraries.size()); i++)
     {
-      wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(propertiesPanel, ID_LINK_SELECT_LIBRARY, crea::std2wx(libraries[i]->GetName().c_str()), crea::std2wx(libraries[i]->GetName().c_str()));
-      pLibrarylk->SetWindowStyle(wxALIGN_LEFT);
+               wxHyperlinkCtrl* pLibrarylk = new wxHyperlinkCtrl(propertiesPanel, ID_LINK_SELECT_LIBRARY, crea::std2wx(libraries[i]->GetName().c_str()), crea::std2wx(libraries[i]->GetName().c_str()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      pLibrarylk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
       std::string tt = "Name: " + libraries[i]->GetName() + "\n";
       tt += "Location: " + libraries[i]->GetPath();
       pLibrarylk->SetToolTip(crea::std2wx(tt.c_str()));
index 4bbf234840c00050734aad270d03e32efee20853..05ba6f37eea1f7b6df25d44af9715038bdf48410 100644 (file)
@@ -93,8 +93,9 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->library->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
-      returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
+         returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
         {
index 5017c440ee1b368bd25f15208535ffd2be61fc61..9565b8a37858d75e7e8b0713d573e1c0fabab5c4 100755 (executable)
@@ -219,6 +219,7 @@ void wxCDMMainFrame::CreateControls()
       wxSize(200,400),
          wxTR_HAS_BUTTONS | wxTR_AQUA_BUTTONS
   );
+  this->actualTreeItem.Unset();
 
   panel_Properties = new wxCDMMainDescriptionPanel(
       this,
@@ -298,8 +299,9 @@ void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
       auiManager.Update();
 
       //populate tree control
-      tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
       tree_Projects->Unselect();
+         this->actualTreeItem.Unset();
+         tree_Projects->BuildTree(this->model->GetModelElements(),this->model->GetProject());
          tree_Projects->SelectItem(this->model->GetProject()->GetId().GetWxId());
          wxMessageBox(wxT("ProjectSelected") ,_T("New Project - Success!"),wxOK | wxICON_ERROR);
     }
@@ -344,12 +346,12 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
       std::cout << "building ui" << std::endl;
 
       //populate tree control
+         tree_Projects->Unselect();
+         this->actualTreeItem.Unset();
       tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
-      tree_Projects->Unselect();
          tree_Projects->SelectItem(this->model->GetProject()->GetId().GetWxId(), true);
 
 
-
       //change project's actions panel
       if(this->panel_ProjectActions!= NULL)
         {
@@ -374,8 +376,6 @@ void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
       auiManager.Update();
 
     }
-
-  event.Skip();
 }
 
 void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
@@ -389,18 +389,16 @@ void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
     }
 
   tree_Projects->BuildTree(this->model->GetModelElements(), this->model->GetProject());
-
+  this->actualTreeItem.Unset();
   if(this->panel_Properties != NULL)
     {
       auiManager.DetachPane(this->panel_Properties);
-      this->panel_Properties->Destroy();
-      this->panel_Properties = NULL;
+         this->panel_Properties->Hide();
     }
   if(this->panel_ProjectActions != NULL)
     {
       auiManager.DetachPane(this->panel_ProjectActions);
-      this->panel_ProjectActions->Destroy();
-      this->panel_ProjectActions = NULL;
+      this->panel_ProjectActions->Hide();    
     }
 
   this->panel_Properties = new wxCDMMainDescriptionPanel(
@@ -415,7 +413,6 @@ void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
   auiManager.AddPane(panel_Properties, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
 
   auiManager.Update();
-  event.Skip();
 }
 
 void wxCDMMainFrame::OnMenuExportHierarchy(wxCommandEvent& event)
@@ -590,17 +587,24 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
 
   //get selected element
   wxTreeItemId elementId = event.GetItem();
-  if(elementId.IsOk() && this->tree_Projects->IsSelected(elementId))
+  //elementId.IsOk() && this->tree_Projects->IsSelected(elementId)
+  if(elementId.IsOk() && this->actualTreeItem != elementId)
     {
-      std::cout << "Tree Selection id: " << elementId << std::endl;
+      
+      std::cout << "Tree Selection id: " << elementId.m_pItem << std::endl;
       //get element from model
       modelCDMIProjectTreeNode* element = this->model->GetModelElements()[elementId];
 
          if (element == NULL)
                  return;
       std::cout << "Tree Selection: " << element->GetName() << std::endl;
-               
-      //TODO get element type
+
+         //std::stringstream ss;
+         //ss << this->actualTreeItem.m_pItem << ":" << event.GetOldItem().m_pItem << " --> " << elementId.m_pItem;
+         //wxMessageBox( wxT("Tree Selection id: " + ss.str() + " by " + element->GetName()), wxT("Refresh Project - Error"), wxICON_ERROR);   
+      this->actualTreeItem = elementId;
+
+         //get element type
       //project
       modelCDMProject* elementProject = dynamic_cast<modelCDMProject*>(element);
       wxPanel* description;
@@ -801,16 +805,19 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
         {
           this->panel_Properties->Hide();
           auiManager.DetachPane(this->panel_Properties);
-          this->panel_Properties->Destroy();
-          this->panel_Properties = NULL;
+          //this->panel_Properties->Destroy();
+          //this->panel_Properties = NULL;
         }
       //set new view
       auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
       this->panel_Properties = description;
 
       auiManager.Update();
-      event.Skip();
     }
+  else
+    {
+      event.Skip();
+       }
 
   return;
 
@@ -819,22 +826,24 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event)
 void wxCDMMainFrame::OnChangeView(wxCommandEvent& event)
 {
   modelCDMIProjectTreeNode* myItem = NULL;
+  wxPanel* description = NULL;
   switch(event.GetId())
   {
   case 0:
     myItem = ((modelCDMIProjectTreeNode*)event.GetClientData());
     //select out old one to generate selection event
     this->tree_Projects->Unselect();
-    this->tree_Projects->SelectItem(myItem->GetId().GetWxId(), true);
+    this->tree_Projects->SelectItem(myItem->GetId().GetWxId());
     this->tree_Projects->Expand(myItem->GetId().GetWxId());
     break;
   case 1:
-    wxPanel* description = NULL;
+    
     if(event.GetString() == wxT("manage_packages"))
       {
         //this->tree_Projects->Expand(this->model->GetProject()->GetId());
         //this->tree_Projects->Unselect();
-        description = new wxCDMPackageManagerPanel(
+        this->actualTreeItem.Unset();
+                 description = new wxCDMPackageManagerPanel(
             this,
             this->model->GetProject(),
             ID_WINDOW_PROPERTIES,
@@ -846,19 +855,20 @@ void wxCDMMainFrame::OnChangeView(wxCommandEvent& event)
       }
     else if(event.GetString() == wxT("manage_libraries"))
       {
-        this->tree_Projects->SelectItem(this->model->GetProject()->GetLib()->GetId().GetWxId(), true);
+        this->tree_Projects->SelectItem(this->model->GetProject()->GetLib()->GetId().GetWxId());
         this->tree_Projects->Expand(this->model->GetProject()->GetLib()->GetId().GetWxId());
         break;
       }
     else if(event.GetString() == wxT("manage_applications"))
       {
-        this->tree_Projects->SelectItem(this->model->GetProject()->GetAppli()->GetId().GetWxId(), true);
+        this->tree_Projects->SelectItem(this->model->GetProject()->GetAppli()->GetId().GetWxId());
         this->tree_Projects->Expand(this->model->GetProject()->GetAppli()->GetId().GetWxId());
         break;
       }
     else if(event.GetString() == wxT("blackbox"))
       {
         modelCDMBlackBox* bb = (modelCDMBlackBox*)event.GetClientData();
+               this->actualTreeItem.Unset();
         description = new wxCDMBlackBoxDescriptionPanel(
             this,
             bb,
@@ -868,6 +878,7 @@ void wxCDMMainFrame::OnChangeView(wxCommandEvent& event)
             wxSize(600, 400),
             0
         );
+               
       }
 
     //delete old view
@@ -882,10 +893,11 @@ void wxCDMMainFrame::OnChangeView(wxCommandEvent& event)
     auiManager.AddPane(description, wxAuiPaneInfo().Center().Name(wxT("panel_Properties")).Caption(wxT("")).BestSize(600,400).CloseButton(false));
     this->panel_Properties = description;
     auiManager.Update();
-
     break;
+  default:
+         event.Skip();
   }
-  event.Skip();
+  
 }
 
 void wxCDMMainFrame::OnElementSelected(wxCommandEvent& event)
index 5c440cc23914b0387010e7171655a7994d612579..9df0879c5d120e1c09613e96035e7e25dc9d934e 100755 (executable)
@@ -151,6 +151,10 @@ private:
    * Tree control for an open project
    */
   wxCDMProjectsTreeCtrl* tree_Projects;
+  /**
+   * Tree item for the selected item in the tree.
+   */
+  wxTreeItemId actualTreeItem;
   /**
    * Description panel for a selected project item
    */
index a2868679c1904ad95b8f731c4b4eb10316791000..bed6dc5e8d878f3dabadafc453893d88c16f9a0f 100644 (file)
@@ -101,8 +101,9 @@ void wxCDMPackageDescriptionPanel::CreateControls()
   std::vector<modelCDMIProjectTreeNode*> parents = this->package->GetParents();
   for (int i = 0; i < (int)(parents.size()); i++)
     {
-      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()));
-      returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
+      wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(parents[parents.size()-1-i]->GetName()), crea::std2wx(parents[parents.size()-1-i]->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+      returnLnk->SetWindowStyle(wxNO_BORDER);
+         returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + "."));
       linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5);
       if (i < (int)(parents.size())-1)
         {
@@ -189,8 +190,8 @@ void wxCDMPackageDescriptionPanel::CreateControls()
       if(blackBoxes[i] != NULL)
         {
 
-          wxHyperlinkCtrl* pBBlk = new wxHyperlinkCtrl(BBPanel,ID_LINK_SELECT_BLACKBOX, crea::std2wx(blackBoxes[i]->GetName().c_str()), crea::std2wx(blackBoxes[i]->GetName().c_str()));
-          pBBlk->SetWindowStyle(wxALIGN_LEFT);
+                       wxHyperlinkCtrl* pBBlk = new wxHyperlinkCtrl(BBPanel,ID_LINK_SELECT_BLACKBOX, crea::std2wx(blackBoxes[i]->GetName().c_str()), crea::std2wx(blackBoxes[i]->GetName().c_str()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+          pBBlk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
           std::string tt = "Author: " + blackBoxes[i]->GetAuthors() + "\nDescription: " + blackBoxes[i]->GetDescription() + "\nCategories: " + blackBoxes[i]->GetCategories();
           pBBlk->SetToolTip(crea::std2wx(tt));
           pBBlk->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseEnter,NULL,this);
index 3176c561b57561280a9a610b53527208e755b2eb..543ac596fc53364f088baf6d3161d0649b21c828 100644 (file)
@@ -89,7 +89,8 @@ void wxCDMPackageManagerPanel::CreateControls()
   wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
 
   //Link to return
-  wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(this->project->GetName()), crea::std2wx(this->project->GetPath()));
+  wxHyperlinkCtrl* returnLnk = new wxHyperlinkCtrl(this, ID_BUTTON_PREV, crea::std2wx(this->project->GetName()), crea::std2wx(this->project->GetPath()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+  returnLnk->SetWindowStyle(wxNO_BORDER);
   returnLnk->SetToolTip(wxT("Return to the active project description."));
   sizer->Add(returnLnk, 0, wxALIGN_CENTER | wxALL, 5);
 
@@ -115,8 +116,8 @@ void wxCDMPackageManagerPanel::CreateControls()
   std::vector<modelCDMPackage*> packages = this->project->GetPackages();
   for (int i = 0; i < (int)(packages.size()); i++)
     {
-      wxHyperlinkCtrl* pPackagelk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_PACKAGE, crea::std2wx(packages[i]->GetName().c_str()), crea::std2wx(packages[i]->GetName().c_str()));
-      pPackagelk->SetWindowStyle(wxALIGN_LEFT);
+               wxHyperlinkCtrl* pPackagelk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_PACKAGE, crea::std2wx(packages[i]->GetName().c_str()), crea::std2wx(packages[i]->GetName().c_str()), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+               pPackagelk->SetWindowStyle(wxALIGN_LEFT | wxNO_BORDER);
       std::string tt = "Author: " + packages[i]->GetAuthors() + "\nDescription: " + packages[i]->GetDescription();
       pPackagelk->SetToolTip(crea::std2wx(tt));
       propertiesPanelSizer -> Add(pPackagelk, 0, wxEXPAND | wxALL, 5);
index 6f7e33354cbff7aeb8eb380e1b112a4aa345c81f..2d217184e0f71524b8e139156454f2b908a2b266 100755 (executable)
@@ -106,6 +106,7 @@ bool wxCDMProjectsTreeCtrl::Create(
 
 void wxCDMProjectsTreeCtrl::BuildTree(std::map< wxCDMTreeItemId, modelCDMIProjectTreeNode* >& modelElements, modelCDMProject* projectTree)
 {
+  this->Unselect();
   std::cout << "building tree" << std::endl;
   this->DeleteAllItems();
   modelElements.clear();