]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWtBlackBox.cxx
2498 BBTK FeatureNewNormal wt-version kernel
[bbtk.git] / kernel / src / bbtkWtBlackBox.cxx
index 93ef1274417e92a2d95a68159ab270e96dd84bfe..d94fa513aad503e95238088a7025b02dc44c256d 100644 (file)
 //#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"<<std::endl;
-               this->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------------           "<<loadedJS<<std::endl;
+
                mBox = myWtData.b;
                if(!myWtData.parent)
                        {
@@ -126,8 +158,11 @@ namespace bbtk
                myWtData.b->bbUserCreateWidget(myCont);
                root()->addWidget(myWtData.parent);
                //bbmWindow = myCont;
+               this->refresh();
+               //jss = WtBlackBox::jScript;
                std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................80%"<<std::endl;
-               this->doJavaScript(jScriptLine); 
+               std::cout<<"Creando WebWIDGET DELETE ME SCRIPT : ---"<<bbtk::jScript<<".................80%"<<std::endl;
+               //this->doJavaScript(bbtk::jScript); 
 
 
   }
@@ -244,7 +279,9 @@ namespace bbtk
   //=========================================================================
   //=========================================================================
   BBTK_BLACK_BOX_IMPLEMENTATION(WtBlackBox,WidgetBlackBox<Wt::WContainerWidget>);
+       
 
+       
   //=========================================================================
   //=========================================================================
   void WtBlackBox::bbUserSetDefaultValues()