X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWx.cxx;h=f361a14af1b60d930958ce8078384e1b16ff071d;hb=bafc00d3eee5ab3c580e0971cb2d8806b5c74f35;hp=c8026e40b24f97a4cfa6d1d238e2c45376430d63;hpb=8822f9075c66dcf742b9edae47271bb46af6a9b7;p=bbtk.git diff --git a/kernel/src/bbtkWx.cxx b/kernel/src/bbtkWx.cxx index c8026e4..f361a14 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: 2009/01/27 14:22:57 $ - Version: $Revision: 1.12 $ + Date: $Date: 2010/01/14 13:17:27 $ + Version: $Revision: 1.16 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -28,11 +28,11 @@ * 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 +42,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 +86,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() + void Wx::ProcessPendingEvents() { - 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"<