Loading...
Searching...
No Matches
juce::WebComboBoxRelay Class Reference

## Detailed Description

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.

// Add a relay to your AudioProcessorEditor members
WebComboBoxRelay filterTypeComboRelay { "filterTypeCombo" };
WebBrowserComponent webComponent { WebBrowserComponent::Options{}::withOptionsFrom (filterTypeComboRelay) };
juce::WebBrowserComponent::Options
Options to configure WebBrowserComponent.
Definition juce_WebBrowserComponent.h:122
juce::WebBrowserComponent
A component that displays an embedded web browser.
Definition juce_WebBrowserComponent.h:84
juce::WebComboBoxRelay::WebComboBoxRelay
WebComboBoxRelay(StringRef nameIn)
Creating a relay will ensure that a Javascript object under the provided name will be available in th...
// In your Javascript GUI code you obtain an object from the framework
import * as Juce from "juce-framework-frontend";
const comboBoxState = Juce.getComboBoxState("filterTypeCombo");

See also
  WebComboBoxParameterAttachment

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

- juce_gui_extra/misc/juce_WebControlRelays.h

Inheritance diagram for juce::WebComboBoxRelay:

## 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 | setValue (float newValue)
void | addListener (Listener *l)
void | removeListener (Listener *l)
WebBrowserComponent::Options | buildOptions (const WebBrowserComponent::Options &initialOptions) override
void | emitEvent (const var &payload)
Public Member Functions inherited from juce::OptionsBuilder< WebBrowserComponent::Options >
virtual | ~OptionsBuilder ()=default

## Constructors and Destructors

## WebComboBoxRelay()

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.

## Member Functions

## setValue()

void juce::WebComboBoxRelay::setValue | ( | float | newValue | ) |

## addListener()

void juce::WebComboBoxRelay::addListener | ( | Listener * | l | ) |

## removeListener()

void juce::WebComboBoxRelay::removeListener | ( | Listener * | l | ) |

## buildOptions()

WebBrowserComponent::Options juce::WebComboBoxRelay::buildOptions | ( | const WebBrowserComponent::Options & | initialOptions | ) |

override virtual

Implements juce::OptionsBuilder< WebBrowserComponent::Options >.

## emitEvent()

void juce::WebComboBoxRelay::emitEvent | ( | const var & | payload | ) |

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited