// If input is connected
BlackBoxInputConnector* c = bbGetInputConnectorMap().find(in)->second ;
if ( c->IsConnected() )
- {
- // Get black box from
- BlackBox::Pointer from =
- c->GetConnection()->GetBlackBoxFrom();
- // Cast it into a WidgetBlackBox
- typename WidgetBlackBox<T>::Pointer wfrom
- = boost::dynamic_pointer_cast<WidgetBlackBox<T> >(from);
- // If the black box from construction is not done yet : do it
- // If not constructed do it
- wfrom->bbInitializeProcessing();
- // Call bbUserCreateWidget
- wfrom->bbUserCreateWidget(parent);
- // Get the widget created
- w = wfrom->bbGetOutputWidget();
- // Insert the box into the NestedWidgetBoxes list
- bbmNestedWidgetBoxes.push_back(from);
- }
+ {
+ // Get black box from
+ BlackBox::Pointer from = c->GetConnection()->GetBlackBoxFrom();
+ // Cast it into a WidgetBlackBox
+ typename WidgetBlackBox<T>::Pointer wfrom = boost::dynamic_pointer_cast<WidgetBlackBox<T> >(from);
+ // If the black box from construction is not done yet : do it
+ // If not constructed do it
+ wfrom->bbInitializeProcessing();
+ // Call bbUserCreateWidget
+ wfrom->bbUserCreateWidget(parent);
+ // Get the widget created
+ w = wfrom->bbGetOutputWidget();
+ // Insert the box into the NestedWidgetBoxes list
+ bbmNestedWidgetBoxes.push_back(from);
+ } // if IsConnected
return w;
}
//==================================================================
printf("EED (WT) createApplication warnning 2019 \n");
//EED2019-08-20
// return new WtWFrame(env);
- std::make_unique<WtWFrame>(env);
+ return std::make_unique<WtWFrame>(env);
}
//=========================================================================
void WtBlackBox::bbUserInitializeProcessing()
{
-
}
- //================================================================http://intranet-if.insa-lyon.fr/temps/5IF39.html==
+ //==================================================================
//=========================================================================
void WtBlackBox::bbUserFinalizeProcessing()
void WtBlackBox::bbCreateDialogWindow()
{
bbtkBlackBoxDebugMessage("widget",3,
- "==> WtBlackBox::bbCreateDialogWindow() - No Dialog must be created, it is a web app"
+ "==> WtBlackBox::bbCreateDialogWindow() - No Dialog must be created, it is a web app"
<<std::endl);
}
/// Callback for creating a Frame window
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>();
int argc=2;
*/
-
/* if(Wt::WServer::instance()->isRunning())
{
std::cout<<"Checking the existence of a Server deployed -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
}
*/
-
std::cout<<"EED WtBlackBox::bbCreateFrameWindow Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
-
// Wt::WRun(argc,argv,&createApplication);
- Wt::WRun(WtBlackBox::wtServerData::argc,
- WtBlackBox::wtServerData::argv,
- &createApplication);
-
-
+ Wt::WRun(WtBlackBox::wtServerData::argc,WtBlackBox::wtServerData::argv, &createApplication);
}
//==================================================================
{
bbtkBlackBoxDebugMessage("widget",9,"==> WtBlackBox::bbSetWindow("<<w<<")"<<std::endl);
if ((bbmWindow != 0)&&(w!=0))
- {
- std::cout << "ERRRRRRRROOOOR"<<std::endl;
- }
+ {
+ std::cout << "ERRRRRRRROOOOR"<<std::endl;
+ }
bbmWindow = w;
}
void WtBlackBox::bbShowWindow()
{
if ((bbmWindow) && (!bbIsShown()))
- {
- bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbShowWindow()"
- <<std::endl);
- if (bbGetInputWinDialog())
- {
- // ((WxDialog*)bbmWindow)->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);
- }
- }
+ {
+ bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbShowWindow()"
+ <<std::endl);
+ if (bbGetInputWinDialog())
+ {
+ // ((WxDialog*)bbmWindow)->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);
+ } // if Dialog
+ } // if Window Show
}
//==================================================================
{
bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbDestroyWindow("<<bbmWindow<<")"<<std::endl);
if (bbGetWindow()!=NULL)
- {
- // wxWindow* w = bbGetWindow();
- //bbSetWindow(0);
- // WE SHOULD DESTROY THE WINDOW WITH THE Close METHOD
- // HOWEVER I
- //w->Close(true);
- //
- delete bbGetWindow();
- bbSetShown(false);
- }
+ {
+ // wxWindow* w = bbGetWindow();
+ //bbSetWindow(0);
+ // WE SHOULD DESTROY THE WINDOW WITH THE Close METHOD
+ // HOWEVER I
+ //w->Close(true);
+ //
+ delete bbGetWindow();
+ bbSetShown(false);
+ }
bbtkBlackBoxDebugMessage("widget",3,"<== WtBlackBox::bbDestroyWindow("<<bbmWindow<<")"<<std::endl);
-
}
* \brief
*/
-
#ifdef USE_WT
-
-
#ifndef __bbtkWtBlackBox_h__
#define __bbtkWtBlackBox_h__
-
-
#include "bbtkWidgetBlackBox.h"
#include "bbtkWt.h"
-
namespace bbtk
{
-
-
//==================================================================
/// Widget black boxes
//EED 10/06/2009 /*BBTK_EXPORT*/
class BBTK_EXPORT WtBlackBox : public bbtk::WidgetBlackBox<Wt::WContainerWidget>
{
-
-
-
-
-
public:
BBTK_BLACK_BOX_INTERFACE(WtBlackBox,bbtk::WidgetBlackBox<Wt::WContainerWidget>);
-
-
+
// protected:
-
public:
-
struct wtServerData
{
- /*std::string docRoot;
- std::string port;
- std::string address;
+ /*
+ std::string docRoot;
+ std::string port;
+ std::string address;
*/
- static std::string docRoot ;
- static std::string port ;
- static std::string address ;
+ static std::string docRoot ;
+ static std::string port ;
+ static std::string address ;
- static int argc;
- static char **argv;
+ static int argc;
+ static char **argv;
};
/* static std::string* jScript;
// Wt::WApplication *createApplication(const Wt::WEnvironment& env);
//==================================================================
-
//==================================================================
virtual void bbShowWindow();
//==================================================================
void bbwtProcess();
private:
-
- Wt::WApplication* bbApp;
- Wt::WContainerWidget* bbmWindow;
-
+ Wt::WApplication *bbApp;
+ Wt::WContainerWidget *bbmWindow;
};
//=================================================================
-
//=================================================================
// WxBlackBoxDescriptor declaration
class WtBlackBoxDescriptor : public WidgetBlackBoxDescriptor<Wt::WContainerWidget>