JUCE  v5.1.1-3-g1a0b28c73
JUCE API
Slider::Listener Class Referenceabstract

A class for receiving callbacks from a Slider. More...

#include <juce_Slider.h>

Inheritance diagram for Slider::Listener:

Public Member Functions

virtual ~Listener ()
 Destructor. More...
 
virtual void sliderDragEnded (Slider *)
 Called after a drag operation has finished. More...
 
virtual void sliderDragStarted (Slider *)
 Called when the slider is about to be dragged. More...
 
virtual void sliderValueChanged (Slider *slider)=0
 Called when the slider's value is changed. More...
 

Detailed Description

A class for receiving callbacks from a Slider.

To be told when a slider's value changes, you can register a Slider::Listener object using Slider::addListener().

See also
Slider::addListener, Slider::removeListener

Constructor & Destructor Documentation

◆ ~Listener()

virtual Slider::Listener::~Listener ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ sliderDragEnded()

virtual void Slider::Listener::sliderDragEnded ( Slider )
inlinevirtual

Called after a drag operation has finished.

See also
sliderDragStarted, Slider::stoppedDragging

◆ sliderDragStarted()

virtual void Slider::Listener::sliderDragStarted ( Slider )
inlinevirtual

Called when the slider is about to be dragged.

This is called when a drag begins, then it's followed by multiple calls to sliderValueChanged(), and then sliderDragEnded() is called after the user lets go.

See also
sliderDragEnded, Slider::startedDragging

◆ sliderValueChanged()

virtual void Slider::Listener::sliderValueChanged ( Slider slider)
pure virtual

Called when the slider's value is changed.

This may be caused by dragging it, or by typing in its text entry box, or by a call to Slider::setValue().

You can find out the new value using Slider::getValue().

See also
Slider::valueChanged

Implemented in ColourSelector, and SliderPropertyComponent.


The documentation for this class was generated from the following file: