X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkWxGUIScriptingInterface.cxx;h=c15e5996551ca429597292ddfa59b8073663f217;hb=5c4a538667f27876a5259ce1478ff809ad2bee6f;hp=f06b07eced988fe2dac3cc031f485b96e31f7fcb;hpb=98e18224b83c6955a804d79d4e7083626ea8afcd;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index f06b07e..c15e599 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -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/05/28 08:12:07 $ + Version: $Revision: 1.38 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -243,8 +243,10 @@ namespace bbtk #endif // parent window of all bbtk windows will be a child of this - Wx::SetTopWindowParent(this); - // Add the method OnWxSignal as a Wx::Signal observer + // Wx::SetTopWindowParent(this); + Wx::SetTopWindow(this); + // Wx::SetAutoDestroyTopWindow(false); + // Add the method OnWxSignal as a Wx::Signal observer //bbtkAddWxSignalObserver(WxGUIPackageBrowser2Window::OnWxSignal); //.PaneBorder(false)); @@ -301,11 +303,29 @@ namespace bbtk //================================================================ WxGUIScriptingInterface::~WxGUIScriptingInterface() { + bbtkDebugMessage("widget",9,"bbStudio::~bbStudio()"<Close(); + } + this->Destroy(); + } + //================================================================ + + //================================================================ void WxGUIScriptingInterface::Open(const std::string& filename) { @@ -390,6 +410,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 +638,6 @@ namespace bbtk command += " " + pack + " -q"; bbtkMessage("debug",1,"Executing system command '"<