X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkWxGUIScriptingInterface.cxx;h=4bde5cbe221519ef4ac00a8d0683b59571261378;hb=9d5a41aa77e7749118fc4885f7b26ea25bd90629;hp=d176ba3d31a2b1eb8adf37ddffdc7169c903362a;hpb=d4eee42d2a2b5cc416a30deb49bf07aa76b7b3b1;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index d176ba3..4bde5cb 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $ Language: C++ - Date: $Date: 2008/09/10 09:25:19 $ - Version: $Revision: 1.17 $ + Date: $Date: 2008/10/09 14:38:57 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -39,6 +39,7 @@ #include "bbtkWxStreamRedirector.h" #include "bbtkUtilities.h" +#include //#include "icons/cc_run.xpm" @@ -53,7 +54,9 @@ namespace bbtk ID_Menu_CreatePackage, ID_Menu_CreateBlackBox, ID_Menu_ShowImageGraph, - ID_Menu_CreateIndex, + ID_Menu_RegeneratePackageDoc, + ID_Menu_RegenerateBoxesLists, + ID_Menu_RegenerateAll, ID_Menu_Windows_Files, ID_Menu_Windows_Help, ID_Menu_Windows_Messages, @@ -92,7 +95,11 @@ namespace bbtk menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") ); menuTools->Append( ID_Menu_CreateBlackBox, _T("Create &black box") ); menuTools->Append( ID_Menu_ShowImageGraph, _T("&Show last image graph") ); - menuTools->Append( ID_Menu_CreateIndex, _T("&Generate index") ); + menuTools->AppendSeparator(); + menuTools->Append( ID_Menu_RegeneratePackageDoc,_T("&Regenerate package doc") ); + menuTools->Append( ID_Menu_RegenerateBoxesLists,_T("&Regenerate boxes lists") ); + menuTools->Append( ID_Menu_RegenerateAll,_T("&Regenerate all") ); + wxMenu *menuWindows = new wxMenu; menuWindows->AppendCheckItem(ID_Menu_Windows_Files, @@ -233,9 +240,14 @@ namespace bbtk // mwxNotebook->SetSelection(1); mWxGUIHtmlBrowser->GoHome(); // Refresh(); -// m_mgr.Update(); + m_mgr.Update(); // LoadPerspective(); + + wxTipWindow* tip = new wxTipWindow(this, + _T("\n Welcome to bbStudio !\n\n To run a demo or example:\n 1. click on the 'Demos' or 'Examples' link\n 2. select a demo or example\n 3. click on the '[source]' link : the source file is loaded in bbStudio\n 4. click on the 'Run' button (the arrow at the bottom right of the source file) \n"),1000); + tip->CenterOnParent(); + tip->Show(); } //================================================================ @@ -261,7 +273,7 @@ namespace bbtk } \ catch (InterpreterError e) \ { \ - std::cerr << "* IERROR : "<InterpretLine( "config"); - I->InterpretLine( "message echo 2"); - I->InterpretLine( "exec freeze"); - I->InterpretLine( "include *"); - I->InterpretLine( "help packages"); - I->InterpretLine( "index "+doc_path+"/bbdoc/index-alpha.html Initials"); - I->InterpretLine( "index "+doc_path+"/bbdoc/index-package.html Packages"); - I->InterpretLine( "index "+doc_path+"/bbdoc/index-category.html Categories"); - I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors"); - + //================================================================ + void WxGUIScriptingInterface::OnMenuRegenerateAll(wxCommandEvent& WXUNUSED(event)) + { + std::string command; + command = ConfigurationFile::GetInstance().Get_bin_path(); + command += ConfigurationFile::GetInstance().Get_file_separator(); + command += "bbRegeneratePackageDoc -a && "; + command += ConfigurationFile::GetInstance().Get_bin_path(); + command += ConfigurationFile::GetInstance().Get_file_separator(); + command += "bbRegenerateBoxesLists"; + bbtkMessage("debug",1,"Executing system command '"<> conf; - int w,h; + // int x,y; + // f >> x >> y ; + int w,h; f >> w >> h ; f.close(); // std::cout << conf << std::endl; + // Move(x,y); SetSize(w,h); m_mgr.LoadPerspective(std2wx(conf)); } @@ -602,7 +679,9 @@ namespace bbtk EVT_MENU(ID_Menu_CreatePackage, WxGUIScriptingInterface::OnMenuCreatePackage) EVT_MENU(ID_Menu_CreateBlackBox, WxGUIScriptingInterface::OnMenuCreateBlackBox) EVT_MENU(ID_Menu_ShowImageGraph, WxGUIScriptingInterface::OnMenuShowImageGraph) - EVT_MENU(ID_Menu_CreateIndex, WxGUIScriptingInterface::OnMenuCreateIndex) + EVT_MENU(ID_Menu_RegeneratePackageDoc, WxGUIScriptingInterface::OnMenuRegeneratePackageDoc) + EVT_MENU(ID_Menu_RegenerateBoxesLists, WxGUIScriptingInterface::OnMenuRegenerateBoxesLists) + EVT_MENU(ID_Menu_RegenerateAll, WxGUIScriptingInterface::OnMenuRegenerateAll) EVT_MENU(ID_Menu_Windows_Files, WxGUIScriptingInterface::OnMenuWindowsFiles) EVT_MENU(ID_Menu_Windows_Help, WxGUIScriptingInterface::OnMenuWindowsHelp) EVT_MENU(ID_Menu_Windows_Messages, WxGUIScriptingInterface::OnMenuWindowsMessages)