A Component which contains multiple Sliders which support dragging & bipolar display. More...
Classes | |
class | Listener |
Inherit from this class in order to get notified about changes to the slider pack. More... | |
Public Member Functions | |
void | addListener (Listener *listener) |
Register a listener that will receive notification when the sliders are changed. More... | |
int | getNumSliders () |
Returns the number of slider. More... | |
double | getValue (int sliderIndex) |
Returns the value of the slider index. More... | |
void | removeListener (Listener *listener) |
Removes a previously registered listener. More... | |
void | setDefaultValue (double defaultValue) |
Sets the double click return value. More... | |
void | setNumSliders (int numSliders) |
Sets the number of sliders shown. More... | |
void | setSliderWidths (const Array< var > &newWidths) |
Set the slider widths to the given proportions. More... | |
void | setValue (int sliderIndex, double newValue) |
Sets the value of one of the sliders. More... | |
SliderPack (SliderPackData *data=nullptr) | |
Creates a new SliderPack. More... | |
A Component which contains multiple Sliders which support dragging & bipolar display.
This class is driven by the SliderPackData class, which acts as data container.
SliderPack | ( | SliderPackData * | data = nullptr | ) |
Creates a new SliderPack.
|
inline |
Register a listener that will receive notification when the sliders are changed.
int getNumSliders | ( | ) |
Returns the number of slider.
double getValue | ( | int | sliderIndex | ) |
Returns the value of the slider index.
If the index is bigger than the slider amount, it will return -1.
|
inline |
Removes a previously registered listener.
void setDefaultValue | ( | double | defaultValue | ) |
Sets the double click return value.
void setNumSliders | ( | int | numSliders | ) |
Sets the number of sliders shown.
This clears all values.
|
inline |
Set the slider widths to the given proportions.
For example { 0.25, 0.5, 0.25 } will make the middle slider twice as big.
void setValue | ( | int | sliderIndex, |
double | newValue | ||
) |
Sets the value of one of the sliders.
If the index is bigger than the slider amount, it will do nothing.