Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::WebBrowserBase Class Reference

#include <webbrowserbase.h>

+ Inheritance diagram for inviwo::WebBrowserBase:

Public Member Functions

 WebBrowserBase (InviwoApplication *app, Processor *processor, std::string url="")
 
 WebBrowserBase (const WebBrowserBase &rhs)=delete
 
 WebBrowserBase (WebBrowserBase &&rhs)=delete
 
WebBrowserBaseoperator= (const WebBrowserBase &rhs)=delete
 
WebBrowserBaseoperator= (WebBrowserBase &&rhs)=delete
 
void reload ()
 
bool isLoading () const
 
void load (const std::filesystem::path &filename)
 
void load (std::string_view url)
 
const std::string & getURL () const
 
void clear ()
 
void setZoom (double zoom)
 
void render (ImageOutport &outport, ImageInport *background=nullptr)
 
void executeJavaScript (const std::string &javascript, int startLine=1)
 
InteractionHandlergetInteractionHandler ()
 
std::shared_ptr< BaseCallBack > addLoadingDoneCallback (std::function< void()> f)
 

Detailed Description

Base class of a CEF based browser that renders webpages into an ImageOutport. Needs to be wrapped by a CefRefPtr<> due to reference counting.

Usage:

CefRefPtr<WebBrowserBase> my_class = new WebBrowserBase(app, processor);
Definition webbrowserbase.h:73

See https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-reference-counting

Member Function Documentation

◆ addLoadingDoneCallback()

std::shared_ptr< BaseCallBack > inviwo::WebBrowserBase::addLoadingDoneCallback ( std::function< void()> f)
nodiscard

Registers a callback function f that will be called whenever the web page has been loaded.

Parameters
fcallback function
Returns
RAII callback
See also
CefLoadHandler::OnLoadingStateChange

◆ clear()

void inviwo::WebBrowserBase::clear ( )

Clear the browser frame and load an empty page

◆ setZoom()

void inviwo::WebBrowserBase::setZoom ( double zoom)

Set the zoom level of the browser to the absolute zoom factor.

Parameters
zoomabsolute zoom factor, i.e. 1.0 corresponds to a scaling of 100%

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