From: Eduardo Davila Date: Wed, 15 Apr 2009 15:45:04 +0000 (+0000) Subject: icons bbStudio X-Git-Tag: EED.02Oct2009~61 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=975161a89341e867c53da1dedd15e2f97cbd4586;p=bbtk.git icons bbStudio --- diff --git a/kernel/data/icons/wxart_graphdetail.xpm b/kernel/data/icons/wxart_graphdetail.xpm new file mode 100644 index 0000000..a84c29a --- /dev/null +++ b/kernel/data/icons/wxart_graphdetail.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * wxart_graphdetail_xpm[] = { +"16 15 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +"...... ......", +".++++. .++++.", +".+..+......++++.", +".++++. .+..+.", +".+..+. .++++.", +".++++......+..+.", +".+..+. .++++.", +".++++. .+..+.", +".++++......++++.", +"...... .+..+.", +" .++++.", +" ......", +" ", +" "}; diff --git a/kernel/data/icons/wxart_graphsimple.xpm b/kernel/data/icons/wxart_graphsimple.xpm new file mode 100644 index 0000000..b887d75 --- /dev/null +++ b/kernel/data/icons/wxart_graphsimple.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * wxart_graphsimple_xpm[] = { +"16 15 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ..... ", +" .+++... ", +" .+++. ... ", +" ..... . ", +" . ", +" ..... ", +" .+++. ", +" .+++. ", +" ..... ", +" ", +" ", +" ", +" "}; diff --git a/kernel/data/icons/wxart_run.xpm b/kernel/data/icons/wxart_run.xpm new file mode 100644 index 0000000..86155d0 --- /dev/null +++ b/kernel/data/icons/wxart_run.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * wxart_run_xpm[] = { +"15 16 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" . ", +" .. ", +" .+. ", +" ........++. ", +" .++++++++++. ", +" .+++++++++++. ", +" .+++++++++++. ", +" .++++++++++. ", +" ........++. ", +" .+. ", +" .. ", +" . ", +" ", +" "}; diff --git a/kernel/data/icons/wxart_runbbi.xpm b/kernel/data/icons/wxart_runbbi.xpm new file mode 100644 index 0000000..22a7839 --- /dev/null +++ b/kernel/data/icons/wxart_runbbi.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char * wxart_runbbi_xpm[] = { +"15 16 3 1", +" c None", +". c #000000", +"+ c #FF1B1B", +" ", +" ", +" . ", +" .. ", +" .+. ", +" ........++. ", +" .++++++++++. ", +" .+++++++++++. ", +" .+++++++++++. ", +" .++++++++++. ", +" ........++. ", +" .+. ", +". . .. . ", +"... ... . ", +". . . . . ", +"... ... . "}; diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index f06b07e..4cb10db 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/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 '"<SaveFile(std2wx(mName)); +// mwxInputText->SaveFile(std2wx(mName)); + SaveFile(mName); mwxInputText->SetModified(false); } //================================================================ - - - - - - - - - - + //================================================================ + void WxGUITextEditorPage::SaveFile(const std::string& filename) + { + mwxInputText->SaveFile( std2wx(filename) ); + } + //================================================================ + + @@ -331,7 +334,10 @@ namespace bbtk wxBitmap bmp_close(eldel_xpm); wxBitmap bmp_save(filesave_xpm); wxBitmap bmp_saveas(filesaveas_xpm); - wxBitmap bmp_run(down_xpm); + wxBitmap bmp_run(wxart_run_xpm); + wxBitmap bmp_runbbi(wxart_runbbi_xpm); + wxBitmap bmp_graphsimple(wxart_graphsimple_xpm); + wxBitmap bmp_graphdetail(wxart_graphdetail_xpm); mwxToolBar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, @@ -355,7 +361,22 @@ namespace bbtk mwxToolBar->AddTool(ID_ButtonRun, _T("Run"), bmp_run, wxNullBitmap, wxITEM_NORMAL, _T("Run file"), _T("Run current file")); - + + + mwxToolBar->AddTool(ID_ButtonGraphSimple, _T("Graph (simple)"), + bmp_graphsimple, wxNullBitmap, wxITEM_NORMAL, + _T("Graph simple"), _T("Simple graph of actual script")); + + mwxToolBar->AddTool(ID_ButtonGraphDetail, _T("Graph (detail)"), + bmp_graphdetail, wxNullBitmap, wxITEM_NORMAL, + _T("Graph (detail)"), _T("Detail graph of actual script")); + + mwxToolBar->AddTool(ID_ButtonRunBBI, _T("Run external bbi "), + bmp_runbbi, wxNullBitmap, wxITEM_NORMAL, + _T("Run external bbi"), _T("Run external bbi")); + + + mwxToolBar->AddSeparator(); mwxPosition = new wxStaticText ( mwxToolBar, -1, _T("")); mwxToolBar->AddControl(mwxPosition); @@ -454,10 +475,29 @@ namespace bbtk SaveCurrentPage(); break; case ID_ButtonRun : - if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) + if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) mUser->WxGUITextEditorRun(); FocusOnCurrentPage(); break; + + case ID_ButtonGraphSimple : + if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) + mUser->WxGUITextEditorGraphSimple(); + FocusOnCurrentPage(); + break; + + case ID_ButtonGraphDetail : + if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) + mUser->WxGUITextEditorGraphDetail(); + FocusOnCurrentPage(); + break; + + case ID_ButtonRunBBI : + if ((mUser!=0) && (mwxNotebook->GetPageCount()>0)) + mUser->WxGUITextEditorRunBBI(); + FocusOnCurrentPage(); + break; + } } //================================================================ diff --git a/kernel/src/bbtkWxGUITextEditor.h b/kernel/src/bbtkWxGUITextEditor.h index 77eac31..166a46f 100644 --- a/kernel/src/bbtkWxGUITextEditor.h +++ b/kernel/src/bbtkWxGUITextEditor.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUITextEditor.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:15 $ - Version: $Revision: 1.8 $ + Date: $Date: 2009/04/15 15:45:50 $ + Version: $Revision: 1.9 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -76,6 +76,10 @@ namespace bbtk virtual ~WxGUITextEditorUser() {} /// Callback invoked when the 'run' button is pressed virtual void WxGUITextEditorRun() {} + virtual void WxGUITextEditorRunBBI() {} + virtual void WxGUITextEditorGraphSimple() {} + virtual void WxGUITextEditorGraphDetail() {} + }; //================================================================ @@ -95,7 +99,9 @@ namespace bbtk void Load(const std::string& filename); void Save(const std::string& filter); + void SaveFile(const std::string& filename); + bool IsModified(); //{ return mwxInputText->IsModified(); } std::string GetText(); @@ -176,7 +182,10 @@ namespace bbtk ID_ButtonClose, ID_ButtonSave, ID_ButtonSaveAs, - ID_ButtonRun + ID_ButtonRun, + ID_ButtonRunBBI, + ID_ButtonGraphSimple, + ID_ButtonGraphDetail // ID_ButtonQuit }; diff --git a/packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx b/packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx index ba4cb8c..a5dbdc1 100644 --- a/packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx +++ b/packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbvtkIsoSurfaceExtractor.cxx,v $ Language: C++ - Date: $Date: 2009/03/23 12:55:52 $ - Version: $Revision: 1.11 $ + Date: $Date: 2009/04/15 15:45:52 $ + Version: $Revision: 1.12 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -94,7 +94,6 @@ namespace bbvtk void IsoSurfaceExtractor::DoProcess() { -printf("EED IsoSurfaceExtractor::DoProcess() 0\n"); marchingcubes->SetInput( bbGetInputIn() ); marchingcubes->SetValue(0, bbGetInputIsovalue() ); marchingcubes->Update(); diff --git a/packages/wx/src/bbwxLayoutSplit.cxx b/packages/wx/src/bbwxLayoutSplit.cxx index 45e3ea5..6427085 100644 --- a/packages/wx/src/bbwxLayoutSplit.cxx +++ b/packages/wx/src/bbwxLayoutSplit.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxLayoutSplit.cxx,v $ Language: C++ - Date: $Date: 2008/12/12 12:56:33 $ - Version: $Revision: 1.9 $ + Date: $Date: 2009/04/15 15:45:55 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -68,6 +68,7 @@ namespace bbwx wxSP_3D | wxSP_LIVE_UPDATE ); w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) ); + w->SetMinimumPaneSize(2); /* wxWindow* w1 = bbGetInputWidget1(); wxWindow* w2 = bbGetInputWidget2(); diff --git a/packages/wxvtk/src/bbwxvtkViewer3D.cxx b/packages/wxvtk/src/bbwxvtkViewer3D.cxx index fe71dd7..056e496 100644 --- a/packages/wxvtk/src/bbwxvtkViewer3D.cxx +++ b/packages/wxvtk/src/bbwxvtkViewer3D.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxvtkViewer3D.cxx,v $ Language: C++ - Date: $Date: 2009/03/23 12:55:54 $ - Version: $Revision: 1.14 $ + Date: $Date: 2009/04/15 15:45:57 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -154,7 +154,6 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect ) void Viewer3D::Process() { - printf("EED Viewer3D::Process() 0\n"); //EED // Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget(); @@ -165,7 +164,6 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect ) Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget(); if ((firsttime==true) && (w!=NULL)){ firsttime=false; - printf("EED Viewer3D::Process() 1\n"); vtkRenderWindowInteractor *interactor = w->GetInteractor(); if (interactor!=NULL) @@ -230,7 +228,6 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect ) */ void Viewer3D::CreateWidget(wxWindow* parent) { - printf("EED Viewer3D::CreateWidget() 0\n"); bbtkDebugMessageInc("Core",9,"Viewer3D::CreateWidget()"<Update();