Inviwo
0.9.10.1
Inviwo documentation
|
Handler for setting, getting, onChange and PropertyObservable of a property from HTML. Handles "property.set", "property.get" commands sent from the Inviwo javascript API (see webbrowser/data/js/inviwoapi.js) and sets property values on the Inviwo-side. More...
#include <propertywidgetcef.h>
Public Member Functions | |
PropertyWidgetCEF (Property *prop, std::unique_ptr< PropertyJSONConverter > converter, CefRefPtr< CefFrame > frame=nullptr, std::string onChange="") | |
void | setFrameIfPartOfFrame (CefRefPtr< CefFrame > frame) |
void | setOnChange (std::string onChange) |
const std::string & | getOnChange () const |
void | setPropertyObserverCallback (std::string propertyObserverCallback) |
const std::string & | getPropertyObserverCallback () const |
virtual bool | onQuery (CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, int64 query_id, const CefString &request, bool persistent, CefRefPtr< CefMessageRouterBrowserSide::Handler::Callback > callback) |
virtual void | updateFromProperty () override |
Public Member Functions inherited from inviwo::PropertyWidget | |
PropertyWidget (Property *property) | |
virtual | ~PropertyWidget () |
virtual PropertyEditorWidget * | getEditorWidget () const |
virtual bool | hasEditorWidget () const |
virtual Property * | getProperty () |
Public Member Functions inherited from inviwo::Observer | |
Observer (const Observer &other) | |
Observer (Observer &&other) | |
Observer & | operator= (Observer &&other) |
Observer & | operator= (const Observer &other) |
virtual | ~Observer () |
void | removeObservation (ObservableInterface *observable) |
void | removeObservations () |
Protected Member Functions | |
virtual void | onSetIdentifier (Property *property, const std::string &identifier) override |
virtual void | onSetDisplayName (Property *property, const std::string &displayName) override |
virtual void | onSetSemantics (Property *property, const PropertySemantics &semantics) override |
virtual void | onSetReadOnly (Property *property, bool readonly) override |
virtual void | onSetVisible (Property *property, bool visible) override |
virtual void | onSetUsageMode (Property *property, UsageMode usageMode) override |
void | setFrame (CefRefPtr< CefFrame > frame) |
Protected Member Functions inherited from inviwo::Observer | |
void | addObservation (ObservableInterface *observable) |
Protected Attributes | |
std::unique_ptr< PropertyJSONConverter > | converter_ |
std::string | onChange_ |
std::string | propertyObserverCallback_ |
Callback to execute in javascript when property changes. | |
CefRefPtr< CefFrame > | frame_ |
Execute on any PropertyObserver notifications. | |
Protected Attributes inherited from inviwo::PropertyWidget | |
Property * | property_ = nullptr |
Protected Attributes inherited from inviwo::Observer | |
ObservableSet | observables_ |
Friends | |
class | CefDOMSearchId |
class | PropertyCefSynchronizer |
Additional Inherited Members | |
Protected Types inherited from inviwo::Observer | |
using | ObservableSet = std::unordered_set< ObservableInterface * > |
Handler for setting, getting, onChange and PropertyObservable of a property from HTML. Handles "property.set", "property.get" commands sent from the Inviwo javascript API (see webbrowser/data/js/inviwoapi.js) and sets property values on the Inviwo-side.
PropertyWidgetCEF must have a PropertyJSONConverter for its corresponding property. Thus, to add support for a new property it is only necessary to:
Example code on HTML-side:
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overrideprotectedvirtual |
Calls the currently set propertyObserverCallback function in javascript with the JSON encoded changed value as parameter. The propertyObserverCallback javascript function must be in global scope.
Reimplemented from inviwo::PropertyObserver.
|
overridevirtual |
Calls the currently set onChange function in javascript with the JSON encoded property as parameter. The onChange javascript function must be in global scope.
Implements inviwo::PropertyWidget.
Reimplemented in inviwo::MinMaxPropertyWidgetCEF< T >.