All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | Protected Member Functions | List of all members
MacroControlledObject Class Referenceabstract
Inheritance diagram for MacroControlledObject:
HiComboBox HiSlider MacroModulator

Public Member Functions

 MacroControlledObject ()
const String getName () const noexcept
virtual void setup (Processor *p, int parameter_, const String &name_)
virtual void updateValue (NotificationType sendAttributeChange=sendNotification)=0
virtual NormalisableRange< double > getRange () const =0
void enableMacroControlledComponent (bool shouldBeEnabled) noexcept

Protected Member Functions

bool checkLearnMode ()

Detailed Description

A base class for all control widgets that can be controlled by a MacroControlBroadcaster.

Subclass your component from this class, and set the Processor's Attribute in its specified callback.

Constructor & Destructor Documentation

Creates a new MacroControlledObject.

You have to call setup() before you use the object!

Member Function Documentation

bool checkLearnMode ( )

checks if the macro learn mode is active.

If it is active, it adds this control to the macro and returns true. You can use this in the widget callback like:

    getProcessor()->setAttribute(parameter, value, dontSendNotification);
void enableMacroControlledComponent ( bool  shouldBeEnabled)

Since the original setEnabled() is overwritten in the updateValue, use this method instead to enable / disable MacroControlledComponents.

const String getName ( void  ) const

returns the name.

virtual NormalisableRange<double> getRange ( ) const
pure virtual

overwrite this method and return the range that the parameter can have.

virtual void setup ( Processor p,
int  parameter_,
const String &  name_ 

Initializes the control widget.

It connects to a Processor's parameter and automatically updates its value and changes the attribute.

pthe Processor that is controlled by the widget.
parameter_the parameter that is controlled by the widget
name_the name of the widget. This will also be the displayed name in the macro control panel.
virtual void updateValue ( NotificationType  sendAttributeChange = sendNotification)
pure virtual

overwrite this method and update the widget to display the current value of the controlled attribute.

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