- void WtBlackBox::bbCreateFrameWindow()
- {
-
- std::cout<<"Creating Container WT -- DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
- bbtkBlackBoxDebugMessage("widget",3,
- "==> WtBlackBox::bbCreateFrameWindow() - parent = "
- <<WWt::GetTopWindow()
- <<std::endl);
- WtWContainer* w = 0;
-// WxFrame* w = 0;
- w = new WtWContainer( GetThisPointer<WtBlackBox>(),
- WWt::GetTopWindow(),
- std2wt( bbGetInputWinTitle()
- + " - bbtk (c) CREATIS")
- );
- std::cout<<"Container created succesfully -- DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
- bbmWindow = w;
-
-/*
- w = new WxFrame( GetThisPointer<WxBlackBox>(),
- Wx::GetTopWindow(),
- std2wx( bbGetInputWinTitle()
- + " - bbtk (c) CREATIS"),
- wxSize( bbGetInputWinWidth() ,
- bbGetInputWinHeight() ) );
-
- w->Show();
-*/
- WWt::CreateWtAppIfNeeded();
- }
+ void WtBlackBox::bbCreateFrameWindow()
+ {
+
+ bbtkBlackBoxDebugMessage("widget",3,
+ "==> WtBlackBox::bbCreateFrameWindow() - parent = "
+ <<WWt::GetTopWindow()
+ <<std::endl);
+
+ //Setting necessary data for Wt server deployment
+ myWtData.parent = WWt::GetTopWindow();
+ myWtData.b = GetThisPointer<WtBlackBox>();
+ myWtData.title = std2wt( bbGetInputWinTitle()
+ + " - bbtk (c) CREATIS");
+
+ std::cout<<"Creating Container WT -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
+ char *argv[7] = {"./WtTest","--docroot","/home/gonzalez/Documents/pruebaResources","--http-address","0.0.0.0","--http-port","8080"};
+ int argc = 7;
+ /* if(Wt::WServer::instance()->isRunning())
+ {
+ std::cout<<"Checking the existence of a Server deployed -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
+ Wt::WServer::instance()->stop();
+ }
+ */
+ std::cout<<"Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
+ Wt::WRun(argc,argv,&createApplication);
+ }