![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
#include <webbrowserbase.h>
Public Member Functions | |
| WebBrowserBase (InviwoApplication *app, Processor &processor, ImageOutport &outport, ImageInport *background=nullptr, std::string_view url="", std::function< void()> onNewRender=nullptr, std::function< void(bool)> onLoadingChanged=nullptr) | |
| WebBrowserBase (const WebBrowserBase &rhs)=delete | |
| WebBrowserBase (WebBrowserBase &&rhs)=delete | |
| WebBrowserBase & | operator= (const WebBrowserBase &rhs)=delete |
| WebBrowserBase & | operator= (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 | executeJavaScript (const std::string &javascript, int startLine=1) |
| InteractionHandler * | getInteractionHandler () |
| std::shared_ptr< BaseCallBack > | addLoadingDoneCallback (std::function< void()> f) |
| void | addMessageHandler (std::function< void(cef_log_severity_t, const CefString &, const CefString &, int)> func) |
| void | addStaticHandler (std::function< bool(const std::string &, scoped_refptr< CefResourceManager::Request >)> handler) |
| void | removeStaticHandler () |
| std::shared_ptr< std::function< std::string(const std::string &)> > | registerCallback (const std::string &name, std::function< std::string(const std::string &)> callback) |
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:
See https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-reference-counting
|
nodiscard |
Registers a callback function f that will be called whenever the web page has been loaded.
| f | callback function |
| void inviwo::WebBrowserBase::clear | ( | ) |
Clear the browser frame and load an empty page
| void inviwo::WebBrowserBase::setZoom | ( | double | zoom | ) |
Set the zoom level of the browser to the absolute zoom factor.
| zoom | absolute zoom factor, i.e. 1.0 corresponds to a scaling of 100% |