49 Int_t *argc,
char **argv)
64 static bool show_warn =
true;
65 if (!show_warn ||
gROOT->IsWebDisplay())
return;
69 "ROOT comes with a web-based canvas, which is now being started. \n"
70 "Revert to the legacy canvas by setting \"Canvas.Name: TRootCanvas\" in rootrc file or\n"
71 "by starting \"root --web=off\".\n"
72 "Find more info on https://root.cern/for_developers/root7/#twebcanvas\n";
83 if ((canvName ==
"TWebCanvas") && !
gROOT->IsWebDisplay()) {
84 printf(
"\nWARNING!\n");
85 printf(
"rootrc parameter \"Canvas.Name\" with web canvas disabled for security reason.\n");
86 printf(
"See https://root.cern/about/security/#2023-11-26-open-port-for-control-of-web-gui-allows-read-and-write-access-to-file-system for more information.\n");
87 printf(
"For environments controlling the security issues you can enable web display by calling\n");
88 printf(
"gROOT->SetWebDisplay(); in ROOT prompt or in startup scripts\n\n");
90 canvName =
"TRootCanvas";
93 if (canvName ==
"TWebCanvas") {
94 auto ph =
gROOT->GetPluginManager()->FindHandler(
"TCanvasImp",
"TWebCanvas");
96 if (ph && ph->LoadPlugin() != -1) {
114 if ((canvName ==
"TWebCanvas") && !
gROOT->IsWebDisplay()) {
115 printf(
"\nWARNING!\n");
116 printf(
"rootrc parameter \"Canvas.Name\" with web canvas disabled for security reason.\n");
117 printf(
"See https://root.cern/about/security/#2023-11-26-open-port-for-control-of-web-gui-allows-read-and-write-access-to-file-system for more information.\n");
118 printf(
"For environments controlling the security issues you can enable web display by calling\n");
119 printf(
"gROOT->SetWebDisplay(); in ROOT prompt or in startup scripts\n\n");
121 canvName =
"TRootCanvas";
124 if (canvName ==
"TWebCanvas") {
125 auto ph =
gROOT->GetPluginManager()->FindHandler(
"TCanvasImp",
"TWebCanvas");
127 if (ph && ph->LoadPlugin() != -1) {
146 if ((browserVersion ==
"ROOT::RWebBrowserImp") && !
gROOT->IsWebDisplay()) {
147 printf(
"\nWARNING!\n");
148 printf(
"rootrc parameter \"Browser.Name\" with web browser disabled for security reasons.\n");
149 printf(
"See https://root.cern/about/security/#2023-11-26-open-port-for-control-of-web-gui-allows-read-and-write-access-to-file-system for more information.\n");
150 printf(
"For environments controlling the security issues you can enable web display by calling\n");
151 printf(
"gROOT->SetWebDisplay(); in ROOT prompt or in startup scripts\n\n");
153 browserVersion =
"TRootBrowser";
159 if (opt && strlen(opt))
160 browserOptions = opt;
162 if (browserOptions.
Contains(
"LITE"))
184 if ((browserVersion ==
"ROOT::RWebBrowserImp") && !
gROOT->IsWebDisplay()) {
185 printf(
"\nWARNING!\n");
186 printf(
"rootrc parameter \"Browser.Name\" with web browser disabled for security reasons.\n");
187 printf(
"See https://root.cern/about/security/#2023-11-26-open-port-for-control-of-web-gui-allows-read-and-write-access-to-file-system for more information.\n");
188 printf(
"For environments controlling the security issues you can enable web display by calling\n");
189 printf(
"gROOT->SetWebDisplay(); in ROOT prompt or in startup scripts\n\n");
191 browserVersion =
"TRootBrowser";
197 if (opt && strlen(opt))
198 browserOptions = opt;
200 if (browserOptions.
Contains(
"LITE"))
217 const char *
name,
const char *)
227 if (
gROOT->IsWebDisplay())
239 if (
gROOT->IsWebDisplay())
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
ABC describing GUI independent application implementation protocol.
ABC describing GUI independent browser implementation protocol.
Using a TBrowser one can browse all ROOT objects.
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
ABC describing GUI independent control bar.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
This ABC is a factory for GUI components.
virtual TControlBarImp * CreateControlBarImp(TControlBar *c, const char *title)
Create a batch version of TControlBarImp.
Longptr_t ExecPlugin(int nargs)
Int_t LoadPlugin()
Load the plugin library for this handler.
This class create the ROOT native GUI version of the ROOT application environment.
TGClient * Client() const
This class creates a ROOT object browser (looking like Windows Explorer).
This class creates a ROOT object browser, constituted by three main tabs.
This class creates a main window with menubar, scrollbars and a drawing area.
This class provides an interface to the GUI dependent functions of the TControlBar class.
This class is a factory for ROOT GUI components.
TCanvasImp * CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height) override
Create a ROOT native GUI version of TCanvasImp.
void ShowWebCanvasWarning()
Show warning that TWebCanvas will be started by default.
TControlBarImp * CreateControlBarImp(TControlBar *c, const char *title) override
Create a ROOT native GUI version of TControlBarImp.
TRootGuiFactory(const char *name="Root", const char *title="ROOT GUI Factory")
TRootGuiFactory ctor.
TApplicationImp * CreateApplicationImp(const char *classname, int *argc, char **argv) override
Create a ROOT native GUI version of TApplicationImp.
TContextMenuImp * CreateContextMenuImp(TContextMenu *c, const char *name, const char *title) override
Create a ROOT native GUI version of TContextMenuImp.
TBrowserImp * CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt="") override
Create a ROOT native GUI version of TBrowserImp.
const char * Data() const
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const