]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxGUIScriptingInterface.cxx
icons bbStudio
[bbtk.git] / kernel / src / bbtkWxGUIScriptingInterface.cxx
index f06b07eced988fe2dac3cc031f485b96e31f7fcb..4cb10db79bff0daccd28c7af3ba31cf30e133286 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/30 15:22:51 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2009/04/15 15:45:49 $
+  Version:   $Revision: 1.37 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -390,6 +390,52 @@ namespace bbtk
   }
   //================================================================
  
+       
+  //================================================================
+       void WxGUIScriptingInterface::WxGUITextEditorGraphSimple()
+       {
+               WxGUICommandEnter("exec freeze_no_error");
+               WxGUITextEditorRun();
+               WxGUICommandEnter("exec unfreeze");
+               WxGUICommandEnter("graph");
+       }
+  //================================================================
+       
+       //================================================================
+       void WxGUIScriptingInterface::WxGUITextEditorGraphDetail()
+       {
+               WxGUICommandEnter("exec freeze_no_error");
+               WxGUITextEditorRun();
+               WxGUICommandEnter("exec unfreeze");
+               WxGUICommandEnter("graph . 1");
+       }
+       //================================================================
+
+       
+       //================================================================
+       void WxGUIScriptingInterface::WxGUITextEditorRunBBI()
+       {
+         std::string separator = ConfigurationFile::GetInstance().Get_file_separator ();
+         std::string dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+         std::string filename = dir + separator + "tmp_bbtk.bbs";
+         mWxGUITextEditor->GetCurrentPage()->SaveFile(filename);
+       
+               std::string command = "\"";
+         command += ConfigurationFile::GetInstance().Get_bin_path();
+#ifdef MACOSX
+         command += separator + "bbi.app/Contents/MacOS/bbi\" ";
+#else 
+         command += separator + "bbi\" ";
+#endif
+         command += "\""+filename + "\"";
+         command += " & ";
+         
+         printf ("EED WxGUIScriptingInterface::WxGUITextEditorRunBBI %s \n" , command.c_str() );
+         system( command.c_str() );
+       }
+       //================================================================
+       
+       
   //================================================================
   void WxGUIScriptingInterface::WxGUITextEditorRun()
   {
@@ -572,7 +618,6 @@ namespace bbtk
        command += " " + pack + " -q";
     bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
 
-printf("EED WxGUIScriptingInterface::DoRegeneratePackageDoc %s",  command.c_str());      
 
     if ( ! system ( command.c_str() ) )
       {