Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
Definition at line 30 of file RWebDisplayArgs.hxx.
Public Types | |
enum | EBrowserKind { kChrome , kFirefox , kNative , kCEF , kQt5 , kLocal , kStandard , kEmbedded , kCustom } |
Public Member Functions | |
RWebDisplayArgs () | |
Default constructor - browser kind configured from gROOT->GetWebDisplay() | |
RWebDisplayArgs (const char *browser) | |
Constructor - browser kind specified as const char * See SetBrowserKind() method for description of allowed parameters. | |
RWebDisplayArgs (const std::string &browser) | |
Constructor - browser kind specified as std::string See SetBrowserKind() method for description of allowed parameters. | |
RWebDisplayArgs (int width, int height, int x=-1, int y=-1, const std::string &browser="") | |
Constructor - specify window width and height. | |
RWebDisplayArgs (std::shared_ptr< RWebWindow > master, int channel=-1) | |
Constructor - specify master window and channel (if reserved already) | |
virtual | ~RWebDisplayArgs () |
Destructor. | |
void | AppendUrlOpt (const std::string &opt) |
append extra url options, add "&" as separator if required | |
EBrowserKind | GetBrowserKind () const |
returns configured browser kind, see EBrowserKind for supported values | |
std::string | GetBrowserName () const |
Returns configured browser name. | |
std::string | GetCustomExec () const |
returns custom executable to start web browser | |
void * | GetDriverData () const |
[internal] returns web-driver data, used to start window | |
const std::string & | GetExtraArgs () const |
std::string | GetFullUrl () const |
returns window url with append options | |
int | GetHeight () const |
returns preferable web window height | |
THttpServer * | GetHttpServer () const |
returns http server instance, used for window display | |
const std::string & | GetPageContent () const |
returns window url | |
const std::string & | GetRedirectOutput () const |
const std::string & | GetUrl () const |
returns window url | |
const std::string & | GetUrlOpt () const |
returns window url options | |
int | GetWidth () const |
returns preferable web window width | |
int | GetX () const |
set preferable web window x position | |
int | GetY () const |
set preferable web window y position | |
bool | IsHeadless () const |
returns headless mode | |
bool | IsLocalDisplay () const |
returns true if local display like CEF or Qt5 QWebEngine should be used | |
bool | IsStandalone () const |
Return true if browser should runs in standalone mode. | |
bool | IsSupportHeadless () const |
returns true if browser supports headless (batch) mode, used for image production | |
RWebDisplayArgs & | SetBrowserKind (const std::string &kind) |
Set browser kind as string argument Recognized values: chrome - use Google Chrome web browser, supports headless mode from v60, default firefox - use Mozilla Firefox browser, supports headless mode from v57 native - (or empty string) either chrome or firefox, only these browsers support batch (headless) mode browser - default system web-browser, no batch mode safari - Safari browser on Mac cef - Chromium Embeded Framework, local display, local communication qt5 - Qt5 WebEngine, local display, local communication local - either cef or qt5 <prog> - any program name which will be started instead of default browser, like /usr/bin/opera. | |
RWebDisplayArgs & | SetBrowserKind (EBrowserKind kind) |
set browser kind, see EBrowserKind for allowed values | |
void | SetCustomExec (const std::string &exec) |
set custom executable to start web browser | |
void | SetDriverData (void *data) |
[internal] set web-driver data, used to start window | |
void | SetExtraArgs (const std::string &args) |
void | SetHeadless (bool on=true) |
set headless mode | |
RWebDisplayArgs & | SetHeight (int h=0) |
set preferable web window height | |
void | SetHttpServer (THttpServer *serv) |
set http server instance, used for window display | |
void | SetMasterWindow (std::shared_ptr< RWebWindow > master, int channel=-1) |
Assign window and channel id where other window will be embed. | |
RWebDisplayArgs & | SetPageContent (const std::string &cont) |
set window url | |
RWebDisplayArgs & | SetPos (int x=-1, int y=-1) |
void | SetRedirectOutput (const std::string &fname="") |
RWebDisplayArgs & | SetSize (int w, int h) |
void | SetStandalone (bool on=true) |
Set standalone mode for running browser, default on When disabled, normal browser window (or just tab) will be started. | |
RWebDisplayArgs & | SetUrl (const std::string &url) |
set window url | |
RWebDisplayArgs & | SetUrlOpt (const std::string &opt) |
set window url options | |
RWebDisplayArgs & | SetWidth (int w=0) |
set preferable web window width | |
RWebDisplayArgs & | SetX (int x=-1) |
set preferable web window x position, negative is default | |
RWebDisplayArgs & | SetY (int y=-1) |
set preferable web window y position, negative is default | |
Static Public Member Functions | |
static std::string | GetQt5EmbedQualifier (const void *qparent, const std::string &urlopt="") |
returns string which can be used as argument in RWebWindow::Show() method to display web window in provided QWidget After RWebWindow is displayed created QWebEngineView can be found with the command: auto view = qparent->findChild<QWebEngineView*>("RootWebView"); | |
Protected Member Functions | |
bool | SetPosAsStr (const std::string &str) |
Set position of web browser window as string like "100,100". | |
bool | SetSizeAsStr (const std::string &str) |
Set size of web browser window as string like "800x600". | |
Protected Attributes | |
void * | fDriverData {nullptr} |
! special data delivered to driver, can be used for QWebEngine | |
std::string | fExec |
! string to run browser, used with kCustom type | |
std::string | fExtraArgs |
! extra arguments which will be append to exec string | |
bool | fHeadless {false} |
! is browser runs in headless mode | |
int | fHeight {0} |
! custom window height, when not specified - used RWebWindow geometry | |
EBrowserKind | fKind {kNative} |
! id of web browser used for display | |
std::shared_ptr< RWebWindow > | fMaster |
! master window | |
int | fMasterChannel {-1} |
! used master channel | |
std::string | fPageContent |
! HTML page content | |
std::string | fRedirectOutput |
! filename where browser output should be redirected | |
THttpServer * | fServer {nullptr} |
! http server which handle all requests | |
bool | fStandalone {true} |
! indicates if browser should run isolated from other browser instances | |
std::string | fUrl |
! URL to display | |
std::string | fUrlOpt |
! extra URL options, which are append to window URL | |
int | fWidth {0} |
! custom window width, when not specified - used RWebWindow geometry | |
int | fX {-1} |
! custom window x position, negative is default | |
int | fY {-1} |
! custom window y position, negative is default | |
Friends | |
class | RWebWindow |
#include <ROOT/RWebDisplayArgs.hxx>
Enumerator | |
---|---|
kChrome | Google Chrome browser. |
kFirefox | Mozilla Firefox browser. |
kNative | either Chrome or Firefox - both support major functionality |
kCEF | Chromium Embedded Framework - local display with CEF libs. |
kQt5 | QWebEngine libraries - Chrome code packed in qt5. |
kLocal | either CEF or Qt5 - both runs on local display without real http server |
kStandard | standard system web browser, not recognized by ROOT, without batch mode |
kEmbedded | window will be embedded into other, no extra browser need to be started |
kCustom | custom web browser, execution string should be provided |
Definition at line 35 of file RWebDisplayArgs.hxx.
RWebDisplayArgs::RWebDisplayArgs | ( | ) |
Default constructor - browser kind configured from gROOT->GetWebDisplay()
Definition at line 41 of file RWebDisplayArgs.cxx.
RWebDisplayArgs::RWebDisplayArgs | ( | const std::string & | browser | ) |
Constructor - browser kind specified as std::string See SetBrowserKind() method for description of allowed parameters.
Definition at line 50 of file RWebDisplayArgs.cxx.
RWebDisplayArgs::RWebDisplayArgs | ( | const char * | browser | ) |
Constructor - browser kind specified as const char * See SetBrowserKind() method for description of allowed parameters.
Definition at line 59 of file RWebDisplayArgs.cxx.
RWebDisplayArgs::RWebDisplayArgs | ( | int | width, |
int | height, | ||
int | x = -1 , |
||
int | y = -1 , |
||
const std::string & | browser = "" |
||
) |
Constructor - specify window width and height.
Definition at line 67 of file RWebDisplayArgs.cxx.
RWebDisplayArgs::RWebDisplayArgs | ( | std::shared_ptr< RWebWindow > | master, |
int | channel = -1 |
||
) |
Constructor - specify master window and channel (if reserved already)
Definition at line 77 of file RWebDisplayArgs.cxx.
|
virtual |
Destructor.
Definition at line 86 of file RWebDisplayArgs.cxx.
void RWebDisplayArgs::AppendUrlOpt | ( | const std::string & | opt | ) |
append extra url options, add "&" as separator if required
Append string to url options Add "&" as separator if any options already exists.
Definition at line 253 of file RWebDisplayArgs.cxx.
|
inline |
returns configured browser kind, see EBrowserKind for supported values
Definition at line 87 of file RWebDisplayArgs.hxx.
std::string RWebDisplayArgs::GetBrowserName | ( | ) | const |
Returns configured browser name.
Definition at line 220 of file RWebDisplayArgs.cxx.
std::string RWebDisplayArgs::GetCustomExec | ( | ) | const |
returns custom executable to start web browser
Definition at line 298 of file RWebDisplayArgs.cxx.
|
inline |
[internal] returns web-driver data, used to start window
Definition at line 176 of file RWebDisplayArgs.hxx.
|
inline |
Definition at line 158 of file RWebDisplayArgs.hxx.
std::string RWebDisplayArgs::GetFullUrl | ( | ) | const |
returns window url with append options
Returns full url, which is combined from URL and extra URL options Takes into account "#" symbol in url - options are inserted before that symbol.
Definition at line 267 of file RWebDisplayArgs.cxx.
|
inline |
returns preferable web window height
Definition at line 151 of file RWebDisplayArgs.hxx.
|
inline |
returns http server instance, used for window display
Definition at line 171 of file RWebDisplayArgs.hxx.
|
inline |
returns window url
Definition at line 112 of file RWebDisplayArgs.hxx.
|
static |
returns string which can be used as argument in RWebWindow::Show() method to display web window in provided QWidget After RWebWindow is displayed created QWebEngineView can be found with the command: auto view = qparent->findChild<QWebEngineView*>("RootWebView");
Definition at line 317 of file RWebDisplayArgs.cxx.
|
inline |
Definition at line 161 of file RWebDisplayArgs.hxx.
|
inline |
returns window url
Definition at line 107 of file RWebDisplayArgs.hxx.
|
inline |
returns window url options
Definition at line 123 of file RWebDisplayArgs.hxx.
|
inline |
returns preferable web window width
Definition at line 149 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window x position
Definition at line 153 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window y position
Definition at line 155 of file RWebDisplayArgs.hxx.
|
inline |
returns headless mode
Definition at line 134 of file RWebDisplayArgs.hxx.
|
inline |
returns true if local display like CEF or Qt5 QWebEngine should be used
Definition at line 93 of file RWebDisplayArgs.hxx.
|
inline |
Return true if browser should runs in standalone mode.
Definition at line 118 of file RWebDisplayArgs.hxx.
|
inline |
returns true if browser supports headless (batch) mode, used for image production
Definition at line 99 of file RWebDisplayArgs.hxx.
RWebDisplayArgs & RWebDisplayArgs::SetBrowserKind | ( | const std::string & | kind | ) |
Set browser kind as string argument Recognized values: chrome - use Google Chrome web browser, supports headless mode from v60, default firefox - use Mozilla Firefox browser, supports headless mode from v57 native - (or empty string) either chrome or firefox, only these browsers support batch (headless) mode browser - default system web-browser, no batch mode safari - Safari browser on Mac cef - Chromium Embeded Framework, local display, local communication qt5 - Qt5 WebEngine, local display, local communication local - either cef or qt5 <prog> - any program name which will be started instead of default browser, like /usr/bin/opera.
Definition at line 152 of file RWebDisplayArgs.cxx.
|
inline |
set browser kind, see EBrowserKind for allowed values
Definition at line 85 of file RWebDisplayArgs.hxx.
void RWebDisplayArgs::SetCustomExec | ( | const std::string & | exec | ) |
set custom executable to start web browser
Configure custom web browser Either just name of browser which can be used like "opera" or full execution string which must includes $url like "/usr/bin/opera $url".
Definition at line 289 of file RWebDisplayArgs.cxx.
[internal] set web-driver data, used to start window
Definition at line 174 of file RWebDisplayArgs.hxx.
|
inline |
Definition at line 157 of file RWebDisplayArgs.hxx.
set headless mode
Definition at line 132 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window height
Definition at line 139 of file RWebDisplayArgs.hxx.
|
inline |
set http server instance, used for window display
Definition at line 169 of file RWebDisplayArgs.hxx.
void RWebDisplayArgs::SetMasterWindow | ( | std::shared_ptr< RWebWindow > | master, |
int | channel = -1 |
||
) |
Assign window and channel id where other window will be embed.
Definition at line 242 of file RWebDisplayArgs.cxx.
|
inline |
set window url
Definition at line 110 of file RWebDisplayArgs.hxx.
|
inline |
Definition at line 146 of file RWebDisplayArgs.hxx.
|
protected |
Set position of web browser window as string like "100,100".
Definition at line 118 of file RWebDisplayArgs.cxx.
|
inline |
Definition at line 160 of file RWebDisplayArgs.hxx.
|
inline |
Definition at line 140 of file RWebDisplayArgs.hxx.
|
protected |
Set size of web browser window as string like "800x600".
Definition at line 94 of file RWebDisplayArgs.cxx.
Set standalone mode for running browser, default on When disabled, normal browser window (or just tab) will be started.
Definition at line 116 of file RWebDisplayArgs.hxx.
|
inline |
set window url
Definition at line 105 of file RWebDisplayArgs.hxx.
|
inline |
set window url options
Definition at line 121 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window width
Definition at line 137 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window x position, negative is default
Definition at line 143 of file RWebDisplayArgs.hxx.
|
inline |
set preferable web window y position, negative is default
Definition at line 145 of file RWebDisplayArgs.hxx.
|
friend |
Definition at line 32 of file RWebDisplayArgs.hxx.
|
protected |
! special data delivered to driver, can be used for QWebEngine
Definition at line 62 of file RWebDisplayArgs.hxx.
|
protected |
! string to run browser, used with kCustom type
Definition at line 61 of file RWebDisplayArgs.hxx.
|
protected |
! extra arguments which will be append to exec string
Definition at line 50 of file RWebDisplayArgs.hxx.
|
protected |
! is browser runs in headless mode
Definition at line 53 of file RWebDisplayArgs.hxx.
|
protected |
! custom window height, when not specified - used RWebWindow geometry
Definition at line 57 of file RWebDisplayArgs.hxx.
|
protected |
! id of web browser used for display
Definition at line 48 of file RWebDisplayArgs.hxx.
|
protected |
! master window
Definition at line 64 of file RWebDisplayArgs.hxx.
|
protected |
! used master channel
Definition at line 65 of file RWebDisplayArgs.hxx.
|
protected |
! HTML page content
Definition at line 51 of file RWebDisplayArgs.hxx.
|
protected |
! filename where browser output should be redirected
Definition at line 52 of file RWebDisplayArgs.hxx.
|
protected |
! http server which handle all requests
Definition at line 55 of file RWebDisplayArgs.hxx.
|
protected |
! indicates if browser should run isolated from other browser instances
Definition at line 54 of file RWebDisplayArgs.hxx.
|
protected |
! URL to display
Definition at line 49 of file RWebDisplayArgs.hxx.
|
protected |
! extra URL options, which are append to window URL
Definition at line 60 of file RWebDisplayArgs.hxx.
|
protected |
! custom window width, when not specified - used RWebWindow geometry
Definition at line 56 of file RWebDisplayArgs.hxx.
|
protected |
! custom window x position, negative is default
Definition at line 58 of file RWebDisplayArgs.hxx.
|
protected |
! custom window y position, negative is default
Definition at line 59 of file RWebDisplayArgs.hxx.