Definition at line 23 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. | |
| const std::string & | GetContent () const |
| get content | |
| const std::string & | GetUrl () const |
| returns url of start web display | |
| bool | IsValid () const |
| virtual void | RemoveStartupFiles () |
| remove file which was used to startup widget - if possible | |
| bool | Resize (int, int) override |
| Resize browser window. | |
| void | SetBrowser (CefRefPtr< CefBrowser > br) |
| void | SetContent (const std::string &cont) |
| set content | |
| 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. | |
Static Public Member Functions | |
| static void | AddCreator () |
| Add CEF creator. | |
| 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< RWebDisplayHandle > | Display (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 There is special handling of ".screenshot.pdf" and ".screenshot.png" extensions Creation of such files relies on headless browser functionality and fully supported only by Chrome browser. | |
| 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 &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. | |
| static bool | ProduceImages (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 std::vector< std::string > | ProduceImagesNames (const std::string &fname, unsigned nfiles=1) |
| Produce vector of file names for specified file pattern Depending from supported file formats. | |
Protected Types | |
| enum | EValidValues { kValid = 0x3C3C3C3C , kInvalid = 0x92929292 } |
Static Protected Member Functions | |
| 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. | |
Protected Attributes | |
| CefRefPtr< CefBrowser > | fBrowser |
| associated browser | |
| bool | fCloseBrowser = true |
| unsigned | fValid {kValid} |
| used to verify if instance valid or not | |
Private Attributes | |
| std::string | fContent |
| !< URL used to launch display | |
| std::string | fUrl |
#include <RCefWebDisplayHandle.hxx>
|
protected |
| Enumerator | |
|---|---|
| kValid | |
| kInvalid | |
Definition at line 35 of file RCefWebDisplayHandle.hxx.
|
inline |
Definition at line 43 of file RCefWebDisplayHandle.hxx.
|
override |
Destructor Closes browser window if any.
Definition at line 258 of file RCefWebDisplayHandle.cxx.
|
static |
Add CEF creator.
Definition at line 329 of file RCefWebDisplayHandle.cxx.
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.
Definition at line 1076 of file RWebDisplayHandle.cxx.
|
staticprotectedinherited |
Checks if configured browser can be used for image production.
Definition at line 1028 of file RWebDisplayHandle.cxx.
| void RCefWebDisplayHandle::CloseBrowser | ( | ) |
Closes associated browser window.
Definition at line 268 of file RCefWebDisplayHandle.cxx.
|
staticinherited |
Create web display.
| 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 918 of file RWebDisplayHandle.cxx.
Display provided url in configured web browser.
| 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: RWebDisplayArgs args;
args.SetUrl(url);
args.SetStandalone(false);
auto handle = RWebDisplayHandle::Display(args);
Definition TCollection.h:312 |
Definition at line 1014 of file RWebDisplayHandle.cxx.
|
staticprotectedinherited |
Search for specific browser creator If not found, try to add one.
| name | - creator name like ChromeCreator |
| libname | - shared library name where creator could be provided |
Definition at line 80 of file RWebDisplayHandle.cxx.
|
inlineinherited |
get content
Definition at line 107 of file RWebDisplayHandle.hxx.
|
staticinherited |
Detect image format There is special handling of ".screenshot.pdf" and ".screenshot.png" extensions Creation of such files relies on headless browser functionality and fully supported only by Chrome browser.
Definition at line 1088 of file RWebDisplayHandle.cxx.
|
staticprotectedinherited |
Static holder of registered creators of web displays.
Definition at line 68 of file RWebDisplayHandle.cxx.
|
inlineinherited |
returns url of start web display
Definition at line 102 of file RWebDisplayHandle.hxx.
|
inline |
Definition at line 47 of file RCefWebDisplayHandle.hxx.
|
staticinherited |
Check if http server required for display.
| args | - defines where and how to display web window |
Definition at line 888 of file RWebDisplayHandle.cxx.
|
staticinherited |
Produce image file using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
Definition at line 1123 of file RWebDisplayHandle.cxx.
|
staticinherited |
Produce image file(s) using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
Definition at line 1170 of file RWebDisplayHandle.cxx.
|
staticinherited |
Produce image file(s) using JSON data as source Invokes JSROOT drawing functionality in headless browser - Google Chrome or Mozilla Firefox.
Definition at line 1179 of file RWebDisplayHandle.cxx.
|
staticinherited |
Produce vector of file names for specified file pattern Depending from supported file formats.
Definition at line 1133 of file RWebDisplayHandle.cxx.
|
inlinevirtualinherited |
remove file which was used to startup widget - if possible
Reimplemented in ROOT::RWebBrowserHandle.
Definition at line 113 of file RWebDisplayHandle.hxx.
Resize browser window.
Reimplemented from ROOT::RWebDisplayHandle.
Definition at line 319 of file RCefWebDisplayHandle.cxx.
|
inline |
Definition at line 49 of file RCefWebDisplayHandle.hxx.
|
inlineinherited |
set content
Definition at line 105 of file RWebDisplayHandle.hxx.
Process system events until browser content is available Used in headless mode for batch production like chrome –dump-dom is doing.
Definition at line 281 of file RCefWebDisplayHandle.cxx.
|
protected |
associated browser
Definition at line 39 of file RCefWebDisplayHandle.hxx.
Definition at line 40 of file RCefWebDisplayHandle.hxx.
|
privateinherited |
!< URL used to launch display
Definition at line 29 of file RWebDisplayHandle.hxx.
|
privateinherited |
Definition at line 27 of file RWebDisplayHandle.hxx.
|
protected |
used to verify if instance valid or not
Definition at line 37 of file RCefWebDisplayHandle.hxx.