Protected Member Functions | List of all members
UIConnection::Base< ComponentType, ValueType > Class Template Referenceabstract

The base class for the connection implementation of each UI widget. More...

Inheritance diagram for UIConnection::Base< ComponentType, ValueType >:
Data< ValueType > ControlledObject SafeChangeListener

Protected Member Functions

ComponentType & getComponent ()
 Returns a reference to the component. More...
 
void parameterChangedFromUI (ValueType newValue)
 Call this method from your subclass's listener callback. More...
 
virtual void updateUI (ValueType newValue)=0
 Overwrite this method and change the displayed value on your Component. More...
 

Additional Inherited Members

- Public Member Functions inherited from ControlledObject
 ControlledObject (MainController *m)
 Creates a new ControlledObject. More...
 
const MainControllergetMainController () const noexcept
 Provides read-only access to the main controller. More...
 
MainControllergetMainController () noexcept
 Provides write access to the main controller. More...
 

Detailed Description

template<class ComponentType, typename ValueType>
class hise::raw::UIConnection::Base< ComponentType, ValueType >

The base class for the connection implementation of each UI widget.

There are three available UI widgets: the ComboBox, the Slider and the Button.

If you need more UI widgets or hook them up to your own classes, make sure that:

  1. The class is derived from juce::Component
  2. It has a subclass called Listener and the methods addListener() and removeListener()
  3. the Listener subclass has a virtual callback that gets overwritten to change the Processor's parameter (take a look at the implementations to get a feeling how this works).
  4. Overwrite the method updateUI() to reflect the change on your UI widget. This is important to match the displayed value when the parameter is changed externally, eg. by loading presets or automation.

Member Function Documentation

ComponentType& getComponent ( )
inlineprotected

Returns a reference to the component.

It is safe to assume that it's not deleted in the UI callbacks.

void parameterChangedFromUI ( ValueType  newValue)
protected

Call this method from your subclass's listener callback.

virtual void updateUI ( ValueType  newValue)
protectedpure virtual

Overwrite this method and change the displayed value on your Component.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.