![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
#include <propertycefsynchronizer.h>
Public Member Functions | |
PropertyCefSynchronizer (CefRefPtr< CefBrowser > browser, const PropertyWidgetCEFFactory *htmlWidgetFactory) | |
virtual void | OnLoadStart (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, TransitionType transition_type) override |
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 | onWillRemoveProperty (Property *property, size_t index) override |
![]() | |
virtual void | onWillAddProperty (PropertyOwner *owner, Property *property, size_t index) |
virtual void | onDidAddProperty (Property *property, size_t index) |
virtual void | onDidRemoveProperty (PropertyOwner *owner, Property *property, size_t index) |
![]() | |
Observer (const Observer &other) | |
Observer (Observer &&other) | |
Observer & | operator= (Observer &&other) |
Observer & | operator= (const Observer &other) |
virtual | ~Observer () |
void | removeObservation (ObservableInterface *observable) |
void | removeObservations () |
Additional Inherited Members | |
![]() | |
friend | PropertyOwnerObservable |
![]() | |
void | addObservation (ObservableInterface *observable) |
![]() | |
std::unordered_set< ObservableInterface * > | observables_ |
Handles "property.set", "property.get" and "property.subscribe" commands sent from the Inviwo javascript API (see webbrowser/data/js/inviwoapi.js).
The path can be to a Processor (myprocessor.myproperty) or system/module Settings (mysetting.myproperty) properties.
Flow of information between PropertyWidgetCEF and browser. Changes can start from Inviwo (left) or browser (right). Information is encoded in JSON format, e.g.
Inviwo Browser (JavaScript) Property change | updateFromProperty() --> onChangeCallbackJS(property) | | OnQuery <------— inviwo.setProperty('myprocessor.myproperty', {value: 2.0}); from_json(json, property);
|
overridevirtual |
Synchronizes all widgets and sets their frame, called when frame has loaded.
|
overridevirtual |
Removes all property synchronizations.
|
overridevirtual |
Called due to cefQuery execution in message_router.html. Expects the request to be a JSON data object, see inviwoapi.js: {command: "subscribe", "path": propertyPath, "id":htmlId} for synchronizing property to change. {command: "property.set", "path":"PropertyIdentifier", "value":0.5} for setting a value {command: "property.get", "path": propertyPath} for getting a value. Currently only supports a single property in the request.
|
overridevirtual |
Reimplemented from inviwo::PropertyOwnerObserver.