From: davila <> Date: Fri, 8 Oct 2010 18:31:44 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v1_0_0~26 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e581dbc8bf451bedae77aec3d46ef174e9063086;p=bbtkGEditor.git *** empty log message *** --- diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index f3f6a04..4a9ec05 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -479,15 +479,25 @@ namespace bbtk void wxGUIEditorGraphicBBS::SaveActualComplexBox(std::string filename) { - wxTextEntryDialog *nameDialog = new wxTextEntryDialog(this,wxT("Name of complex box")); + wxTextEntryDialog *cbNameDialog = new wxTextEntryDialog(this,wxT("Complex Box name")); + cbNameDialog->SetValue(_T("BBBBoxName")); std::string cbName=""; - if (nameDialog->ShowModal() == wxID_OK) + if (cbNameDialog->ShowModal() == wxID_OK) { - wxString complexboxname = nameDialog->GetValue(); + wxString complexboxname = cbNameDialog->GetValue(); cbName=(const char*) (complexboxname.mb_str()); } - if(!cbName.empty()) + wxTextEntryDialog *paNameDialog = new wxTextEntryDialog(this,wxT("Package name")); + paNameDialog->SetValue(_T("PPPPackageName")); + std::string paName=""; + if (paNameDialog->ShowModal() == wxID_OK) + { + wxString packagename = paNameDialog->GetValue(); + paName=(const char*) (packagename.mb_str()); + } + + if( (!cbName.empty()) || (!paName.empty()) ) { ofstream file; @@ -503,7 +513,7 @@ namespace bbtk content += "\n"; content += "# ----------------------------------\n"; content += "\n"; - content += _tabsMgr->getActualComplexBoxBBS(cbName); + content += _tabsMgr->getActualComplexBoxBBS(cbName,paName); file << content; file.close(); } @@ -557,7 +567,8 @@ namespace bbtk { wxString fileName = saveFileDialog->GetPath(); std::string filename = (const char*) (fileName.mb_str()); - std::string filenamebbs = filename+"s"; + std::string filenamebbs = filename; + filenamebbs[filename.length()-1]='s'; SaveActualDiagram( filename ); if (_tabsMgr->isActualDiagramComplexBox()==false) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index 4291597..1002c60 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -135,9 +135,9 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this ); //========================================================================= - std::string wxGEditorTabPanel::saveComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) + std::string wxGEditorTabPanel::saveComplexBoxBBS(std::string cbName, std:string paName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) { - return _sceneManager->saveComplexBoxBBS(cbName,cbAuthor,cbCategory,cbDescription); + return _sceneManager->saveComplexBoxBBS(cbName,paName,cbAuthor,cbCategory,cbDescription); } //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h index 28ba74d..8330969 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h @@ -95,7 +95,7 @@ namespace bbtk // Saves the actual BBS as complex box // RaC TOFIX It must be included the package of the complex box - std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); + std::string saveComplexBoxBBS(std::string cbName,std::string paName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); // Shows the dialog to edit black box parameters void editBlackBox(GBlackBoxModel *bbmodel); diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx index bca6b0b..2f1e1ba 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx @@ -102,9 +102,9 @@ namespace bbtk //========================================================================= - std::string wxTabPanelsManager::getActualComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) + std::string wxTabPanelsManager::getActualComplexBoxBBS(std::string cbName, std::string paName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) { - return _actual->saveComplexBoxBBS(cbName,cbAuthor,cbCategory,cbDescription); + return _actual->saveComplexBoxBBS(cbName,paName,cbAuthor,cbCategory,cbDescription); } //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h index ec6cfdf..67e4d3a 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h @@ -79,7 +79,7 @@ namespace bbtk void updateStatusBar(std::string textStatus); std::string getActualDiagramBBS(bool wln=false); - std::string getActualComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); + std::string getActualComplexBoxBBS(std::string cbName, std::string std::string paName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); void editBlackBox(GBlackBoxModel *bbmodel); void deleteAllBoxesActualDiagram(); diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 3cb95f8..5b409fe 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -1339,7 +1339,7 @@ printf("EED wxVtkSceneManager::createGComplexBoxOutputPort 900-450\n"); //========================================================================= - std::string wxVtkSceneManager::saveComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) + std::string wxVtkSceneManager::saveComplexBoxBBS(std::string cbName,std::string paName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) { std::vector packages; @@ -1400,7 +1400,7 @@ printf("EED wxVtkSceneManager::createGComplexBoxOutputPort 900-450\n"); // Definition of a complex box script+="define "; - script+=cbName; + script+=cbName+" "+paName; script+="\n"; script+="\n"; diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h index 3fd5a27..72dbe14 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h @@ -166,7 +166,7 @@ namespace bbtk std::string getDiagramBBS(bool wln=false); //Returns a string with the BBS script of the complex box. - std::string saveComplexBoxBBS(std::string cbName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); + std::string saveComplexBoxBBS(std::string cbName,std::string paName,std::string cbAuthor="",std::string cbCategory="",std::string cbDescription=""); //Delete the object in the list of controllers with the id given by parameter. void deleteObject(int id);