From: Eduardo DAVILA Date: Thu, 10 Mar 2016 15:06:06 +0000 (+0100) Subject: #2888 bbGEditor Feature New Normal - avoid vtk messages OutputWindwo box (vtkOutput... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=36a0d24cb1d01a0f0c6010a18ec09874e6331fd5;p=bbtkGEditor.git #2888 bbGEditor Feature New Normal - avoid vtk messages OutputWindwo box (vtkOutputWindow) --- diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index a54c317..517b72d 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -36,6 +36,24 @@ #include +#include "vtkOutputWindow.h" + +class vtkOutputWindowbbGEditor : public vtkOutputWindow +{ +public: + vtkOutputWindowbbGEditor() {} + static vtkOutputWindowbbGEditor* New() { return new vtkOutputWindowbbGEditor;} + virtual void DisplayDebugText (const char *) {} + virtual void DisplayText (const char *) {} + virtual void DisplayErrorText (const char *) {} + virtual void DisplayWarningText (const char *) {} + virtual void DisplayGenericWarningText (const char *) {} +protected: +}; + + + + static const wxCmdLineEntryDesc cmdLineDesc[] = { { wxCMD_LINE_PARAM, NULL, NULL, _T("file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, @@ -98,6 +116,12 @@ bool wxBBEditorApp::OnCmdLineParsed(wxCmdLineParser& parser) // main frame bool wxBBEditorApp::OnInit( ) { + + vtkOutputWindowbbGEditor *vtkoutputwindowbbgeditor= vtkOutputWindowbbGEditor::New(); + vtkOutputWindow::SetInstance( vtkoutputwindowbbgeditor ); + vtkoutputwindowbbgeditor->Delete(); + + #ifdef MACOSX /* assume this is OSX */ wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);