42 SetBrowserKind(browser);
51 SetBrowserKind(browser);
59 SetSize(
width, height);
61 SetBrowserKind(browser);
69 SetMasterWindow(master, channel);
97 std::string kind = _kind;
99 auto pos = kind.find(
"?");
101 SetUrlOpt(kind.substr(1));
106 kind =
gROOT->GetWebDisplay().Data();
109 SetBrowserKind(kLocal);
110 else if (kind.empty() || (kind ==
"native"))
111 SetBrowserKind(kNative);
112 else if (kind ==
"firefox")
113 SetBrowserKind(kFirefox);
114 else if ((kind ==
"chrome") || (kind ==
"chromium"))
115 SetBrowserKind(kChrome);
116 else if ((kind ==
"cef") || (kind ==
"cef3"))
117 SetBrowserKind(kCEF);
118 else if ((kind ==
"qt") || (kind ==
"qt5"))
119 SetBrowserKind(kQt5);
120 else if ((kind ==
"embed") || (kind ==
"embedded"))
121 SetBrowserKind(kEmbedded);
133 switch (GetBrowserKind()) {
134 case kChrome:
return "chrome";
135 case kFirefox:
return "firefox";
136 case kNative:
return "native";
137 case kCEF:
return "cef";
138 case kQt5:
return "qt5";
139 case kLocal:
return "local";
140 case kStandard:
return "default";
141 case kEmbedded:
return "embed";
143 auto pos = fExec.find(
" ");
144 return (pos == std::string::npos) ? fExec : fExec.substr(0,pos);
155 SetBrowserKind(kEmbedded);
157 fMasterChannel = channel;
166 if (opt.empty())
return;
168 if (!fUrlOpt.empty())
180 std::string url = GetUrl(), urlopt = GetUrlOpt();
181 if (url.empty() || urlopt.empty())
return url;
183 auto rpos = url.find(
"#");
184 if (rpos == std::string::npos) rpos = url.length();
186 if (url.find(
"?") != std::string::npos)
187 url.insert(rpos,
"&");
189 url.insert(rpos,
"?");
190 url.insert(rpos+1, urlopt);
202 SetBrowserKind(kCustom);
211 if (GetBrowserKind() != kCustom)
215 if ((fExec ==
"safari") || (fExec ==
"Safari"))
216 return "open -a Safari";
include TDocParser_001 C image html pict1_TDocParser_001 png width
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
std::string GetCustomExec() const
returns custom executable to start web browser
RWebDisplayArgs & SetBrowserKind(const std::string &kind)
Set browser kind as string argument Recognized values: chrome - use Google Chrome web browser,...
std::string GetFullUrl() const
returns window url with append options
std::string GetBrowserName() const
Returns configured browser name.
void SetCustomExec(const std::string &exec)
set custom executable to start web browser
virtual ~RWebDisplayArgs()
Destructor.
void AppendUrlOpt(const std::string &opt)
append extra url options, add "&" as separator if required
void SetMasterWindow(std::shared_ptr< RWebWindow > master, int channel=-1)
Assign window and channel id where other window will be embed.
RWebDisplayArgs()
Default constructor - browser kind configured from gROOT->GetWebDisplay()