This class combines a Slider, Label, and a SliderAttachment to simplify the process of adding knobs to a GUI element.
More...
#include <AttachedSlider.h>
This class combines a Slider, Label, and a SliderAttachment to simplify the process of adding knobs to a GUI element.
◆ LabelPosition
| Enumerator |
|---|
| Above | |
| Below | |
| Left | |
◆ AttachedSlider()
| krotos::AttachedSlider::AttachedSlider |
( |
const String & | labelText, |
|
|
bool | setLabelVisible = true, |
|
|
const String & | dragAndDropDescription = String() ) |
Constructs a new slider with specified text for the label and an optional dragAndDropDescription
◆ getAttachment()
| std::unique_ptr< SliderParameterAttachment > & krotos::AttachedSlider::getAttachment |
( |
| ) |
|
Returns reference to the attachment Object.
◆ getControlComponent()
| Slider & krotos::AttachedSlider::getControlComponent |
( |
| ) |
|
◆ getLabel()
| Label & krotos::AttachedSlider::getLabel |
( |
| ) |
|
Returns reference to the label displaying the slider name.
◆ getLabelPosition()
Getter for the label position
◆ getSlider()
| Slider & krotos::AttachedSlider::getSlider |
( |
| ) |
|
Returns reference to the slider Object.
◆ mouseExit()
| void krotos::AttachedSlider::mouseExit |
( |
const MouseEvent & | | ) |
|
|
override |
◆ mouseMove()
| void krotos::AttachedSlider::mouseMove |
( |
const MouseEvent & | event | ) |
|
|
override |
◆ paint()
| void krotos::AttachedSlider::paint |
( |
Graphics & | g | ) |
|
|
override |
◆ panSuffix()
| String krotos::AttachedSlider::panSuffix |
( |
double | value | ) |
const |
|
private |
◆ resized()
| void krotos::AttachedSlider::resized |
( |
| ) |
|
|
override |
◆ setDebugColour()
| void krotos::AttachedSlider::setDebugColour |
( |
Colour | newColour | ) |
|
Changes the colour of a slider so that it shows up in GUI
◆ setDragAndDropDescription()
| void krotos::AttachedSlider::setDragAndDropDescription |
( |
const var & | description | ) |
|
Set the descriptor for the Label which will be passed to a dragAndDropTarget. Setting this will enable the Label to become draggable
◆ setLabelPosition()
| void krotos::AttachedSlider::setLabelPosition |
( |
LabelPosition | position | ) |
|
|
inline |
Setter for the label position
◆ setLabelYPosition()
| void krotos::AttachedSlider::setLabelYPosition |
( |
int | newPos | ) |
|
Sets the Y position of the label component
- Parameters
-
| [in] | newPos | The new Y position of the label |
◆ setValueFormat()
| void krotos::AttachedSlider::setValueFormat |
( |
String | valueFormat | ) |
|
|
inline |
Setter for the label value format, e.g. how many decimal places
◆ setValueSuffix()
| void krotos::AttachedSlider::setValueSuffix |
( |
String | valueSuffix | ) |
|
|
inline |
Setter for the label value suffix, e.g. "dB"
◆ updateLabel()
| void krotos::AttachedSlider::updateLabel |
( |
| ) |
|
|
private |
◆ m_attachment
| std::unique_ptr<SliderParameterAttachment> krotos::AttachedSlider::m_attachment |
|
private |
◆ m_label
◆ m_labelPosition
◆ m_labelText
| String krotos::AttachedSlider::m_labelText |
|
private |
◆ m_labelYPositionOverride
| int krotos::AttachedSlider::m_labelYPositionOverride {-1} |
|
private |
◆ m_layout
◆ m_mouseIsOver
| bool krotos::AttachedSlider::m_mouseIsOver {false} |
|
private |
◆ m_slider
| Slider krotos::AttachedSlider::m_slider |
|
private |
◆ m_valueFormat
| String krotos::AttachedSlider::m_valueFormat {""} |
|
private |
◆ m_valueSuffix
| String krotos::AttachedSlider::m_valueSuffix {""} |
|
private |
The documentation for this class was generated from the following files: