Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RCefWebDisplayHandle Class Reference

Definition at line 24 of file RCefWebDisplayHandle.hxx.

Classes

class  CefCreator
 

Public Member Functions

 RCefWebDisplayHandle (const std::string &url)
 
 ~RCefWebDisplayHandle () override
 Destructor Closes browser window if any.
 
void CloseBrowser ()
 Closes associated browser window.
 
bool IsValid () const
 
bool Resize (int, int) override
 Resize browser window.
 
void SetBrowser (CefRefPtr< CefBrowser > br)
 
bool WaitForContent (int tmout_sec, const std::string &extra_args)
 Process system events until browser content is available Used in headless mode for batch production like chrome –dump-dom is doing.
 
- Public Member Functions inherited from ROOT::RWebDisplayHandle
 RWebDisplayHandle (const std::string &url)
 constructor
 
virtual ~RWebDisplayHandle ()=default
 required virtual destructor for correct cleanup at the end
 
const std::string & GetContent () const
 get content
 
const std::string & GetUrl () const
 returns url of start web display
 
void SetContent (const std::string &cont)
 set content
 

Static Public Member Functions

static void AddCreator ()
 Add CEF creator.
 
- Static Public Member Functions inherited from ROOT::RWebDisplayHandle
static bool CanProduceImages (const std::string &browser="")
 Returns true if image production for specified browser kind is supported If browser not specified - use currently configured browser or try to test existing web browsers.
 
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 std::string GetImageFormat (const std::string &fname)
 Detect image format.
 
static bool NeedHttpServer (const RWebDisplayArgs &args)
 Check if http server required for display.
 
static bool ProduceImage (const std::string &fname, const std::string &json, int width=800, int height=600, const char *batch_file=nullptr)
 Produce image file using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
 
static bool ProduceImages (const std::string &fmt, const std::vector< std::string > &fnames, const std::vector< std::string > &jsons, const std::vector< int > &widths, const std::vector< int > &heights, const char *batch_file=nullptr)
 Produce image file(s) using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
 
static bool ProduceImages (const std::string &fname, const std::vector< std::string > &jsons, const std::vector< int > &widths, const std::vector< int > &heights, const char *batch_file=nullptr)
 Produce image file(s) using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
 

Protected Types

enum  EValidValues { kValid = 0x3C3C3C3C , kInvalid = 0x92929292 }
 

Protected Attributes

CefRefPtr< CefBrowser > fBrowser
 associated browser
 
unsigned fValid {kValid}
 used to verify if instance valid or not
 

Additional Inherited Members

- Static Protected Member Functions inherited from ROOT::RWebDisplayHandle
static bool CheckIfCanProduceImages (RWebDisplayArgs &args)
 Checks if configured browser can be used for image production.
 
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.
 

#include <RCefWebDisplayHandle.hxx>

Inheritance diagram for RCefWebDisplayHandle:
[legend]

Member Enumeration Documentation

◆ EValidValues

Enumerator
kValid 
kInvalid 

Definition at line 36 of file RCefWebDisplayHandle.hxx.

Constructor & Destructor Documentation

◆ RCefWebDisplayHandle()

RCefWebDisplayHandle::RCefWebDisplayHandle ( const std::string &  url)
inline

Definition at line 43 of file RCefWebDisplayHandle.hxx.

◆ ~RCefWebDisplayHandle()

RCefWebDisplayHandle::~RCefWebDisplayHandle ( )
override

Destructor Closes browser window if any.

Definition at line 218 of file RCefWebDisplayHandle.cxx.

Member Function Documentation

◆ AddCreator()

void RCefWebDisplayHandle::AddCreator ( )
static

Add CEF creator.

Definition at line 289 of file RCefWebDisplayHandle.cxx.

◆ CloseBrowser()

void RCefWebDisplayHandle::CloseBrowser ( )

Closes associated browser window.

Definition at line 228 of file RCefWebDisplayHandle.cxx.

◆ IsValid()

bool RCefWebDisplayHandle::IsValid ( ) const
inline

Definition at line 47 of file RCefWebDisplayHandle.hxx.

◆ Resize()

bool RCefWebDisplayHandle::Resize ( int  width,
int  height 
)
overridevirtual

Resize browser window.

Reimplemented from ROOT::RWebDisplayHandle.

Definition at line 279 of file RCefWebDisplayHandle.cxx.

◆ SetBrowser()

void RCefWebDisplayHandle::SetBrowser ( CefRefPtr< CefBrowser >  br)
inline

Definition at line 49 of file RCefWebDisplayHandle.hxx.

◆ WaitForContent()

bool RCefWebDisplayHandle::WaitForContent ( int  tmout_sec,
const std::string &  extra_args 
)

Process system events until browser content is available Used in headless mode for batch production like chrome –dump-dom is doing.

Definition at line 241 of file RCefWebDisplayHandle.cxx.

Member Data Documentation

◆ fBrowser

CefRefPtr<CefBrowser> RCefWebDisplayHandle::fBrowser
protected

associated browser

Definition at line 40 of file RCefWebDisplayHandle.hxx.

◆ fValid

unsigned RCefWebDisplayHandle::fValid {kValid}
protected

used to verify if instance valid or not

Definition at line 38 of file RCefWebDisplayHandle.hxx.

  • gui/cefdisplay/inc/RCefWebDisplayHandle.hxx
  • gui/cefdisplay/src/RCefWebDisplayHandle.cxx