]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Wed, 23 Apr 2008 14:49:27 +0000 (14:49 +0000)
committerguigues <guigues>
Wed, 23 Apr 2008 14:49:27 +0000 (14:49 +0000)
12 files changed:
kernel/appli/bbc/main.cxx.in
kernel/cmake/BBTKCreatePackageBBdoc.cmake
kernel/doc/bbtkWebSite/CMakeLists.txt
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBoxOutputConnector.cxx
kernel/src/bbtkComplexBlackBox.cxx
kernel/src/bbtkConnection.cxx
kernel/src/bbtkMessageManager.cxx
kernel/src/bbtkWx.cxx
kernel/src/bbtkWx.h
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxGUIConsole.cxx

index 61ba8dafdb7e5837dde787730ff92157e843ab41..119862a13113d01450130d4b7361f1df6cdd0e74 100644 (file)
@@ -15,8 +15,8 @@
 
 static const wxCmdLineEntryDesc cmdLineDesc[] =
 {
-  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Debug messages on (message All 9)") },
-  { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet") },
+  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("debug messages on (message all 9)") },
+  { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet (message mac 0)") },
   { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("print help") },
   { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"),   _T("prompts the user for the parameters values using dialog boxes") },
   { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"),   _T("prompts the user for the parameters values in text mode") },
@@ -105,8 +105,8 @@ bool wxBBIApp::OnInit( )
   setlocale(LC_NUMERIC, "C");
 #endif
   
-  if (quiet) bbtk::MessageManager::SetMessageLevel("All",0);
-  if (debug) bbtk::MessageManager::SetMessageLevel("All",9);
+  if (quiet) bbtk::MessageManager::SetMessageLevel("max",0);
+  if (debug) bbtk::MessageManager::SetMessageLevel("all",9);
   
   bbtk::Wx::CreateInvisibleTopWindow();
 
index b220f47e71e62fe75021499e2b7e73418be9f6fa..2f6c9582dabac4eb626139d583292cc1dc913886 100644 (file)
@@ -32,7 +32,7 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
     FILE(TO_NATIVE_PATH ${BBTK_BIN_PATH}/bb${BBTK_PACKAGE_NAME}.dll  pathCommand2 )
     set(command1 cd "${BBTK_BIN_PATH}/../bbs/") 
     set(command2 copy ${pathCommand2} . )
-    set(command3 ${BBTK_BBI} -N ${OUTPUT_FILE}) 
+    set(command3 ${BBTK_BBI} -N -q ${OUTPUT_FILE}) 
     set(command4 del bb${BBTK_PACKAGE_NAME}.dll)
     
     ADD_CUSTOM_COMMAND(
@@ -46,7 +46,7 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
     ADD_CUSTOM_COMMAND(
       OUTPUT ${DOC_OUTPUT}
       COMMAND 
-      cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N ${OUTPUT_FILE}
+      cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${OUTPUT_FILE}
       DEPENDS bb${PACKAGE_NAME} 
       )
   ENDIF(WIN32)
index 77b99620ccfc515320640b7ede6125acf4eabbce..443fe6dd2daf1186f42fb2c45318a6403b876655 100644 (file)
@@ -35,7 +35,7 @@ CONFIGURE_FILE(
 ADD_CUSTOM_COMMAND(
   OUTPUT ${INDEX_OUTPUT}
   COMMAND 
-  cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -n ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
+  cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
   DEPENDS ${BBTK_BBI_DEPENDENCY} ${BBTK_PACKAGES_DEPS}
   )
 ADD_CUSTOM_TARGET(bbdoc_index ALL
index 1f59e6bdae6f18d99f17e15b88f01f8f70784ef6..de8091778b696f5c507e30164aab68c88b6fd8e5 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/04/22 14:30:25 $
-Version:   $Revision: 1.14 $
+Date:      $Date: 2008/04/23 14:49:27 $
+Version:   $Revision: 1.15 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -417,48 +417,48 @@ namespace bbtk
   ///  Signals that the BlackBox has been modified
   void BlackBox::bbSetModifiedStatus(BlackBoxInputConnector* c)
   {
-    bbtkDebugMessageInc("Process",5,
-                       "=> BlackBox::bbSetModifiedStatus("<<c<<") ["
-                       <<bbGetFullName()<<"]"<<std::endl);
-   
+    bbtkDebugMessage("modified",1,
+                    "==> BlackBox::bbSetModifiedStatus("<<c<<") ["
+                    <<bbGetFullName()<<"]"<<std::endl);
+    
     if ( (c==bbGetInputConnectorMap().find("WinHide")->second) )
-        //      && (bbCanReact()))
+      //        && (bbCanReact()))
       {
-       bbtkDebugMessage("Process",9,
+       bbtkDebugMessage("modified",2,
                         "-> Hide triggered by WinHide input change"
                         <<std::endl);
        this->bbHideWindow();
        this->bbSetStatus(MODIFIED); 
        return;
       }
+    
     if ( ( bbBoxProcessModeIsReactive()  ||
           (c==bbGetInputConnectorMap().find("BoxExecute")->second))
         && (bbCanReact() ) )
       {
-       bbtkDebugMessage("Process",9,
+       bbtkDebugMessage("modified",2,
                         "-> Execution triggered by Reactive mode or BoxExecute input change"<<std::endl);
        this->bbSetStatus(MODIFIED); 
         bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
       }
     else if ( bbGetStatus() == MODIFIED ) //! this->bbIsUptodate()) 
       { 
-       bbtkDebugMessage("Process",5,"-> Already modified"<<std::endl);
-       bbtkDebugDecTab("Process",5);
+       bbtkDebugMessage("modified",2,"-> Already modified"<<std::endl);
        return;
       }
     else 
       {
-       bbtkDebugMessage("Process",5,"-> Status set to modified"<<std::endl);
-       bbtkDebugDecTab("Process",5);
+       bbtkDebugMessage("modified",2,"-> Status set to modified"<<std::endl);
        this->bbSetStatus(MODIFIED); 
       }
  
     this->bbSignalOutputModification(false);
 
-   bbtkDebugMessageDec("Process",5,
+    /* 
+  bbtkDebugMessageDec("Process",5,
                        "<= BlackBox::bbSetModifiedStatus("<<c<<") ["
                        <<bbGetFullName()<<"]"<<std::endl);
+    */
   }  
   //=========================================================================
 
index 35dd02454c05431c62b10d68bfafbf3be6b39b92..5b990f6db00ca50b7562cfd49e6abb5347e8249e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxOutputConnector.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/22 14:30:25 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/04/23 14:49:27 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -97,16 +97,17 @@ namespace bbtk
   
   void BlackBoxOutputConnector::SetModifiedStatus()
   {
-    bbtkDebugMessageInc("Process",5,
-                       "BlackBoxOutputConnector::SetModifiedStatus()"
-                       <<std::endl);
+    bbtkDebugMessage("modified",2,
+                    "==> BlackBoxOutputConnector::SetModifiedStatus() ["
+                    <<this<<"]"
+                    <<std::endl);
     ConnectionVector::iterator i;
     for (i=mConnection.begin();i!=mConnection.end();++i) 
       {
        (*i)->SetModifiedStatus();
       }
     
-    bbtkDebugDecTab("Process",5);
+    //    bbtkDebugDecTab("Process",5);
     
    }
  
index d15a45cc726c94b137be1158e8c17c4a2b3d2dee..8a6c65b2ee07d55d927dab236b69d9cb298f5da4 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/04/22 14:30:25 $
-Version:   $Revision: 1.15 $
+Date:      $Date: 2008/04/23 14:49:27 $
+Version:   $Revision: 1.16 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -270,15 +270,17 @@ namespace bbtk
   //==================================================================
   void ComplexBlackBox::bbSetModifiedStatus(BlackBoxInputConnector* c)
   {
-    bbtkDebugMessage("Process",3,
-                       "ComplexBlackBox::bbSetModifiedStatus("
+    bbtkDebugMessage("modified",1,
+                       "==> ComplexBlackBox::bbSetModifiedStatus("
                     <<c<<") ["<<bbGetFullName()<<"]"<<std::endl);
 
     c->GetBlackBox()->bbSetModifiedStatus(c);
 
-    bbtkDebugMessage("Process",3,
-                    "EO ComplexBlackBox::bbSetModifiedStatus("
+    /*
+    bbtkDebugMessage("modified",1,
+                    "<== ComplexBlackBox::bbSetModifiedStatus("
                     <<c<<") ["<<bbGetFullName()<<"]"<<std::endl);
+    */
   }
   //==================================================================
 
index 5f26be0b7b3beb7f7f0bb98a1968dfa0c354af55..09c30c56938219b33e93f27bfbbddf9617b93164 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConnection.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/22 14:30:25 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/04/23 14:49:27 $
+  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
@@ -356,15 +356,19 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output,
   /// Modified
   void Connection::SetModifiedStatus()
   {
-    bbtkDebugMessageInc("Process",5,
-                       "Connection::SetModifiedStatus() ["
-                       <<GetFullName()<<"]"<<std::endl);
+    bbtkDebugMessage("modified",2,
+                    "==> Connection::SetModifiedStatus() ["
+                    <<GetFullName()<<"]"<<std::endl);
     
     if (mAdaptor) mAdaptor->bbSetModifiedStatus();
     
     mTo->bbSetModifiedStatus(  mTo->bbGetInputConnectorMap().find(mInput)->second );
     
-    bbtkDebugDecTab("Process",5);
+    /*
+    bbtkDebugMessage("modified",2,
+                    "==> Connection::SetModifiedStatus() ["
+                    <<GetFullName()<<"]"<<std::endl);
+    */
   }
   //==================================================================
 
index 56c3227e91326e1a8b52357d598b737d80dbb967..fa5572497ea55e6874dc81925a028a2c6eca7cbe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkMessageManager.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/23 08:34:06 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/04/23 14:49:27 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -93,6 +93,10 @@ namespace bbtk
     mMessageLevel[key] = 0;
     mMessageHelp[key] = "Connections related messages";
     if (mMaxMessageLength<key.length()) mMaxMessageLength = key.length();
+    key = "modified";
+    mMessageLevel[key] = 0;
+    mMessageHelp[key] = "Modified related messages";
+    if (mMaxMessageLength<key.length()) mMaxMessageLength = key.length();
    }
 
 
index e186c7923a6b8342a768dcc99996ed0164c9324e..346d0fbfe94263dfe720a2a634ce61041691943c 100644 (file)
@@ -11,9 +11,10 @@ namespace bbtk
   static int mgNbWindowsAlive  = 0;
   static int mgNbWindowsShown  = 0;
 
-  void Wx::CreateInvisibleTopWindow()
+  void Wx::CreateInvisibleTopWindow(wxWindow* parent)
   {
-    wxWindow* top = new wxFrame(0,-1,_T("TOP (YOU SHOULD NOT SEE ME !!)"));
+    wxWindow* top = new wxFrame(parent,
+                               -1,_T("TOP (YOU SHOULD NOT SEE ME !!)"));
     top->Hide();
     Wx::SetTopWindow(top);
   }
index e160c3ae7b1eecbc994674bb8c27be450bbb8230..2969edb205a9853cea914b4d575b3fef0b9cd4ff 100644 (file)
@@ -44,7 +44,7 @@ namespace bbtk
     static void EndBusyCursor();
     static int mBeginBusyCallsCount;
 
-    static void CreateInvisibleTopWindow();
+    static void CreateInvisibleTopWindow(wxWindow* parent=0);
     /// Returns the global parent of all bbtk windows
     static wxWindow* GetTopWindow();
     /// Sets the global parent of all bbtk windows
index be78a7ec853e3ef2197eee8218b4d9a80d4e7ae8..e4a8410357eedb865837908d5effa2763157f6df 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/22 14:30:25 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2008/04/23 14:49:28 $
+  Version:   $Revision: 1.15 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -379,6 +379,7 @@ namespace bbtk
     bbSetOutputWidget(0);
 
     bbSetWidgetEventHandler(0);
+    bbSetUpdateTransferedToParent(false);
   }
   //=========================================================================
 
@@ -423,42 +424,81 @@ namespace bbtk
   /// Main processing method of the box.
   IOStatus WxBlackBox::bbBackwardUpdate( Connection::Pointer caller )
   {
-    bbtkDebugMessageInc("Process",1,
-                       "=> WxBlackBox::bbBackwardUpdate("
-                       <<(caller?caller->GetFullName():"0")<<") ["
-                       <<bbGetFullName()<<"]"<<std::endl);
+    bbtkDebugMessage("Process",1,
+                    "=> WxBlackBox::bbBackwardUpdate("
+                    <<(caller?caller->GetFullName():"0")<<") ["
+                    <<bbGetFullName()<<"]"<<std::endl);
+    // If the caller's box to is not the box to connected to the 
+    // output 'Widget'
+    if ( ! (( bbGetStatus() == MODIFIED ) ||
+           ( bbBoxProcessModeIsAlways() )) )
+      {
+       bbtkDebugMessage("Process",2,"Up-to-date : nothing to do"<<std::endl);
+       bbtkDebugMessage("Process",1,
+                        "<= WxBlackBox::bbBackwardUpdate("
+                        <<(caller?caller->GetFullName():"0")<<") ["
+                        <<bbGetFullName()<<"]"<<std::endl);
+       return bbGetStatus();
+      }
+    BlackBox::OutputConnectorMapType::const_iterator i 
+      = bbGetOutputConnectorMap().find("Widget") ;
+    if ( i->second->GetConnectionVector().size() != 0 )
+      
+      {
+       BlackBox::Pointer to = 
+         i->second->GetConnectionVector()[0]->GetBlackBoxTo();
+               
+       if (caller) 
+         {
+           bbtkDebugMessage("Process",2,
+                            "-> Output 'Widget' connected to '"
+                            <<to->bbGetFullName()<<"' - caller->to = '"
+                            <<caller->GetBlackBoxTo()->bbGetFullName()
+                            <<"'"
+                            <<std::endl);
+         }
+       else
+         {
+           bbtkDebugMessage("Process",2,
+                            "-> Output 'Widget' connected to '"
+                            <<to->bbGetFullName()<<"'"
+                            <<std::endl);
+         }
+       if ((caller==0) ||
+           ((caller!=0) && 
+            (caller->GetBlackBoxTo() != to))&&
+           (!bbGetUpdateTransferedToParent()))
+         {
+           bbtkDebugMessage("Process",2,
+                            "   ... Transfering update order to parent"
+                            <<std::endl);
+           
+           bbSetUpdateTransferedToParent(true);
+           i->second->GetConnectionVector().front() //.lock()
+             ->GetBlackBoxTo()->bbExecute(false);
+         }
+       else
+         {
+           bbSetUpdateTransferedToParent(false);
+           bbtkDebugMessage("Process",2,
+                            "   ... No need to transfer to parent"
+                            <<std::endl);
+         }
+      }
+    /*    
+
     // If the caller is not the connection to the output widget
     // and the output 'Widget' is connected then 
     // we must execute the parent box 
     // but only one time 
-    // (this is the role of the flag UpdateTransferedToParent=
+    // (this is the role of the flag UpdateTransferedToParent)
     if ( (caller==0) ||
         ((caller!=0)&&(caller->GetBlackBoxFromOutput()!="Widget"))
         )
       {
-       BlackBox::OutputConnectorMapType::const_iterator i 
-         = bbGetOutputConnectorMap().find("Widget") ;
-       if ( i->second->GetConnectionVector().size() != 0 )
-            
-         {
-           bbtkDebugMessage("Process",2,
-                            "-> Output 'Widget' connected : transfering update order to parent"
-                            <<std::endl);
-           if ( bbGetUpdateTransferedToParent() )          
-             {
-               bbSetUpdateTransferedToParent(false);
-               bbtkDebugMessage("Process",2,
-                                "   ... already transfered : abort"
-                                <<std::endl);
-             }
-           else 
-             {
-               bbSetUpdateTransferedToParent(true);
-               i->second->GetConnectionVector().front() //.lock()
-                 ->GetBlackBoxTo()->bbExecute(false);
-             }
-         }
       }
+    */
     // call 'standard' BlackBox execution method
     if (!bbGetUpdateTransferedToParent()) 
       { 
index 3659fa97f2711159291a614f0d97e57cc443733c..e70ca40295ec3f4c36c90a5a01408c2ebed0d9dd 100644 (file)
@@ -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/04/23 14:49:28 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -152,10 +152,12 @@ namespace bbtk
 
         
     // Creates and sets the parent window of all bbtk windows
+    /*
     wxWindow* top = new wxPanel(this,-1);//,_T("top"));
     top->Hide();
     Wx::SetTopWindow(top);
-    
+    */
+    Wx::CreateInvisibleTopWindow(this);
 
     // Layout
 //EED    SetSizer(sizer);