17#ifndef ROOT_cef_simple_app
18#define ROOT_cef_simple_app
20#include "include/cef_app.h"
33 public CefPrintHandler,
50 THttpServer *serv =
nullptr,
const std::string &url =
"",
const std::string &cont =
"",
51 int width = 0,
int height = 0,
bool headless =
false);
59#if CEF_VERSION_MAJOR < 95
61 virtual CefRefPtr<CefPrintHandler> GetPrintHandler()
override {
return this; }
78#if CEF_VERSION_MAJOR < 95
79 virtual CefSize GetPdfPaperSize(
int device_units_per_inch)
override {
return CefSize(device_units_per_inch*8.25, device_units_per_inch*11.75); }
81 virtual CefSize GetPdfPaperSize(CefRefPtr<CefBrowser>,
int device_units_per_inch)
override {
return CefSize(device_units_per_inch*8.25, device_units_per_inch*11.75); }
83 virtual bool OnPrintDialog( CefRefPtr< CefBrowser > browser,
bool has_selection, CefRefPtr< CefPrintDialogCallback > callback )
override {
return false; }
84 virtual bool OnPrintJob( CefRefPtr< CefBrowser > browser,
const CefString& document_name,
const CefString& pdf_file_path, CefRefPtr< CefPrintJobCallback > callback )
override {
return false; }
85 virtual void OnPrintReset( CefRefPtr< CefBrowser > browser )
override {}
86 virtual void OnPrintSettings( CefRefPtr< CefBrowser > browser, CefRefPtr< CefPrintSettings > settings,
bool get_defaults )
override {}
87 virtual void OnPrintStart( CefRefPtr< CefBrowser > browser )
override {}
include TDocParser_001 C image html pict1_TDocParser_001 png width
RCefWebDisplayHandle * fNextHandle
next handle where browser will be created
std::string fFirstUrl
! first URL to open
bool fUseViewes
! is views framework used
virtual void OnContextInitialized() override
virtual CefRefPtr< CefBrowserProcessHandler > GetBrowserProcessHandler() override
THttpServer * fFirstServer
! first server
void StartWindow(THttpServer *serv, const std::string &url, const std::string &cont, CefRect &rect)
bool fFirstHeadless
! is first window is headless
virtual void OnBeforeChildProcessLaunch(CefRefPtr< CefCommandLine > command_line) override
CefRect fFirstRect
! original width
void SetNextHandle(RCefWebDisplayHandle *handle)
virtual void OnRegisterCustomSchemes(CefRawPtr< CefSchemeRegistrar > registrar) override
CefRefPtr< GuiHandler > fGuiHandler
! normal handler
std::string fFirstContent
! first page content open
DISALLOW_COPY_AND_ASSIGN(SimpleApp)
IMPLEMENT_REFCOUNTING(SimpleApp)
virtual void OnBeforeCommandLineProcessing(const CefString &process_type, CefRefPtr< CefCommandLine > command_line) override