X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxGUIConsole.cxx;h=53cbb2fdc4d40f0a7d0c7b88971600c71aae6309;hb=d8041d1ef54a73acc2306557435f6b04edf60daf;hp=3659fa97f2711159291a614f0d97e57cc443733c;hpb=5934ccb7ca0fabdbe6c1907b2aea3696e19a0251;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIConsole.cxx b/kernel/src/bbtkWxGUIConsole.cxx index 3659fa9..53cbb2f 100644 --- a/kernel/src/bbtkWxGUIConsole.cxx +++ b/kernel/src/bbtkWxGUIConsole.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUIConsole.cxx,v $ Language: C++ - Date: $Date: 2008/04/22 14:30:25 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/05/06 13:45:12 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,6 +52,7 @@ namespace bbtk ID_Menu_CreatePackage, ID_Menu_CreateBlackBox, ID_Menu_ShowImageGraph, + ID_Menu_ShowHTMLDoc, ID_Menu_CreateIndex, ID_Button_Run }; @@ -83,6 +84,7 @@ namespace bbtk menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") ); menuTools->Append( ID_Menu_CreateBlackBox, _T("Create &blackbox") ); menuTools->Append( ID_Menu_ShowImageGraph, _T("&Show last image graph") ); + menuTools->Append( ID_Menu_ShowHTMLDoc, _T("Show &HTML documentation") ); menuTools->Append( ID_Menu_CreateIndex, _T("&Generate index") ); @@ -151,11 +153,11 @@ namespace bbtk cmdsizer->Add (mWxGUICommand, 0, wxALL | wxGROW, 5); - // Creates and sets the parent window of all bbtk windows - wxWindow* top = new wxPanel(this,-1);//,_T("top")); - top->Hide(); - Wx::SetTopWindow(top); - + // Creates the parent window of all bbtk windows as a child of this + Wx::CreateTopWindow(this,true); + // Add the method OnWxSignal as a Wx::Signal observer + bbtkAddWxSignalObserver(WxGUIConsole::OnWxSignal); + // Layout //EED SetSizer(sizer); @@ -179,6 +181,16 @@ namespace bbtk } //================================================================ + //================================================================ + void WxGUIConsole::OnWxSignal() + { + if ((!Wx::TopWindowExists())&&(!IsShown())) + { + bbtkDebugMessage("wx",2," --> bbtk top window destroyed and WxGUIConsole not shown => destructing"<