]> 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 f3f6a04d7e6e8624a984ff3240e38ea3541f9940..4a9ec05c1bb0582fdb4703ab5792fc660bc213ae 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 4291597df0cc6b00e2caf375424b6f908adfd1c3..1002c606018538aa837eeec8f3227a4f1f99c7e9 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 28ba74dc5c1a7f8030b620417b1038f20a288279..833096967aad41365189bccaa614c44f590c3f91 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 bca6b0b81f8396454147308d43ea481cb2b284e4..2f1e1bac91b55dc34fac068f357b877801adf49c 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 ec6cfdf804c9d472167645f43faf9b83e874f673..67e4d3a062df956caf9b5c97a31f54efbabbfc91 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 3cb95f86f21e22778fb95e3f97f47a42029d7e57..5b409fe573c2c3054b58e0feb1b1009a9ca30e21 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 3fd5a2764d053ae5691efd20171da84dadb392ee..72dbe14bea55326d77210d832bf99770aa7006e5 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);