From 41f7684f91c2a21b9db09d53404acfea645875e4 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Fri, 26 Oct 2012 15:53:03 +0000 Subject: [PATCH] Feature #1711 CreaDevManager application implementation: Changes to adjust std library usage and wxString fixes --- appli/creaDevManager/creaDevManager.cpp | 5 +- .../ModelCreaDevManagerTree.cpp | 34 ++--- .../ModelCreaDevManagerTree.h | 8 +- .../ModelCreaDevManagerTreeNode.cpp | 12 +- .../ModelCreaDevManagerTreeNode.h | 18 +-- .../wxCreaDevManagerDescriptionPanel.cpp | 2 +- .../wxCreaDevManagerDescriptionPanel.h | 8 +- .../wxCreaDevManagerMainFrame.cxx | 142 +++++++++--------- .../wxCreaDevManagerMainFrame.h | 4 +- .../wxCreaDevManagerTreeCtrl.cxx | 4 +- .../wxCreaDevManagerTreeCtrl.h | 2 +- 11 files changed, 113 insertions(+), 126 deletions(-) diff --git a/appli/creaDevManager/creaDevManager.cpp b/appli/creaDevManager/creaDevManager.cpp index 4b36d6e..a702bf7 100644 --- a/appli/creaDevManager/creaDevManager.cpp +++ b/appli/creaDevManager/creaDevManager.cpp @@ -3,7 +3,6 @@ #include // for std::cout #include "creaDevManager.h" #include "wxCreaDevManagerMainFrame.h" -using namespace std; IMPLEMENT_APP(wxCreaDevManagerApp) @@ -20,7 +19,7 @@ bool wxCreaDevManagerApp::OnInit() mainWindow->SetSize(800, 600); mainWindow->Show(true); - cout << "Crea DevManager opened." << endl; + std::cout << "Crea DevManager opened." << std::endl; return true; } @@ -28,6 +27,6 @@ bool wxCreaDevManagerApp::OnInit() int wxCreaDevManagerApp::OnExit() { wxApp::OnExit(); - cout << "Crea DevManager closed." << endl; + std::cout << "Crea DevManager closed." << std::endl; return 0; } diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp b/lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp index e4bcc71..4ae0ee2 100644 --- a/lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp +++ b/lib/creaDevManagerLib/ModelCreaDevManagerTree.cpp @@ -17,8 +17,6 @@ #include #include -using namespace std; - ModelCreaDevManagerTree::ModelCreaDevManagerTree() { } @@ -32,8 +30,8 @@ bool ModelCreaDevManagerTree::CompareNodeItem(ModelCreaDevManagerTreeNode x, Mod bool returnValue; bool noWinner = true; unsigned int i = 0; - string xName = x.GetName(); - string yName = y.GetName(); + std::string xName = x.GetName(); + std::string yName = y.GetName(); unsigned char xType = x.GetType(); unsigned char yType = y.GetType(); @@ -73,11 +71,11 @@ bool ModelCreaDevManagerTree::CompareNodeItem(ModelCreaDevManagerTreeNode x, Mod return returnValue; } -void ModelCreaDevManagerTree::addRoot(string path) +void ModelCreaDevManagerTree::addRoot(std::string path) { - stringstream p(path); - vector breadcrumbs; - string name; + std::stringstream p(path); + std::vector breadcrumbs; + std::string name; while(!p.eof()) { @@ -94,25 +92,25 @@ void ModelCreaDevManagerTree::addRoot(string path) name = breadcrumbs[breadcrumbs.size()-1]; this->projectRoots.push_back(ModelCreaDevManagerTreeNode(path,name,DT_DIR,0)); - cout << "project root added: " << name << " in " << path << endl; + std::cout << "project root added: " << name << " in " << path << std::endl; } void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node) { - //cout << "populating " << node.GetName() << " path " << node.GetPath() << "..." << endl; - vector * nodes = new vector ; + //std::cout << "populating " << node.GetName() << " path " << node.GetPath() << "..." << std::endl; + std::vector * nodes = new std::vector ; DIR *dp; struct dirent *ep; - string path = node.GetPath()+node.GetName()+"/"; + std::string path = node.GetPath()+node.GetName()+"/"; dp = opendir(path.c_str()); if (dp != NULL) { while ((ep = readdir (dp)) != NULL) { - //cout << ep->d_name << endl; + //std::cout << ep->d_name << std::endl; if(strcmp(ep->d_name, ".") != 0 && strcmp(ep->d_name, "..") != 0 ) { ModelCreaDevManagerTreeNode innerNode = ModelCreaDevManagerTreeNode(path, ep->d_name, ep->d_type, node.GetLevel()+1); @@ -134,21 +132,21 @@ void ModelCreaDevManagerTree::populateNode(ModelCreaDevManagerTreeNode& node) } else { - cerr << "Couldn't open the directory" << endl; + std::cerr << "Couldn't open the directory" << std::endl; } } -void ModelCreaDevManagerTree::populateNode(string path) +void ModelCreaDevManagerTree::populateNode(std::string path) { if(path[path.size()-1] != '/') path+="/"; - cout << "searching " << path << endl; + std::cout << "searching " << path << std::endl; for (int i = 0; i < this->projectRoots.size(); i++) { - //cout << (this->projectRoots[i].GetPath() + this->projectRoots[i].GetName() + "/") << "..." << endl; + //std::cout << (this->projectRoots[i].GetPath() + this->projectRoots[i].GetName() + "/") << "..." << std::endl; if(this->projectRoots[i].GetPath()+this->projectRoots[i].GetName()+"/" == path) { - cout << "Populating Project: " << path << "..." << endl; + std::cout << "Populating Project: " << path << "..." << std::endl; this->populateNode(this->projectRoots[i]); break; } diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTree.h b/lib/creaDevManagerLib/ModelCreaDevManagerTree.h index ebf067e..2d677d7 100644 --- a/lib/creaDevManagerLib/ModelCreaDevManagerTree.h +++ b/lib/creaDevManagerLib/ModelCreaDevManagerTree.h @@ -12,8 +12,6 @@ #include #include "ModelCreaDevManagerTreeNode.h" -using namespace std; - class ModelCreaDevManagerTree { public: @@ -23,10 +21,10 @@ class ModelCreaDevManagerTree static bool CompareNodeItem(ModelCreaDevManagerTreeNode x, ModelCreaDevManagerTreeNode y); - void addRoot(string path); - void populateNode(string path); + void addRoot(std::string path); + void populateNode(std::string path); - vector projectRoots; + std::vector projectRoots; private: void populateNode(ModelCreaDevManagerTreeNode& node); }; diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp index a2e49f0..29f8bd5 100644 --- a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp +++ b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.cpp @@ -14,9 +14,7 @@ #include #include -using namespace std; - -ModelCreaDevManagerTreeNode::ModelCreaDevManagerTreeNode(string path, string name, unsigned char type, int level) +ModelCreaDevManagerTreeNode::ModelCreaDevManagerTreeNode(std::string path, std::string name, unsigned char type, int level) { this->_path = path; this->_name = name; @@ -28,12 +26,12 @@ ModelCreaDevManagerTreeNode::~ModelCreaDevManagerTreeNode() { } -string ModelCreaDevManagerTreeNode::GetPath() +std::string ModelCreaDevManagerTreeNode::GetPath() { return this->_path; } -string ModelCreaDevManagerTreeNode::GetName() +std::string ModelCreaDevManagerTreeNode::GetName() { return this->_name; } @@ -47,13 +45,13 @@ int ModelCreaDevManagerTreeNode::GetLevel() return this->_level; } -vector& ModelCreaDevManagerTreeNode::GetChildren() +std::vector& ModelCreaDevManagerTreeNode::GetChildren() { return this->_children; } -void ModelCreaDevManagerTreeNode::SetChildren(vector& children) +void ModelCreaDevManagerTreeNode::SetChildren(std::vector& children) { this->_children.clear(); this->_children = children; diff --git a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h index 442dd58..5644099 100644 --- a/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h +++ b/lib/creaDevManagerLib/ModelCreaDevManagerTreeNode.h @@ -11,29 +11,27 @@ #include #include -using namespace std; - class ModelCreaDevManagerTreeNode { public: - ModelCreaDevManagerTreeNode(string path, string name, unsigned char type, int level); + ModelCreaDevManagerTreeNode(std::string path, std::string name, unsigned char type, int level); ~ModelCreaDevManagerTreeNode(); - string GetPath(); - string GetName(); + std::string GetPath(); + std::string GetName(); unsigned char GetType(); int GetLevel(); - vector& GetChildren(); + std::vector& GetChildren(); - void SetChildren(vector& children); + void SetChildren(std::vector& children); private: - string _path; - string _name; + std::string _path; + std::string _name; unsigned char _type; int _level; - vector _children; + std::vector _children; }; diff --git a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp index bcc263b..c0ad9b2 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.cpp @@ -43,7 +43,7 @@ bool wxCreaDevManagerDescriptionPanel::Create( return TRUE; } -void wxCreaDevManagerDescriptionPanel::CreateView(string title, string imagePath, string type, vector > properties) +void wxCreaDevManagerDescriptionPanel::CreateView(wxString title, wxString imagePath, wxString type, std::vector< std::pair< std::string, std::string > > properties) { wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); diff --git a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h index 7c4f3dc..3feb493 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h +++ b/lib/creaDevManagerLib/wxCreaDevManagerDescriptionPanel.h @@ -14,11 +14,9 @@ #include #include -#include +#include #include -using namespace std; - class wxCreaDevManagerDescriptionPanel : public wxPanel { public: @@ -44,8 +42,8 @@ class wxCreaDevManagerDescriptionPanel : public wxPanel protected: - void CreateView(string title = "Title", string imagePath = "", string type = "Type", vector > properties = vector >()); - + void CreateView(wxString title = wxString("Title"), wxString imagePath = wxString(""), wxString type = wxString("Type"), std::vector > properties = std::vector >()); + //void CreateView(); private: wxStaticText* _title; wxBitmap* _image; diff --git a/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx b/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx index 31d07a2..03e4b10 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx +++ b/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.cxx @@ -16,8 +16,6 @@ #include -using namespace std; - BEGIN_EVENT_TABLE(wxCreaDevManagerMainFrame, wxFrame) EVT_MENU(ID_MENU_NEW_PROJECT, wxCreaDevManagerMainFrame::OnMenuNewProject) EVT_MENU(ID_MENU_OPEN_PROJECT, wxCreaDevManagerMainFrame::OnMenuOpenProject) @@ -82,51 +80,51 @@ void wxCreaDevManagerMainFrame::CreateMenus() //FileMenu menu_File = new wxMenu(); - menu_File->Append(ID_MENU_NEW_PROJECT, _("&New Project...")); - menu_File->Append(ID_MENU_OPEN_PROJECT, _("&Open Project...")); - menu_File->Append(ID_MENU_OPEN_RECENT, _("Open &Recent")); + menu_File->Append(ID_MENU_NEW_PROJECT, wxString("&New Project...")); + menu_File->Append(ID_MENU_OPEN_PROJECT, wxString("&Open Project...")); + menu_File->Append(ID_MENU_OPEN_RECENT, wxString("Open &Recent")); menu_File->AppendSeparator(); - menu_File->Append(ID_MENU_CLOSE_PROJECT, _("&Close Project")); - menu_File->Append(ID_MENU_CLOSE_ALL_PROJECTS, _("C&lose All Projects")); + menu_File->Append(ID_MENU_CLOSE_PROJECT, wxString("&Close Project")); + menu_File->Append(ID_MENU_CLOSE_ALL_PROJECTS, wxString("C&lose All Projects")); menu_File->AppendSeparator(); - menu_File->Append(ID_MENU_EXPORT_HIERARCHY, _("&Export Project Hierarchy...")); + menu_File->Append(ID_MENU_EXPORT_HIERARCHY, wxString("&Export Project Hierarchy...")); menu_File->AppendSeparator(); - menu_File->Append(ID_MENU_EXIT, _("E&xit")); + menu_File->Append(ID_MENU_EXIT, wxString("E&xit")); - menuBar->Append(menu_File, _("&File")); + menuBar->Append(menu_File, wxString("&File")); //EditMenu menu_Edit = new wxMenu(); - menu_Edit->Append(ID_MENU_REFRESH_PROJECT, _("&Refresh Project")); + menu_Edit->Append(ID_MENU_REFRESH_PROJECT, wxString("&Refresh Project")); menu_Edit->AppendSeparator(); - menu_Edit->Append(ID_MENU_CUT, _("Cu&t")); - menu_Edit->Append(ID_MENU_COPY, _("&Copy")); - menu_Edit->Append(ID_MENU_PASTE, _("&Paste")); + menu_Edit->Append(ID_MENU_CUT, wxString("Cu&t")); + menu_Edit->Append(ID_MENU_COPY, wxString("&Copy")); + menu_Edit->Append(ID_MENU_PASTE, wxString("&Paste")); menu_Edit->AppendSeparator(); - menu_Edit->Append(ID_MENU_DELETE, _("&Delete")); - menu_Edit->Append(ID_MENU_SELECT_ALL, _("Select &All")); - menu_Edit->Append(ID_MENU_SELECT_NONE, _("Ca&ncel Selection")); + menu_Edit->Append(ID_MENU_DELETE, wxString("&Delete")); + menu_Edit->Append(ID_MENU_SELECT_ALL, wxString("Select &All")); + menu_Edit->Append(ID_MENU_SELECT_NONE, wxString("Ca&ncel Selection")); - menuBar->Append(menu_Edit, _("&Edit")); + menuBar->Append(menu_Edit, wxString("&Edit")); //ToolsMenu menu_Tools = new wxMenu(); - menu_Tools->Append(ID_MENU_EVENT_LOG, _("Event &Log")); - menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, _("BBTK &Graphical Editor")); - menu_Tools->Append(ID_MENU_MINITOOLS, _("&MiniTools")); - menu_Tools->Append(ID_MENU_CODE_EDITOR, _("&Code Editor")); - menu_Tools->Append(ID_MENU_COMMAND_LINE, _("&Command Line")); + menu_Tools->Append(ID_MENU_EVENT_LOG, wxString("Event &Log")); + menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, wxString("BBTK &Graphical Editor")); + menu_Tools->Append(ID_MENU_MINITOOLS, wxString("&MiniTools")); + menu_Tools->Append(ID_MENU_CODE_EDITOR, wxString("&Code Editor")); + menu_Tools->Append(ID_MENU_COMMAND_LINE, wxString("&Command Line")); - menuBar->Append(menu_Tools, _("&Tools")); + menuBar->Append(menu_Tools, wxString("&Tools")); //HelpMenu menu_Help = new wxMenu(); - menu_Help->Append(ID_MENU_HELP, _("&Help")); - menu_Help->Append(ID_MENU_REPORT_BUG, _("Report &Bug")); - menu_Help->Append(ID_MENU_ABOUT_CREADEVMANAGER, _("&About CreaDevManager")); - menu_Help->Append(ID_MENU_ABOUT_CREATIS, _("A&bout CREATIS")); + menu_Help->Append(ID_MENU_HELP, wxString("&Help")); + menu_Help->Append(ID_MENU_REPORT_BUG, wxString("Report &Bug")); + menu_Help->Append(ID_MENU_ABOUT_CREADEVMANAGER, wxString("&About CreaDevManager")); + menu_Help->Append(ID_MENU_ABOUT_CREATIS, wxString("A&bout CREATIS")); - menuBar->Append(menu_Help, _("&Help")); + menuBar->Append(menu_Help, wxString("&Help")); //Set Bar SetMenuBar(menuBar); @@ -156,7 +154,7 @@ void wxCreaDevManagerMainFrame::CreateControls() panel_Properties = new wxCreaDevManagerDescriptionPanel( this, ID_WINDOW_PROPERTIES, - _("Description Panel"), + wxString("Description Panel"), wxDefaultPosition, wxDefaultSize, 0 @@ -167,66 +165,66 @@ void wxCreaDevManagerMainFrame::CreateControls() panel_ProjectActions = new wxCreaDevManagerProjectActionsPanel( this, ID_WINDOW_PROJ_ACTIONS, - _("Project Actions Panel"), + wxString("Project Actions Panel"), wxDefaultPosition, wxDefaultSize, 0 ); panel_ProjectActions->SetMinSize(wxSize(500, 150)); - auiManager.AddPane(tree_Projects, wxLEFT, wxT("Projects Tree")); - auiManager.AddPane(panel_ProjectActions, wxBOTTOM, wxT("Project Actions")); - auiManager.AddPane(panel_Properties, wxCENTER, wxT("Properties")); + auiManager.AddPane(tree_Projects, wxLEFT, wxString("Projects Tree")); + auiManager.AddPane(panel_ProjectActions, wxBOTTOM, wxString("Project Actions")); + auiManager.AddPane(panel_Properties, wxCENTER, wxString("Properties")); auiManager.Update(); auiManager.GetPane(tree_Projects).CloseButton(false).MaximizeButton(true); - auiManager.GetPane(panel_Properties).CloseButton(false); + auiManager.GetPane(panel_Properties).CloseButton(false); } //Event Handlers //File menu void wxCreaDevManagerMainFrame::OnMenuNewProject(wxCommandEvent& event) { - cerr << "Event OnMenuNewProject not implemented yet" << endl; + std::cerr << "Event OnMenuNewProject not implemented yet" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuOpenProject(wxCommandEvent& event) { - cerr << "Event OnMenuOpenProject not implemented" << endl; + //std::cerr << "Event OnMenuOpenProject not implemented" << std::endl; long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST; - wxDirDialog* FD = new wxDirDialog(this, crea::std2wx("Select the project directory"), crea::std2wx(""), style); + wxDirDialog* FD = new wxDirDialog(this, wxString("Select the project directory"), wxString(""), style); long userResponse; userResponse = FD->ShowModal(); if(userResponse == wxID_OK) { - string path = crea::wx2std (FD->GetPath()); - cout << "selection path: "<< path << endl; - string path1 = path + "/Makefile"; + std::string path = crea::wx2std (FD->GetPath()); + std::cout << "selection path: "<< path << std::endl; + std::string path1 = path + "/Makefile"; FILE* pFile = fopen(path1.c_str(), "r"); if(pFile == NULL) // not the binary folder { - cerr << path1 << ": file not found..." << endl; + std::cerr << path1 << ": file not found..." << std::endl; path1 = path + "/CMakeLists.txt"; pFile = fopen(path1.c_str(), "r"); if(pFile == NULL) //not the source folder { - cerr << path1 << ": file not found..." << endl; + std::cerr << path1 << ": file not found..." << std::endl; wxMessageBox( wxT("No project selected."), wxT("Open Project - Error"), wxICON_ERROR); event.Skip(); return; }else{//source folder - cout << "sources folder found..." << endl; + std::cout << "sources folder found..." << std::endl; fclose(pFile); } }else{//binary folder - cout << "binary folder found..." << endl; + std::cout << "binary folder found..." << std::endl; fclose(pFile); - ifstream readFile; + std::ifstream readFile; readFile.open(path1.c_str()); - string word; + std::string word; bool found = false; while(!found && readFile >> word) { @@ -244,14 +242,14 @@ void wxCreaDevManagerMainFrame::OnMenuOpenProject(wxCommandEvent& event) if(!found) { - cerr << "sources not found..." << endl; - wxMessageBox( wxT("Sources not found."), wxT("Open Project - Error"), wxICON_ERROR); + std::cerr << "sources not found..." << std::endl; + wxMessageBox( wxString("Sources not found."), wxString("Open Project - Error"), wxICON_ERROR); event.Skip(); return; }else{ pFile = fopen(path.c_str(), "r"); - cout << "sources at " << path << " open = " << (pFile != NULL) << endl; - cout.flush(); + std::cout << "sources at " << path << " open = " << (pFile != NULL) << std::endl; + std::cout.flush(); } } @@ -267,27 +265,27 @@ void wxCreaDevManagerMainFrame::OnMenuOpenProject(wxCommandEvent& event) } void wxCreaDevManagerMainFrame::OnMenuOpenRecent(wxCommandEvent& event) { - cerr << "Event OnMenuOpenRecent not implemented" << endl; + std::cerr << "Event OnMenuOpenRecent not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuCloseProject(wxCommandEvent& event) { - cerr << "Event OnMenuCloseProject not implemented" << endl; + std::cerr << "Event OnMenuCloseProject not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuCloseAllProjects(wxCommandEvent& event) { - cerr << "Event OnMenuCloseAllProjects not implemented" << endl; + std::cerr << "Event OnMenuCloseAllProjects not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuExportHierarchy(wxCommandEvent& event) { - cerr << "Event OnMenuExportHierarchy not implemented" << endl; + std::cerr << "Event OnMenuExportHierarchy not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuExit(wxCommandEvent& event) { - cout << "Closing CreaDevManager..." << endl; + std::cout << "Closing CreaDevManager..." << std::endl; Close(); event.Skip(); } @@ -295,85 +293,85 @@ void wxCreaDevManagerMainFrame::OnMenuExit(wxCommandEvent& event) //Edit Menu void wxCreaDevManagerMainFrame::OnMenuRefreshProject(wxCommandEvent& event) { - cerr << "Event OnMenuRefreshProject not implemented" << endl; + std::cerr << "Event OnMenuRefreshProject not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuMenuCut(wxCommandEvent& event) { - cerr << "Event OnMenuMenuCut not implemented" << endl; + std::cerr << "Event OnMenuMenuCut not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuMenuCopy(wxCommandEvent& event) { - cerr << "Event OnMenuMenuCopy not implemented" << endl; + std::cerr << "Event OnMenuMenuCopy not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuMenuPaste(wxCommandEvent& event) { - cerr << "Event OnMenuMenuPaste not implemented" << endl; + std::cerr << "Event OnMenuMenuPaste not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuMenuDelete(wxCommandEvent& event) { - cerr << "Event OnMenuMenuDelete not implemented" << endl; + std::cerr << "Event OnMenuMenuDelete not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuSelectAll(wxCommandEvent& event) { - cerr << "Event OnMenuSelectAll not implemented" << endl; + std::cerr << "Event OnMenuSelectAll not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuSelectNone(wxCommandEvent& event) { - cerr << "Event OnMenuSelectNone not implemented" << endl; + std::cerr << "Event OnMenuSelectNone not implemented" << std::endl; event.Skip(); } //Tools Menu void wxCreaDevManagerMainFrame::OnMenuEventLog(wxCommandEvent& event) { - cerr << "Event OnMenuEventLog not implemented" << endl; + std::cerr << "Event OnMenuEventLog not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuBBTKGraphicalEditor(wxCommandEvent& event) { - cerr << "Event OnMenuBBTKGraphicalEditor not implemented" << endl; + std::cerr << "Event OnMenuBBTKGraphicalEditor not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuMiniTools(wxCommandEvent& event) { - cerr << "Event OnMenuMiniTools not implemented" << endl; + std::cerr << "Event OnMenuMiniTools not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuCodeEditor(wxCommandEvent& event) { - cerr << "Event OnMenuCodeEditor not implemented" << endl; + std::cerr << "Event OnMenuCodeEditor not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuCommandLine(wxCommandEvent& event) { - cerr << "Event OnMenuCommandLine not implemented" << endl; + std::cerr << "Event OnMenuCommandLine not implemented" << std::endl; event.Skip(); } //Help Menu void wxCreaDevManagerMainFrame::OnMenuHelp(wxCommandEvent& event) { - cerr << "Event OnMenuHelp not implemented" << endl; + std::cerr << "Event OnMenuHelp not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuReportBug(wxCommandEvent& event) { - cerr << "Event OnMenuReportBug not implemented" << endl; + std::cerr << "Event OnMenuReportBug not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuAboutCreaDevManager(wxCommandEvent& event) { - cerr << "Event OnMenuAboutCreaDevManager not implemented" << endl; + std::cerr << "Event OnMenuAboutCreaDevManager not implemented" << std::endl; event.Skip(); } void wxCreaDevManagerMainFrame::OnMenuAboutCreatis(wxCommandEvent& event) { - cerr << "Event OnMenuAboutCreatis not implemented" << endl; + std::cerr << "Event OnMenuAboutCreatis not implemented" << std::endl; event.Skip(); } diff --git a/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h b/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h index a4a3147..cfdb1dd 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h +++ b/lib/creaDevManagerLib/wxCreaDevManagerMainFrame.h @@ -15,7 +15,7 @@ class wxCreaDevManagerMainFrame:public wxFrame wxCreaDevManagerMainFrame( wxWindow* parent, wxWindowID id = -1, - const wxString& caption = _("CREATIS CreaDevManager"), + const wxString& caption = wxString("CREATIS CreaDevManager"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE @@ -26,7 +26,7 @@ class wxCreaDevManagerMainFrame:public wxFrame bool Create( wxWindow* parent, wxWindowID id = -1, - const wxString& caption = _("CREATIS CreaDevManager"), + const wxString& caption = wxString("CREATIS CreaDevManager"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE diff --git a/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx b/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx index 87c7880..613112e 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx +++ b/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.cxx @@ -48,7 +48,7 @@ void wxCreaDevManagerTreeCtrl::BuildTree(ModelCreaDevManagerTree& projectsTree) wxTreeItemId rootIndex = this-> AddRoot(_("Open Projects")); for (int i = 0; i < projectsTree.projectRoots.size(); i++) { - cout << "Building TreeCtrl for " << projectsTree.projectRoots[i].GetName() << endl; + 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); } @@ -57,7 +57,7 @@ void wxCreaDevManagerTreeCtrl::BuildTree(ModelCreaDevManagerTree& projectsTree) this->Update(); } -void wxCreaDevManagerTreeCtrl::BuildTree(vector& projectsTree, wxTreeItemId parent) +void wxCreaDevManagerTreeCtrl::BuildTree(std::vector& projectsTree, wxTreeItemId parent) { for (int i = 0; i < projectsTree.size(); i++) { diff --git a/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h b/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h index f67da00..151f3b7 100644 --- a/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h +++ b/lib/creaDevManagerLib/wxCreaDevManagerTreeCtrl.h @@ -40,7 +40,7 @@ public: void BuildTree(ModelCreaDevManagerTree& tree); private: - void BuildTree(vector& tree, wxTreeItemId parent); + void BuildTree(std::vector& tree, wxTreeItemId parent); }; #endif /* WXCREADEVMANAGERTREECTRL_H_ */ -- 2.47.1