X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWx.cxx;h=9a144705b4f2aa5ab0fe1ccba7c94398aeb93712;hb=63d56e2f28b834d9e13f3757aaa23ab63b2b3dd6;hp=c734298271e0e613cde1b544e960d49f0a780434;hpb=6575a389b71b1b85c79e4444885becb76ecf16e4;p=bbtk.git diff --git a/kernel/src/bbtkWx.cxx b/kernel/src/bbtkWx.cxx index c734298..9a14470 100644 --- a/kernel/src/bbtkWx.cxx +++ b/kernel/src/bbtkWx.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWx.cxx,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:14 $ - Version: $Revision: 1.10 $ + Date: $Date: 2009/05/28 08:12:06 $ + Version: $Revision: 1.15 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -27,12 +27,11 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-B license and that you accept its terms. * ------------------------------------------------------------------------ */ - -#ifdef _USE_WXWIDGETS_ - #include "bbtkWx.h" #include "bbtkMessageManager.h" +#ifdef _USE_WXWIDGETS_ + namespace bbtk { //========================================================================= @@ -42,12 +41,9 @@ namespace bbtk //========================================================================= static WxApp* mgWxApp = 0; static wxWindow* mgTopWindow = 0; - static wxWindow* mgTopWindowParent = 0; - static bool mgAutoDestroyTopWindow = true; static int mgNbWindowsAlive = 0; - static int mgNbWindowsShown = 0; //========================================================================= - + //========================================================================= // BBTKWXSIG static Wx::Signal_type mgWxSignal; @@ -89,8 +85,6 @@ namespace bbtk bbtkDebugMessage("wx",1," --> Creating bbtk wxApp"< Destructing bbtk WxApp"< Destructing bbtk WxApp"< Creating bbtk top window"<Hide(); - - Wx::SetTopWindow(top); - } - //========================================================================= - - //========================================================================= - void Wx::DestroyTopWindowIfNeeded() - { - if ( (mgNbWindowsAlive==0) && - (mgAutoDestroyTopWindow) ) + /* + if (Wx::GetTopWindow() != 0) { - bbtkDebugMessage("wx",1," --> Destructing bbtk top window"<Close(); - mgTopWindow = 0; - - DestroyWxAppIfNeeded(); + Wx::GetTopWindow()->DestroyChildren(); } - } - //========================================================================= + */ - //========================================================================= - void Wx::LoopUntilAllWindowsClose() - { - int i = 0; - while (mgTopWindow != 0) - { - if (i % 100 == 0) - { - bbtkDebugMessage("wx",2,"Wx::Loop "<Pending()) + a->Dispatch(); + std::cout << "$$$$$$$$$$$$$$ PROCESS PENDING DONE"<