A pair of buttons for incrementing and decrementing a Slider's value.
More...
#include <incrementer_buttons.h>
|
| IncrementerButtons (Slider *slider) |
| Constructs the IncrementerButtons object.
|
|
void | setActive (bool active) |
| Sets whether the incrementer buttons are active.
|
|
void | resized () override |
| Resizes and positions the increment and decrement buttons.
|
|
void | paint (Graphics &g) override |
| Paints the component background and updates button colors.
|
|
void | buttonClicked (Button *clicked_button) override |
| Called when one of the incrementer buttons is clicked.
|
|
A pair of buttons for incrementing and decrementing a Slider's value.
The IncrementerButtons class provides two small triangular arrow buttons, one for incrementing and one for decrementing the value of an associated Slider. When either button is pressed, the Slider's value is adjusted by one unit. The appearance of the buttons adapts to the currently active skin colors, and can be toggled active or inactive.
◆ IncrementerButtons()
IncrementerButtons::IncrementerButtons |
( |
Slider * | slider | ) |
|
|
inline |
Constructs the IncrementerButtons object.
- Parameters
-
slider | A pointer to a Slider whose value will be modified when these buttons are pressed. |
◆ buttonClicked()
void IncrementerButtons::buttonClicked |
( |
Button * | clicked_button | ) |
|
|
inlineoverride |
Called when one of the incrementer buttons is clicked.
- Parameters
-
clicked_button | The button that was clicked. |
Increments or decrements the associated Slider's value by 1.0 depending on which button is clicked.
◆ paint()
void IncrementerButtons::paint |
( |
Graphics & | g | ) |
|
|
inlineoverride |
Paints the component background and updates button colors.
- Parameters
-
g | The graphics context to use for painting. |
◆ resized()
void IncrementerButtons::resized |
( |
| ) |
|
|
inlineoverride |
Resizes and positions the increment and decrement buttons.
◆ setActive()
void IncrementerButtons::setActive |
( |
bool | active | ) |
|
|
inline |
Sets whether the incrementer buttons are active.
- Parameters
-
active | True if active (enabled), false otherwise. |
When inactive, the buttons can be visually indicated as disabled.
The documentation for this class was generated from the following file: