From: Felipe Gonzalez Date: Fri, 19 Jun 2015 08:31:48 +0000 (+0200) Subject: 2498 BBTK FeatureNewNormal wt-version kernel X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=bbtk.git;a=commitdiff_plain;h=c707b7a431df27af2590fcf837190ee4e5070107 2498 BBTK FeatureNewNormal wt-version kernel --- diff --git a/kernel/src/CMakeLists.txt b/kernel/src/CMakeLists.txt index ae687e5..44e3b2c 100644 --- a/kernel/src/CMakeLists.txt +++ b/kernel/src/CMakeLists.txt @@ -185,8 +185,9 @@ IF(BBTK_USE_QT) # *********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/include/Wt) + INCLUDE_DIRECTORIES(/usr/local/lib/) ENDIF(BBTK_USE_QT) diff --git a/kernel/src/bbtkWt.h b/kernel/src/bbtkWt.h index 299878e..0828d0b 100644 --- a/kernel/src/bbtkWt.h +++ b/kernel/src/bbtkWt.h @@ -71,6 +71,9 @@ #include #include #include +#include +#include + //typedef boost::signals::trackable SignalObserver; // \BBTKWXSIG //=========================================================================== @@ -153,7 +156,7 @@ namespace bbtk typedef boost::signal Signal_type; typedef Signal_type::slot_function_type Slot_function_type; // \BBTKWXSIG - + /* static void ResetCursor(); static void BeginBusyCursor(); @@ -199,6 +202,9 @@ namespace bbtk //================================================================== #ifdef USE_WT + + + static std::string jScript; //================================================================== /// Conversion std::string to wxString inline Wt::WString std2wt(const std::string& s) diff --git a/kernel/src/bbtkWtBlackBox.cxx b/kernel/src/bbtkWtBlackBox.cxx index 93ef127..d94fa51 100644 --- a/kernel/src/bbtkWtBlackBox.cxx +++ b/kernel/src/bbtkWtBlackBox.cxx @@ -52,10 +52,21 @@ //#include "bbtkData.h" //#include "bbtkFactory.h" -static std::string jScriptLine; + + namespace bbtk { + + +/* + class jScript + { + public: + jScript(); + std::string jScriptLine; + }; +*/ //========================================================================= // wtData structure //========================================================================= @@ -68,13 +79,24 @@ namespace bbtk Wt::WString title; }; +/* jScript::jScript() + { + jScriptLine = ""; + } +*/ +// static bbtk::jScript* js = new bbtk::jScript(); static wtData myWtData; + static bool loadedJS; + //static std::string* jss; + + //========================================================================= // javaScript Line //========================================================================= //Contains all the JS statements needed for the bbwt. + //========================================================================= // WxFrame //========================================================================= @@ -90,14 +112,14 @@ namespace bbtk const Wt::WEnvironment& env ); ~WtWFrame(); - + WtBlackBox::WeakPointer mBox; - + }; - + WtWFrame::WtWFrame( const Wt::WEnvironment& env @@ -106,10 +128,20 @@ namespace bbtk Wt::WApplication(env) { //std::cout<<"Adding JavaScript -- DELETE ME -- bbtkWtBlackBox.cxx"<require("js/xtk.js"); - //this->require("js/demo/demo2.js"); + //this->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"); - jScriptLine = ""; + + // this->require("http://get.goXTK.com/xtk_edge.js"); + this->require("http://get.goXTK.com/xtk_xdat.gui.js"); + this->require("xtk.js"); + //this->require("xtk_xdat.gui.js"); + this->useStyleSheet("style.css"); + + + std::cout<<"Cargado------------ "<bbUserCreateWidget(myCont); root()->addWidget(myWtData.parent); //bbmWindow = myCont; + this->refresh(); + //jss = WtBlackBox::jScript; std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................80%"<doJavaScript(jScriptLine); + std::cout<<"Creando WebWIDGET DELETE ME SCRIPT : ---"<doJavaScript(bbtk::jScript); } @@ -244,7 +279,9 @@ namespace bbtk //========================================================================= //========================================================================= BBTK_BLACK_BOX_IMPLEMENTATION(WtBlackBox,WidgetBlackBox); + + //========================================================================= //========================================================================= void WtBlackBox::bbUserSetDefaultValues() diff --git a/kernel/src/bbtkWtBlackBox.h b/kernel/src/bbtkWtBlackBox.h index ba56e29..310a854 100644 --- a/kernel/src/bbtkWtBlackBox.h +++ b/kernel/src/bbtkWtBlackBox.h @@ -75,12 +75,14 @@ namespace bbtk { public: BBTK_BLACK_BOX_INTERFACE(WtBlackBox,bbtk::WidgetBlackBox); - + // protected: public: - + /* 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 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/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);