X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkWxConsole.cxx;h=a599ead45e684aa61e4c16d86e76e3a9d25904b4;hb=b0f948e65655a106e7328784444554f34da7dcac;hp=c988e33380d4eef8d10883dee5a0a7f6d03d3ab4;hpb=c03be5662c1ea498e612cbaa9f9b7a9988a65765;p=bbtk.git diff --git a/kernel/src/bbtkWxConsole.cxx b/kernel/src/bbtkWxConsole.cxx index c988e33..a599ead 100644 --- a/kernel/src/bbtkWxConsole.cxx +++ b/kernel/src/bbtkWxConsole.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxConsole.cxx,v $ Language: C++ - Date: $Date: 2008/03/07 08:40:14 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/03/10 10:01:14 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -40,7 +40,7 @@ namespace bbtk { - WxConsole* WxConsole::mInstance = 0; + // On Windows when compiling a dll, wx prevents the compilation // of the class wxStreamToTextRedirector (why ? it is a nightmare...) // The blocking symbol is wxHAS_TEXT_WINDOW_STREAM. @@ -159,7 +159,7 @@ namespace bbtk WxConsole::WxConsole( wxWindow *parent, wxString title, wxSize size) : wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size) { - mInstance = this; + mInterpreter = new bbtk::Interpreter(); mInterpreter->SetWxConsole(this); mInterpreter->SetCommandLine(true); @@ -329,15 +329,20 @@ namespace bbtk mRedirect_cerr = new WxTextCtrlStreamRedirector(std::cerr,mwxTextHistory,*wxGREEN,true); - // Sets the console as the parent window of all bbtk windows - Wx::SetTopWindow(this); - + // Creates and sets the parent window of all bbtk windows + wxFrame* top = new wxFrame(this,-1,_T("bbtk"), + wxDefaultPosition, + wxSize(0,0), + wxFRAME_TOOL_WINDOW) ;//wxMINIMIZE_BOX); + Wx::SetTopWindow(top); + // top->Show(); + // Layout //EED SetSizer(sizer); SetAutoLayout(true); Layout(); - + Refresh(); } //================================================================