From: Eduardo Davila Date: Mon, 23 Mar 2009 13:05:53 +0000 (+0000) Subject: MACOS configure X-Git-Tag: EED.02Oct2009~70 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ffe082cfc10dbb2c326c513563286caa2606110f;p=bbtk.git MACOS configure --- diff --git a/kernel/cmake/BBTKConfigurePackagePaths.cmake b/kernel/cmake/BBTKConfigurePackagePaths.cmake index 5375858..2a74b53 100644 --- a/kernel/cmake/BBTKConfigurePackagePaths.cmake +++ b/kernel/cmake/BBTKConfigurePackagePaths.cmake @@ -1,4 +1,6 @@ + + IF(WIN32) SET (EXECUTABLE_OUTPUT_REL_PATH "") SET (LIBRARY_OUTPUT_REL_PATH "") diff --git a/kernel/cmake/BBTKKernelConfig.cmake b/kernel/cmake/BBTKKernelConfig.cmake index 3813133..a2a07b0 100644 --- a/kernel/cmake/BBTKKernelConfig.cmake +++ b/kernel/cmake/BBTKKernelConfig.cmake @@ -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) diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index 803e554..0206b29 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -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 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 <bbShowWidget(); + + bbtkDebugMessage("process",3, "<= BlackBox::bbRecursiveExecute() [" < 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) diff --git a/kernel/src/bbtkWxBlackBox.cxx b/kernel/src/bbtkWxBlackBox.cxx index 91d1085..86c3775 100644 --- a/kernel/src/bbtkWxBlackBox.cxx +++ b/kernel/src/bbtkWxBlackBox.cxx @@ -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() [" <bbGetFullName()<<"]"<GetConnectionVector().size() == 0 ) + { + Window* show = 0; + // If the window already exists : no need creating it + if (bbGetWindow()!=0) + { + bbtkDebugMessage("wx",2, + "-> Window already exists" + < Creating the window" + <(), + 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" + <(), + 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 } //========================================================================= - +*/ //========================================================================= diff --git a/kernel/src/bbtkWxBlackBox.h b/kernel/src/bbtkWxBlackBox.h index 878c83b..0acfbf8 100644 --- a/kernel/src/bbtkWxBlackBox.h +++ b/kernel/src/bbtkWxBlackBox.h @@ -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; diff --git a/kernel/src/bbtkWxGUIHtmlBrowser.cxx b/kernel/src/bbtkWxGUIHtmlBrowser.cxx index 1b687a7..4994d18 100644 --- a/kernel/src/bbtkWxGUIHtmlBrowser.cxx +++ b/kernel/src/bbtkWxGUIHtmlBrowser.cxx @@ -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()) { diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index 49bc346..618f804 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -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"))