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

#include <processorcefsynchronizer.h>

+ Inheritance diagram for inviwo::ProcessorCefSynchronizer:

Public Types

using CallbackFunc = void(const std::string&)
 
using CallbackHandle = std::shared_ptr<std::function<CallbackFunc>>
 

Public Member Functions

 ProcessorCefSynchronizer (const Processor *parent)
 
CallbackHandle registerCallback (const std::string &name, std::function< CallbackFunc > callback)
 
virtual void OnLoadEnd (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, int httpStatusCode) override
 
virtual bool OnQuery (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, int64_t query_id, const CefString &request, bool persistent, CefRefPtr< Callback > callback) override
 
virtual void onProcessorNetworkWillRemoveProcessor (Processor *) override
 
- Public Member Functions inherited from inviwo::ProcessorNetworkObserver
virtual void onProcessorNetworkChange ()
 
virtual void onProcessorNetworkEvaluateRequest ()
 
virtual void onProcessorNetworkUnlocked ()
 
virtual void onProcessorNetworkWillAddProcessor (Processor *)
 
virtual void onProcessorNetworkDidAddProcessor (Processor *)
 
virtual void onProcessorNetworkDidRemoveProcessor (Processor *)
 
virtual void onProcessorNetworkWillAddConnection (const PortConnection &)
 
virtual void onProcessorNetworkDidAddConnection (const PortConnection &)
 
virtual void onProcessorNetworkWillRemoveConnection (const PortConnection &)
 
virtual void onProcessorNetworkDidRemoveConnection (const PortConnection &)
 
virtual void onProcessorNetworkWillAddLink (const PropertyLink &)
 
virtual void onProcessorNetworkDidAddLink (const PropertyLink &)
 
virtual void onProcessorNetworkWillRemoveLink (const PropertyLink &)
 
virtual void onProcessorNetworkDidRemoveLink (const PropertyLink &)
 
virtual void onProcessorBackgroundJobsChanged (Processor *, int, int)
 
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Additional Inherited Members

- Public Attributes inherited from inviwo::ProcessorNetworkObserver
friend ProcessorNetworkObservable
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 
- Protected Attributes inherited from inviwo::Observer
std::unordered_set< ObservableInterface * > observables_
 

Detailed Description

Handles "processor.subscribe.progress" and "parentwebbrowserprocessor" commands sent from the Inviwo javascript API (see webbrowser/data/js/inviwoapi.js).

See also
PropertyCefSynchronizer

Constructor & Destructor Documentation

◆ ProcessorCefSynchronizer()

inviwo::ProcessorCefSynchronizer::ProcessorCefSynchronizer ( const Processor * parent)
explicit
Parameters
parentweb browser processor responsible for the browser. Cannot be null.

Member Function Documentation

◆ OnLoadEnd()

virtual void inviwo::ProcessorCefSynchronizer::OnLoadEnd ( CefRefPtr< CefBrowser > browser,
CefRefPtr< CefFrame > frame,
int httpStatusCode )
overridevirtual

Synchronizes all widgets and sets their frame, called when frame has loaded.

◆ onProcessorNetworkWillRemoveProcessor()

virtual void inviwo::ProcessorCefSynchronizer::onProcessorNetworkWillRemoveProcessor ( Processor * )
overridevirtual

Reimplemented from inviwo::ProcessorNetworkObserver.

◆ OnQuery()

virtual bool inviwo::ProcessorCefSynchronizer::OnQuery ( CefRefPtr< CefBrowser > browser,
CefRefPtr< CefFrame > frame,
int64_t query_id,
const CefString & request,
bool persistent,
CefRefPtr< Callback > callback )
overridevirtual

Called due to cefQuery execution in message_router.html. Expects the request to be a JSON data object, see inviwoapi.js:

{"command": "processor.subscribe.progress", "path": ProcessorIdentifier,
"onProgressChange":onProgressCallback, "onProgressVisibleChange":onProgressVisibleChange}

or

{"command": "parentwebbrowserprocessor"}

or, in case callbacks have been registered, calling the given callback

{"command": "callback", "callback": "name", "data" : "string payload"}

◆ registerCallback()

CallbackHandle inviwo::ProcessorCefSynchronizer::registerCallback ( const std::string & name,
std::function< CallbackFunc > callback )

Register a callback which can be triggered through a cefQuery request where the 'command' is 'callback' and 'name' refers to name in the JSON object. The callback will then be called with the payload given by 'data'.

{"command": "callback", "callback": "name", "data": "string payload"}
See also
OnQuery

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