Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RCefWebDisplayHandle.hxx
Go to the documentation of this file.
1// Author: Sergey Linev <S.Linev@gsi.de>
2// Date: 2020-08-21
3
4/*************************************************************************
5 * Copyright (C) 1995-2023, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT7_RCefWebDisplayHandle
13#define ROOT7_RCefWebDisplayHandle
14
16
17#include "simple_app.h"
18
19/** \class RCefWebDisplayHandle
20\ingroup cefwebdisplay
21*/
22
24protected:
25 class CefCreator : public Creator {
26
28 public:
29 CefCreator() = default;
30 ~CefCreator() override = default;
31
32 std::unique_ptr<ROOT::RWebDisplayHandle> Display(const ROOT::RWebDisplayArgs &args) override;
33 };
34
35 enum EValidValues { kValid = 0x3C3C3C3C, kInvalid = 0x92929292 };
36
37 unsigned fValid{kValid}; ///< used to verify if instance valid or not
38
39 CefRefPtr<CefBrowser> fBrowser; ///< associated browser
40 bool fCloseBrowser = true;
41
42public:
44
45 ~RCefWebDisplayHandle() override;
46
47 bool IsValid() const { return fValid == kValid; }
48
50
51 void CloseBrowser();
52
53 bool WaitForContent(int tmout_sec, const std::string &extra_args);
54
55 bool Resize(int, int) override;
56
57 static void AddCreator();
58
59};
60
61
62#endif
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
~CefCreator() override=default
std::unique_ptr< ROOT::RWebDisplayHandle > Display(const ROOT::RWebDisplayArgs &args) override
CefRefPtr< CefBrowser > fBrowser
associated browser
void CloseBrowser()
Closes associated browser window.
static void AddCreator()
Add CEF creator.
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 l...
unsigned fValid
used to verify if instance valid or not
~RCefWebDisplayHandle() override
Destructor Closes browser window if any.
bool Resize(int, int) override
Resize browser window.
RCefWebDisplayHandle(const std::string &url)
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
Handle of created web-based display Depending from type of web display, holds handle of started brows...
RWebDisplayHandle(const std::string &url)
constructor