Helper class that relays audio parameter information to an object inside a WebBrowserComponent. More...
#include <juce_WebControlRelays.h>


Classes | |
| struct | Listener |
Public Member Functions | |
| WebComboBoxRelay (StringRef nameIn) | |
| Creating a relay will ensure that a Javascript object under the provided name will be available in the specified WebBrowserComponent's context. | |
| void | addListener (Listener *l) |
| WebBrowserComponent::Options | buildOptions () |
| WebBrowserComponent::Options | buildOptions (const WebBrowserComponent::Options &initialOptions) override |
| virtual WebBrowserComponent::Options | buildOptions (const WebBrowserComponent::Options &initialOptions)=0 |
| void | emitEvent (const var &payload) |
| void | removeListener (Listener *l) |
| void | setValue (float newValue) |
Private Member Functions | |
| void | handleEvent (const var &event) |
| void | webViewConstructed (WebBrowserComponent *) override |
| Called from the WebBrowserComponent constructor. | |
| void | webViewDestructed (WebBrowserComponent *) override |
| Called from the WebBrowserComponent destructor. | |
Private Attributes | |
| WebBrowserComponent * | browser = nullptr |
| Identifier | eventId { "__juce__comboBox" + name } |
| ListenerList< Listener > | listeners |
| String | name |
Helper class that relays audio parameter information to an object inside a WebBrowserComponent.
In order to create a relay you need to specify an identifier for the relayed state. This will result in a Javascript object becoming available inside the WebBrowserComponent under the provided identifier.
Pass the relay object to WebBrowserComponent::Options::withOptionsFrom() to associate it with a WebBrowserComponent instance.
You can then use a WebComboBoxParameterAttachment as you would a ComboBoxParameterAttachment, to attach the relay to a RangedAudioParameter. This will synchronise the state and events of the Javascript object with the audio parameter at all times.
@tags{GUI}
| juce::WebComboBoxRelay::WebComboBoxRelay | ( | StringRef | nameIn | ) |
Creating a relay will ensure that a Javascript object under the provided name will be available in the specified WebBrowserComponent's context.
Use the frontend framework's getComboBoxState function with the same name to get a hold of this object.
| void juce::WebComboBoxRelay::addListener | ( | Listener * | l | ) |
|
inlineinherited |
|
override |
|
pure virtualinherited |
| void juce::WebComboBoxRelay::emitEvent | ( | const var & | payload | ) |
|
private |
| void juce::WebComboBoxRelay::removeListener | ( | Listener * | l | ) |
| void juce::WebComboBoxRelay::setValue | ( | float | newValue | ) |
|
overrideprivatevirtual |
Called from the WebBrowserComponent constructor.
Implements juce::WebViewLifetimeListener.
|
overrideprivatevirtual |
Called from the WebBrowserComponent destructor.
Implements juce::WebViewLifetimeListener.
|
private |
|
private |
|
private |
|
private |