]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBox.cxx
index 51a9ab7cfe824b790f5cd30cdc780c67003412c4..d2137752f2e8aee1d3084543d6c786427e001b71 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/05/06 13:45:12 $
-Version:   $Revision: 1.17 $
+Date:      $Date: 2008/06/19 09:46:41 $
+Version:   $Revision: 1.21 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -65,7 +65,7 @@ namespace bbtk
     bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : deleting black box"<<std::endl);
     
     b->bbDelete();
-    
+
     bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : releasing descriptor ["<<desc.lock()<<"]"<<std::endl);
     
     if (!desc.expired()) 
@@ -145,7 +145,8 @@ namespace bbtk
                        "=> BlackBox::bbExecute() ["
                        <<bbGetFullName()<<"]"<<std::endl);
  
-    Wx::BeginBusyCursor();
+       wxBusyCursor wait;
+    //EED Wx::BeginBusyCursor();
 
     // If execution frozen : return
     if (bbGlobalGetFreezeExecution()) 
@@ -160,7 +161,7 @@ namespace bbtk
     // Calls the main recursive update method 
     bbBackwardUpdate(Connection::Pointer());
 
-    Wx::EndBusyCursor();
+    //EED Wx::EndBusyCursor();
 
     bbtkDebugMessageDec("process",2,
                        "<= BlackBox::bbExecute() ["
@@ -434,6 +435,16 @@ namespace bbtk
        this->bbSetStatus(MODIFIED); 
        return;
       }
+    if ( (c==bbGetInputConnectorMap().find("WinClose")->second) )
+      //        && (bbCanReact()))
+      {
+       bbtkDebugMessage("modified",2,
+                        "-> Close triggered by WinClose input change"
+                        <<std::endl);
+       this->bbHideWindow();
+       this->bbSetStatus(MODIFIED); 
+       return;
+      }
     
     if ( ( bbBoxProcessModeIsReactive()  ||
           (c==bbGetInputConnectorMap().find("BoxExecute")->second))
@@ -1156,13 +1167,6 @@ namespace bbtk
        } 
 
 
-  //=========================================================================
-  // Static members initialization
-/*EED
-  bool BlackBox::bbmgSomeBoxExecuting = false;
-  bool BlackBox::bbmgFreezeExecution = false;
-  std::set<BlackBox*> BlackBox::bbmgExecutionList;
-*/
    //=========================================================================
 
   //=========================================================================
@@ -1173,6 +1177,16 @@ namespace bbtk
   }
   //=========================================================================
 
+  void BlackBox::bbUserOnShowWidget(std::string nameInput)
+  {
+         bbtk::BlackBoxInputConnector *cc;
+         cc = this->bbGetInputConnectorMap().find( nameInput.c_str() )->second;
+         if (cc->GetConnection()!=NULL) 
+         {
+                 cc->GetConnection()->GetBlackBoxFrom()->bbUserOnShow();
+         }
+  }
+
 
 
 }  // EO namespace bbtk