97 auto separ = str.find(
"x");
98 if ((
separ == std::string::npos) || (
separ == 0) || (
separ == str.length()-1))
return false;
121 auto separ = str.find(
",");
122 if ((
separ == std::string::npos) || (
separ == 0) || (
separ == str.length()-1))
return false;
127 x = std::stoi(str.substr(0,
separ));
128 y = std::stoi(str.substr(
separ+1));
133 if ((
x < 0) || (
y < 0))
160 std::string kind =
_kind;
162 auto pos = kind.find(
"?");
166 }
else if (pos != std::string::npos) {
171 pos = kind.find(
"size:");
172 if (pos != std::string::npos) {
173 auto epos = kind.find_first_of(
" ;", pos+5);
174 if (
epos == std::string::npos)
epos = kind.length();
176 kind.erase(pos,
epos-pos);
179 pos = kind.find(
"pos:");
180 if (pos != std::string::npos) {
181 auto epos = kind.find_first_of(
" ;", pos+4);
182 if (
epos == std::string::npos)
epos = kind.length();
184 kind.erase(pos,
epos-pos);
187 pos = kind.rfind(
"headless");
188 if ((pos != std::string::npos) && (pos == kind.length() - 8)) {
191 if ((pos > 0) && (kind[pos-1] ==
';')) kind.resize(pos-1);
195 if (kind.find(
"qt6:") == 0) {
201 while ((kind.length() > 0) && (kind[kind.length()-1] ==
' '))
202 kind.resize(kind.length()-1);
208 kind =
gROOT->GetWebDisplay().Data();
212 else if (kind ==
"native")
214 else if (kind.empty() || (kind ==
"on"))
216 else if ((kind ==
"dflt") || (kind ==
"default") || (kind ==
"browser"))
218 else if (kind ==
"firefox")
220 else if ((kind ==
"chrome") || (kind ==
"chromium"))
223 else if (kind ==
"safari")
227 else if ((kind ==
"edge") || (kind ==
"msedge"))
230 else if ((kind ==
"cef") || (kind ==
"cef3"))
232 else if ((kind ==
"qt") || (kind ==
"qt6"))
234 else if ((kind ==
"embed") || (kind ==
"embedded"))
236 else if (kind ==
"server")
238 else if (kind ==
"off")
253 case kEdge:
return "edge";
257 case kCEF:
return "cef";
258 case kQt6:
return "qt6";
259 case kLocal:
return "local";
263 case kOff:
return "off";
264 case kOn:
return "on";
266 auto pos =
fExec.find(
" ");
267 return (pos == std::string::npos) ?
fExec :
fExec.substr(0,pos);
290 if (opt.empty())
return;
308 if (
rpos == std::string::npos)
rpos =
url.length();
310 if (
url.find(
"?") != std::string::npos)
339 if ((
fExec ==
"safari") || (
fExec ==
"Safari"))
340 return "open -a Safari";
#define R__LOG_ERROR(...)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
A log configuration for a channel, e.g.
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
std::string GetBrowserName() const
Returns configured browser name.
virtual ~RWebDisplayArgs()
Destructor.
EBrowserKind GetBrowserKind() const
returns configured browser kind, see EBrowserKind for supported values
RWebDisplayArgs & SetUrlOpt(const std::string &opt)
set window url options
bool SetPosAsStr(const std::string &str)
Set position of web browser window as string like "100,100".
std::string fExec
! string to run browser, used with kCustom type
RWebDisplayArgs & SetSize(int w, int h)
set preferable web window width and height
std::string fUrlOpt
! extra URL options, which are append to window URL
const std::string & GetUrl() const
returns window url
static std::string GetQtEmbedQualifier(const void *qparent, const std::string &urlopt="", unsigned qtversion=0x60000)
Returns string which can be used as argument in RWebWindow::Show() method to display web window in pr...
void SetCustomExec(const std::string &exec)
set custom executable to start web browser
void SetMasterWindow(std::shared_ptr< RWebWindow > master, unsigned connid=0, int channel=-1)
Assign window, connection and channel id where other window will be embed.
void AppendUrlOpt(const std::string &opt)
append extra url options, add "&" as separator if required
std::string GetFullUrl() const
returns window url with append options
RWebDisplayArgs & SetBrowserKind(const std::string &kind)
Set browser kind as string argument.
std::string GetCustomExec() const
returns custom executable to start web browser
unsigned fMasterConnection
! used master connection
RWebDisplayArgs & SetPos(int x=-1, int y=-1)
set preferable web window x and y position, negative is default
int fMasterChannel
! used master channel
void SetDriverData(void *data)
[internal] set web-driver data, used to start window
std::shared_ptr< RWebWindow > fMaster
! master window
const std::string & GetUrlOpt() const
returns window url options
static std::string GetQt5EmbedQualifier(const void *qparent, const std::string &urlopt="", unsigned qtversion=0x60000)
Returns string which can be used as argument in RWebWindow::Show() method to display web window in pr...
bool SetSizeAsStr(const std::string &str)
Set size of web browser window as string like "800x600".
@ kOn
web display enable, first try use embed displays like Qt or CEF, then native browsers and at the end ...
@ kDefault
default system web browser, can not be used in batch mode
@ kFirefox
Mozilla Firefox browser.
@ kNative
either Chrome or Firefox - both support major functionality
@ kLocal
either CEF or Qt5 - both runs on local display without real http server
@ kServer
indicates that ROOT runs as server and just printouts window URL, browser should be started by the us...
@ kOff
disable web display, do not start any browser
@ kEmbedded
window will be embedded into other, no extra browser need to be started
@ kCEF
Chromium Embedded Framework - local display with CEF libs.
@ kQt6
Qt6 QWebEngine libraries - Chromium code packed in qt6.
@ kCustom
custom web browser, execution string should be provided
@ kChrome
Google Chrome browser.
@ kEdge
Microsoft Edge browser (Windows only)
void SetHeadless(bool on=true)
set headless mode
RWebDisplayArgs()
Default constructor.
ROOT::RLogChannel & WebGUILog()
Log channel for WebGUI diagnostics.