Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RWebDisplayHandle Class Reference

Definition at line 25 of file RWebDisplayHandle.hxx.

Classes

class  BrowserCreator
 
class  ChromeCreator
 
class  Creator
 !< page content More...
 
class  FirefoxCreator
 

Public Member Functions

 RWebDisplayHandle (const std::string &url)
 
virtual ~RWebDisplayHandle ()=default
 
const std::string & GetContent () const
 
const std::string & GetUrl () const
 
void SetContent (const std::string &cont)
 

Static Public Member Functions

static std::unique_ptr< RWebDisplayHandleDisplay (const RWebDisplayArgs &args)
 Create web display.
 
static bool DisplayUrl (const std::string &url)
 Display provided url in configured web browser.
 
static bool ProduceImage (const std::string &fname, const std::string &json, int width=800, int height=600)
 Produce image file using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome.
 

Static Protected Member Functions

static std::unique_ptr< Creator > & FindCreator (const std::string &name, const std::string &libname="")
 Search for specific browser creator If not found, try to add one.
 
static std::map< std::string, std::unique_ptr< Creator > > & GetMap ()
 Static holder of registered creators of web displays.
 

Private Attributes

std::string fContent
 !< URL used to launch display
 
std::string fUrl
 

#include <ROOT/RWebDisplayHandle.hxx>

Inheritance diagram for ROOT::Experimental::RWebDisplayHandle:
[legend]

Constructor & Destructor Documentation

◆ RWebDisplayHandle()

ROOT::Experimental::RWebDisplayHandle::RWebDisplayHandle ( const std::string &  url)
inline

Definition at line 82 of file RWebDisplayHandle.hxx.

◆ ~RWebDisplayHandle()

virtual ROOT::Experimental::RWebDisplayHandle::~RWebDisplayHandle ( )
virtualdefault

Member Function Documentation

◆ Display()

std::unique_ptr< RWebDisplayHandle > RWebDisplayHandle::Display ( const RWebDisplayArgs args)
static

Create web display.

Parameters
args- defines where and how to display web window Returns RWebDisplayHandle, which holds information of running browser application Can be used fully independent from RWebWindow classes just to show any web page

Definition at line 510 of file RWebDisplayHandle.cxx.

◆ DisplayUrl()

bool RWebDisplayHandle::DisplayUrl ( const std::string &  url)
static

Display provided url in configured web browser.

Parameters
url- specified URL address like https://root.cern Browser can specified when starting root --web=firefox Returns true when browser started It is convenience method, equivalent to:
args.SetUrl(url);
args.SetStandalone(false);
auto handle = RWebDisplayHandle::Display(args);
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
RWebDisplayArgs & SetUrl(const std::string &url)
set window url
void SetStandalone(bool on=true)
Set standalone mode for running browser, default on When disabled, normal browser window (or just tab...
static std::unique_ptr< RWebDisplayHandle > Display(const RWebDisplayArgs &args)
Create web display.

Definition at line 574 of file RWebDisplayHandle.cxx.

◆ FindCreator()

std::unique_ptr< RWebDisplayHandle::Creator > & RWebDisplayHandle::FindCreator ( const std::string &  name,
const std::string &  libname = "" 
)
staticprotected

Search for specific browser creator If not found, try to add one.

Parameters
name- creator name like ChromeCreator
libname- shared library name where creator could be provided

Definition at line 58 of file RWebDisplayHandle.cxx.

◆ GetContent()

const std::string & ROOT::Experimental::RWebDisplayHandle::GetContent ( ) const
inline

Definition at line 90 of file RWebDisplayHandle.hxx.

◆ GetMap()

std::map< std::string, std::unique_ptr< RWebDisplayHandle::Creator > > & RWebDisplayHandle::GetMap ( )
staticprotected

Static holder of registered creators of web displays.

Definition at line 46 of file RWebDisplayHandle.cxx.

◆ GetUrl()

const std::string & ROOT::Experimental::RWebDisplayHandle::GetUrl ( ) const
inline

Definition at line 87 of file RWebDisplayHandle.hxx.

◆ ProduceImage()

bool RWebDisplayHandle::ProduceImage ( const std::string &  fname,
const std::string &  json,
int  width = 800,
int  height = 600 
)
static

Produce image file using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome.

Definition at line 590 of file RWebDisplayHandle.cxx.

◆ SetContent()

void ROOT::Experimental::RWebDisplayHandle::SetContent ( const std::string &  cont)
inline

Definition at line 89 of file RWebDisplayHandle.hxx.

Member Data Documentation

◆ fContent

std::string ROOT::Experimental::RWebDisplayHandle::fContent
private

!< URL used to launch display

Definition at line 29 of file RWebDisplayHandle.hxx.

◆ fUrl

std::string ROOT::Experimental::RWebDisplayHandle::fUrl
private

Definition at line 27 of file RWebDisplayHandle.hxx.

Libraries for ROOT::Experimental::RWebDisplayHandle:

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