15std::shared_ptr<ROOT::RWebWindow> window;
19void ProcessData(
unsigned connid,
const std::string &arg)
21 printf(
"Get msg %s \n", arg.c_str());
25 if (arg ==
"get_text") {
28 }
else if (arg ==
"get_binary") {
31 for (
int n = 0;
n < 10; ++
n)
33 window->SendBinary(connid, arr,
sizeof(arr));
34 }
else if (arg ==
"halt") {
36 window->TerminateROOT();
47 std::string fdir = __FILE__;
48 auto pos = fdir.find(
"webwindow.cxx");
52 fdir =
gROOT->GetTutorialsDir() + std::string(
"/webgui/webwindow/");
53 window->SetDefaultPage(
"file:" + fdir +
"webwindow.html");
56 window->SetDataCallBack(ProcessData);
58 window->SetGeometry(300, 500);
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.