From d4eee42d2a2b5cc416a30deb49bf07aa76b7b3b1 Mon Sep 17 00:00:00 2001 From: guigues Date: Wed, 10 Sep 2008 09:25:18 +0000 Subject: [PATCH] *** empty log message *** --- kernel/appli/bbStudio/bbStudio.cxx | 2 +- kernel/src/bbtkFactory.cxx | 12 +++--- kernel/src/bbtkWxGUIScriptingInterface.cxx | 46 ++++++++++++---------- kernel/src/bbtkWxGUIScriptingInterface.h | 6 +-- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/kernel/appli/bbStudio/bbStudio.cxx b/kernel/appli/bbStudio/bbStudio.cxx index b994e49..541d24a 100644 --- a/kernel/appli/bbStudio/bbStudio.cxx +++ b/kernel/appli/bbStudio/bbStudio.cxx @@ -75,7 +75,7 @@ bool wxBBIApp::OnInit( ) if (usage) return false; bbtk::WxGUIScriptingInterface *I = - new bbtk::WxGUIScriptingInterface(0,_T("bbStudio"),wxSize(800,600)); + new bbtk::WxGUIScriptingInterface(0); SetTopWindow(I); I->Show(true); diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index bc21a29..3ca2be2 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -4,8 +4,8 @@ Program: bbtk Module: $RCSfile: bbtkFactory.cxx,v $ Language: C++ -Date: $Date: 2008/07/01 07:58:28 $ -Version: $Revision: 1.37 $ +Date: $Date: 2008/09/10 09:25:19 $ +Version: $Revision: 1.38 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de @@ -251,8 +251,8 @@ namespace bbtk if (ok) { bbtkMessage("debug",2," OK"<Append( ID_Menu_EditConfig, _T("Open bbtk &Config file") ); menuFile->Append( ID_Menu_Quit, _T("&Quit") ); wxMenu *menuAbout = new wxMenu; menuAbout->Append( ID_Menu_About, _T("&About...") ); wxMenu *menuTools = new wxMenu; - menuTools->Append( ID_Menu_EditConfig, _T("&Edit bbtk config") ); 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") ); @@ -122,10 +123,13 @@ namespace bbtk SetMenuBar( menuBar ); + //=== + // Status bar CreateStatusBar(); SetStatusText( _T("Welcome to bbStudio !") ); - // + //=== + // Panes (Files, Messages, Help, Command) mWxGUITextEditor = new WxGUITextEditor(this,this); mWxGUITextEditor->SetFileNameFilter("*.bbs"); @@ -179,7 +183,7 @@ namespace bbtk .Caption(wxT("Files")) .MinimizeButton(true) .MaximizeButton(true) - .Left() + .Center() .MinSize(wxSize(100,100)) ); @@ -189,7 +193,8 @@ namespace bbtk .MinimizeButton(true) .MaximizeButton(true) .Right() - .MinSize(wxSize(200,100)) + .Layer(2) + .MinSize(wxSize(400,100)) ); m_mgr.AddPane(mWxGUIOutputMessages, @@ -206,7 +211,7 @@ namespace bbtk .MinimizeButton(true) .MaximizeButton(true) .Bottom() - .Position(1) + .Layer(1) .MinSize(wxSize(100,100)) ); #endif @@ -216,9 +221,11 @@ namespace bbtk // Add the method OnWxSignal as a Wx::Signal observer //bbtkAddWxSignalObserver(WxGUIPackageBrowser2Window::OnWxSignal); -//.PaneBorder(false)); + //.PaneBorder(false)); + // Load the interface appearance saved on last closing LoadPerspective(); + // Done in LoadPerspective // m_mgr.Update(); SetAutoLayout(true); @@ -336,16 +343,9 @@ namespace bbtk //================================================================ void WxGUIScriptingInterface::OnMenuEditConfig(wxCommandEvent& WXUNUSED(event)) { - std::string commandStr; - std::string configFile = ConfigurationFile::GetInstance().Get_config_xml_full_path(); -#ifdef WIN32 - commandStr = "notepad.exe "; -#else - commandStr = "gedit "; -#endif - commandStr = commandStr + configFile; - // std::cout << "system: " << commandStr << std::endl; - system ( commandStr.c_str() ); + std::string configFile = + ConfigurationFile::GetInstance().Get_config_xml_full_path(); + Open(configFile); } //================================================================ @@ -433,8 +433,11 @@ namespace bbtk Interpreter::Pointer I = Interpreter::New(); + I->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"); @@ -585,7 +588,8 @@ namespace bbtk void WxGUIScriptingInterface::OnPaneClose(wxAuiManagerEvent& evt) { std::cout << "Closing panel '"<name<<"'"<