--- /dev/null
+/* XPM */
+static const char * wxart_graphdetail_xpm[] = {
+"16 15 3 1",
+" c None",
+". c #000000",
+"+ c #FFFFFF",
+" ",
+"...... ......",
+".++++. .++++.",
+".+..+......++++.",
+".++++. .+..+.",
+".+..+. .++++.",
+".++++......+..+.",
+".+..+. .++++.",
+".++++. .+..+.",
+".++++......++++.",
+"...... .+..+.",
+" .++++.",
+" ......",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static const char * wxart_graphsimple_xpm[] = {
+"16 15 3 1",
+" c None",
+". c #000000",
+"+ c #FFFFFF",
+" ",
+" ",
+" ..... ",
+" .+++... ",
+" .+++. ... ",
+" ..... . ",
+" . ",
+" ..... ",
+" .+++. ",
+" .+++. ",
+" ..... ",
+" ",
+" ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static const char * wxart_run_xpm[] = {
+"15 16 3 1",
+" c None",
+". c #000000",
+"+ c #FFFFFF",
+" ",
+" ",
+" . ",
+" .. ",
+" .+. ",
+" ........++. ",
+" .++++++++++. ",
+" .+++++++++++. ",
+" .+++++++++++. ",
+" .++++++++++. ",
+" ........++. ",
+" .+. ",
+" .. ",
+" . ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static const char * wxart_runbbi_xpm[] = {
+"15 16 3 1",
+" c None",
+". c #000000",
+"+ c #FF1B1B",
+" ",
+" ",
+" . ",
+" .. ",
+" .+. ",
+" ........++. ",
+" .++++++++++. ",
+" .+++++++++++. ",
+" .+++++++++++. ",
+" .++++++++++. ",
+" ........++. ",
+" .+. ",
+". . .. . ",
+"... ... . ",
+". . . . . ",
+"... ... . "};
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
//================================================================
+
+ //================================================================
+ 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()
{
command += " " + pack + " -q";
bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-printf("EED WxGUIScriptingInterface::DoRegeneratePackageDoc %s", command.c_str());
if ( ! system ( command.c_str() ) )
{
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.h,v $
Language: C++
- Date: $Date: 2008/12/15 09:04:47 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2009/04/15 15:45:49 $
+ Version: $Revision: 1.16 $
=========================================================================*/
/* ---------------------------------------------------------------------
// WxGUITextEditor callbacks
void WxGUITextEditorRun();
-
+ void WxGUITextEditorRunBBI();
+ void WxGUITextEditorGraphSimple();
+ void WxGUITextEditorGraphDetail();
+
// WxGUIHtmlBrowser callbacks
bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target);
Program: bbtk
Module: $RCSfile: bbtkWxGUITextEditor.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:15 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2009/04/15 15:45:49 $
+ Version: $Revision: 1.19 $
=========================================================================*/
/* ---------------------------------------------------------------------
#include "../data/icons/wxart_filesaveas.xpm"
//#include "../data/icons/wxart_exefile.xpm"
//#include "../data/icons/wxart_delete.xpm"
-#include "../data/icons/wxart_down.xpm"
+//#include "../data/icons/wxart_down.xpm"
+#include "../data/icons/wxart_run.xpm"
+#include "../data/icons/wxart_runbbi.xpm"
+#include "../data/icons/wxart_graphsimple.xpm"
+#include "../data/icons/wxart_graphdetail.xpm"
#include "../data/icons/wxart_eldel.xpm"
namespace bbtk
}
}
// std::cout << "file [" << mName << "]" <<std::endl;
- mwxInputText->SaveFile(std2wx(mName));
+// mwxInputText->SaveFile(std2wx(mName));
+ SaveFile(mName);
mwxInputText->SetModified(false);
}
//================================================================
-
-
-
-
-
-
-
-
-
-
+ //================================================================
+ void WxGUITextEditorPage::SaveFile(const std::string& filename)
+ {
+ mwxInputText->SaveFile( std2wx(filename) );
+ }
+ //================================================================
+
+
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,
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);
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;
+
}
}
//================================================================
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
virtual ~WxGUITextEditorUser() {}
/// Callback invoked when the 'run' button is pressed
virtual void WxGUITextEditorRun() {}
+ virtual void WxGUITextEditorRunBBI() {}
+ virtual void WxGUITextEditorGraphSimple() {}
+ virtual void WxGUITextEditorGraphDetail() {}
+
};
//================================================================
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();
ID_ButtonClose,
ID_ButtonSave,
ID_ButtonSaveAs,
- ID_ButtonRun
+ ID_ButtonRun,
+ ID_ButtonRunBBI,
+ ID_ButtonGraphSimple,
+ ID_ButtonGraphDetail
// ID_ButtonQuit
};
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
void IsoSurfaceExtractor::DoProcess()
{
-printf("EED IsoSurfaceExtractor::DoProcess() 0\n");
marchingcubes->SetInput( bbGetInputIn() );
marchingcubes->SetValue(0, bbGetInputIsovalue() );
marchingcubes->Update();
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 $
=========================================================================*/
/* ---------------------------------------------------------------------
wxSP_3D |
wxSP_LIVE_UPDATE );
w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
+ w->SetMinimumPaneSize(2);
/*
wxWindow* w1 = bbGetInputWidget1();
wxWindow* w2 = bbGetInputWidget2();
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
void Viewer3D::Process()
{
- printf("EED Viewer3D::Process() 0\n");
//EED
// Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget();
Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget();
if ((firsttime==true) && (w!=NULL)){
firsttime=false;
- printf("EED Viewer3D::Process() 1\n");
vtkRenderWindowInteractor *interactor = w->GetInteractor();
if (interactor!=NULL)
*/
void Viewer3D::CreateWidget(wxWindow* parent)
{
- printf("EED Viewer3D::CreateWidget() 0\n");
bbtkDebugMessageInc("Core",9,"Viewer3D::CreateWidget()"<<std::endl);
// when window is shown
void Viewer3D::OnShowWidget()
{
- printf("EED Viewer3D::OnShowWidget() 0\n");
// Viewer3DWidget* w = (Viewer3DWidget*)bbGetOutputWidget();
// if (w) w->Update();