X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkWx.cxx;h=f361a14af1b60d930958ce8078384e1b16ff071d;hb=6ac9074f717f22c4ffdc6a70d0704c1b1f8fe842;hp=29567ff69b031e4f560e8f102a8572fe2f7d6682;hpb=20088af65d30f9b8fa96beec1b96d196ee0d76f0;p=bbtk.git diff --git a/kernel/src/bbtkWx.cxx b/kernel/src/bbtkWx.cxx index 29567ff..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: 2008/10/21 13:55:49 $ - Version: $Revision: 1.11 $ + 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"<