X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FbbEditor%2FbbEditor.cxx;fp=appli%2FbbEditor%2FbbEditor.cxx;h=a12bae411a5cc06ab59ae0b07c6943ed81b9009f;hb=10012627035234dfbe7a9028e393d1f912d15e8f;hp=517b72de9cb1c0d6271d07bae66da72a81a74906;hpb=204fc70d152f2c46eea9d21bc2616ccfb2226e8e;p=bbtkGEditor.git diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index 517b72d..a12bae4 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -54,13 +54,27 @@ protected: -static const wxCmdLineEntryDesc cmdLineDesc[] = -{ -{ wxCMD_LINE_PARAM, NULL, NULL, _T("file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, -{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, -//{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, -{ wxCMD_LINE_NONE } -}; + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, _T("file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, + //{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, + { wxCMD_LINE_NONE } + }; +#else + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, "file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, "h", "help", "Prints this help" }, + //{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, + { wxCMD_LINE_NONE } + }; +#endif + + class wxBBEditorApp : public wxApp @@ -116,7 +130,6 @@ bool wxBBEditorApp::OnCmdLineParsed(wxCmdLineParser& parser) // main frame bool wxBBEditorApp::OnInit( ) { - vtkOutputWindowbbGEditor *vtkoutputwindowbbgeditor= vtkOutputWindowbbGEditor::New(); vtkOutputWindow::SetInstance( vtkoutputwindowbbgeditor ); vtkoutputwindowbbgeditor->Delete(); @@ -134,6 +147,7 @@ bool wxBBEditorApp::OnInit( ) #endif bbtk::wxGUIEditorGraphicBBS *iegbbs; + iegbbs = new bbtk::wxGUIEditorGraphicBBS(NULL); SetTopWindow(iegbbs); iegbbs->Show(true); @@ -157,7 +171,6 @@ bool wxBBEditorApp::OnInit( ) } } - return true; }