]> Creatis software - bbtk.git/commitdiff
MACOS configure
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 23 Mar 2009 13:05:53 +0000 (13:05 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 23 Mar 2009 13:05:53 +0000 (13:05 +0000)
kernel/cmake/BBTKConfigurePackagePaths.cmake
kernel/cmake/BBTKKernelConfig.cmake
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBox.h
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxBlackBox.h
kernel/src/bbtkWxGUIHtmlBrowser.cxx
kernel/src/bbtkWxGUIScriptingInterface.cxx

index 5375858b20e8e732c986743b7a8c0010a96578db..2a74b53ea45e60ab0fbcd7542a3b1b0779e49299 100644 (file)
@@ -1,4 +1,6 @@
 
+
+
 IF(WIN32)
   SET (EXECUTABLE_OUTPUT_REL_PATH "") 
   SET (LIBRARY_OUTPUT_REL_PATH    "")
index 3813133db56985331f433d6a7feaebf35f0e7933..a2a07b0b7d7707ff1efb547dd2cd91d6e56913dc 100644 (file)
@@ -35,7 +35,6 @@ SET (LIBRARY_OUTPUT_PATH
 
 
 
-
 #-----------------------------------------------------------------------------
 # The var BBTK_BIN_PATH
 # gives the system-dependent path to output binaries
@@ -59,11 +58,11 @@ IF(WIN32)
 ELSE(WIN32)
   SET(BBTK_LIB_PATH lib)
 # For Xcode : have to test the cmake generator !
-#  IF (APPLE)
-#    SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH}/Debug)
-#  ELSE(APPLE)
+  IF ( CMAKE_GENERATOR STREQUAL Xcode)
+    SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH}/Debug)
+  ELSE(CMAKE_GENERATOR STREQUAL Xcode)
     SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH})
-#  ENDIF(APPLE
+  ENDIF(CMAKE_GENERATOR STREQUAL Xcode
   SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi)
   SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp)
   SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc)
index 803e554ce0971f89ed7e21c73dfc2f5741a6fbea..0206b2924369b54871e9eba5df07b74a59de64c4 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/02/27 11:20:25 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.40 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -54,6 +54,7 @@ namespace bbtk
   static std::set<BlackBox::WeakPointer> bbmgExecutionList;
 
   //=========================================================================
+
   BlackBox::Deleter::Deleter()
   {
   }
@@ -754,21 +755,23 @@ namespace bbtk
     bool wasExecuting = bbGlobalGetSomeBoxExecuting();
     bbGlobalSetSomeBoxExecuting(true);
 
+       this->bbCreateWidget();
+
     // Updates its inputs
     IOStatus s = bbUpdateInputs();
     
     if ( (s != UPTODATE) ||
         bbBoxProcessModeIsAlways() )
       {
-       // Displays the window (WxBlackbox)
-       //      bbShowWindow(caller);
+         // Displays the window (WxBlackbox)
+         //    bbShowWindow(caller);
 
-       // Actual processing (virtual)
-       this->bbProcess();
+         // Actual processing (virtual)
+         this->bbProcess();
        
        
-       // Update the I/O statuses
-       bbComputePostProcessStatus();
+         // Update the I/O statuses
+         bbComputePostProcessStatus();
       }
     else 
       {
@@ -790,6 +793,9 @@ namespace bbtk
                         <<std::endl);
       }
 
+         this->bbShowWidget(); 
+
+         
     bbtkDebugMessage("process",3,
             "<= BlackBox::bbRecursiveExecute() ["
             <<bbGetFullName()<<"]"<<std::endl);
index a8299e4ea918d5b232b9ec766da5b2d1574d954e..c9a6395a033a423d30b7225506e294da47070a36 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 09:50:35 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.22 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -378,6 +378,26 @@ namespace bbtk
     IOStatus bbUpdateInputs();
     //==================================================================
 
+         
+         //==================================================================
+         /// Actual CreateWidget method (vitual)
+         /// Overloaded in AtomicBlacBox and descendants 
+         virtual void bbCreateWidget()
+         {
+               //  bbtkError("BlackBox::bbCreateWidget called : how can this happen ?");
+         }
+         //==================================================================
+         
+         //==================================================================
+         /// Actual ShowWidget method (vitual)
+         /// Overloaded in AtomicBlacBox and descendants 
+         virtual void bbShowWidget()
+         {
+               //  bbtkError("BlackBox::bbShowWidget called : how can this happen ?");
+         }
+         //==================================================================
+         
+                 
    //==================================================================
     /// Actual processing method (vitual)
     /// Overloaded in AtomicBlacBox and descendants 
@@ -450,7 +470,7 @@ namespace bbtk
     /// 2) Releases the box descriptor
     struct BBTK_EXPORT Deleter : public Object::Deleter
     { 
-      Deleter();
+               Deleter(); 
       void Delete(Object* p);
     };
     //==================================================================
index 4fab8d8ec74d841fe00f47ab0a283afb827b69a9..58a19437a64df08c17240974bfdefc4d540a09ff 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/01/28 13:20:32 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.29 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,14 +58,24 @@ namespace bbtk
     
     // ==> Set system paths 
     mBin_path = Utilities::GetExecutablePath();
-    
+
+         
+         
+         
+/*     EED 23 Mars 2009  
 #ifdef MACOSX
     mInstall_path = mBin_path + "/../../../..";
 #else
     mInstall_path = mBin_path + "/..";
 #endif
-    
-    
+*/    
+#ifdef MACOSX
+         mBin_path = mBin_path + "/../../..";
+#endif   
+         mInstall_path = mBin_path + "/..";
+
+         
+         
     // The relative path to the doc folder (=BBTK_DOC_REL_PATH)
     //    mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH);
     // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path)
index 91d10850435988e294add1de283877514472d1c7..86c3775d77addaf0331ff993bea6306d8fad4db7 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 12:56:28 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.37 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -163,6 +163,7 @@ namespace bbtk
     bbtkDebugMessage("wx",5,"WxBlackBoxDialog::bbShow() ["
                     <<bbGetBlackBox()->bbGetFullName()<<"]"<<std::endl);
     WxBlackBoxWindow::bbShow();
+       Show(false);
     SetReturnCode( wxDialog::ShowModal() ); 
     bbClose();
   }
@@ -404,14 +405,101 @@ namespace bbtk
   }
   //=========================================================================
 
+
+       //=========================================================================
+       void WxBlackBox::bbCreateWidget()
+       {
+               // If output widget not connected : have to create and show the window
+               if ( (*bbGetOutputConnectorMap().find("Widget")).second->GetConnectionVector().size() == 0 ) 
+               {
+                       Window* show = 0;
+                       // If the window already exists : no need creating it
+                       if (bbGetWindow()!=0)
+                       {
+                               bbtkDebugMessage("wx",2,
+                                                                "-> Window already exists"
+                                                                <<std::endl);
+                               show = bbGetWindow();
+                       } // bbGetWindow
+                       // Else create window 
+                       else 
+                       {
+                               bbtkDebugMessage("wx",2,
+                                                                "-> Creating the window"
+                                                                <<std::endl);
+                               
+                               // Input WinDialog set to true : creating a Dialog
+                               if (bbGetInputWinDialog()) 
+                               {
+                                       bbtkDebugMessage("wx",2,
+                                                                        "   Input WinDialog set to true : creating a Dialog"
+                                                                        <<std::endl);
+                                       show = (Window*) new WxBlackBoxDialog( GetThisPointer<WxBlackBox>(),
+                                                                                                                 Wx::GetTopWindow(),
+                                                                                                                 std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
+                                                                                                                 wxSize( bbGetInputWinWidth() , bbGetInputWinHeight()  )); 
+                                       //bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+//                                     show->bbGetDialog()->Update();
+//                                     show->bbGetDialog()->Refresh();
+                                       
+                                       //show->bbGetDialog()->Iconize(true);
+                                       show->bbGetDialog()->Show(true);
+//                                     show->bbGetDialog()->Show(false);
+//                                     show->bbGetDialog()->SetSize(wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ));
+                                       
+                               }
+                               // Input WinDialog set to false : creating a Frame
+                               else 
+                               {
+                                       bbtkDebugMessage("process",2,
+                                                                        "   Input WinDialog set to false : creating a Frame"
+                                                                        <<std::endl);
+                                       show = (Window*) new WxBlackBoxFrame( GetThisPointer<WxBlackBox>(),
+                                                                                                                Wx::GetTopWindow(),
+                                                                                                                std2wx( bbGetInputWinTitle()  + " - bbtk (c) CREATIS LRMN"),
+                                                                                                                wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+//                                     show->bbGetFrame()->Update();
+//                                     show->bbGetFrame()->Refresh();
+                                                                                       show->bbGetFrame()->Show();
+                               }
+                               
+                       } // else bbGetWindow
+//                     show->bbShow();
+                       
+               } // bbGetOutputConnectorMap().find("Widget")).second->GetConnectionVector().size()  
+       }
+       //=========================================================================
+
+       
+       //=========================================================================
+       void WxBlackBox::bbShowWidget()
+       {
+               // Show the window
+               Window *show = bbGetWindow();
+               if (show!=NULL)
+               {
+                       show->bbShow(); 
+               }
+       }
+       //=========================================================================
+       
+       
+       //=========================================================================
+       void WxBlackBox::bbProcess()
+       { 
+               // TODO : update the window size and title 
+               this->bbUserProcess(); 
+       }
+       //=========================================================================
+       
+       /* EED BORRAME  original  18 mars 2009
   //=========================================================================
   void WxBlackBox::bbProcess()
   { 
     // If output widget not connected : have to create and show the window
-    if ( (*bbGetOutputConnectorMap().find("Widget")).second
-        ->GetConnectionVector().size() == 0 ) 
+    if ( (*bbGetOutputConnectorMap().find("Widget")).second->GetConnectionVector().size() == 0 ) 
       {
-       Window* show = 0;
+               Window* show = 0;
        // If the window already exists : no need creating it
        if (bbGetWindow()!=0)
          {
@@ -461,7 +549,7 @@ namespace bbtk
     
   }
   //=========================================================================
+*/ 
        
        
   //=========================================================================
index 878c83b79ea61bf91d09b1843ae9f9633341024d..0acfbf88b2b3220997993835f6b4ee5a568a6e26 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 15:30:04 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.25 $
 ========================================================================*/
 
 
@@ -155,12 +155,28 @@ namespace bbtk
 
  
 
-    //==================================================================
+         //==================================================================
+         /// Overloaded bbCreateWidget method for WxBlackBoxes which handles 
+         /// the window creation if needed
+         virtual void bbCreateWidget();
+         //==================================================================
+         
+         //==================================================================
+         /// Overloaded bbShowWidget method for WxBlackBoxes which handles 
+         /// the window creation if needed
+         virtual void bbShowWidget();
+         //==================================================================
+         
+         //==================================================================
     /// Overloaded processing method for WxBlackBoxes which handles 
     /// the window creation if needed
     virtual void bbProcess();
     //==================================================================
-
+         
+         
+         
+         
+         
     //==================================================================
     /// If necessary creates the WxBlackBoxWindow associated to the box
     /// and shows it 
@@ -192,6 +208,7 @@ namespace bbtk
 
     /// The WxBlackBoxWindow associated to the box
     Window* bbmWindow;
+         
     /// The WxBlackBoxWidgetEventHandler associated to the box
     WxBlackBoxWidgetEventHandler* bbmWidgetEventHandler;
 
index 1b687a7156b5ed3a10f528cdacf7b72f55cd388e..4994d18c40eaec19814fe7e081df3e06e7386082 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIHtmlBrowser.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/25 13:18:30 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.13 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -172,16 +172,18 @@ namespace bbtk
     mwxHtmlWindow->SetBorders(5);
     //  mwxHtmlWindow->FitInside();
 
-    wxStaticBoxSizer* hw = 
-      new wxStaticBoxSizer( new wxStaticBox( this, -1, _T(""),
-                                            wxDefaultPosition, 
-                                            size ),
-                           wxVERTICAL );
-
-         hw->Add ( mwxHtmlWindow, 1, wxEXPAND  );
-
-    sizer->Add ( bsizer , 0, wxEXPAND );
-    sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
+       sizer->Add ( bsizer , 0, wxEXPAND );
+         
+// EED: This have a problem in macOS
+//    wxStaticBoxSizer* hw = 
+//         new wxStaticBoxSizer( 
+//                                                        new wxStaticBox( this, -1, _T(""),  wxDefaultPosition,  size ), 
+//                                                       wxVERTICAL 
+//                              );
+//       hw->Add ( mwxHtmlWindow, 1, wxEXPAND  );        
+//EED    sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
+         
+    sizer->Add ( mwxHtmlWindow, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
 
     panel      -> SetSizer(sizer);
     panel      -> SetAutoLayout(true);
@@ -360,7 +362,6 @@ namespace bbtk
   //========================================================================
   void WxGUIHtmlBrowser::UpdateURL()
   {
-
     wxString s = mwxHtmlWindow->GetOpenedPage();
     if (!mwxHtmlWindow->GetOpenedAnchor().IsEmpty())
     {
index 49bc3460c4b27219bd8b51e26ae56fb3ecea7d24..618f8049366eb5af701e02cb9903b866c617ab3c 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/01/27 14:22:57 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2009/03/23 13:06:41 $
+  Version:   $Revision: 1.34 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -230,6 +230,7 @@ namespace bbtk
                  .Bottom()
                  .MinSize(wxSize(100,100))
                  );
+         
     m_mgr.AddPane(mWxGUICommand,
                  wxAuiPaneInfo().Name(wxT("command_content"))
                  .Caption(wxT("Command"))