Use of bootstrap
framework together with RWebWindow class.
In webwindow.cxx RWebWindow created In dist
directory HTML files generated with bootstrap are placed One also can see usage of embed TWebCanvas in such application
std::shared_ptr<ROOT::RWebWindow> window;
int counter = 0;
void ProcessData(unsigned connid, const std::string &arg)
{
printf(
"Get msg %s \n", arg.c_str());
counter++;
if (arg == "get_text") {
} else if (arg == "get_binary") {
for (
int n = 0;
n < 10; ++
n)
window->SendBinary(connid,
arr,
sizeof(
arr));
} else if (arg == "halt") {
window->TerminateROOT();
}
}
{
auto pos = fdir.find("webwindow.cxx");
if (pos > 0)
fdir.resize(pos);
else
fdir =
gROOT->GetTutorialsDir() + std::string(
"/visualisation/webgui/webwindow/");
window->SetDefaultPage("file:" + fdir + "webwindow.html");
window->SetDataCallBack(ProcessData);
window->SetGeometry(300, 500);
window->Show();
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static std::shared_ptr< RWebWindow > Create()
Create new RWebWindow Using default RWebWindowsManager.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
- Author
- Sergey Linev
Definition in file webwindow.cxx.