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
if (ok)
{
bbtkMessage("debug",2," OK"<<std::endl);
- break; // a package was found; we stop iterating
}
+ break; // we stop iterating even if error : have to signal it to user
} //------------------ // end for ( package_paths.begin();i!=package_paths.end() )
}
{
#if defined(__GNUC__)
bbtkError("Could not load package ["<< pkgname
- <<"] :" << std::endl << " " << dlerror());
+ <<"] :" << std::endl
+ << " Opening "<<libname<<" failed"
+ << " Reason: "<< dlerror());
#elif defined(_WIN32)
bbtkError("Could not load package ["<<pkgname
- <<"] : " << std::endl << " " <<libname<<" not found");
+ <<"] :"<< std::endl << " Error loading " <<libname);
// look how to get the error message on win
//<<dlerror());
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2008/09/10 07:25:23 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2008/09/10 09:25:19 $
+ Version: $Revision: 1.17 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//================================================================
- WxGUIScriptingInterface::WxGUIScriptingInterface( wxWindow *parent, wxString title, wxSize size)
- : wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
+ WxGUIScriptingInterface::WxGUIScriptingInterface( wxWindow *parent )
+ : wxFrame((wxFrame *)parent, -1, _T("bbStudio"),
+ wxDefaultPosition, wxSize(1200,800) )
{
// m_mgr = new wxAuiManager(this);
m_mgr.SetManagedWindow(this);
wxInitAllImageHandlers();
wxMenu *menuFile = new wxMenu;
+ menuFile->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") );
SetMenuBar( menuBar );
+ //===
+ // Status bar
CreateStatusBar();
SetStatusText( _T("Welcome to bbStudio !") );
- //
+ //===
+ // Panes (Files, Messages, Help, Command)
mWxGUITextEditor = new WxGUITextEditor(this,this);
mWxGUITextEditor->SetFileNameFilter("*.bbs");
.Caption(wxT("Files"))
.MinimizeButton(true)
.MaximizeButton(true)
- .Left()
+ .Center()
.MinSize(wxSize(100,100))
);
.MinimizeButton(true)
.MaximizeButton(true)
.Right()
- .MinSize(wxSize(200,100))
+ .Layer(2)
+ .MinSize(wxSize(400,100))
);
m_mgr.AddPane(mWxGUIOutputMessages,
.MinimizeButton(true)
.MaximizeButton(true)
.Bottom()
- .Position(1)
+ .Layer(1)
.MinSize(wxSize(100,100))
);
#endif
// 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);
//================================================================
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);
}
//================================================================
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");
void WxGUIScriptingInterface::OnPaneClose(wxAuiManagerEvent& evt)
{
std::cout << "Closing panel '"<<evt.pane->name<<"'"<<std::endl;
-
+ // TO DO : Uncheck
+ // OnMenuWindowsCheck( wxCommandEvent& event, wxWindow* w);
}
//================================================================