]> Creatis software - crea.git/commitdiff
Feature #1711
authorDaniel Gonzalez <Daniel.Gonzalez@creatis.insa-lyon.fr>
Tue, 13 Nov 2012 16:52:26 +0000 (16:52 +0000)
committerDaniel Gonzalez <Daniel.Gonzalez@creatis.insa-lyon.fr>
Tue, 13 Nov 2012 16:52:26 +0000 (16:52 +0000)
CreaDevManager application implementation:

Adjusting architecture: implementing standard class naming

31 files changed:
appli/creaDevManager/creaDevManager.cpp
lib/creaDevManagerLib/ControlCreaDevManagerMain.cpp
lib/creaDevManagerLib/ControlCreaDevManagerMain.h
lib/creaDevManagerLib/ModelCreaDevManagerTree.h [deleted file]
lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp [deleted file]
lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h [deleted file]
lib/creaDevManagerLib/controlCDMMain.cpp [new file with mode: 0644]
lib/creaDevManagerLib/controlCDMMain.h [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMIProjectTreeNode.h [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMMain.cpp [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMMain.h [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMProject.cpp [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMProject.h [new file with mode: 0644]
lib/creaDevManagerLib/modelCDMProjectsTree.cpp [moved from lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp with 66% similarity, mode: 0755]
lib/creaDevManagerLib/modelCDMProjectsTree.h [new file with mode: 0755]
lib/creaDevManagerLib/modelCDMProjectsTreeNode.cpp [new file with mode: 0755]
lib/creaDevManagerLib/modelCDMProjectsTreeNode.h [new file with mode: 0755]
lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMMainDescriptionPanel.h [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMMainFrame.cpp [moved from lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx with 57% similarity, mode: 0755]
lib/creaDevManagerLib/wxCDMMainFrame.h [new file with mode: 0755]
lib/creaDevManagerLib/wxCDMNewProjectDialog.cpp [moved from lib/creaDevManagerLib/wxCreaDevManagerNewProjectDialog.cpp with 53% similarity]
lib/creaDevManagerLib/wxCDMNewProjectDialog.h [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp [moved from lib/creaDevManagerLib/wxCreaDevManagerProjectActionsPanel.cpp with 65% similarity, mode: 0755]
lib/creaDevManagerLib/wxCDMProjectActionsPanel.h [moved from lib/creaDevManagerLib/wxCreaDevManagerProjectActionsPanel.h with 66% similarity, mode: 0755]
lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.cxx [moved from lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx with 55% similarity, mode: 0755]
lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h [moved from lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h with 62% similarity, mode: 0755]
lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp [deleted file]
lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h [deleted file]
lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h [deleted file]
lib/creaDevManagerLib/wxCreaDevManagerNewProjectDialog.h [deleted file]

index a702bf756db2075ce706b30d4de498130d0da0ba..3ced23f97ff3cb4c2610c2f2f9bd3673d76a7b60 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <iostream> // for std::cout
 #include "creaDevManager.h"
-#include "wxCreaDevManagerMainFrame.h"
+#include "wxCDMMainFrame.h"
 
 IMPLEMENT_APP(wxCreaDevManagerApp)
 
@@ -14,7 +14,7 @@ bool wxCreaDevManagerApp::OnInit()
 {
   wxApp::OnInit();
   
-  wxCreaDevManagerMainFrame* mainWindow = new wxCreaDevManagerMainFrame(NULL);
+  wxCDMMainFrame* mainWindow = new wxCDMMainFrame(NULL);
   SetTopWindow(mainWindow);
   mainWindow->SetSize(800, 600);
   mainWindow->Show(true);
index 56337bd8dfc8ca1b3ea445f62c7169c286f5e8ae..22d1eac666c189aa4045730ffa8ce59d8e097d18 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "ControlCreaDevManagerMain.h"
-#include "ModelCreaDevManagerTree.h"
 
 #include <cstdio>
 #include <fstream>
@@ -19,7 +18,7 @@ ControlCreaDevManagerMain::~ControlCreaDevManagerMain()
 {
 }
 
-const ModelCreaDevManagerTree& ControlCreaDevManagerMain::GetActiveProjects() const
+const modelCDMProjectsTree& ControlCreaDevManagerMain::GetActiveProjects() const
 {
   return projectsTree;
 }
@@ -92,7 +91,7 @@ const int ControlCreaDevManagerMain::OpenProject(const std::string& actualpath)
     }
   }
 
-  projectsTree.addRoot(path);
+  projectsTree.SetRoot(path);
   projectsTree.populateNode(path);
   return 0;
 }
index 786df739ad629b62d4f929b69d13eff6f40b896c..d29eead82592fe2c01b86f737cb5ccbd338cda7f 100644 (file)
@@ -9,7 +9,7 @@
 #define CONTROLCREADEVMANAGERMAIN_H_
 
 #include <iostream>
-#include "ModelCreaDevManagerTree.h"
+#include "modelCDMProjectsTree.h"
 
 class ControlCreaDevManagerMain
 {
@@ -17,14 +17,14 @@ public:
   ControlCreaDevManagerMain();
   ~ControlCreaDevManagerMain();
 
-  const ModelCreaDevManagerTree& GetActiveProjects() const;
+  const modelCDMProjectsTree& GetActiveProjects() const;
   bool LoadActiveProjects();
   bool UpdateActiveProjects();
   const int OpenProject(const std::string& path);
   bool CloseProject(const std::string& projectName);
 
 private:
-  ModelCreaDevManagerTree projectsTree;
+  modelCDMProjectsTree projectsTree;
 };
 
 
diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTree.h b/lib/creaDevManagerLib/ModelCreaDevManagerTree.h
deleted file mode 100644 (file)
index 2d677d7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ModelCreaDevManagerTree.h
- *
- *  Created on: 22/10/2012
- *      Author: daniel
- */
-
-#ifndef MODELCREADEVMANAGERTREE_H_
-#define MODELCREADEVMANAGERTREE_H_
-
-#include <vector>
-#include <iostream>
-#include "ModelCreaDevManagerTreeNode.h"
-
-class ModelCreaDevManagerTree
-{
-  public:
-    ModelCreaDevManagerTree();
-    ~ModelCreaDevManagerTree();
-
-
-    static bool CompareNodeItem(ModelCreaDevManagerTreeNode x, ModelCreaDevManagerTreeNode y);
-
-    void addRoot(std::string path);
-    void populateNode(std::string path);
-
-    std::vector<ModelCreaDevManagerTreeNode> projectRoots;
-  private:
-    void populateNode(ModelCreaDevManagerTreeNode& node);
-};
-
-#endif /* MODELCREADEVMANAGERTREE_H_ */
diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp
deleted file mode 100644 (file)
index 832f001..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * ModelCreaDevManagerTreeNode.cpp
- *
- *  Created on: 22/10/2012
- *      Author: daniel
- */
-
-#include "ModelCreaDevManagerTreeNode.h"
-
-ModelCreaDevManagerTreeNode::ModelCreaDevManagerTreeNode(std::string path, std::string name, unsigned char type, int level)
-{
-  this->_path = path;
-  this->_name = name;
-  this->_type = type;
-  this->_level = level;
-}
-
-ModelCreaDevManagerTreeNode::~ModelCreaDevManagerTreeNode()
-{
-}
-
-const std::string& ModelCreaDevManagerTreeNode::GetPath() const
-{
-  return this->_path;
-}
-
-const std::string& ModelCreaDevManagerTreeNode::GetName() const
-{
-  return this->_name;
-}
-const unsigned char& ModelCreaDevManagerTreeNode::GetType() const
-{
-  return this->_type;
-}
-
-const int& ModelCreaDevManagerTreeNode::GetLevel() const
-{
-  return this->_level;
-}
-
-const std::vector<ModelCreaDevManagerTreeNode>& ModelCreaDevManagerTreeNode::GetChildren() const
-{
-  return this->_children;
-}
-
-
-void ModelCreaDevManagerTreeNode::SetChildren(std::vector<ModelCreaDevManagerTreeNode>& children)
-{
-  this->_children.clear();
-  this->_children = children;
-}
diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h
deleted file mode 100644 (file)
index 61d9449..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * ModelCreaDevManagerTreeNode.h
- *
- *  Created on: 22/10/2012
- *      Author: daniel
- */
-
-#ifndef MODELCREADEVMANAGERTREENODE_H_
-#define MODELCREADEVMANAGERTREENODE_H_
-
-#include <vector>
-#include <iostream>
-
-
-
-class ModelCreaDevManagerTreeNode
-{
-  public:
-    ModelCreaDevManagerTreeNode(std::string path, std::string name, unsigned char type, int level);
-    ~ModelCreaDevManagerTreeNode();
-
-    const std::string& GetPath() const;
-    const std::string& GetName() const;
-    const unsigned char& GetType() const;
-    const int& GetLevel() const;
-    const std::vector<ModelCreaDevManagerTreeNode>& GetChildren() const;
-
-    void SetChildren(std::vector<ModelCreaDevManagerTreeNode>& children);
-
-
-  private:
-    std::string _path;
-    std::string _name;
-    unsigned char _type;
-    int _level;
-    std::vector<ModelCreaDevManagerTreeNode> _children;
-
-};
-
-#endif /* MODELCREADEVMANAGERTREENODE_H_ */
diff --git a/lib/creaDevManagerLib/controlCDMMain.cpp b/lib/creaDevManagerLib/controlCDMMain.cpp
new file mode 100644 (file)
index 0000000..f6bbe72
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * controlCDMMain.cpp
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#include "controlCDMMain.h"
+#include <iostream>
+
+controlCDMMain::controlCDMMain()
+{
+  this->main = NULL;
+}
+
+controlCDMMain::~controlCDMMain()
+{
+
+}
+
+const modelCDMProject& controlCDMMain::GetActiveProject()
+{
+  if(!main)
+    this->main = new modelCDMProject();
+  return *main;
+}
+
+bool controlCDMMain::UpdateActiveProject()
+{
+  return true;
+}
+
+const int controlCDMMain::OpenProject(const std::string& path)
+{
+  return 1;
+}
+
+bool controlCDMMain::CloseProject(const std::string& projectName)
+{
+  return true;
+}
+
diff --git a/lib/creaDevManagerLib/controlCDMMain.h b/lib/creaDevManagerLib/controlCDMMain.h
new file mode 100644 (file)
index 0000000..4bd9fab
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * controlCDMMain.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef CONTROLCDMMAIN_H_
+#define CONTROLCDMMAIN_H_
+
+#include "modelCDMProject.h"
+
+class controlCDMMain
+{
+public:
+  controlCDMMain();
+  ~controlCDMMain();
+  const modelCDMProject& GetActiveProject();
+  bool UpdateActiveProject();
+  const int OpenProject(const std::string& path);
+  bool CloseProject(const std::string& projectName);
+private:
+  modelCDMProject* main;
+};
+
+#endif /* CONTROLCDMMAIN_H_ */
diff --git a/lib/creaDevManagerLib/modelCDMIProjectTreeNode.h b/lib/creaDevManagerLib/modelCDMIProjectTreeNode.h
new file mode 100644 (file)
index 0000000..e48b8c7
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * modelCDMIProjectTreeNode.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef MODELCDMIPROJECTTREENODE_H_
+#define MODELCDMIPROJECTTREENODE_H_
+
+#include <iostream>
+#include <vector>
+
+class modelCDMIProjectTreeNode
+{
+public:
+  virtual ~modelCDMIProjectTreeNode(){}
+
+  const std::string& GetPath() const
+  {
+    return this->path;
+  }
+  const std::string& GetName() const
+  {
+    return this->name;
+  }
+  const unsigned char& GetType() const
+  {
+    return this->type;
+  }
+  const int& GetLevel() const
+  {
+    return this->level;
+  }
+  const std::vector<modelCDMIProjectTreeNode>& GetChildren() const
+  {
+    return this->children;
+  }
+  void SetChildren(std::vector<modelCDMIProjectTreeNode>& children)
+  {
+    this->children.clear();
+    this->children = children;
+  }
+protected:
+  std::string path;
+  std::string name;
+  unsigned char type;
+  int level;
+  std::vector<modelCDMIProjectTreeNode> children;
+};
+
+
+#endif /* MODELCDMIPROJECTTREENODE_H_ */
diff --git a/lib/creaDevManagerLib/modelCDMMain.cpp b/lib/creaDevManagerLib/modelCDMMain.cpp
new file mode 100644 (file)
index 0000000..9cde404
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * modelCDMMain.cpp
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#include "modelCDMMain.h"
+
+#include <iostream>
+
+modelCDMMain::modelCDMMain()
+{
+  this->project = NULL;
+}
+modelCDMMain::~modelCDMMain()
+{
+  if (this->project != NULL)
+    delete this->project;
+}
+
+modelCDMProject* modelCDMMain::GetProject()
+{
+  return this->project;
+}
+void modelCDMMain::SetProject(modelCDMProject* project)
+{
+  if(this->project != NULL && this->project != project)
+    delete this->project;
+  this->project = project;
+}
+
diff --git a/lib/creaDevManagerLib/modelCDMMain.h b/lib/creaDevManagerLib/modelCDMMain.h
new file mode 100644 (file)
index 0000000..6fd8e5d
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * modelCDMMain.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef MODELCDMMAIN_H_
+#define MODELCDMMAIN_H_
+
+#include "modelCDMProject.h"
+
+class modelCDMMain
+{
+public:
+  modelCDMMain();
+  ~modelCDMMain();
+
+  modelCDMProject* GetProject();
+  void SetProject(modelCDMProject* project);
+
+private:
+  modelCDMProject* project;
+};
+
+
+#endif /* MODELCDMMAIN_H_ */
diff --git a/lib/creaDevManagerLib/modelCDMProject.cpp b/lib/creaDevManagerLib/modelCDMProject.cpp
new file mode 100644 (file)
index 0000000..0ad6fe4
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * modelCDMProject.cpp
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#include "modelCDMProject.h"
+
+modelCDMProject::modelCDMProject(std::string name, std::string path, unsigned char type, int level)
+{
+  this->name = name;
+  this->path = path;
+  this->type = type;
+  this->level = level;
+}
+
diff --git a/lib/creaDevManagerLib/modelCDMProject.h b/lib/creaDevManagerLib/modelCDMProject.h
new file mode 100644 (file)
index 0000000..c073466
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * modelCDMProject.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef MODELCDMPROJECT_H_
+#define MODELCDMPROJECT_H_
+
+#include "modelCDMIProjectTreeNode.h"
+
+class modelCDMProject : public modelCDMIProjectTreeNode
+{
+public:
+  modelCDMProject();
+  modelCDMProject(std::string name, std::string path, unsigned char type, int level);
+  ~modelCDMProject(){}
+
+};
+
+#endif /* MODELCDMPROJECT_H_ */
old mode 100644 (file)
new mode 100755 (executable)
similarity index 66%
rename from lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp
rename to lib/creaDevManagerLib/modelCDMProjectsTree.cpp
index e980346..cc09a9f
@@ -5,26 +5,23 @@
  *      Author: daniel
  */
 
-#include "ModelCreaDevManagerTree.h"
+#include "modelCDMProjectsTree.h"
 
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-#include <string>
-#include <cstring>
 #include <creaWx.h>
 #include <wx/dir.h>
 
+#include <sstream>
+#include <algorithm>
 
-ModelCreaDevManagerTree::ModelCreaDevManagerTree()
+modelCDMProjectsTree::modelCDMProjectsTree()
 {
 }
 
-ModelCreaDevManagerTree::~ModelCreaDevManagerTree()
+modelCDMProjectsTree::~modelCDMProjectsTree()
 {
 }
 
-bool ModelCreaDevManagerTree::CompareNodeItem(ModelCreaDevManagerTreeNode x, ModelCreaDevManagerTreeNode y)
+bool modelCDMProjectsTree::CompareNodeItem(modelCDMProjectsTreeNode x, modelCDMProjectsTreeNode y)
 {
   bool returnValue;
   bool noWinner = true;
@@ -70,7 +67,7 @@ bool ModelCreaDevManagerTree::CompareNodeItem(ModelCreaDevManagerTreeNode x, Mod
   return returnValue;
 }
 
-void ModelCreaDevManagerTree::addRoot(std::string path)
+void modelCDMProjectsTree::SetRoot(std::string path)
 {
   std::stringstream p(path);
   std::vector<std::string> breadcrumbs;
@@ -91,26 +88,23 @@ void ModelCreaDevManagerTree::addRoot(std::string path)
   name = breadcrumbs[breadcrumbs.size()-1];
 
   bool projectFound = false;
-  for (int i = 0; i < this->projectRoots.size(); i++)
-  {
-    if(this->projectRoots[i].GetName() == name)
-      projectFound = true;
-  }
+  if(projectRoot.GetName() == name)
+    projectFound = true;
 
   if(!projectFound)
   {
-    this->projectRoots.push_back(ModelCreaDevManagerTreeNode(path,name,DT_DIR,0));
+    this->projectRoot = modelCDMProjectsTreeNode(path,name,DT_DIR,0);
   }else{
     std::cout << "already existing ";
   }
 
-  std::cout << "project root added: " << name << " in " << path << std::endl;
+  std::cout << "project root set: " << name << " in " << path << std::endl;
 }
 
-void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node)
+void modelCDMProjectsTree::populateNode(modelCDMProjectsTreeNode& node)
 {
   //std::cout << "populating " << node.GetName() << " path " << node.GetPath() << "..." << std::endl;
-  std::vector <ModelCreaDevManagerTreeNode>*  nodes = new std::vector <ModelCreaDevManagerTreeNode>;
+  std::vector <modelCDMProjectsTreeNode>*  nodes = new std::vector <modelCDMProjectsTreeNode>;
 
   std::string path = node.GetPath()+node.GetName()+"/";
 
@@ -125,7 +119,7 @@ void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node)
   bool cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_DIRS);
   while (cont)
   {
-    ModelCreaDevManagerTreeNode innerNode = ModelCreaDevManagerTreeNode(path, crea::wx2std(fileName), wxDIR_DIRS, node.GetLevel()+1);
+      modelCDMProjectsTreeNode innerNode = modelCDMProjectsTreeNode(path, crea::wx2std(fileName), wxDIR_DIRS, node.GetLevel()+1);
     this->populateNode(innerNode);
     nodes->push_back(innerNode);
     cont = dir.GetNext(&fileName);
@@ -134,7 +128,7 @@ void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node)
   cont = dir.GetFirst(&fileName, wxEmptyString, wxDIR_FILES);
   while (cont)
   {
-    ModelCreaDevManagerTreeNode innerNode = ModelCreaDevManagerTreeNode(path, crea::wx2std(fileName), wxDIR_FILES, node.GetLevel()+1);
+    modelCDMProjectsTreeNode innerNode = modelCDMProjectsTreeNode(path, crea::wx2std(fileName), wxDIR_FILES, node.GetLevel()+1);
     nodes->push_back(innerNode);
     cont = dir.GetNext(&fileName);
   }
@@ -180,19 +174,14 @@ void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node)
   }*/
 }
 
-void ModelCreaDevManagerTree::populateNode(std::string path)
+void modelCDMProjectsTree::populateNode(std::string path)
 {
   if(path[path.size()-1] != '/')
     path+="/";
   std::cout << "searching " << path << std::endl;
-  for (int i = 0; i < this->projectRoots.size(); i++)
+  if(this->projectRoot.GetPath()+this->projectRoot.GetName()+"/" == path)
   {
-    //std::cout << (this->projectRoots[i].GetPath() + this->projectRoots[i].GetName() + "/") << "..." << std::endl;
-    if(this->projectRoots[i].GetPath()+this->projectRoots[i].GetName()+"/" == path)
-    {
-        std::cout << "Populating Project: " << path << "..." << std::endl;
-      this->populateNode(this->projectRoots[i]);
-      break;
-    }
+      std::cout << "Populating Project: " << path << "..." << std::endl;
+    this->populateNode(this->projectRoot);
   }
 }
diff --git a/lib/creaDevManagerLib/modelCDMProjectsTree.h b/lib/creaDevManagerLib/modelCDMProjectsTree.h
new file mode 100755 (executable)
index 0000000..4ed3754
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * modelCDMProjectsTree.h
+ *
+ *  Created on: 22/10/2012
+ *      Author: daniel
+ */
+
+#ifndef MODELCDMPROJECTSTREE_H_
+#define MODELCDMPROJECTSTREE_H_
+
+#include <iostream>
+#include "modelCDMProjectsTreeNode.h"
+
+class modelCDMProjectsTree
+{
+  public:
+  modelCDMProjectsTree();
+    ~modelCDMProjectsTree();
+
+
+    static bool CompareNodeItem(modelCDMProjectsTreeNode x, modelCDMProjectsTreeNode y);
+
+    void SetRoot(std::string path);
+    void populateNode(std::string path);
+
+    modelCDMProjectsTreeNode projectRoot;
+  protected:
+    void populateNode(modelCDMProjectsTreeNode& node);
+};
+
+#endif /* MODELCDMPROJECTSTREE_H_ */
diff --git a/lib/creaDevManagerLib/modelCDMProjectsTreeNode.cpp b/lib/creaDevManagerLib/modelCDMProjectsTreeNode.cpp
new file mode 100755 (executable)
index 0000000..8803432
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * ModelCreaDevManagerTreeNode.cpp
+ *
+ *  Created on: 22/10/2012
+ *      Author: daniel
+ */
+
+#include "modelCDMProjectsTreeNode.h"
+
+modelCDMProjectsTreeNode::modelCDMProjectsTreeNode(std::string path, std::string name, unsigned char type, int level)
+{
+  this->_path = path;
+  this->_name = name;
+  this->_type = type;
+  this->_level = level;
+}
+
+modelCDMProjectsTreeNode::~modelCDMProjectsTreeNode()
+{
+}
+
+const std::string& modelCDMProjectsTreeNode::GetPath() const
+{
+  return this->_path;
+}
+
+const std::string& modelCDMProjectsTreeNode::GetName() const
+{
+  return this->_name;
+}
+const unsigned char& modelCDMProjectsTreeNode::GetType() const
+{
+  return this->_type;
+}
+
+const int& modelCDMProjectsTreeNode::GetLevel() const
+{
+  return this->_level;
+}
+
+const std::vector<modelCDMProjectsTreeNode>& modelCDMProjectsTreeNode::GetChildren() const
+{
+  return this->_children;
+}
+
+
+void modelCDMProjectsTreeNode::SetChildren(std::vector<modelCDMProjectsTreeNode>& children)
+{
+  this->_children.clear();
+  this->_children = children;
+}
diff --git a/lib/creaDevManagerLib/modelCDMProjectsTreeNode.h b/lib/creaDevManagerLib/modelCDMProjectsTreeNode.h
new file mode 100755 (executable)
index 0000000..208104c
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * modelCDMProjectsTreeNode.h
+ *
+ *  Created on: 22/10/2012
+ *      Author: daniel
+ */
+
+#ifndef MODELCDMPROJECTSTREENODE_H_
+#define MODELCDMPROJECTSTREENODE_H_
+
+#include <iostream>
+#include <vector>
+
+class modelCDMProjectsTreeNode
+{
+public:
+  modelCDMProjectsTreeNode();
+  modelCDMProjectsTreeNode(std::string path, std::string name, unsigned char type, int level);
+  ~modelCDMProjectsTreeNode();
+
+  const std::string& GetPath() const;
+  const std::string& GetName() const;
+  const unsigned char& GetType() const;
+  const int& GetLevel() const;
+  const std::vector<modelCDMProjectsTreeNode>& GetChildren() const;
+
+  void SetChildren(std::vector<modelCDMProjectsTreeNode>& children);
+
+
+private:
+  std::string _path;
+  std::string _name;
+  unsigned char _type;
+  int _level;
+  std::vector<modelCDMProjectsTreeNode> _children;
+
+};
+
+#endif /* MODELCDMPROJECTSTREENODE_H_ */
diff --git a/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp
new file mode 100644 (file)
index 0000000..ca8f09c
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * wxCDMMainPanel.cpp
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#include "wxCDMMainDescriptionPanel.h"
+#include "creaDevManagerIds.h"
+#include "images/Cicon64.xpm"
+
+
+wxCDMMainDescriptionPanel::wxCDMMainDescriptionPanel(
+    wxWindow* parent,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& pos,
+    const wxSize& size,
+    long style
+)
+{
+  wxCDMMainDescriptionPanel::Create(parent, id, caption, pos, size, style);
+}
+
+wxCDMMainDescriptionPanel::~wxCDMMainDescriptionPanel()
+{
+}
+
+bool wxCDMMainDescriptionPanel::Create(
+    wxWindow* parent,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& pos,
+    const wxSize& size,
+    long style
+)
+{
+  wxPanel::Create(parent, id, pos, size, style);
+  CreateControls();
+  return TRUE;
+}
+
+void wxCDMMainDescriptionPanel::CreateControls()
+{
+  wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+  //Welcome
+  sizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_CENTER, 0);
+
+  //Image
+  sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(Cicon)),0, wxALIGN_CENTER, 0);
+
+  //Crea Development Manager
+  sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0);
+
+  //Actions
+  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
+  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
+  sizer -> Add(actionsBoxInnerSizer, 2, wxEXPAND | wxALL, 20);
+
+  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_NEWPROJECT, _T("New Project")), 0, wxRIGHT | wxLEFT, 20);
+  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPENPROJECT, _T("Open Project")), 0, wxRIGHT | wxLEFT, 20);
+
+  //Asign sizer
+  sizer->SetSizeHints(this);
+  SetSizer(sizer);
+}
+
+void wxCDMMainDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
+{
+  event.ResumePropagation(1);
+  event.Skip();
+}
+
+void wxCDMMainDescriptionPanel::OnBtnOpenProject(wxCommandEvent& event)
+{
+  event.ResumePropagation(1);
+  event.Skip();
+}
+
diff --git a/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.h b/lib/creaDevManagerLib/wxCDMMainDescriptionPanel.h
new file mode 100644 (file)
index 0000000..62b4cd1
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * wxCDMMainDescriptionPanel.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef WXCDMMAINDESCRIPTIONPANEL_H_
+#define WXCDMMAINDESCRIPTIONPANEL_H_
+
+#include <creaWx.h>
+#include <wx/panel.h>
+
+class wxCDMMainDescriptionPanel : public wxPanel
+{
+public:
+    wxCDMMainDescriptionPanel(
+        wxWindow* parent,
+        wxWindowID id = -1,
+        const wxString& caption = _("Description Frame"),
+        const wxPoint& pos = wxDefaultPosition,
+        const wxSize& size = wxDefaultSize,
+        long style = wxDEFAULT_FRAME_STYLE
+    );
+
+    ~wxCDMMainDescriptionPanel();
+
+    bool Create(
+        wxWindow* parent,
+        wxWindowID id = -1,
+        const wxString& caption = _("Description Frame"),
+        const wxPoint& pos = wxDefaultPosition,
+        const wxSize& size = wxDefaultSize,
+        long style = wxDEFAULT_FRAME_STYLE
+    );
+
+    void CreateControls();
+
+//handlers
+protected:
+    void OnBtnNewProject(wxCommandEvent& event);
+    void OnBtnOpenProject(wxCommandEvent& event);
+};
+
+#endif /* WXCDMMAINDESCRIPTIONPANEL_H_ */
old mode 100644 (file)
new mode 100755 (executable)
similarity index 57%
rename from lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx
rename to lib/creaDevManagerLib/wxCDMMainFrame.cpp
index b48582a..4f92e01
@@ -1,52 +1,45 @@
-#include "wxCreaDevManagerMainFrame.h"
-#include "creaDevManagerIds.h"
 
-#include "wxCreaDevManagerTreeCtrl.h"
+#include "wxCDMMainFrame.h"
 
-#include "wxCreaDevManagerDescriptionPanel.h"
-#include "wxCreaDevManagerProjectActionsPanel.h"
-#include "wxCreaDevManagerNewProjectDialog.h"
-#include "ControlCreaDevManagerMain.h"
+#include "creaDevManagerIds.h"
+#include "wxCDMMainDescriptionPanel.h"
+#include "wxCDMProjectActionsPanel.h"
+#include "wxCDMNewProjectDialog.h"
 
-#include <wx/dirdlg.h>
 
 #include <iostream>
-#include <cstdio>
-#include <iterator>
-#include <fstream>
-#include <string>
-#include <algorithm>
-
-
-BEGIN_EVENT_TABLE(wxCreaDevManagerMainFrame, wxFrame)
-  EVT_MENU(ID_MENU_NEW_PROJECT, wxCreaDevManagerMainFrame::OnMenuNewProject)
-  EVT_MENU(ID_MENU_OPEN_PROJECT, wxCreaDevManagerMainFrame::OnMenuOpenProject)
-  EVT_MENU(ID_MENU_OPEN_RECENT, wxCreaDevManagerMainFrame::OnMenuOpenRecent)
-  EVT_MENU(ID_MENU_CLOSE_PROJECT, wxCreaDevManagerMainFrame::OnMenuCloseProject)
-  EVT_MENU(ID_MENU_CLOSE_ALL_PROJECTS, wxCreaDevManagerMainFrame::OnMenuCloseAllProjects)
-  EVT_MENU(ID_MENU_EXPORT_HIERARCHY, wxCreaDevManagerMainFrame::OnMenuExportHierarchy)
-  EVT_MENU(ID_MENU_EXIT, wxCreaDevManagerMainFrame::OnMenuExit)
-  EVT_MENU(ID_MENU_REFRESH_PROJECT, wxCreaDevManagerMainFrame::OnMenuRefreshProject)
-  EVT_MENU(ID_MENU_CUT, wxCreaDevManagerMainFrame::OnMenuMenuCut)
-  EVT_MENU(ID_MENU_COPY, wxCreaDevManagerMainFrame::OnMenuMenuCopy)
-  EVT_MENU(ID_MENU_PASTE, wxCreaDevManagerMainFrame::OnMenuMenuPaste)
-  EVT_MENU(ID_MENU_DELETE, wxCreaDevManagerMainFrame::OnMenuMenuDelete)
-  EVT_MENU(ID_MENU_SELECT_ALL, wxCreaDevManagerMainFrame::OnMenuSelectAll)
-  EVT_MENU(ID_MENU_SELECT_NONE, wxCreaDevManagerMainFrame::OnMenuSelectNone)
-  EVT_MENU(ID_MENU_EVENT_LOG, wxCreaDevManagerMainFrame::OnMenuEventLog)
-  EVT_MENU(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxCreaDevManagerMainFrame::OnMenuBBTKGraphicalEditor)
-  EVT_MENU(ID_MENU_MINITOOLS, wxCreaDevManagerMainFrame::OnMenuMiniTools)
-  EVT_MENU(ID_MENU_CODE_EDITOR, wxCreaDevManagerMainFrame::OnMenuCodeEditor)
-  EVT_MENU(ID_MENU_COMMAND_LINE, wxCreaDevManagerMainFrame::OnMenuCommandLine)
-  EVT_MENU(ID_MENU_HELP, wxCreaDevManagerMainFrame::OnMenuHelp)
-  EVT_MENU(ID_MENU_REPORT_BUG, wxCreaDevManagerMainFrame::OnMenuReportBug)
-  EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCreaDevManagerMainFrame::OnMenuAboutCreaDevManager)
-  EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCreaDevManagerMainFrame::OnMenuAboutCreatis)
-  EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCreaDevManagerMainFrame::OnMenuNewProject)
-  EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCreaDevManagerMainFrame::OnMenuOpenProject)
+
+
+
+BEGIN_EVENT_TABLE(wxCDMMainFrame, wxFrame)
+  EVT_MENU(ID_MENU_NEW_PROJECT, wxCDMMainFrame::OnMenuNewProject)
+  EVT_MENU(ID_MENU_OPEN_PROJECT, wxCDMMainFrame::OnMenuOpenProject)
+  EVT_MENU(ID_MENU_OPEN_RECENT, wxCDMMainFrame::OnMenuOpenRecent)
+  EVT_MENU(ID_MENU_CLOSE_PROJECT, wxCDMMainFrame::OnMenuCloseProject)
+  EVT_MENU(ID_MENU_CLOSE_ALL_PROJECTS, wxCDMMainFrame::OnMenuCloseAllProjects)
+  EVT_MENU(ID_MENU_EXPORT_HIERARCHY, wxCDMMainFrame::OnMenuExportHierarchy)
+  EVT_MENU(ID_MENU_EXIT, wxCDMMainFrame::OnMenuExit)
+  EVT_MENU(ID_MENU_REFRESH_PROJECT, wxCDMMainFrame::OnMenuRefreshProject)
+  EVT_MENU(ID_MENU_CUT, wxCDMMainFrame::OnMenuMenuCut)
+  EVT_MENU(ID_MENU_COPY, wxCDMMainFrame::OnMenuMenuCopy)
+  EVT_MENU(ID_MENU_PASTE, wxCDMMainFrame::OnMenuMenuPaste)
+  EVT_MENU(ID_MENU_DELETE, wxCDMMainFrame::OnMenuMenuDelete)
+  EVT_MENU(ID_MENU_SELECT_ALL, wxCDMMainFrame::OnMenuSelectAll)
+  EVT_MENU(ID_MENU_SELECT_NONE, wxCDMMainFrame::OnMenuSelectNone)
+  EVT_MENU(ID_MENU_EVENT_LOG, wxCDMMainFrame::OnMenuEventLog)
+  EVT_MENU(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxCDMMainFrame::OnMenuBBTKGraphicalEditor)
+  EVT_MENU(ID_MENU_MINITOOLS, wxCDMMainFrame::OnMenuMiniTools)
+  EVT_MENU(ID_MENU_CODE_EDITOR, wxCDMMainFrame::OnMenuCodeEditor)
+  EVT_MENU(ID_MENU_COMMAND_LINE, wxCDMMainFrame::OnMenuCommandLine)
+  EVT_MENU(ID_MENU_HELP, wxCDMMainFrame::OnMenuHelp)
+  EVT_MENU(ID_MENU_REPORT_BUG, wxCDMMainFrame::OnMenuReportBug)
+  EVT_MENU(ID_MENU_ABOUT_CREADEVMANAGER, wxCDMMainFrame::OnMenuAboutCreaDevManager)
+  EVT_MENU(ID_MENU_ABOUT_CREATIS, wxCDMMainFrame::OnMenuAboutCreatis)
+  EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCDMMainFrame::OnMenuNewProject)
+  EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCDMMainFrame::OnMenuOpenProject)
 END_EVENT_TABLE()
 
-wxCreaDevManagerMainFrame::wxCreaDevManagerMainFrame(
+wxCDMMainFrame::wxCDMMainFrame(
   wxWindow* parent,
   wxWindowID id,
   const wxString& caption,
@@ -58,18 +51,12 @@ wxCreaDevManagerMainFrame::wxCreaDevManagerMainFrame(
   Create(parent, id, caption, pos, size, style);
 }
 
-wxCreaDevManagerMainFrame::~wxCreaDevManagerMainFrame()
+wxCDMMainFrame::~wxCDMMainFrame()
 {
   auiManager.UnInit();
 }
 
-void wxCreaDevManagerMainFrame::UpdateVisual()
-{
-  auiManager.Update();
-  this->Update();
-}
-
-bool wxCreaDevManagerMainFrame::Create(
+bool wxCDMMainFrame::Create(
   wxWindow* parent,
   wxWindowID id,
   const wxString& caption,
@@ -79,14 +66,13 @@ bool wxCreaDevManagerMainFrame::Create(
 )
 {
   wxFrame::Create(parent, id, caption, pos, size, style);
-  this->controller = new ControlCreaDevManagerMain();
-  this->controller->LoadActiveProjects();
+  this->model = new modelCDMMain();
   CreateMenus();
   CreateControls();
   return TRUE;
 }
 
-void wxCreaDevManagerMainFrame::CreateMenus()
+void wxCDMMainFrame::CreateMenus()
 {
   wxMenuBar* menuBar = new wxMenuBar;
 
@@ -147,13 +133,13 @@ void wxCreaDevManagerMainFrame::CreateMenus()
 
 }
 
-void wxCreaDevManagerMainFrame::CreateControls()
+void wxCDMMainFrame::CreateControls()
 {
 
   auiManager.SetManagedWindow(this);
 
 
-  tree_Projects = new wxCreaDevManagerTreeCtrl(
+  tree_Projects = new wxCDMProjectsTreeCtrl(
     this,
     ID_TREE_PROJECTS,
     wxDefaultPosition,
@@ -162,7 +148,7 @@ void wxCreaDevManagerMainFrame::CreateControls()
   );
   tree_Projects->SetMinSize(wxSize(200,200));
 
-  panel_Properties = new wxCreaDevManagerDescriptionPanel(
+  panel_Properties = new wxCDMMainDescriptionPanel(
     this,
     ID_WINDOW_PROPERTIES,
     wxString("Description Panel"),
@@ -173,7 +159,7 @@ void wxCreaDevManagerMainFrame::CreateControls()
 
 
 
-  panel_ProjectActions = new wxCreaDevManagerProjectActionsPanel(
+  panel_ProjectActions = new wxCDMProjectActionsPanel(
     this,
     ID_WINDOW_PROJ_ACTIONS,
     wxString("Project Actions Panel"),
@@ -194,20 +180,24 @@ void wxCreaDevManagerMainFrame::CreateControls()
 
 //Event Handlers
 //File menu
-void wxCreaDevManagerMainFrame::OnMenuNewProject(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuNewProject(wxCommandEvent& event)
 {
-  wxCreaDevManagerNewProjectDialog* dialog = new wxCreaDevManagerNewProjectDialog(this, this->controller);
+  wxCDMNewProjectDialog* dialog = new wxCDMNewProjectDialog(this);
   long userResponse;
   userResponse = dialog->ShowModal();
 
-  ((wxCreaDevManagerTreeCtrl*)tree_Projects)->BuildTree(this->controller->GetActiveProjects());
-
-  this->UpdateVisual();
+  if(userResponse == wxID_FORWARD)
+  {
+    //TODO createProject
+    std::cerr << "should create Project here" << std::endl;
+    //tree_Projects->BuildTree(this->model->GetActiveProjects());
+  }
 
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuOpenProject(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuOpenProject(wxCommandEvent& event)
 {
+  /*
   long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST;
   wxDirDialog* FD = new wxDirDialog(this, wxString("Select the project directory"), wxString(""), style);
   long userResponse;
@@ -232,29 +222,30 @@ void wxCreaDevManagerMainFrame::OnMenuOpenProject(wxCommandEvent& event)
 
     auiManager.Update();
   }
+  */
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuOpenRecent(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuOpenRecent(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuOpenRecent not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuCloseProject(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuCloseProject(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuCloseProject not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuCloseAllProjects not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuExportHierarchy(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuExportHierarchy(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuExportHierarchy not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuExit(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuExit(wxCommandEvent& event)
 {
   std::cout << "Closing CreaDevManager..." << std::endl;
   Close();
@@ -262,86 +253,86 @@ void wxCreaDevManagerMainFrame::OnMenuExit(wxCommandEvent& event)
 }
 
 //Edit Menu
-void wxCreaDevManagerMainFrame::OnMenuRefreshProject(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuRefreshProject(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuRefreshProject not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuMenuCut(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuMenuCut(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuMenuCut not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuMenuCopy(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuMenuCopy(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuMenuCopy not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuMenuPaste(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuMenuPaste(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuMenuPaste not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuMenuDelete(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuMenuDelete(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuMenuDelete not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuSelectAll(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuSelectAll(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuSelectAll not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuSelectNone(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuSelectNone(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuSelectNone not implemented" << std::endl;
   event.Skip();
 }
 
 //Tools Menu
-void wxCreaDevManagerMainFrame::OnMenuEventLog(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuEventLog(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuEventLog not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuBBTKGraphicalEditor(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuBBTKGraphicalEditor(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuBBTKGraphicalEditor not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuMiniTools(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuMiniTools(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuMiniTools not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuCodeEditor(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuCodeEditor(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuCodeEditor not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuCommandLine(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuCommandLine(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuCommandLine not implemented" << std::endl;
   event.Skip();
 }
 
 //Help Menu
-void wxCreaDevManagerMainFrame::OnMenuHelp(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuHelp(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuHelp not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuReportBug(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuReportBug(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuReportBug not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuAboutCreaDevManager(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuAboutCreaDevManager(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuAboutCreaDevManager not implemented" << std::endl;
   event.Skip();
 }
-void wxCreaDevManagerMainFrame::OnMenuAboutCreatis(wxCommandEvent& event)
+void wxCDMMainFrame::OnMenuAboutCreatis(wxCommandEvent& event)
 {
   std::cerr << "Event OnMenuAboutCreatis not implemented" << std::endl;
   event.Skip();
diff --git a/lib/creaDevManagerLib/wxCDMMainFrame.h b/lib/creaDevManagerLib/wxCDMMainFrame.h
new file mode 100755 (executable)
index 0000000..8e5826a
--- /dev/null
@@ -0,0 +1,89 @@
+#ifndef WXCDMMAINFRAME_H_INCLUDED
+#define WXCDMMAINFRAME_H_INCLUDED
+
+#include <creaWx.h>
+#include <wx/aui/aui.h>
+#include "wxCDMProjectsTreeCtrl.h"
+#include "modelCDMMain.h"
+
+class wxCDMMainFrame:public wxFrame
+{
+  DECLARE_EVENT_TABLE()
+
+public:
+  wxCDMMainFrame(
+      wxWindow* parent,
+      wxWindowID id = -1,
+      const wxString& caption = wxString("CREATIS CreaDevManager"),
+      const wxPoint& pos = wxDefaultPosition,
+      const wxSize& size = wxDefaultSize,
+      long style = wxDEFAULT_FRAME_STYLE
+  );
+
+  ~wxCDMMainFrame();
+
+  bool Create(
+      wxWindow* parent,
+      wxWindowID id = -1,
+      const wxString& caption = wxString("CREATIS CreaDevManager"),
+      const wxPoint& pos = wxDefaultPosition,
+      const wxSize& size = wxDefaultSize,
+      long style = wxDEFAULT_FRAME_STYLE
+  );
+
+protected:
+  void CreateMenus();
+  void CreateControls();
+
+private:
+
+  //Menus
+  wxMenu* menu_File;
+  wxMenu* menu_Edit;
+  wxMenu* menu_Tools;
+  wxMenu* menu_Help;
+
+  //Controls
+  wxAuiManager auiManager;
+  wxCDMProjectsTreeCtrl* tree_Projects;
+  wxPanel* panel_Properties;
+  wxPanel* panel_ProjectActions;
+
+  //Model
+  modelCDMMain* model;
+
+  //events
+protected:
+  //File
+  void OnMenuNewProject(wxCommandEvent& event);
+  void OnMenuOpenProject(wxCommandEvent& event);
+  void OnMenuOpenRecent(wxCommandEvent& event);
+  void OnMenuCloseProject(wxCommandEvent& event);
+  void OnMenuCloseAllProjects(wxCommandEvent& event);
+  void OnMenuExportHierarchy(wxCommandEvent& event);
+  void OnMenuExit(wxCommandEvent& event);
+
+  //Edit
+  void OnMenuRefreshProject(wxCommandEvent& event);
+  void OnMenuMenuCut(wxCommandEvent& event);
+  void OnMenuMenuCopy(wxCommandEvent& event);
+  void OnMenuMenuPaste(wxCommandEvent& event);
+  void OnMenuMenuDelete(wxCommandEvent& event);
+  void OnMenuSelectAll(wxCommandEvent& event);
+  void OnMenuSelectNone(wxCommandEvent& event);
+
+  //Tools
+  void OnMenuEventLog(wxCommandEvent& event);
+  void OnMenuBBTKGraphicalEditor(wxCommandEvent& event);
+  void OnMenuMiniTools(wxCommandEvent& event);
+  void OnMenuCodeEditor(wxCommandEvent& event);
+  void OnMenuCommandLine(wxCommandEvent& event);
+
+  //Help
+  void OnMenuHelp(wxCommandEvent& event);
+  void OnMenuReportBug(wxCommandEvent& event);
+  void OnMenuAboutCreaDevManager(wxCommandEvent& event);
+  void OnMenuAboutCreatis(wxCommandEvent& event);
+};
+
+#endif
similarity index 53%
rename from lib/creaDevManagerLib/wxCreaDevManagerNewProjectDialog.cpp
rename to lib/creaDevManagerLib/wxCDMNewProjectDialog.cpp
index 5fc677242dcbd1dde5e4f8d53db81c5e4e983696..478e419ef0e3a30dbed1e8e06af5287f5bc9aa65 100644 (file)
@@ -1,51 +1,43 @@
 /*
- * wxCreaDevManagerNewProjectDialog.cpp
+ * wxCDMNewProjectDialog.cpp
  *
- *  Created on: 2/11/2012
+ *  Created on: 13/11/2012
  *      Author: daniel
  */
 
-#include "wxCreaDevManagerNewProjectDialog.h"
-
-#include "wx/richtext/richtextctrl.h"
+#include "wxCDMNewProjectDialog.h"
 
 #include "creaDevManagerIds.h"
 
-#include "ControlCreaDevManagerProject.h"
-
-#include "wxCreaDevManagerMainFrame.h"
-
-BEGIN_EVENT_TABLE(wxCreaDevManagerNewProjectDialog, wxDialog)
-  EVT_BUTTON(ID_BUTTON_NEXT, wxCreaDevManagerNewProjectDialog::OnCreateProject)
-  EVT_BUTTON(ID_BUTTON_CANCEL, wxCreaDevManagerNewProjectDialog::OnCancel)
-  EVT_BUTTON(ID_BUTTON_CHOOSE, wxCreaDevManagerNewProjectDialog::OnChooseLocation)
+BEGIN_EVENT_TABLE(wxCDMNewProjectDialog, wxDialog)
+  EVT_BUTTON(ID_BUTTON_NEXT, wxCDMNewProjectDialog::OnCreateProject)
+  EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMNewProjectDialog::OnCancel)
+  EVT_BUTTON(ID_BUTTON_CHOOSE, wxCDMNewProjectDialog::OnChooseLocation)
 END_EVENT_TABLE()
 
-wxCreaDevManagerNewProjectDialog::wxCreaDevManagerNewProjectDialog(
-  wxWindow* parent,
-  ControlCreaDevManagerMain* controller,
-  wxWindowID id,
-  const wxString& caption,
-  const wxPoint& position,
-  const wxSize& size,
-  long style
+wxCDMNewProjectDialog::wxCDMNewProjectDialog(
+    wxWindow* parent,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& position,
+    const wxSize& size,
+    long style
 )
 {
-  this->Controller = controller;
-  wxCreaDevManagerNewProjectDialog::Create(parent, id, caption, position, size, style);
+  wxCDMNewProjectDialog::Create(parent, id, caption, position, size, style);
 }
 
-wxCreaDevManagerNewProjectDialog::~wxCreaDevManagerNewProjectDialog()
+wxCDMNewProjectDialog::~wxCDMNewProjectDialog()
 {
 }
 
-bool wxCreaDevManagerNewProjectDialog::Create(
-  wxWindow* parent,
-  wxWindowID id,
-  const wxString& caption,
-  const wxPoint& position,
-  const wxSize& size,
-  long style
+bool wxCDMNewProjectDialog::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);
@@ -55,7 +47,24 @@ bool wxCreaDevManagerNewProjectDialog::Create(
   return TRUE;
 }
 
-void wxCreaDevManagerNewProjectDialog::CreateControls()
+const wxString wxCDMNewProjectDialog::GetProjectLocation()
+{
+  return this->projectLocation->GetLabel();
+}
+const wxString wxCDMNewProjectDialog::GetProjectName()
+{
+  return this->projectName->GetValue();
+}
+const wxString wxCDMNewProjectDialog::GetPackageAuthor()
+{
+  return this->packageAuthor->GetValue();
+}
+const wxString wxCDMNewProjectDialog::GetPackageDescription()
+{
+  return this->packageDescription->GetValue();
+}
+
+void wxCDMNewProjectDialog::CreateControls()
 {
   wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
 
@@ -108,62 +117,41 @@ void wxCreaDevManagerNewProjectDialog::CreateControls()
   v_sizer1->SetSizeHints(this);
 }
 
-void wxCreaDevManagerNewProjectDialog::OnCreateProject(wxCommandEvent& event)
+void wxCDMNewProjectDialog::OnCreateProject(wxCommandEvent& event)
 {
   bool ready = true;
 
   if(ready && this->projectName->GetValue() == wxString(""))
-  {
-    wxMessageBox(wxString("The project name cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
-    ready = false;
-  }
+    {
+      wxMessageBox(wxString("The project name cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      ready = false;
+    }
   if(ready && this->projectLocation->GetLabel() == wxString(""))
-  {
-    wxMessageBox(wxString("The project location cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
-    ready = false;
-  }
+    {
+      wxMessageBox(wxString("The project location cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      ready = false;
+    }
   if(ready && this->packageAuthor->GetValue() == wxString(""))
-  {
-    wxMessageBox(wxString("The project's author cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
-    ready = false;
-  }
-
-  std::cout << ready << std::endl;
-
-  if(ready && ControlCreaDevManagerProject::CreateProject(crea::wx2std(this->projectName->GetValue()), crea::wx2std(this->projectLocation->GetLabel()), crea::wx2std(this->packageAuthor->GetValue()), crea::wx2std(this->packageDescription->GetValue())))
-  {
-    this->Controller->OpenProject(crea::wx2std(this->projectLocation->GetLabel()) + "/" + crea::wx2std(this->projectName->GetValue()));
-
-    this->DestroyChildren();
-
-    wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
-
-    wxStaticText* title = new wxStaticText(this, wxID_ANY, wxString("Your project is ready!"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
-    v_sizer1->Add(title, 0, wxALL, 5);
-
-    wxStaticText* instruction = new wxStaticText(this, wxID_ANY, wxString("Please close this dialog to continue to the project."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
-    v_sizer1->Add(instruction, 0, wxALL, 5);
-
-    v_sizer1->Add(new wxButton(this, ID_BUTTON_CANCEL, wxString("Close")), 0, wxALL, 5);
-
-    SetSizer(v_sizer1);
-    v_sizer1->SetSizeHints(this);
-  }else{
-      if(ready)
-        this->Close();
-  }
+    {
+      wxMessageBox(wxString("The project's author cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      ready = false;
+    }
 
+  if(ready)
+    {
+      this->EndModal(wxID_FORWARD);
+    }
 
   event.Skip();
 }
 
-void wxCreaDevManagerNewProjectDialog::OnCancel(wxCommandEvent& event)
+void wxCDMNewProjectDialog::OnCancel(wxCommandEvent& event)
 {
-  this->Close();
+  this->EndModal(wxID_CANCEL);
   event.Skip();
 }
 
-void wxCreaDevManagerNewProjectDialog::OnChooseLocation(wxCommandEvent& event)
+void wxCDMNewProjectDialog::OnChooseLocation(wxCommandEvent& event)
 {
   wxDirDialog* dialog = new wxDirDialog(this, "Choose the location of the new project");
   dialog->ShowModal();
@@ -171,3 +159,4 @@ void wxCreaDevManagerNewProjectDialog::OnChooseLocation(wxCommandEvent& event)
   this->Update();
   event.Skip();
 }
+
diff --git a/lib/creaDevManagerLib/wxCDMNewProjectDialog.h b/lib/creaDevManagerLib/wxCDMNewProjectDialog.h
new file mode 100644 (file)
index 0000000..94e4dc3
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * wxCDMNewProjectDialog.h
+ *
+ *  Created on: 13/11/2012
+ *      Author: daniel
+ */
+
+#ifndef WXCDMNEWPROJECTDIALOG_H_
+#define WXCDMNEWPROJECTDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+class wxCDMNewProjectDialog : public wxDialog
+{
+  DECLARE_EVENT_TABLE()
+public:
+  wxCDMNewProjectDialog(
+      wxWindow* parent,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxString("New Project"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(400,300),
+      long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+  );
+  ~wxCDMNewProjectDialog();
+  bool Create(
+      wxWindow* parent,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxString("New Project"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(400,300),
+      long style = wxDEFAULT_DIALOG_STYLE
+  );
+
+  const wxString GetProjectLocation();
+  const wxString GetProjectName();
+  const wxString GetPackageAuthor();
+  const wxString GetPackageDescription();
+
+protected:
+  void CreateControls();
+
+private:
+  wxStaticText* projectLocation;
+  wxTextCtrl* projectName;
+  wxTextCtrl* packageAuthor;
+  wxTextCtrl* packageDescription;
+
+//handlers
+protected:
+  void OnCreateProject(wxCommandEvent& event);
+  void OnCancel(wxCommandEvent& event);
+  void OnChooseLocation(wxCommandEvent& event);
+};
+
+#endif /* WXCDMNEWPROJECTDIALOG_H_ */
old mode 100644 (file)
new mode 100755 (executable)
similarity index 65%
rename from lib/creaDevManagerLib/wxCreaDevManagerProjectActionsPanel.cpp
rename to lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp
index 2c34fc6..67e4497
@@ -1,15 +1,15 @@
 /*
- * wxCreaDevManagerProjectActionsWindow.cpp
+ * wxCDMProjectActionsPanel.cpp
  *
  *  Created on: 25/10/2012
  *      Author: daniel
  */
 
-#include "wxCreaDevManagerProjectActionsPanel.h"
+#include "wxCDMProjectActionsPanel.h"
 
 
 
-wxCreaDevManagerProjectActionsPanel::wxCreaDevManagerProjectActionsPanel(
+wxCDMProjectActionsPanel::wxCDMProjectActionsPanel(
     wxWindow* parent,
     wxWindowID id,
     const wxString& caption,
@@ -18,14 +18,14 @@ wxCreaDevManagerProjectActionsPanel::wxCreaDevManagerProjectActionsPanel(
     long style
 )
 {
-  wxCreaDevManagerProjectActionsPanel::Create(parent,id,caption,pos,size,style);
+  wxCDMProjectActionsPanel::Create(parent,id,caption,pos,size,style);
 }
 
-wxCreaDevManagerProjectActionsPanel::~wxCreaDevManagerProjectActionsPanel()
+wxCDMProjectActionsPanel::~wxCDMProjectActionsPanel()
 {
 }
 
-bool wxCreaDevManagerProjectActionsPanel::Create(
+bool wxCDMProjectActionsPanel::Create(
     wxWindow* parent,
     wxWindowID id,
     const wxString& caption,
@@ -43,7 +43,7 @@ bool wxCreaDevManagerProjectActionsPanel::Create(
   return TRUE;
 }
 
-void wxCreaDevManagerProjectActionsPanel::CreateControls()
+void wxCDMProjectActionsPanel::CreateControls()
 {
   this->GetSizer()->Add(new wxButton(this, -1, _T("Action 1")), 0, wxALL, 5);
   this->GetSizer()->Add(new wxButton(this, -1, _T("Action 2")), 0, wxALL, 5);
old mode 100644 (file)
new mode 100755 (executable)
similarity index 66%
rename from lib/creaDevManagerLib/wxCreaDevManagerProjectActionsPanel.h
rename to lib/creaDevManagerLib/wxCDMProjectActionsPanel.h
index 8d0e9f1..a647270
@@ -1,20 +1,20 @@
 /*
- * wxCreaDevManagerProjectActionsWindow.h
+ * wxCDMProjectActionsPanel.h
  *
  *  Created on: 25/10/2012
  *      Author: daniel
  */
 
-#ifndef WXCREADEVMANAGERPROJECTACTIONSPANEL_H_
-#define WXCREADEVMANAGERPROJECTACTIONSPANEL_H_
+#ifndef WXCDMPROJECTACTIONSPANEL_H_
+#define WXCDMPROJECTACTIONSPANEL_H_
 
 #include <creaWx.h>
 #include <wx/panel.h>
 
-class wxCreaDevManagerProjectActionsPanel : public wxPanel
+class wxCDMProjectActionsPanel : public wxPanel
 {
 public:
-  wxCreaDevManagerProjectActionsPanel(
+  wxCDMProjectActionsPanel(
       wxWindow* parent,
       wxWindowID id = -1,
       const wxString& caption = _("Description Frame"),
@@ -22,7 +22,7 @@ public:
       const wxSize& size = wxDefaultSize,
       long style = wxDEFAULT_FRAME_STYLE
   );
-  ~wxCreaDevManagerProjectActionsPanel();
+  ~wxCDMProjectActionsPanel();
   bool Create(
       wxWindow* parent,
       wxWindowID id = -1,
@@ -36,4 +36,4 @@ protected:
   void CreateControls();
 };
 
-#endif /* WXCREADEVMANAGERPROJECTACTIONSWINDOW_H_ */
+#endif /* WXCDMPROJECTACTIONSPANEL_H_ */
old mode 100644 (file)
new mode 100755 (executable)
similarity index 55%
rename from lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx
rename to lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.cxx
index b325804..cda1e60
@@ -5,11 +5,11 @@
  *      Author: daniel
  */
 
-#include "wxCreaDevManagerTreeCtrl.h"
+#include "wxCDMProjectsTreeCtrl.h"
 #include "creaDevManagerIds.h"
 #include <vector>
 
-wxCreaDevManagerTreeCtrl::wxCreaDevManagerTreeCtrl(
+wxCDMProjectsTreeCtrl::wxCDMProjectsTreeCtrl(
     wxWindow *parent,
     wxWindowID id,
     const wxPoint &pos,
@@ -19,14 +19,14 @@ wxCreaDevManagerTreeCtrl::wxCreaDevManagerTreeCtrl(
     const wxString &name
 )
 {
-  Create(parent, id, pos, size, style, validator, name);
+  wxCDMProjectsTreeCtrl::Create(parent, id, pos, size, style, validator, name);
 }
 
-wxCreaDevManagerTreeCtrl::~wxCreaDevManagerTreeCtrl()
+wxCDMProjectsTreeCtrl::~wxCDMProjectsTreeCtrl()
 {
 }
 
-bool wxCreaDevManagerTreeCtrl::Create(
+bool wxCDMProjectsTreeCtrl::Create(
     wxWindow* parent,
     wxWindowID id,
     const wxPoint &pos,
@@ -42,22 +42,20 @@ bool wxCreaDevManagerTreeCtrl::Create(
   return TRUE;
 }
 
-void wxCreaDevManagerTreeCtrl::BuildTree(const ModelCreaDevManagerTree& projectsTree)
+void wxCDMProjectsTreeCtrl::BuildTree(const modelCDMProjectsTree& projectsTree)
 {
   this->DeleteAllItems();
   wxTreeItemId rootIndex = this-> AddRoot(_("Open Projects"));
-  for (int i = 0; i < projectsTree.projectRoots.size(); i++)
-  {
-      std::cout << "Building TreeCtrl for " << projectsTree.projectRoots[i].GetName() << std::endl;
-    wxTreeItemId parentIndex = this-> AppendItem(rootIndex, wxString(projectsTree.projectRoots[i].GetName().c_str(), wxConvUTF8));
-    this->BuildTree(projectsTree.projectRoots[i].GetChildren(), parentIndex);
-  }
+  std::cout << "Building TreeCtrl for " << projectsTree.projectRoot.GetName() << std::endl;
+  wxTreeItemId parentIndex = this-> AppendItem(rootIndex, wxString(projectsTree.projectRoot.GetName().c_str(), wxConvUTF8));
+  this->BuildTree(projectsTree.projectRoot.GetChildren(), parentIndex);
+
   this->Expand(rootIndex);
 
   this->Update();
 }
 
-void wxCreaDevManagerTreeCtrl::BuildTree(const std::vector<ModelCreaDevManagerTreeNode>& projectsTree, wxTreeItemId parent)
+void wxCDMProjectsTreeCtrl::BuildTree(const std::vector<modelCDMProjectsTreeNode>& projectsTree, wxTreeItemId parent)
 {
   for (int i = 0; i < projectsTree.size(); i++)
   {
@@ -66,7 +64,7 @@ void wxCreaDevManagerTreeCtrl::BuildTree(const std::vector<ModelCreaDevManagerTr
     wxString nodeName((projectsTree[i].GetName()).c_str(), wxConvUTF8);
     parentNodeIndex = this->AppendItem(parent, nodeName);
 
-    std::vector<ModelCreaDevManagerTreeNode> innerChildren = projectsTree[i].GetChildren();
+    std::vector<modelCDMProjectsTreeNode> innerChildren = projectsTree[i].GetChildren();
     if(innerChildren.size() > 0)
     {
       this->BuildTree(innerChildren, parentNodeIndex);
old mode 100644 (file)
new mode 100755 (executable)
similarity index 62%
rename from lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h
rename to lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h
index f5671e0..5b3d4a4
@@ -5,20 +5,19 @@
  *      Author: daniel
  */
 
-#ifndef WXCREADEVMANAGERTREECTRL_H_
-#define WXCREADEVMANAGERTREECTRL_H_
+#ifndef WXCDMPROJECTSTREECTRL_H_
+#define WXCDMPROJECTSTREECTRL_H_
 
 #include <creaWx.h>
 #include <wx/treectrl.h>
-#include "ModelCreaDevManagerTree.h"
-#include "ModelCreaDevManagerTreeNode.h"
-#include <vector>
+#include "modelCDMProjectsTree.h"
 
+#include <vector>
 
-class wxCreaDevManagerTreeCtrl: public wxTreeCtrl
+class wxCDMProjectsTreeCtrl: public wxTreeCtrl
 {
 public:
-  wxCreaDevManagerTreeCtrl(
+  wxCDMProjectsTreeCtrl(
       wxWindow *parent,
       wxWindowID id=wxID_ANY,
       const wxPoint &pos=wxDefaultPosition,
@@ -27,7 +26,7 @@ public:
       const wxValidator &validator=wxDefaultValidator,
       const wxString &name=_("Projects tree")
   );
-  ~wxCreaDevManagerTreeCtrl();
+  ~wxCDMProjectsTreeCtrl();
   bool Create(
     wxWindow *parent,
     wxWindowID id=wxID_ANY,
@@ -38,9 +37,9 @@ public:
     const wxString &name=_("Projects tree")
   );
 
-  void BuildTree(const ModelCreaDevManagerTree& tree);
+  void BuildTree(const modelCDMProjectsTree& tree);
 private:
-  void BuildTree(const std::vector<ModelCreaDevManagerTreeNode>& tree, wxTreeItemId parent);
+  void BuildTree(const std::vector<modelCDMProjectsTreeNode>& tree, wxTreeItemId parent);
 };
 
-#endif /* WXCREADEVMANAGERTREECTRL_H_ */
+#endif /* WXCDMPROJECTSTREECTRL_H_ */
diff --git a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp
deleted file mode 100644 (file)
index 5711faf..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * wxCreaDevManagerDescriptionFrame.cpp
- *
- *  Created on: 23/10/2012
- *      Author: daniel
- */
-
-#include "wxCreaDevManagerDescriptionPanel.h"
-
-#include "images/Cicon64.xpm"
-
-#include "creaDevManagerIds.h"
-
-#include <wx/statbox.h>
-
-#include <iostream>
-
-BEGIN_EVENT_TABLE(wxCreaDevManagerDescriptionPanel, wxPanel)
-  EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCreaDevManagerDescriptionPanel::OnBtnNewProject)
-  EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCreaDevManagerDescriptionPanel::OnBtnOpenProject)
-END_EVENT_TABLE()
-
-wxCreaDevManagerDescriptionPanel::wxCreaDevManagerDescriptionPanel(
-    wxWindow* parent,
-    wxWindowID id,
-    const wxString& caption,
-    const wxPoint& pos,
-    const wxSize& size,
-    long style
-)
-{
-  wxCreaDevManagerDescriptionPanel::Create(parent, id, caption, pos, size, style);
-}
-
-wxCreaDevManagerDescriptionPanel::~wxCreaDevManagerDescriptionPanel()
-{
-}
-
-bool wxCreaDevManagerDescriptionPanel::Create(
-    wxWindow* parent,
-    wxWindowID id,
-    const wxString& caption,
-    const wxPoint& pos,
-    const wxSize& size,
-    long style
-)
-{
-  wxPanel::Create(parent, id, pos, size, style);
-
-  CreateView();
-
-  return TRUE;
-}
-
-void wxCreaDevManagerDescriptionPanel::CreateView(wxString title, wxString imagePath, wxString type, std::vector< std::pair< std::string, std::string > > properties)
-{
-  wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-
-  //Title
-  sizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_CENTER, 0);
-  //Image
-  sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(Cicon)),0, wxALIGN_CENTER, 0);
-  //Name
-  sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0);
-
-  //Properties Box
-  /*
-  wxStaticBox* propsBox = new wxStaticBox(this, -1, _T("&Properties"));
-
-  wxStaticBoxSizer* propsBoxInnerSizer = new wxStaticBoxSizer(propsBox, wxVERTICAL);
-  sizer -> Add(propsBoxInnerSizer, 1, wxCENTER | wxEXPAND | wxALL, 5);
-
-  wxString propsText = wxString(_T("Property 1: value 1\nProperty 2: long valuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuue 2"));
-  wxStaticText* props = new wxStaticText(this, -1, propsText, wxDefaultPosition, wxSize(140,10));
-  propsBoxInnerSizer->Add(props, 1, wxEXPAND | wxALL, 5);
-  */
-  //Actions Box
-  wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
-
-  wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
-  sizer -> Add(actionsBoxInnerSizer, 2, wxCENTER | wxEXPAND | wxALL, 10);
-
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_NEWPROJECT, _T("New Project")), 0, wxRIGHT | wxLEFT, 20);
-  actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPENPROJECT, _T("Open Project")), 0, wxRIGHT | wxLEFT, 20);
-
-
-
-  sizer->SetSizeHints(this);
-
-
-  SetSizer(sizer);
-}
-
-void wxCreaDevManagerDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
-{
-  event.ResumePropagation(1);
-  event.Skip();
-}
-
-void wxCreaDevManagerDescriptionPanel::OnBtnOpenProject(wxCommandEvent& event)
-{
-  event.ResumePropagation(1);
-  event.Skip();
-}
diff --git a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h
deleted file mode 100644 (file)
index 184271a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * wxCreaDevManagerDescriptionFrame.h
- *
- *  Created on: 23/10/2012
- *      Author: daniel
- */
-
-#ifndef WXCREADEVMANAGERDESCRIPTIONPANEL_H_
-#define WXCREADEVMANAGERDESCRIPTIONPANEL_H_
-
-#include <creaWx.h>
-#include <wx/panel.h>
-#include <wx/bitmap.h>
-#include <wx/stattext.h>
-
-#include <iostream>
-#include <utility>
-#include <vector>
-
-class wxCreaDevManagerDescriptionPanel : public wxPanel
-{
-
-  DECLARE_EVENT_TABLE()
-
-  public:
-      wxCreaDevManagerDescriptionPanel(
-        wxWindow* parent,
-        wxWindowID id = -1,
-        const wxString& caption = _("Description Frame"),
-        const wxPoint& pos = wxDefaultPosition,
-        const wxSize& size = wxDefaultSize,
-        long style = wxDEFAULT_FRAME_STYLE
-      );
-
-      ~wxCreaDevManagerDescriptionPanel();
-
-      bool Create(
-        wxWindow* parent,
-        wxWindowID id = -1,
-        const wxString& caption = _("Description Frame"),
-        const wxPoint& pos = wxDefaultPosition,
-        const wxSize& size = wxDefaultSize,
-        long style = wxDEFAULT_FRAME_STYLE
-      );
-
-
-  protected:
-      void CreateView(wxString title = wxString("Title"), wxString imagePath = wxString(""), wxString type = wxString("Type"), std::vector<std::pair<std::string, std::string> > properties = std::vector<std::pair<std::string, std::string> >());
-
-      void OnBtnNewProject(wxCommandEvent& event);
-      void OnBtnOpenProject(wxCommandEvent& event);
-
-
-  private:
-      wxStaticText* _title;
-      wxBitmap* _image;
-      wxStaticText* _type;
-      wxStaticText* _properties;
-
-};
-
-#endif /* WXCREADEVMANAGERDESCRIPTIONFRAME_H_ */
diff --git a/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h b/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h
deleted file mode 100644 (file)
index c01d546..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef WXCREADEVMANAGERMAINFRAME_H_INCLUDED
-#define WXCREADEVMANAGERMAINFRAME_H_INCLUDED
-
-#include <creaWx.h>
-#include <wx/treectrl.h>
-#include <wx/aui/aui.h>
-
-#include "ModelCreaDevManagerTree.h"
-#include "ControlCreaDevManagerMain.h"
-
-class wxCreaDevManagerMainFrame:public wxFrame
-{
-  DECLARE_EVENT_TABLE()
-
-  public:
-    wxCreaDevManagerMainFrame(
-      wxWindow* parent,
-      wxWindowID id = -1,
-      const wxString& caption = wxString("CREATIS CreaDevManager"),
-      const wxPoint& pos = wxDefaultPosition,
-      const wxSize& size = wxDefaultSize,
-      long style = wxDEFAULT_FRAME_STYLE
-    );
-    
-    ~wxCreaDevManagerMainFrame();
-    
-    bool Create(
-      wxWindow* parent,
-      wxWindowID id = -1,
-      const wxString& caption = wxString("CREATIS CreaDevManager"),
-      const wxPoint& pos = wxDefaultPosition,
-      const wxSize& size = wxDefaultSize,
-      long style = wxDEFAULT_FRAME_STYLE
-    );
-    void UpdateVisual();
-
-  protected:
-    void CreateMenus();
-    void CreateControls();
-
-    //events
-    //File
-    void OnMenuNewProject(wxCommandEvent& event);
-    void OnMenuOpenProject(wxCommandEvent& event);
-    void OnMenuOpenRecent(wxCommandEvent& event);
-    void OnMenuCloseProject(wxCommandEvent& event);
-    void OnMenuCloseAllProjects(wxCommandEvent& event);
-    void OnMenuExportHierarchy(wxCommandEvent& event);
-    void OnMenuExit(wxCommandEvent& event);
-
-    //Edit
-    void OnMenuRefreshProject(wxCommandEvent& event);
-    void OnMenuMenuCut(wxCommandEvent& event);
-    void OnMenuMenuCopy(wxCommandEvent& event);
-    void OnMenuMenuPaste(wxCommandEvent& event);
-    void OnMenuMenuDelete(wxCommandEvent& event);
-    void OnMenuSelectAll(wxCommandEvent& event);
-    void OnMenuSelectNone(wxCommandEvent& event);
-
-    //Tools
-    void OnMenuEventLog(wxCommandEvent& event);
-    void OnMenuBBTKGraphicalEditor(wxCommandEvent& event);
-    void OnMenuMiniTools(wxCommandEvent& event);
-    void OnMenuCodeEditor(wxCommandEvent& event);
-    void OnMenuCommandLine(wxCommandEvent& event);
-
-    //Help
-    void OnMenuHelp(wxCommandEvent& event);
-    void OnMenuReportBug(wxCommandEvent& event);
-    void OnMenuAboutCreaDevManager(wxCommandEvent& event);
-    void OnMenuAboutCreatis(wxCommandEvent& event);
-
-  private:
-
-    //Menus
-    wxMenu* menu_File;
-    wxMenu* menu_Edit;
-    wxMenu* menu_Tools;
-    wxMenu* menu_Help;
-
-    //Controls
-    wxAuiManager auiManager;
-    wxTreeCtrl* tree_Projects;
-    wxPanel* panel_Properties;
-    wxPanel* panel_ProjectActions;
-
-    //Model
-    ControlCreaDevManagerMain* controller;
-
-};
-
-#endif
diff --git a/lib/creaDevManagerLib/wxCreaDevManagerNewProjectDialog.h b/lib/creaDevManagerLib/wxCreaDevManagerNewProjectDialog.h
deleted file mode 100644 (file)
index 58f516b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * wxCreaDevManagerNewProjectDialog.h
- *
- *  Created on: 2/11/2012
- *      Author: daniel
- */
-
-#ifndef WXCREADEVMANAGERNEWPROJECTDIALOG_H_
-#define WXCREADEVMANAGERNEWPROJECTDIALOG_H_
-
-#include <creaWx.h>
-#include <wx/dialog.h>
-#include "ControlCreaDevManagerMain.h"
-
-class wxCreaDevManagerNewProjectDialog : public wxDialog
-{
-  DECLARE_EVENT_TABLE()
-  public:
-    wxCreaDevManagerNewProjectDialog(
-      wxWindow* parent,
-      ControlCreaDevManagerMain* controller,
-      wxWindowID id = wxID_ANY,
-      const wxString& caption = wxString("New Project"),
-      const wxPoint& position = wxDefaultPosition,
-      const wxSize& size = wxSize(400,300),
-      long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
-    );
-    ~wxCreaDevManagerNewProjectDialog();
-    bool Create(
-      wxWindow* parent,
-      wxWindowID id = wxID_ANY,
-      const wxString& caption = wxString("New Project"),
-      const wxPoint& position = wxDefaultPosition,
-      const wxSize& size = wxSize(400,300),
-      long style = wxDEFAULT_DIALOG_STYLE
-    );
-
-  protected:
-    void CreateControls();
-
-    void OnCreateProject(wxCommandEvent& event);
-    void OnCancel(wxCommandEvent& event);
-    void OnChooseLocation(wxCommandEvent& event);
-
-  private:
-    wxStaticText* projectLocation;
-    wxTextCtrl* projectName;
-    wxTextCtrl* packageAuthor;
-    wxTextCtrl* packageDescription;
-
-    ControlCreaDevManagerMain* Controller;
-
-
-};
-
-#endif /* WXCREADEVMANAGERNEWPROJECTDIALOG_H_ */