Public Types | Public Member Functions | List of all members
HiSlider Class Reference

A custom Slider class that automatically sets up its properties according to the specified mode. More...

Inheritance diagram for HiSlider:
MacroControlledObject

Public Types

enum  Mode {
  Frequency = 0, Decibel, Time, TempoSync,
  Linear, Discrete, Pan, NormalizedPercentage
}
 The HiSlider can be configured using one of these modes. More...
 

Public Member Functions

String getTextFromValue (double value) override
 Overrides the slider method to display the tempo names for the TempoSync mode. More...
 
double getValueFromText (const String &text) override
 Overrides the slider method to set the value from the Tempo names.
 
 HiSlider (const String &name)
 Creates a Slider. More...
 
void setDisplayValue (float newDisplayValue)
 If the slider represents a modulated attribute (eg. More...
 
void setMode (Mode m, double min, double max, double mid=DBL_MAX, double stepSize=DBL_MAX)
 sets the mode. More...
 
- Public Member Functions inherited from MacroControlledObject
void enableMacroControlledComponent (bool shouldBeEnabled) noexcept
 Since the original setEnabled() is overwritten in the updateValue, use this method instead to enable / disable MacroControlledComponents. More...
 
const String getName () const noexcept
 returns the name. More...
 
 MacroControlledObject ()
 Creates a new MacroControlledObject. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MacroControlledObject
bool checkLearnMode ()
 checks if the macro learn mode is active. More...
 

Detailed Description

A custom Slider class that automatically sets up its properties according to the specified mode.

You can call setup() after you created the Slider and it will be skinned using the global HiLookAndFeel and its range, skew factor and suffix are specified.

Member Enumeration Documentation

enum Mode

The HiSlider can be configured using one of these modes.

Enumerator
Frequency 

Range 20 - 20 000, Suffix "Hz", Midpoint: 1.5kHz.

Decibel 

Range -100 - 0, Suffix "dB", Midpoint -18dB.

Time 

Range 0 - 20 000, Suffix "ms", Midpoint 1000ms.

TempoSync 

Range 0 - numTempos,.

See also
TempoSyncer
Linear 

Range min - max.

Discrete 

Range min - max, Stepsize integer.

Pan 

100L - 100R, Stepsize integer

NormalizedPercentage 

0.0 - 1.0, Displayed as percentage

Constructor & Destructor Documentation

HiSlider ( const String &  name)

Creates a Slider.

The name will be displayed.

The slider must be initialized using setup().

Member Function Documentation

String getTextFromValue ( double  value)
inlineoverride

Overrides the slider method to display the tempo names for the TempoSync mode.

void setDisplayValue ( float  newDisplayValue)
inline

If the slider represents a modulated attribute (eg.

LFO Frequency), this can be used to set the displayed value.

In order to use this functionality, add a timer callback to your editor and update the value using the ModulatorChain's getOutputValue().

void setMode ( Mode  m,
double  min,
double  max,
double  mid = DBL_MAX,
double  stepSize = DBL_MAX 
)
inline

sets the mode.

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