Logo ROOT  
Reference Guide
ROOT::Experimental::RWebDisplayArgs Class Reference

Holds different arguments for starting browser with RWebDisplayHandle::Display() method.

Definition at line 29 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() More...
 
 RWebDisplayArgs (const char *browser)
 Constructor - browser kind specified as const char * See SetBrowserKind() method for description of allowed parameters. More...
 
 RWebDisplayArgs (const std::string &browser)
 Constructor - browser kind specified as std::string See SetBrowserKind() method for description of allowed parameters. More...
 
 RWebDisplayArgs (int width, int height, int x=-1, int y=-1, const std::string &browser="")
 Constructor - specify window width and height. More...
 
 RWebDisplayArgs (std::shared_ptr< RWebWindow > master, int channel=-1)
 Constructor - specify master window and channel (if reserved already) More...
 
virtual ~RWebDisplayArgs ()
 Destructor. More...
 
void AppendUrlOpt (const std::string &opt)
 append extra url options, add "&" as separator if required More...
 
EBrowserKind GetBrowserKind () const
 returns configured browser kind, see EBrowserKind for supported values More...
 
std::string GetBrowserName () const
 Returns configured browser name. More...
 
std::string GetCustomExec () const
 returns custom executable to start web browser More...
 
voidGetDriverData () const
 [internal] returns web-driver data, used to start window More...
 
const std::string & GetExtraArgs () const
 
std::string GetFullUrl () const
 returns window url with append options More...
 
int GetHeight () const
 returns preferable web window height More...
 
THttpServerGetHttpServer () const
 returns http server instance, used for window display More...
 
const std::string & GetRedirectOutput () const
 
std::string GetUrl () const
 returns window url More...
 
std::string GetUrlOpt () const
 returns window url options More...
 
int GetWidth () const
 returns preferable web window width More...
 
int GetX () const
 set preferable web window x position More...
 
int GetY () const
 set preferable web window y position More...
 
bool IsHeadless () const
 returns headless mode More...
 
bool IsLocalDisplay () const
 returns true if local display like CEF or Qt5 QWebEngine should be used More...
 
bool IsStandalone () const
 Return true if browser should runs in standalone mode. More...
 
bool IsSupportHeadless () const
 returns true if browser supports headless mode More...
 
RWebDisplayArgsSetBrowserKind (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. More...
 
RWebDisplayArgsSetBrowserKind (EBrowserKind kind)
 set browser kind, see EBrowserKind for allowed values More...
 
void SetCustomExec (const std::string &exec)
 set custom executable to start web browser More...
 
void SetDriverData (void *data)
 [internal] set web-driver data, used to start window More...
 
void SetExtraArgs (const std::string &args)
 
void SetHeadless (bool on=true)
 set headless mode More...
 
RWebDisplayArgsSetHeight (int h=0)
 set preferable web window height More...
 
void SetHttpServer (THttpServer *serv)
 set http server instance, used for window display More...
 
void SetMasterWindow (std::shared_ptr< RWebWindow > master, int channel=-1)
 Assign window and channel id where other window will be embed. More...
 
RWebDisplayArgsSetPos (int x=-1, int y=-1)
 
void SetRedirectOutput (const std::string &fname="")
 
RWebDisplayArgsSetSize (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. More...
 
RWebDisplayArgsSetUrl (const std::string &url)
 set window url More...
 
RWebDisplayArgsSetUrlOpt (const std::string &opt)
 set window url options More...
 
RWebDisplayArgsSetWidth (int w=0)
 set preferable web window width More...
 
RWebDisplayArgsSetX (int x=-1)
 set preferable web window x position, negative is default More...
 
RWebDisplayArgsSetY (int y=-1)
 set preferable web window y position, negative is default More...
 

Protected Member Functions

bool SetPosAsStr (const std::string &str)
 Set position of web browser window as string like "100,100". More...
 
bool SetSizeAsStr (const std::string &str)
 Set size of web browser window as string like "800x600". More...
 

Protected Attributes

voidfDriverData {nullptr}
 ! special data delivered to driver, can be used for QWebEngine More...
 
std::string fExec
 ! string to run browser, used with kCustom type More...
 
std::string fExtraArgs
 ! extra arguments which will be append to exec string More...
 
bool fHeadless {false}
 ! is browser runs in headless mode More...
 
int fHeight {0}
 ! custom window height, when not specified - used RWebWindow geometry More...
 
EBrowserKind fKind {kNative}
 ! id of web browser used for display More...
 
std::shared_ptr< RWebWindowfMaster
 ! master window More...
 
int fMasterChannel {-1}
 ! used master channel More...
 
std::string fRedirectOutput
 ! filename where browser output should be redirected More...
 
THttpServerfServer {nullptr}
 ! http server which handle all requests More...
 
bool fStandalone {true}
 ! indicates if browser should run isolated from other browser instances More...
 
std::string fUrl
 ! URL to display More...
 
std::string fUrlOpt
 ! extra URL options, which are append to window URL More...
 
int fWidth {0}
 ! custom window width, when not specified - used RWebWindow geometry More...
 
int fX {-1}
 ! custom window x position, negative is default More...
 
int fY {-1}
 ! custom window y position, negative is default More...
 

Friends

class RWebWindow
 

#include <ROOT/RWebDisplayArgs.hxx>

Member Enumeration Documentation

◆ EBrowserKind

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 34 of file RWebDisplayArgs.hxx.

Constructor & Destructor Documentation

◆ RWebDisplayArgs() [1/5]

ROOT::Experimental::RWebDisplayArgs::RWebDisplayArgs ( )

Default constructor - browser kind configured from gROOT->GetWebDisplay()

Definition at line 31 of file RWebDisplayArgs.cxx.

◆ RWebDisplayArgs() [2/5]

ROOT::Experimental::RWebDisplayArgs::RWebDisplayArgs ( const std::string &  browser)

Constructor - browser kind specified as std::string See SetBrowserKind() method for description of allowed parameters.

Definition at line 40 of file RWebDisplayArgs.cxx.

◆ RWebDisplayArgs() [3/5]

ROOT::Experimental::RWebDisplayArgs::RWebDisplayArgs ( const char *  browser)

Constructor - browser kind specified as const char * See SetBrowserKind() method for description of allowed parameters.

Definition at line 49 of file RWebDisplayArgs.cxx.

◆ RWebDisplayArgs() [4/5]

ROOT::Experimental::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 57 of file RWebDisplayArgs.cxx.

◆ RWebDisplayArgs() [5/5]

ROOT::Experimental::RWebDisplayArgs::RWebDisplayArgs ( std::shared_ptr< RWebWindow master,
int  channel = -1 
)

Constructor - specify master window and channel (if reserved already)

Definition at line 67 of file RWebDisplayArgs.cxx.

◆ ~RWebDisplayArgs()

ROOT::Experimental::RWebDisplayArgs::~RWebDisplayArgs ( )
virtual

Destructor.

Definition at line 76 of file RWebDisplayArgs.cxx.

Member Function Documentation

◆ AppendUrlOpt()

void ROOT::Experimental::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 234 of file RWebDisplayArgs.cxx.

◆ GetBrowserKind()

EBrowserKind ROOT::Experimental::RWebDisplayArgs::GetBrowserKind ( ) const
inline

returns configured browser kind, see EBrowserKind for supported values

Definition at line 85 of file RWebDisplayArgs.hxx.

◆ GetBrowserName()

std::string ROOT::Experimental::RWebDisplayArgs::GetBrowserName ( ) const

Returns configured browser name.

Definition at line 201 of file RWebDisplayArgs.cxx.

◆ GetCustomExec()

std::string ROOT::Experimental::RWebDisplayArgs::GetCustomExec ( ) const

returns custom executable to start web browser

Definition at line 279 of file RWebDisplayArgs.cxx.

◆ GetDriverData()

void * ROOT::Experimental::RWebDisplayArgs::GetDriverData ( ) const
inline

[internal] returns web-driver data, used to start window

Definition at line 169 of file RWebDisplayArgs.hxx.

◆ GetExtraArgs()

const std::string & ROOT::Experimental::RWebDisplayArgs::GetExtraArgs ( ) const
inline

Definition at line 151 of file RWebDisplayArgs.hxx.

◆ GetFullUrl()

std::string ROOT::Experimental::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 248 of file RWebDisplayArgs.cxx.

◆ GetHeight()

int ROOT::Experimental::RWebDisplayArgs::GetHeight ( ) const
inline

returns preferable web window height

Definition at line 144 of file RWebDisplayArgs.hxx.

◆ GetHttpServer()

THttpServer * ROOT::Experimental::RWebDisplayArgs::GetHttpServer ( ) const
inline

returns http server instance, used for window display

Definition at line 164 of file RWebDisplayArgs.hxx.

◆ GetRedirectOutput()

const std::string & ROOT::Experimental::RWebDisplayArgs::GetRedirectOutput ( ) const
inline

Definition at line 154 of file RWebDisplayArgs.hxx.

◆ GetUrl()

std::string ROOT::Experimental::RWebDisplayArgs::GetUrl ( ) const
inline

returns window url

Definition at line 105 of file RWebDisplayArgs.hxx.

◆ GetUrlOpt()

std::string ROOT::Experimental::RWebDisplayArgs::GetUrlOpt ( ) const
inline

returns window url options

Definition at line 116 of file RWebDisplayArgs.hxx.

◆ GetWidth()

int ROOT::Experimental::RWebDisplayArgs::GetWidth ( ) const
inline

returns preferable web window width

Definition at line 142 of file RWebDisplayArgs.hxx.

◆ GetX()

int ROOT::Experimental::RWebDisplayArgs::GetX ( ) const
inline

set preferable web window x position

Definition at line 146 of file RWebDisplayArgs.hxx.

◆ GetY()

int ROOT::Experimental::RWebDisplayArgs::GetY ( ) const
inline

set preferable web window y position

Definition at line 148 of file RWebDisplayArgs.hxx.

◆ IsHeadless()

bool ROOT::Experimental::RWebDisplayArgs::IsHeadless ( ) const
inline

returns headless mode

Definition at line 127 of file RWebDisplayArgs.hxx.

◆ IsLocalDisplay()

bool ROOT::Experimental::RWebDisplayArgs::IsLocalDisplay ( ) const
inline

returns true if local display like CEF or Qt5 QWebEngine should be used

Definition at line 91 of file RWebDisplayArgs.hxx.

◆ IsStandalone()

bool ROOT::Experimental::RWebDisplayArgs::IsStandalone ( ) const
inline

Return true if browser should runs in standalone mode.

Definition at line 111 of file RWebDisplayArgs.hxx.

◆ IsSupportHeadless()

bool ROOT::Experimental::RWebDisplayArgs::IsSupportHeadless ( ) const
inline

returns true if browser supports headless mode

Definition at line 97 of file RWebDisplayArgs.hxx.

◆ SetBrowserKind() [1/2]

ROOT::Experimental::RWebDisplayArgs & ROOT::Experimental::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 142 of file RWebDisplayArgs.cxx.

◆ SetBrowserKind() [2/2]

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetBrowserKind ( EBrowserKind  kind)
inline

set browser kind, see EBrowserKind for allowed values

Definition at line 83 of file RWebDisplayArgs.hxx.

◆ SetCustomExec()

void ROOT::Experimental::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 270 of file RWebDisplayArgs.cxx.

◆ SetDriverData()

void ROOT::Experimental::RWebDisplayArgs::SetDriverData ( void data)
inline

[internal] set web-driver data, used to start window

Definition at line 167 of file RWebDisplayArgs.hxx.

◆ SetExtraArgs()

void ROOT::Experimental::RWebDisplayArgs::SetExtraArgs ( const std::string &  args)
inline

Definition at line 150 of file RWebDisplayArgs.hxx.

◆ SetHeadless()

void ROOT::Experimental::RWebDisplayArgs::SetHeadless ( bool  on = true)
inline

set headless mode

Definition at line 125 of file RWebDisplayArgs.hxx.

◆ SetHeight()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetHeight ( int  h = 0)
inline

set preferable web window height

Definition at line 132 of file RWebDisplayArgs.hxx.

◆ SetHttpServer()

void ROOT::Experimental::RWebDisplayArgs::SetHttpServer ( THttpServer serv)
inline

set http server instance, used for window display

Definition at line 162 of file RWebDisplayArgs.hxx.

◆ SetMasterWindow()

void ROOT::Experimental::RWebDisplayArgs::SetMasterWindow ( std::shared_ptr< RWebWindow master,
int  channel = -1 
)

Assign window and channel id where other window will be embed.

Definition at line 223 of file RWebDisplayArgs.cxx.

◆ SetPos()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetPos ( int  x = -1,
int  y = -1 
)
inline

Definition at line 139 of file RWebDisplayArgs.hxx.

◆ SetPosAsStr()

bool ROOT::Experimental::RWebDisplayArgs::SetPosAsStr ( const std::string &  str)
protected

Set position of web browser window as string like "100,100".

Definition at line 108 of file RWebDisplayArgs.cxx.

◆ SetRedirectOutput()

void ROOT::Experimental::RWebDisplayArgs::SetRedirectOutput ( const std::string &  fname = "")
inline

Definition at line 153 of file RWebDisplayArgs.hxx.

◆ SetSize()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetSize ( int  w,
int  h 
)
inline

Definition at line 133 of file RWebDisplayArgs.hxx.

◆ SetSizeAsStr()

bool ROOT::Experimental::RWebDisplayArgs::SetSizeAsStr ( const std::string &  str)
protected

Set size of web browser window as string like "800x600".

Definition at line 84 of file RWebDisplayArgs.cxx.

◆ SetStandalone()

void ROOT::Experimental::RWebDisplayArgs::SetStandalone ( bool  on = true)
inline

Set standalone mode for running browser, default on When disabled, normal browser window (or just tab) will be started.

Definition at line 109 of file RWebDisplayArgs.hxx.

◆ SetUrl()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetUrl ( const std::string &  url)
inline

set window url

Definition at line 103 of file RWebDisplayArgs.hxx.

◆ SetUrlOpt()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetUrlOpt ( const std::string &  opt)
inline

set window url options

Definition at line 114 of file RWebDisplayArgs.hxx.

◆ SetWidth()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetWidth ( int  w = 0)
inline

set preferable web window width

Definition at line 130 of file RWebDisplayArgs.hxx.

◆ SetX()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetX ( int  x = -1)
inline

set preferable web window x position, negative is default

Definition at line 136 of file RWebDisplayArgs.hxx.

◆ SetY()

RWebDisplayArgs & ROOT::Experimental::RWebDisplayArgs::SetY ( int  y = -1)
inline

set preferable web window y position, negative is default

Definition at line 138 of file RWebDisplayArgs.hxx.

Friends And Related Function Documentation

◆ RWebWindow

friend class RWebWindow
friend

Definition at line 31 of file RWebDisplayArgs.hxx.

Member Data Documentation

◆ fDriverData

void* ROOT::Experimental::RWebDisplayArgs::fDriverData {nullptr}
protected

! special data delivered to driver, can be used for QWebEngine

Definition at line 60 of file RWebDisplayArgs.hxx.

◆ fExec

std::string ROOT::Experimental::RWebDisplayArgs::fExec
protected

! string to run browser, used with kCustom type

Definition at line 59 of file RWebDisplayArgs.hxx.

◆ fExtraArgs

std::string ROOT::Experimental::RWebDisplayArgs::fExtraArgs
protected

! extra arguments which will be append to exec string

Definition at line 49 of file RWebDisplayArgs.hxx.

◆ fHeadless

bool ROOT::Experimental::RWebDisplayArgs::fHeadless {false}
protected

! is browser runs in headless mode

Definition at line 51 of file RWebDisplayArgs.hxx.

◆ fHeight

int ROOT::Experimental::RWebDisplayArgs::fHeight {0}
protected

! custom window height, when not specified - used RWebWindow geometry

Definition at line 55 of file RWebDisplayArgs.hxx.

◆ fKind

EBrowserKind ROOT::Experimental::RWebDisplayArgs::fKind {kNative}
protected

! id of web browser used for display

Definition at line 47 of file RWebDisplayArgs.hxx.

◆ fMaster

std::shared_ptr<RWebWindow> ROOT::Experimental::RWebDisplayArgs::fMaster
protected

! master window

Definition at line 62 of file RWebDisplayArgs.hxx.

◆ fMasterChannel

int ROOT::Experimental::RWebDisplayArgs::fMasterChannel {-1}
protected

! used master channel

Definition at line 63 of file RWebDisplayArgs.hxx.

◆ fRedirectOutput

std::string ROOT::Experimental::RWebDisplayArgs::fRedirectOutput
protected

! filename where browser output should be redirected

Definition at line 50 of file RWebDisplayArgs.hxx.

◆ fServer

THttpServer* ROOT::Experimental::RWebDisplayArgs::fServer {nullptr}
protected

! http server which handle all requests

Definition at line 53 of file RWebDisplayArgs.hxx.

◆ fStandalone

bool ROOT::Experimental::RWebDisplayArgs::fStandalone {true}
protected

! indicates if browser should run isolated from other browser instances

Definition at line 52 of file RWebDisplayArgs.hxx.

◆ fUrl

std::string ROOT::Experimental::RWebDisplayArgs::fUrl
protected

! URL to display

Definition at line 48 of file RWebDisplayArgs.hxx.

◆ fUrlOpt

std::string ROOT::Experimental::RWebDisplayArgs::fUrlOpt
protected

! extra URL options, which are append to window URL

Definition at line 58 of file RWebDisplayArgs.hxx.

◆ fWidth

int ROOT::Experimental::RWebDisplayArgs::fWidth {0}
protected

! custom window width, when not specified - used RWebWindow geometry

Definition at line 54 of file RWebDisplayArgs.hxx.

◆ fX

int ROOT::Experimental::RWebDisplayArgs::fX {-1}
protected

! custom window x position, negative is default

Definition at line 56 of file RWebDisplayArgs.hxx.

◆ fY

int ROOT::Experimental::RWebDisplayArgs::fY {-1}
protected

! custom window y position, negative is default

Definition at line 57 of file RWebDisplayArgs.hxx.

Libraries for ROOT::Experimental::RWebDisplayArgs:
[legend]

The documentation for this class was generated from the following files: