]> Creatis software - bbtkGEditor.git/commitdiff
*** empty log message ***
authordavila <>
Fri, 8 Oct 2010 18:31:44 +0000 (18:31 +0000)
committerdavila <>
Fri, 8 Oct 2010 18:31:44 +0000 (18:31 +0000)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index f3f6a04..4a9ec05 100644 (file)
@@ -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)
index 4291597..1002c60 100644 (file)
@@ -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);
        }
 
        //=========================================================================
index 28ba74d..8330969 100644 (file)
@@ -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);
index bca6b0b..2f1e1ba 100644 (file)
@@ -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);
        }
 
        //=========================================================================
index ec6cfdf..67e4d3a 100644 (file)
@@ -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();
index 3cb95f8..5b409fe 100644 (file)
@@ -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<std::string> 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";
 
index 3fd5a27..72dbe14 100644 (file)
@@ -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);