From: Eduardo DAVILA Date: Tue, 6 Oct 2015 09:08:44 +0000 (+0200) Subject: Merge branch 'wt-version' X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=bbtk.git;a=commitdiff_plain;h=12f2166f201f4e5a99c9c7876dadd09da81bfb51;hp=6b76f60671eed79e17d8f602878dac4d1928659f Merge branch 'wt-version' --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bd3c079..5ced062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,11 @@ ADD_SUBDIRECTORY(packages) #----------------------------------------------------------------------------- # The samples + +#----JFGA ---- Por default. +SET(USE_WT OFF) + + # WARNING # Install the creaTools first # then build the 'samples' as a separate project diff --git a/kernel/appli/bbi/CMakeLists.txt b/kernel/appli/bbi/CMakeLists.txt index 71b16c1..bfe73d5 100644 --- a/kernel/appli/bbi/CMakeLists.txt +++ b/kernel/appli/bbi/CMakeLists.txt @@ -45,3 +45,15 @@ ENDIF(BBTK_USE_WXWIDGETS AND WIN32) TARGET_LINK_LIBRARIES(bbi bbtk) INSTALL_TARGETS(/bin/ bbi) + +SET(SOURCES + bbiWeb + ) + +ADD_EXECUTABLE(bbiWeb.wt MACOSX_BUNDLE ${SOURCES}) +TARGET_LINK_LIBRARIES(bbiWeb.wt bbtk) +INSTALL_TARGETS(/bin/ bbiWeb.wt) + + + + diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index af2b7fe..89a3daa 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -91,7 +91,7 @@ void WxProcessCmdLine::Process(wxCmdLineParser& parser) debug = ( parser.Found(_T("d")) ); quiet = ( parser.Found(_T("q")) ); help = ( parser.Found(_T("h")) ); - graphical_dialog = ( parser.Found(_T("g")) ); + graphical_dialog = ( parser.Found(_T("wxcommandlineg")) ); text_dialog = ( parser.Found(_T("t")) ); no_console = ( parser.Found(_T("N")) ); @@ -178,6 +178,9 @@ bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser) // main frame bool wxBBIApp::OnInit( ) { +//Borrame +//FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED wxBBIApp::OnInit\n"); fclose(ff); + // std::cout << "OnInit"<Show(true); @@ -198,9 +206,9 @@ bool wxBBIApp::OnInit( ) I->SetInputs(cmd.param_map); bool help_on_script = cmd.help && (cmd.input_file.size() > 0); - if (help_on_script) I->SetNoExecMode(true); - if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); - if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); + if (help_on_script) I->SetNoExecMode(true); + if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); + if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); std::vector::const_iterator i; bool error = false; @@ -257,6 +265,10 @@ IMPLEMENT_APP(wxBBIApp); // you need to use the linker option "/subsystem:console" and the following code: int main(int argc, char* argv[]) { + +//Borrame +//FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main C\n"); fclose(ff); + return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); } @@ -270,6 +282,10 @@ IMPLEMENT_APP_NO_MAIN(wxBBIApp); int main(int argc, char* argv[]) { + +//Borrame +//FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main A\n"); fclose(ff); + wxMessageOutput::Set( new wxMessageOutputBest ); wxCmdLineParser parser(cmdLineDesc,argc,argv); @@ -448,6 +464,8 @@ int main(int argc, char* argv[]) std::cout << "BBI (Black Box Interpreter) - bbtk " << bbtk::GetVersion()<< " - (c) Creatis 2007" << std::endl; +//Borrame +//FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main B\n"); fclose(ff); bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(); if (argc==1) diff --git a/kernel/appli/bbi/bbiWeb.cxx b/kernel/appli/bbi/bbiWeb.cxx new file mode 100644 index 0000000..55ce986 --- /dev/null +++ b/kernel/appli/bbi/bbiWeb.cxx @@ -0,0 +1,81 @@ +/* +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Santé) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ +*/ + + +#include + + +//========================================================================= +#include +#include +#include "bbtkWtBlackBox.h" + +int main(int argc, char* argv[]) +{ + + printf("bbiWeb...A argc=%d \n",argc); + +//bbtk::MessageManager::SetMessageLevel("all",9); +printf("bbiWeb: [0]: %s \n",argv[0]); +printf("bbiWeb: [1]: %s \n",argv[1]); +printf("bbiWeb: [2]: %s \n",argv[2]); +printf("bbiWeb: [3]: %s \n",argv[3]); +printf("bbiWeb: [4]: %s \n",argv[4]); + printf("bbiWeb...B\n"); + + + bbtk::WtBlackBox::wtServerData::argc = argc; + bbtk::WtBlackBox::wtServerData::argv = argv; + + + +//Borrame +//FILE *ff; ff = fopen ("/tmp/bbi.wt.log","a+"); fprintf(ff,"EED main bbiWeb\n"); fclose(ff); + + + bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(); + printf("bbiWeb...C\n"); + + std::string fileName = argv[0]; + std::size_t pos = fileName.find("_"); + fileName = fileName.substr (pos+1); + pos = fileName.find(".wt"); + fileName = fileName.erase (pos); + fileName = "bbs/"+fileName; + +printf("bbiWeb fileName %s\n", fileName.c_str() ); +// std::string fileName("/var/www/testwtdbg/docroot/.bbtk/tmp/demoPresentacion1Boton02.bbs"); + + + + + printf("bbiWeb...D\n"); + I->InterpretFile(fileName); + printf("bbiWeb...E\n"); + + return 0; +} diff --git a/kernel/cmake/BBTKConfigurePackage_src.cmake b/kernel/cmake/BBTKConfigurePackage_src.cmake index dc6700b..eab078a 100644 --- a/kernel/cmake/BBTKConfigurePackage_src.cmake +++ b/kernel/cmake/BBTKConfigurePackage_src.cmake @@ -132,7 +132,7 @@ FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES}) ADD_CUSTOM_COMMAND( OUTPUT ${BBFY_CXX_OUT} COMMAND - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && echo $ENV{LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q DEPENDS ${xmlfile} ${BBTK_BBFY_DEPENDENCY} ) diff --git a/kernel/src/CMakeLists.txt b/kernel/src/CMakeLists.txt index 449e133..44e3b2c 100644 --- a/kernel/src/CMakeLists.txt +++ b/kernel/src/CMakeLists.txt @@ -180,6 +180,16 @@ IF(BBTK_USE_QT) ) SET(SOURCES ${SOURCES} ${MOC_SOURCES} ${UI_SOURCES}) ENDIF(QT_FOUND) + +# JFGA 03/12/2014 -- Temporal configuration of WT +# *********Missing if conditional Wt******** + #find_package(Boost COMPONENTS system thread signals) + #find_library(wt wt) + #find_library(wtext wtext) + #find_library(wthttp wthttp) + INCLUDE_DIRECTORIES(/usr/local/lib/) + + ENDIF(BBTK_USE_QT) #----------------------------------------------------------------------------- @@ -188,7 +198,7 @@ ENDIF(BBTK_USE_QT) # lib definition ADD_LIBRARY(bbtk SHARED ${SOURCES} ${SOURCES_H}) #----------------------------------------------------------------------------- -TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES} ${BOOST_LIBRARIES} ${crea_LIBRARIES}) +TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES} ${BOOST_LIBRARIES} ${crea_LIBRARIES} ${WT_LIBRARIES}) #----------------------------------------------------------------------------- IF(UNIX) SET_TARGET_PROPERTIES(bbtk PROPERTIES COMPILE_FLAGS -Wall) diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index e2dae01..6fb1fb8 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -463,17 +463,32 @@ namespace bbtk } */ + OutputConnectorMapType::const_iterator o; for ( o = bbGetOutputConnectorMap().begin(); o != bbGetOutputConnectorMap().end(); ++o ) - { - if (o->second->GetStatus()==UPTODATE) + { + + + if (o->first=="BoxChange") + { + o->second->SetStatus(UPTODATE); + } + + + +//EED 24/08/2015 +// EED CASPITAS 2 + if (o->second->GetStatus()==UPTODATE) +// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==OUTOFDATE)) +// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==MODIFIED)) { o->second->SetStatus(OUTOFDATE); o->second->SignalChange(GetThisPointer(),o->first); - } - } + } // if + } // for + if ( ( bbBoxProcessModeIsReactive() || (c==bbGetInputConnectorMap().find("BoxExecute")->second)) && (bbCanReact() ) ) @@ -481,7 +496,7 @@ namespace bbtk bbtkBlackBoxDebugMessage("change",2, "-> Execution triggered by Reactive mode or BoxExecute input change"<() ); - } + } // if bbtkBlackBoxDebugMessage("change",5, "<= BlackBox::bbSetStatusAndPropagate(input)" < BlackBox::bbRecursiveExecute(" <<(caller?caller->GetFullName():"0")<<")" @@ -721,8 +737,8 @@ namespace bbtk IOStatus s=UPTODATE; // IOStatus s=OUTOFDATE; // IOStatus s=MODIFIED; - - + + if ( ( bbBoxProcessModeIsManual()==false ) || ( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) ) { @@ -781,6 +797,7 @@ namespace bbtk bbSetExecuting(false); bbGlobalSetSomeBoxExecuting(wasExecuting); + return; } //========================================================================= @@ -1468,6 +1485,7 @@ namespace bbtk <Inputs\n"; (s) << "

\n"; diff --git a/kernel/src/bbtkBlackBoxOutputConnector.cxx b/kernel/src/bbtkBlackBoxOutputConnector.cxx index f350f89..ca79492 100644 --- a/kernel/src/bbtkBlackBoxOutputConnector.cxx +++ b/kernel/src/bbtkBlackBoxOutputConnector.cxx @@ -62,8 +62,6 @@ namespace bbtk IOStatus mStatus; /// The output changed signal BlackBox::OutputChangeSignalType mChangeSignal; - - }; //======================================================================== diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index c79747c..7706084 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -64,6 +64,7 @@ namespace bbtk // ==> Set system paths mBin_path = Utilities::GetExecutablePath(); + /* EED 23 Mars 2009 #ifdef MACOSX mInstall_path = mBin_path + "/../../../.."; @@ -81,6 +82,7 @@ namespace bbtk } #endif + ///\TODO : better use ?? mInstall_path = mBin_path + "/.."; @@ -230,6 +232,7 @@ namespace bbtk if (!Utilities::FileExists(mDot_bbtk_path)) mDot_bbtk_is_new = true; Utilities::CreateDirectoryIfNeeded(mDot_bbtk_path); + mDoc_path = Utilities::MakeUserSettingsFullFileName("doc"); Utilities::CreateDirectoryIfNeeded(mDoc_path); @@ -293,6 +296,7 @@ namespace bbtk mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp"); Utilities::CreateDirectoryIfNeeded(mTemp_path); + } //========================================================================= @@ -346,9 +350,13 @@ namespace bbtk strcpy(bbtk_path, Utilities::GetExecutablePath().c_str()); // JPR //strcpy(bbtk_path, "/usr/local/bin"); + + std::string str_home=Utilities::GetEnvHome(); + + // rootDirectory char rootDirectory[200]; - sprintf( rootDirectory, "%s/.bbtk", getenv("HOME")); + sprintf( rootDirectory, "%s/.bbtk", str_home.c_str()); // configPath char configPath[200]; diff --git a/kernel/src/bbtkConnection.cxx b/kernel/src/bbtkConnection.cxx index d3d73a9..e6ee238 100644 --- a/kernel/src/bbtkConnection.cxx +++ b/kernel/src/bbtkConnection.cxx @@ -166,12 +166,12 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, } - mFrom = from; - mOriginalFrom = from; - mTo = to; - mOriginalTo = to; - mInput = mOriginalInput = input; - mOutput = mOriginalOutput = output; + mFrom = from; + mOriginalFrom = from; + mTo = to; + mOriginalTo = to; + mInput = mOriginalInput = input; + mOutput = mOriginalOutput = output; // Lock this pointer !!! //Pointer p = MakePointer(this,true); diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index d20ed65..bf51fe5 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -132,6 +132,7 @@ namespace bbtk #if(USE_WXWIDGETS) Wx::ProcessPendingEvents(); #endif + // Create user package Package::Pointer p = diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index 669a9fb..d541db3 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -548,23 +548,47 @@ namespace bbtk bbtkDebugDecTab("kernel",9); } - //=================================================================== -// ups3 EED borrame + //=================================================================== std::string Factory::GetPackageNameOfaBlackBox(std::string boxType) { - std::string result=""; + std::string packageName=""; PackageMapType::const_iterator i; - for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i ) - { - if ( i->second->ifBoxExist( boxType ) == true) + + std::size_t found = boxType.find(":"); + if (found!=std::string::npos) + { + packageName = boxType.substr(0,found); + } else { + for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i ) { - result = i->first; - } - } - return result; + if ( i->second->ifBoxExist( boxType ) == true) + { + packageName = i->first; + } // if ifBoxExist + } // for i + + } // if found + return packageName; } + + //=================================================================== + std::string Factory::GetTypeNameOfaBlackBox(std::string boxType) + { + std::string typeName=""; + + std::size_t found = boxType.find(":"); + if (found!=std::string::npos) + { + typeName = boxType.substr(found+1); + } else { + typeName=boxType; + } // if found + return typeName; + } + + //=================================================================== @@ -572,20 +596,52 @@ namespace bbtk BlackBox::Pointer Factory::NewBlackBox(const std::string& type, const std::string& name) const { - bbtkDebugMessageInc("kernel",7,"Factory::NewBlackBox(\"" + bbtkDebugMessageInc("kernel",7,"Factory::NewBlackBox(\"" <second->NewBlackBox(type,name); - if (b) break; - } + + std::string tmp = type; + std::string packageName = ((bbtk::Factory*)this)->GetPackageNameOfaBlackBox(tmp); + std::string type2 = ((bbtk::Factory*)this)->GetTypeNameOfaBlackBox(tmp); + i = mPackageMap.find(packageName); + if (i != mPackageMap.end()) + { + b = i->second->NewBlackBox(type2,name); + } else { + b =BlackBox::Pointer(); + } + +/* + std::size_t found = type.find(":"); + if (found!=std::string::npos) + { + std::string packageName = type.substr(0,found); + std::string type2 = type.substr(found+1); + i = mPackageMap.find(packageName); + if (i != mPackageMap.end()) + { + b = i->second->NewBlackBox(type2,name); + } else { + b =BlackBox::Pointer(); + } + } else { + for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i ) + { + b = i->second->NewBlackBox(type,name); + if (b) break; + } // for i + + } // if found : +*/ + + if (!b) - { - bbtkError("black box type \""<GetCreatorTypeInfo() == typeid(WxBlackBoxDescriptor)) ) continue; #else +// JFGA 12/12/2014 Adding WT options for compile with it. + +/*#if USE_WT + + if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) || + ( d->GetCreatorTypeInfo() == typeid(WtBlackBoxDescriptor)) ) + continue; + + +#else +*/ if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) ) continue; +//#endif + #endif bool widok = true; std::string widget,adaptor; diff --git a/kernel/src/bbtkInterpreterVirtual.cxx b/kernel/src/bbtkInterpreterVirtual.cxx index c1a6fac..8d27b32 100644 --- a/kernel/src/bbtkInterpreterVirtual.cxx +++ b/kernel/src/bbtkInterpreterVirtual.cxx @@ -346,7 +346,6 @@ namespace bbtk */ - } //======================================================================= @@ -804,8 +803,7 @@ namespace bbtk //======================================================================= void InterpreterVirtual::DoInterpretLine( const std::string& line ) - { - + { bbtkDebugMessage("interpreter",6,"==> InterpreterVirtual::DoInterpretLine(\"" < words; @@ -1128,7 +1126,7 @@ namespace bbtk bbtkDebugMessage("interpreter",6,"<== InterpreterVirtual::DoInterpretLine(\"" <>%s\n", full_path.c_str() ); for (i=script_paths.begin();i!=script_paths.end();i++) { -printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); +printf("EED InterpreterVirtual::SwitchToFile (1) >> %s\n", (*i).c_str() ); bbtkMessage("interpreter",1, "--> Looking in '" << *i << "'" << std::endl); @@ -1404,7 +1402,7 @@ printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); j!= Filenames.end(); ++j) { -printf("EED InterpreterVirtual::SwitchToFile kkkkk >> %s\n", (*j).c_str() ); +printf("EED InterpreterVirtual::SwitchToFile (2) >> %s\n", (*j).c_str() ); int lgr = (*j).size(); if (lgr < 5) continue; diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index f292957..91cdb51 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -85,8 +85,10 @@ namespace bbtk mDescription(description), mVersion(version) { + bbtkDebugMessage("object",2,"==> Package('"<addWidget(WWt::GetTopWindow()); + // There is not additional configuration. The new WtApp must have the same behavior that one Wt::WApplication. + + } + + WtApp::~WtApp() + { + + } +/* + int WtApp::WtWRun() + { + char *argv[7] = {"./WtTest","--docroot",".","--http-address","0.0.0.0","--http-port","8080"}; + int argc = 7; + return Wt::WRun(argc,argv,&createApplication); + } + + + Wt::WApplication *createApplication(const Wt::WEnvironment& env) + { + return new WtApp(env); + } +*/ + + + + //========================================================================= + + //========================================================================= + void WWt::CreateWtAppIfNeeded() + { + std::cout<<"CREATING APP IF NEEDED --------- DELETE ME ------- bbtkWt.cxx"< Creating bbtk WtApp"< Destructing bbtk WxApp"<DestroyChildren(); + } + */ + + /* + wxApp* a = (wxApp*)wxApp::GetInstance(); + if (a==0) return; + + std::cout << "$$$$$$$$$$$$$$ PROCESS PENDING "<Pending()) + a->Dispatch(); + std::cout << "$$$$$$$$$$$$$$ PROCESS PENDING DONE"< +#include + + +//TODO Include libs in the CMake escription +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//typedef boost::signals::trackable SignalObserver; +// \BBTKWXSIG +//=========================================================================== + + +//=========================================================================== +// Qt headers +// DEFINIR LOS HEADERS Wt que se necesitan *-*-*-*-*-*-*-*-*-* +/* +#ifdef USE_WT +#include "qwidget.h" +// EO Qt headers + +#else //USE_QT + +// define QWidget +typedef void QWidget; +typedef void QBusyCursor; + +#endif // EO USE_WXWIDGETS + +//-*-*-*-* JFGA + +*/ +#ifdef USE_WT + + +// Definition of some classes used in tehe code +typedef Wt::WEnvironment WtWEnvironment; +typedef Wt::WWidget WtWWidget; +//typedef Wt::WContainerWidget WtWContainerWidget; +typedef Wt::WApplication WtWApplication; +typedef Wt::WString WtWString; + + + +#else // EO_USE_WT + + +typedef void WtWidget; +typedef void WtWContainerWidget; +typedef void WtWApplication; +typedef void WtBusyCursor; + +#endif // EO USE_WT + + +//========================================================================== + +//=========================================================================== +#include "bbtkSystem.h" +//=========================================================================== + + + + + +namespace bbtk +{ + + //================================================================== + /// Global wt handlers (cursor...) + + +// BBTKWXSIG BBTK_ADD_BLACK_BOX_TO_PACKAGE(MyProjectWT,Testing) + +#define bbtkAddWtSignalObserver(METHOD) \ + WWt::AddSignalObserver(boost::bind(&METHOD, this)) +// \BBTKWXSIG + +#define BBTK_BUSY_CURSOR bbtk::WWt::BusyCursor __bbtk_dummy_busy_cursor; + + struct BBTK_EXPORT WWt + { + public: + // BBTKWXSIG + // The keyword 'signals' is also a macro in qt + // typedef boost::signals::trackable SignalObserver; + typedef boost::signals::trackable SignalObserver; + typedef boost::signal Signal_type; + typedef Signal_type::slot_function_type Slot_function_type; + // \BBTKWXSIG + + /* + static void ResetCursor(); + static void BeginBusyCursor(); + static void EndBusyCursor(); + */ + + static void LoopUntilAllWindowsClose(); + + class BusyCursor + { + public: + BusyCursor(); + ~BusyCursor(); + //wxBusyCursor* mCursor; The wxBusyCursor is only for comunicate to the client/user that the program is busy. + }; + + + static void ProcessPendingEvents(); + /// Sets the parent of all bbtk windows + static void SetTopWindow(Wt::WContainerWidget*); + /// Returns the parent of all bbtk windows + static Wt::WContainerWidget* GetTopWindow(); + + + static void IncNbWindowsAlive(); + static void DecNbWindowsAlive(); + static int GetNbWindowsAlive(); + static bool IsSomeWindowAlive(); + + + // BBTKWXSIG + static void AddSignalObserver(Slot_function_type); + // \BBTKWXSIG + + + + + //private: + static void CreateWtAppIfNeeded(); + static void DestroyWtAppIfNeeded(); + + }; // struct Wt + //================================================================== + +#ifdef USE_WT + + + static std::string jScript; + //================================================================== + /// Conversion std::string to wxString + inline Wt::WString std2wt(const std::string& s) + { + // Wt::WString wt; +/* + const char* my_string=s.c_str(); + wxMBConvUTF8 *wxconv= new wxMBConvUTF8(); + wx=wxString(wxconv->cMB2WC(my_string),wxConvUTF8); + delete wxconv; + // test if conversion works of not. In case it fails convert from Ascii + if(wx.length()==0) + wx=wxString(wxString::FromAscii(s.c_str())); +*/ + return Wt::WString::fromUTF8(s,false); + //return new Wt::WString(s);//wt; + } + //================================================================== + + //================================================================== + /// Conversion wxString to std::string + inline std::string wt2std(const Wt::WString& s){ + /* std::string s2; + if(s.wxString::IsAscii()) { + s2=s.wxString::ToAscii(); + } else { + const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(s); + const char *tmp_str = (const char*) tmp_buf; + s2=std::string(tmp_str, strlen(tmp_str)); + } + + return s2;*/ + return s.toUTF8(); + } + //================================================================== +#endif // EO _USE_WXWIDGETS + + + + + +} // namespace bbtk + + +#endif // EO __bbtkWt_h_INCLUDED__ diff --git a/kernel/src/bbtkWtBlackBox.cxx b/kernel/src/bbtkWtBlackBox.cxx new file mode 100644 index 0000000..a3cb0db --- /dev/null +++ b/kernel/src/bbtkWtBlackBox.cxx @@ -0,0 +1,473 @@ + +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + +/*========================================================================= + Program: bbtk + Module: $RCSfile: bbtkWxBlackBox.cxx,v $ + Language: C++ + Date: $Date: 2012/11/16 08:49:01 $ + Version: $Revision: 1.45 $ +=========================================================================*/ + + + +#ifdef _USE_WT_ + +/** + * \file + * \brief + */ + +#include "bbtkWtBlackBox.h" +#include "bbtkBlackBoxOutputConnector.h" + + +//#include "bbtkWxContainerBlackBox.h" +//#include + +//#include "bbtkData.h" +//#include "bbtkFactory.h" + + + + +namespace bbtk +{ + + +/* + class jScript + { + public: + jScript(); + std::string jScriptLine; + }; +*/ + //========================================================================= + // wtData structure + //========================================================================= + + // For the very first contruction of the application +/* struct wtServerData + { + std::string docRoot; + std::string port; + std::string address; + + }; + */ + struct wtData + { + Wt::WContainerWidget *parent; + WtBlackBox::Pointer b; + WtBlackBox *pbox; + Wt::WString title; + }; + +/* jScript::jScript() + { + jScriptLine = ""; + } +*/ +// static bbtk::jScript* js = new bbtk::jScript(); + static wtData myWtData; +// static wtServerData loadedJS; + //static std::string* jss; + + + + //========================================================================= + // javaScript Line + //========================================================================= + //Contains all the JS statements needed for the bbwt. + + //========================================================================= + // WxFrame + //========================================================================= + // Application WT deployed + //================================================================== + + class WtWFrame : public Wt::WApplication + { + public: + WtWFrame( const Wt::WEnvironment& env ); + ~WtWFrame(); + WtBlackBox::WeakPointer mBox; + }; + + + WtWFrame::WtWFrame( const Wt::WEnvironment& env ):Wt::WApplication(env) + { + //std::cout<<"Adding JavaScript -- DELETE ME -- bbtkWtBlackBox.cxx"<require("/home/gonzalez/Documents/CREATOOLS/wt_library/wt/bbtk_wt_PKG/src/js/xtk.js"); + + //this->require("http://get.goXTK.com/xtk.js"); + //this->useStyleSheet("css/demo.css"); + + //this->require("http://get.goXTK.com/xtk.js"); + this->require( "resourcesXTK/xtk.js" ); + + // this->require("http://get.goXTK.com/xtk_edge.js"); +// this->require("http://get.goXTK.com/xtk_xdat.gui.js"); + this->require( "resourcesXTK/xtk_xdat.gui.js" ); + + this->useStyleSheet("resourcesXTK/styleWT.css"); + // std::cout<<"Cargado------------ "< + if(!myWtData.parent) + { + std::cout<<" SIN PADRE "<setMinimumSize(800,500); + std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.......50%"<bbUserCreateWidget(myContainer); + + root()->addWidget(myWtData.parent); + //bbmWindow = myCont; + this->refresh(); + //jss = WtBlackBox::jScript; + std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx........80%"<doJavaScript(bbtk::jScript); + +//EED + myWtData.pbox->bbwtUpdateInputs(); +// myWtData.pbox->bbwtProcess(); + + + } + //================================================================== + //================================================================== + WtWFrame::~WtWFrame() + { + if (mBox.lock()) + bbtkDebugMessage("widget",9,"["<bbGetName() + <<"] $$$$$$$$$$$$$$$$$$$ ~W()" + <bbSetWindow(0); + WWt::DecNbWindowsAlive(); + } + + + + + Wt::WApplication *createApplication(const Wt::WEnvironment& env) + { + return new WtWFrame(env); + } + + + //========================================================================= + // WxDialogWxBlackBox::Pointer box + //========================================================================= + + //================================================================== + // Dialog window which is modal + /* class BBTK_EXPORT WxDialog : public wxDialog + { + public: + WxDialog(WxBlackBox::Pointer box, + wxWindow *parent, + wxString title, + wxSize size); + ~WxDialog();Wt::GetTopWindow() + void OnCloseWindow(wxCloseEvent& event); + + + WxBlackBox::WeakPointer mBox; + DECLARE_EVENT_TABLE(); + + }; + + BEGIN_EVENT_TABLE(WxDialog, wxDialog) + EVT_CLOSE(WxDialog::OnCloseWindow) + END_EVENT_TABLE(); + //========================================================================= + + //========================================================================= + WxDialog::WxDialog(WxBlackBox::Pointer b, + wxWindow *parent, + wxString title, + wxSize size) + : + wxDialog( parent, + -1, + title, + wxDefaultPosition, + size, + wxRESIZE_BORDER | + wxSYSTEM_MENU | + wxCLOSE_BOX | + wxMAXIMIZE_BOX | + wxMINIMIZE_BOX | + wxCAPTION + ), + mBox(b) + { + bbtkDebugMessage("widget",9,"WxDialog::WxDialog ["<bbGetName()<<"]" + <bbSetWindow(this); + // Insert the widget into the window + wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); + b->bbUserCreateWidget(this); + wxWindow* widget = b->bbGetOutputWidget(); + sizer->Add( widget, 1, wxALL|wxGROW, 2); + SetSizer(sizer); + Layout(); + } + //================================================================== + //===========================organise======================================= + WxDialog::~WxDialog() + { + bbtkDebugMessage("widget",9,"WxDialog::~WxDialog()"<bbSetWindow(0); + // Wx::DecNbWindowsAlive(); + } + //================================================================== + //================================================================== + void WxDialog::OnCloseWindow(wxCloseEvent& event) + { + bbtkDebugMessage("widget",9,"WxDialog::OnCloseWindow()"<bbSetWindow(0); http://doodle.com/qx65tfxismf7d6ku5vxykghs/admin#table + Wx::DecNbWindowsAlive(); + this->Destroy(); + } + //================================================================== + +*/ + //========================================================================= + // WxBlackBox + //========================================================================= + + //========================================================================= + //========================================================================= + //========================================================================= + //========================================================================= + BBTK_BLACK_BOX_IMPLEMENTATION(WtBlackBox,WidgetBlackBox); + + //std::string WtBlackBox::wtServerData::docRoot = "/home/gonzalez/Documents/pruebaResources"; + //std::string WtBlackBox::wtServerData::docRoot = "/usr/local/share/wtResources"; + //std::string WtBlackBox::wtServerData::port = "8081"; + + std::string WtBlackBox::wtServerData::docRoot = ""; + std::string WtBlackBox::wtServerData::port = ""; + std::string WtBlackBox::wtServerData::address = "0.0.0.0"; + int WtBlackBox::wtServerData::argc = 0; + char **WtBlackBox::wtServerData::argv = NULL; + + //========================================================================= + //========================================================================= + void WtBlackBox::bbUserSetDefaultValues() + { + bbtkBlackBoxDebugMessage("widget",5,"WtBlackBox::bbUserSetDefaultValues()"< WtBlackBox::bbUserFinalizeProcessing()"< WtBlackBox::bbCreateDialogWindow() - No Dialog must be created, it is a web app" + < WtBlackBox::bbCreateFrameWindow() - parent = " + <(); + myWtData.title = std2wt( bbGetInputWinTitle() + " - bbtk (c) CREATIS"); + myWtData.pbox = this; + + //char *argv[7] = {"./WtTest","--docroot","/home/gonzalez/Documents/pruebaResources","--http-address","0.0.0.0","--http-port","8080"}; + //int argc = 7; + +/* + char *argv[7] = {"./WtTest" +,"--docroot",(char*)WtBlackBox::wtServerData::docRoot.c_str() +,"--http-address",(char*)WtBlackBox::wtServerData::address.c_str() +,"--http-port",(char*)WtBlackBox::wtServerData::port.c_str() +}; + int argc = 3; + std::cout<<" --- PUERTO :"<isRunning()) + { + std::cout<<"Checking the existence of a Server deployed -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<stop(); + } + */ + + + std::cout<<"EED WtBlackBox::bbCreateFrameWindow Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"< WtBlackBox::bbSetWindow("< WtBlackBox::bbShowWindow()" + <ShowModal(); + } + else + { + // There is not such a thing like show becouse it is a webapp + // bbGetWindow()->Show(); + // WWt::CreateWtAppIfNeeded(); + + + Wt::WRun(WtBlackBox::wtServerData::argc, + WtBlackBox::wtServerData::argv, + &createApplication); + + + bbSetShown(true); + } + } + } + //================================================================== + + //================================================================== + void WtBlackBox::bbDestroyWindow() + { + bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbDestroyWindow("<Close(true); + // + delete bbGetWindow(); + bbSetShown(false); + } + bbtkBlackBoxDebugMessage("widget",3,"<== WtBlackBox::bbDestroyWindow("< + { + + + + + + + public: + BBTK_BLACK_BOX_INTERFACE(WtBlackBox,bbtk::WidgetBlackBox); + + + // protected: + + public: + + struct wtServerData + { + /*std::string docRoot; + std::string port; + std::string address; + */ + static std::string docRoot ; + static std::string port ; + static std::string address ; + + static int argc; + static char **argv; + }; + + /* static std::string* jScript; + static void changeJScript(std::string newJScript){jScript=newJScript;}; + static std::string getJScript(){return jScript;};*/ + //================================================================== + /// Callback for creating a Dialog window (modal) + /// ** Must be defined ** in toolkit specific descendants + virtual void bbCreateDialogWindow(); + //================================================================== + + //================================================================== + /// Callback for creating a Frame window + /// ** Must be defined ** in toolkit specific descendants + virtual void bbCreateFrameWindow(); + //================================================================== + //staticwtServerData serData; + // static void setServerInformation(std::string nDocRoot, std::string nPort, std::string nAddress); + //================================================================== + Wt::WContainerWidget* bbGetWindow() { return bbmWindow; } + void bbSetWindow(Wt::WContainerWidget*) ; + bool bbWindowIsCreated() { return (bbGetWindow() != 0); } + // Wt::WApplication *createApplication(const Wt::WEnvironment& env); + //================================================================== + + + //================================================================== + virtual void bbShowWindow(); + //================================================================== + + //================================================================== + virtual void bbDestroyWindow(); + //================================================================== + + void bbwtUpdateInputs(); + void bbwtProcess(); + + private: + + Wt::WApplication* bbApp; + Wt::WContainerWidget* bbmWindow; + + }; + //================================================================= + + + //================================================================= + // WxBlackBoxDescriptor declaration + class WtBlackBoxDescriptor : public WidgetBlackBoxDescriptor + BBTK_BEGIN_DESCRIBE_BLACK_BOX_BODY(WtBlackBox); + BBTK_NAME("WtBlackBox"); + BBTK_END_DESCRIBE_BLACK_BOX(WtBlackBox); + //================================================================= + + +} //namespace bbtk + +#endif //__bbtkWxBlackBox_h__ + +#endif //USE_WXWIDGETS diff --git a/kernel/src/bbtkWx.cxx b/kernel/src/bbtkWx.cxx index 69cfc4d..78848c1 100644 --- a/kernel/src/bbtkWx.cxx +++ b/kernel/src/bbtkWx.cxx @@ -71,7 +71,8 @@ namespace bbtk IMPLEMENT_APP_NO_MAIN(WxApp); //========================================================================= bool WxApp::OnInit( ) - { + { + std::cout<<"Testing OnINIT Wx ---- JFGA !!!DELETE ME!!! bbtkWx"<bbGetName()<<"]" <Show(); + + } //================================================================== @@ -305,9 +308,9 @@ namespace bbtk { bbtkBlackBoxDebugMessage("widget",9,"==> WxBlackBox::bbSetWindow("<ShowModal(); } - else + else { bbGetWindow()->Show(); bbSetShown(true); } - } + } // if + + } //================================================================== diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index 2b86b39..07e15f4 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -39,6 +39,13 @@ ADD_SUBDIRECTORY(appli) ADD_SUBDIRECTORY(gdcmvtk) + + + +IF(BBTK_USE_WT) + ADD_SUBDIRECTORY(wt) +ENDIF(BBTK_USE_WT) + IF(BBTK_USE_KWWIDGETS) ADD_SUBDIRECTORY(kw) ENDIF(BBTK_USE_KWWIDGETS) diff --git a/packages/itk/src/bbitkImageWriter.cxx b/packages/itk/src/bbitkImageWriter.cxx index f553635..f8d3b5c 100644 --- a/packages/itk/src/bbitkImageWriter.cxx +++ b/packages/itk/src/bbitkImageWriter.cxx @@ -83,6 +83,10 @@ namespace bbitk <() <<">()"<() + <<">()"< itkWriterType; typename itkWriterType::Pointer writer = itkWriterType::New(); writer->SetInput(bbGetInputIn().unsafe_get()); diff --git a/packages/std/src/bbstdGetBBTKinfo.cxx b/packages/std/src/bbstdGetBBTKinfo.cxx new file mode 100644 index 0000000..ff99d44 --- /dev/null +++ b/packages/std/src/bbstdGetBBTKinfo.cxx @@ -0,0 +1,72 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#include "bbstdGetBBTKinfo.h" +#include "bbstdPackage.h" +namespace bbstd +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,GetBBTKinfo) +BBTK_BLACK_BOX_IMPLEMENTATION(GetBBTKinfo,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void GetBBTKinfo::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') +// bbSetOutputOut( bbGetInputIn() ); +// std::cout << "Output value = " <
+
+     printf("EED PolyDataWriter::Process() %s\n", bbGetInputFilename().c_str());
+
    vtkPolyDataWriter* w = vtkPolyDataWriter::New();
    bbGetInputIn()->Update();
    w->SetInput(bbGetInputIn());
diff --git a/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx b/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx
index 5181d61..bca2a1c 100755
--- a/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx
+++ b/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx
@@ -120,7 +120,6 @@ void PolyDataWriterPlus::Process()
 		writer->Delete();
 	}
 
-
 	std::cout << "Saving Ok!" << std::endl;
 
 	InvokeEvent(OBS_POST_WRITER_1);
diff --git a/packages/wx/src/bbwxCheckBox.cxx b/packages/wx/src/bbwxCheckBox.cxx
index 0b7297e..e681ab8 100644
--- a/packages/wx/src/bbwxCheckBox.cxx
+++ b/packages/wx/src/bbwxCheckBox.cxx
@@ -242,6 +242,7 @@ namespace bbwx
 					bbGetInputReactiveOnKeystroke()
 					);
     bbSetOutputWidget( w );
+
   }
   
 
diff --git a/packages/wx/src/bbwxCheckBox.h b/packages/wx/src/bbwxCheckBox.h
index e66a06a..e600f89 100644
--- a/packages/wx/src/bbwxCheckBox.h
+++ b/packages/wx/src/bbwxCheckBox.h
@@ -99,7 +99,7 @@ namespace bbwx
     BBTK_BLACK_BOX_INTERFACE(CheckBox,bbtk::WxBlackBox);
     BBTK_DECLARE_INPUT(In,bool);
     BBTK_DECLARE_INPUT(Title,std::string);
-	BBTK_DECLARE_INPUT(ReactiveOnKeystroke,int);
+    BBTK_DECLARE_INPUT(ReactiveOnKeystroke,int);
     BBTK_DECLARE_OUTPUT(Out,bool);
     BBTK_PROCESS(Process);
     BBTK_CREATE_WIDGET(CreateWidget);
diff --git a/packages/wx/src/bbwxComboBox.cxx b/packages/wx/src/bbwxComboBox.cxx
index e76d44f..234a0e6 100644
--- a/packages/wx/src/bbwxComboBox.cxx
+++ b/packages/wx/src/bbwxComboBox.cxx
@@ -28,6 +28,8 @@ namespace bbwx
 	~ComboBoxWidget();
 
 	void OnComboBox(wxEvent& event);
+	void FillItems( int iSelection, std::vector< std::string > lstIn);
+
 
   private:
     int 				mTypeForm;
@@ -84,7 +86,7 @@ namespace bbwx
 		 	Connect( wxlistbox->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, (wxObjectEventFunction) (void (wxPanel::*)(wxEvent&))&ComboBoxWidget::OnComboBox ); 
     		for (i=0;iAppend(  bbtk::std2wx( lstIn[i] )  ); 
+  		   		wxlistbox->Append(  bbtk::std2wx( lstIn[i] )  ); 
 	 		} // for i
     		wxlistbox->SetSelection(iSelection);
 		   sizer->Add( wxlistbox,1,wxGROW ); 
@@ -95,7 +97,7 @@ namespace bbwx
 	 		Connect( wxchoice->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, (wxObjectEventFunction) (void (wxPanel::*)(wxEvent&))&ComboBoxWidget::OnComboBox ); 
     		for (i=0;iAppend(  bbtk::std2wx( lstIn[i] )  ); 
+		   		wxchoice->Append(  bbtk::std2wx( lstIn[i] )  ); 
 	 		} // for i
     		wxchoice->SetSelection(iSelection);
 		   sizer->Add( wxchoice,1,wxGROW ); 
@@ -130,6 +132,30 @@ namespace bbwx
     mBox->bbSignalOutputModification("OutString");
   }
 
+//--------------------------------------------------------------------------
+  void ComboBoxWidget::FillItems(
+               int iSelection,
+               std::vector< std::string > lstIn
+	)
+	{
+		int i;
+		if (mTypeForm==1)
+		{
+			wxlistbox->Clear();
+    		for (i=0;iAppend(  bbtk::std2wx( lstIn[i] )  ); 
+	 		} // for i
+    		wxlistbox->SetSelection(iSelection);
+		} else {
+			wxchoice->Clear();
+    		for (i=0;iAppend(  bbtk::std2wx( lstIn[i] )  ); 
+	 		} // for i
+    		wxchoice->SetSelection(iSelection);
+		} // if
+	} 
 
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ComboBox)
 BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WxBlackBox);
@@ -138,7 +164,10 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WxBlackBox);
 //===== 
 void ComboBox::Process()
 {
+		ComboBoxWidget *w = (ComboBoxWidget*)bbGetOutputWidget();
+		w->FillItems( bbGetInputSelection(),bbGetInputIn() );
 }
+
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
diff --git a/packages/wx/src/bbwxStaticBox.cxx b/packages/wx/src/bbwxStaticBox.cxx
index 2809ed2..69a8b1f 100644
--- a/packages/wx/src/bbwxStaticBox.cxx
+++ b/packages/wx/src/bbwxStaticBox.cxx
@@ -23,7 +23,6 @@ namespace bbwx
 //===== 
   void StaticBox::CreateWidget(wxWindow* parent)
   {
-    std::cout << "creating..." << std::endl;
     wxPanel *w=new wxPanel(
       parent, //bbGetWxParent(),
       -1
@@ -56,7 +55,6 @@ namespace bbwx
   {
     bbSetInputBoxTitle("");
     bbSetInputBoxContent(NULL);
-    std::cout << "initialized"<