LMMS
Loading...
Searching...
No Matches
juce::Slider::Pimpl Class Reference
Inheritance diagram for juce::Slider::Pimpl:
juce::AsyncUpdater juce::Value::Listener

Classes

struct  PopupDisplayComponent

Public Member Functions

 Pimpl (Slider &s, SliderStyle sliderStyle, TextEntryBoxPosition textBoxPosition)
 ~Pimpl () override
void registerListeners ()
bool isHorizontal () const noexcept
bool isVertical () const noexcept
bool isRotary () const noexcept
bool isBar () const noexcept
bool isTwoValue () const noexcept
bool isThreeValue () const noexcept
bool incDecDragDirectionIsHorizontal () const noexcept
float getPositionOfValue (double value) const
void updateRange ()
void setRange (double newMin, double newMax, double newInt)
void setNormalisableRange (NormalisableRange< double > newRange)
double getValue () const
void setValue (double newValue, NotificationType notification)
void setMinValue (double newValue, NotificationType notification, bool allowNudgingOfOtherValues)
void setMaxValue (double newValue, NotificationType notification, bool allowNudgingOfOtherValues)
void setMinAndMaxValues (double newMinValue, double newMaxValue, NotificationType notification)
double getMinValue () const
double getMaxValue () const
void triggerChangeMessage (NotificationType notification)
void handleAsyncUpdate () override
void sendDragStart ()
void sendDragEnd ()
void incrementOrDecrement (double delta)
void valueChanged (Value &value) override
void textChanged ()
void updateText ()
double constrainedValue (double value) const
float getLinearSliderPos (double value) const
void setSliderStyle (SliderStyle newStyle)
void setVelocityModeParameters (double sensitivity, int threshold, double offset, bool userCanPressKeyToSwapMode, ModifierKeys::Flags newModifierToSwapModes)
void setIncDecButtonsMode (IncDecButtonMode mode)
void setTextBoxStyle (TextEntryBoxPosition newPosition, bool isReadOnly, int textEntryBoxWidth, int textEntryBoxHeight)
void setTextBoxIsEditable (bool shouldBeEditable)
void showTextBox ()
void hideTextBox (bool discardCurrentEditorContents)
void setTextValueSuffix (const String &suffix)
void updateTextBoxEnablement ()
void lookAndFeelChanged (LookAndFeel &lf)
void showPopupMenu ()
int getThumbIndexAt (const MouseEvent &e)
void handleRotaryDrag (const MouseEvent &e)
void handleAbsoluteDrag (const MouseEvent &e)
void handleVelocityDrag (const MouseEvent &e)
void mouseDown (const MouseEvent &e)
void mouseDrag (const MouseEvent &e)
void mouseUp ()
void mouseMove ()
void mouseExit ()
bool keyPressed (const KeyPress &key)
void showPopupDisplay ()
void updatePopupDisplay (double valueToShow)
bool canDoubleClickToValue () const
void mouseDoubleClick ()
double getMouseWheelDelta (double value, double wheelAmount)
bool mouseWheelMove (const MouseEvent &e, const MouseWheelDetails &wheel)
void modifierKeysChanged (const ModifierKeys &modifiers)
bool isAbsoluteDragMode (ModifierKeys mods) const
void restoreMouseIfHidden ()
void paint (Graphics &g, LookAndFeel &lf)
void resized (LookAndFeel &lf)
void resizeIncDecButtons ()
Public Member Functions inherited from juce::AsyncUpdater
 AsyncUpdater ()
virtual ~AsyncUpdater ()
void triggerAsyncUpdate ()
void cancelPendingUpdate () noexcept
void handleUpdateNowIfNeeded ()
bool isUpdatePending () const noexcept

Static Public Member Functions

static void sliderMenuCallback (int result, Slider *slider)
static double smallestAngleBetween (double a1, double a2) noexcept

Public Attributes

Sliderowner
SliderStyle style
ListenerList< Slider::Listenerlisteners
Value currentValue
Value valueMin
Value valueMax
double lastCurrentValue = 0
double lastValueMin = 0
double lastValueMax = 0
NormalisableRange< double > normRange { 0.0, 10.0 }
double doubleClickReturnValue = 0
double valueWhenLastDragged = 0
double valueOnMouseDown = 0
double lastAngle = 0
double velocityModeSensitivity = 1.0
double velocityModeOffset = 0
double minMaxDiff = 0
int velocityModeThreshold = 1
RotaryParameters rotaryParams
Point< float > mouseDragStartPos
Point< float > mousePosWhenLastDragged
int sliderRegionStart = 0
int sliderRegionSize = 1
int sliderBeingDragged = -1
int pixelsForFullDragExtent = 250
Time lastMouseWheelTime
Rectangle< intsliderRect
std::unique_ptr< ScopedDragNotificationcurrentDrag
TextEntryBoxPosition textBoxPos
String textSuffix
int numDecimalPlaces = 7
int textBoxWidth = 80
int textBoxHeight = 20
IncDecButtonMode incDecButtonMode = incDecButtonsNotDraggable
ModifierKeys::Flags modifierToSwapModes = ModifierKeys::ctrlAltCommandModifiers
bool editableText = true
bool doubleClickToValue = false
bool isVelocityBased = false
bool userKeyOverridesVelocity = true
bool incDecButtonsSideBySide = false
bool sendChangeOnlyOnRelease = false
bool showPopupOnDrag = false
bool showPopupOnHover = false
bool menuEnabled = false
bool useDragEvents = false
bool incDecDragged = false
bool scrollWheelEnabled = true
bool snapsToMousePos = true
int popupHoverTimeout = 2000
double lastPopupDismissal = 0.0
ModifierKeys singleClickModifiers
std::unique_ptr< LabelvalueBox
std::unique_ptr< ButtonincButton
std::unique_ptr< ButtondecButton
std::unique_ptr< PopupDisplayComponentpopupDisplay
ComponentparentForPopupDisplay = nullptr

Additional Inherited Members

Private Member Functions inherited from juce::Value::Listener
 Listener ()=default
virtual ~Listener ()=default

Constructor & Destructor Documentation

◆ Pimpl()

juce::Slider::Pimpl::Pimpl ( Slider & s,
SliderStyle sliderStyle,
TextEntryBoxPosition textBoxPosition )
inline

◆ ~Pimpl()

juce::Slider::Pimpl::~Pimpl ( )
inlineoverride

Member Function Documentation

◆ canDoubleClickToValue()

bool juce::Slider::Pimpl::canDoubleClickToValue ( ) const
inline

◆ constrainedValue()

double juce::Slider::Pimpl::constrainedValue ( double value) const
inline

◆ getLinearSliderPos()

float juce::Slider::Pimpl::getLinearSliderPos ( double value) const
inline

◆ getMaxValue()

double juce::Slider::Pimpl::getMaxValue ( ) const
inline

◆ getMinValue()

double juce::Slider::Pimpl::getMinValue ( ) const
inline

◆ getMouseWheelDelta()

double juce::Slider::Pimpl::getMouseWheelDelta ( double value,
double wheelAmount )
inline

◆ getPositionOfValue()

float juce::Slider::Pimpl::getPositionOfValue ( double value) const
inline

◆ getThumbIndexAt()

int juce::Slider::Pimpl::getThumbIndexAt ( const MouseEvent & e)
inline

◆ getValue()

double juce::Slider::Pimpl::getValue ( ) const
inline

◆ handleAbsoluteDrag()

void juce::Slider::Pimpl::handleAbsoluteDrag ( const MouseEvent & e)
inline

◆ handleAsyncUpdate()

void juce::Slider::Pimpl::handleAsyncUpdate ( )
inlineoverridevirtual

Called back to do whatever your class needs to do.

This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.

Implements juce::AsyncUpdater.

◆ handleRotaryDrag()

void juce::Slider::Pimpl::handleRotaryDrag ( const MouseEvent & e)
inline

◆ handleVelocityDrag()

void juce::Slider::Pimpl::handleVelocityDrag ( const MouseEvent & e)
inline

◆ hideTextBox()

void juce::Slider::Pimpl::hideTextBox ( bool discardCurrentEditorContents)
inline

◆ incDecDragDirectionIsHorizontal()

bool juce::Slider::Pimpl::incDecDragDirectionIsHorizontal ( ) const
inlinenoexcept

◆ incrementOrDecrement()

void juce::Slider::Pimpl::incrementOrDecrement ( double delta)
inline

◆ isAbsoluteDragMode()

bool juce::Slider::Pimpl::isAbsoluteDragMode ( ModifierKeys mods) const
inline

◆ isBar()

bool juce::Slider::Pimpl::isBar ( ) const
inlinenoexcept

◆ isHorizontal()

bool juce::Slider::Pimpl::isHorizontal ( ) const
inlinenoexcept

◆ isRotary()

bool juce::Slider::Pimpl::isRotary ( ) const
inlinenoexcept

◆ isThreeValue()

bool juce::Slider::Pimpl::isThreeValue ( ) const
inlinenoexcept

◆ isTwoValue()

bool juce::Slider::Pimpl::isTwoValue ( ) const
inlinenoexcept

◆ isVertical()

bool juce::Slider::Pimpl::isVertical ( ) const
inlinenoexcept

◆ keyPressed()

bool juce::Slider::Pimpl::keyPressed ( const KeyPress & key)
inline

◆ lookAndFeelChanged()

void juce::Slider::Pimpl::lookAndFeelChanged ( LookAndFeel & lf)
inline

◆ modifierKeysChanged()

void juce::Slider::Pimpl::modifierKeysChanged ( const ModifierKeys & modifiers)
inline

◆ mouseDoubleClick()

void juce::Slider::Pimpl::mouseDoubleClick ( )
inline

◆ mouseDown()

void juce::Slider::Pimpl::mouseDown ( const MouseEvent & e)
inline

◆ mouseDrag()

void juce::Slider::Pimpl::mouseDrag ( const MouseEvent & e)
inline

◆ mouseExit()

void juce::Slider::Pimpl::mouseExit ( )
inline

◆ mouseMove()

void juce::Slider::Pimpl::mouseMove ( )
inline

◆ mouseUp()

void juce::Slider::Pimpl::mouseUp ( )
inline

◆ mouseWheelMove()

bool juce::Slider::Pimpl::mouseWheelMove ( const MouseEvent & e,
const MouseWheelDetails & wheel )
inline

◆ paint()

void juce::Slider::Pimpl::paint ( Graphics & g,
LookAndFeel & lf )
inline

◆ registerListeners()

void juce::Slider::Pimpl::registerListeners ( )
inline

◆ resized()

void juce::Slider::Pimpl::resized ( LookAndFeel & lf)
inline

◆ resizeIncDecButtons()

void juce::Slider::Pimpl::resizeIncDecButtons ( )
inline

◆ restoreMouseIfHidden()

void juce::Slider::Pimpl::restoreMouseIfHidden ( )
inline

◆ sendDragEnd()

void juce::Slider::Pimpl::sendDragEnd ( )
inline

◆ sendDragStart()

void juce::Slider::Pimpl::sendDragStart ( )
inline

◆ setIncDecButtonsMode()

void juce::Slider::Pimpl::setIncDecButtonsMode ( IncDecButtonMode mode)
inline

◆ setMaxValue()

void juce::Slider::Pimpl::setMaxValue ( double newValue,
NotificationType notification,
bool allowNudgingOfOtherValues )
inline

◆ setMinAndMaxValues()

void juce::Slider::Pimpl::setMinAndMaxValues ( double newMinValue,
double newMaxValue,
NotificationType notification )
inline

◆ setMinValue()

void juce::Slider::Pimpl::setMinValue ( double newValue,
NotificationType notification,
bool allowNudgingOfOtherValues )
inline

◆ setNormalisableRange()

void juce::Slider::Pimpl::setNormalisableRange ( NormalisableRange< double > newRange)
inline

◆ setRange()

void juce::Slider::Pimpl::setRange ( double newMin,
double newMax,
double newInt )
inline

◆ setSliderStyle()

void juce::Slider::Pimpl::setSliderStyle ( SliderStyle newStyle)
inline

◆ setTextBoxIsEditable()

void juce::Slider::Pimpl::setTextBoxIsEditable ( bool shouldBeEditable)
inline

◆ setTextBoxStyle()

void juce::Slider::Pimpl::setTextBoxStyle ( TextEntryBoxPosition newPosition,
bool isReadOnly,
int textEntryBoxWidth,
int textEntryBoxHeight )
inline

◆ setTextValueSuffix()

void juce::Slider::Pimpl::setTextValueSuffix ( const String & suffix)
inline

◆ setValue()

void juce::Slider::Pimpl::setValue ( double newValue,
NotificationType notification )
inline

◆ setVelocityModeParameters()

void juce::Slider::Pimpl::setVelocityModeParameters ( double sensitivity,
int threshold,
double offset,
bool userCanPressKeyToSwapMode,
ModifierKeys::Flags newModifierToSwapModes )
inline

◆ showPopupDisplay()

void juce::Slider::Pimpl::showPopupDisplay ( )
inline

◆ showPopupMenu()

void juce::Slider::Pimpl::showPopupMenu ( )
inline

◆ showTextBox()

void juce::Slider::Pimpl::showTextBox ( )
inline

◆ sliderMenuCallback()

void juce::Slider::Pimpl::sliderMenuCallback ( int result,
Slider * slider )
inlinestatic

◆ smallestAngleBetween()

double juce::Slider::Pimpl::smallestAngleBetween ( double a1,
double a2 )
inlinestaticnoexcept

◆ textChanged()

void juce::Slider::Pimpl::textChanged ( )
inline

◆ triggerChangeMessage()

void juce::Slider::Pimpl::triggerChangeMessage ( NotificationType notification)
inline

◆ updatePopupDisplay()

void juce::Slider::Pimpl::updatePopupDisplay ( double valueToShow)
inline

◆ updateRange()

void juce::Slider::Pimpl::updateRange ( )
inline

◆ updateText()

void juce::Slider::Pimpl::updateText ( )
inline

◆ updateTextBoxEnablement()

void juce::Slider::Pimpl::updateTextBoxEnablement ( )
inline

◆ valueChanged()

void juce::Slider::Pimpl::valueChanged ( Value & value)
inlineoverridevirtual

Called when a Value object is changed.

Note that the Value object passed as a parameter may not be exactly the same object that you registered the listener with - it might be a copy that refers to the same underlying ValueSource. To find out, you can call Value::refersToSameSourceAs().

Implements juce::Value::Listener.

Member Data Documentation

◆ currentDrag

std::unique_ptr<ScopedDragNotification> juce::Slider::Pimpl::currentDrag

◆ currentValue

Value juce::Slider::Pimpl::currentValue

◆ decButton

std::unique_ptr<Button> juce::Slider::Pimpl::decButton

◆ doubleClickReturnValue

double juce::Slider::Pimpl::doubleClickReturnValue = 0

◆ doubleClickToValue

bool juce::Slider::Pimpl::doubleClickToValue = false

◆ editableText

bool juce::Slider::Pimpl::editableText = true

◆ incButton

std::unique_ptr<Button> juce::Slider::Pimpl::incButton

◆ incDecButtonMode

IncDecButtonMode juce::Slider::Pimpl::incDecButtonMode = incDecButtonsNotDraggable

◆ incDecButtonsSideBySide

bool juce::Slider::Pimpl::incDecButtonsSideBySide = false

◆ incDecDragged

bool juce::Slider::Pimpl::incDecDragged = false

◆ isVelocityBased

bool juce::Slider::Pimpl::isVelocityBased = false

◆ lastAngle

double juce::Slider::Pimpl::lastAngle = 0

◆ lastCurrentValue

double juce::Slider::Pimpl::lastCurrentValue = 0

◆ lastMouseWheelTime

Time juce::Slider::Pimpl::lastMouseWheelTime

◆ lastPopupDismissal

double juce::Slider::Pimpl::lastPopupDismissal = 0.0

◆ lastValueMax

double juce::Slider::Pimpl::lastValueMax = 0

◆ lastValueMin

double juce::Slider::Pimpl::lastValueMin = 0

◆ listeners

ListenerList<Slider::Listener> juce::Slider::Pimpl::listeners

◆ menuEnabled

bool juce::Slider::Pimpl::menuEnabled = false

◆ minMaxDiff

double juce::Slider::Pimpl::minMaxDiff = 0

◆ modifierToSwapModes

ModifierKeys::Flags juce::Slider::Pimpl::modifierToSwapModes = ModifierKeys::ctrlAltCommandModifiers

◆ mouseDragStartPos

Point<float> juce::Slider::Pimpl::mouseDragStartPos

◆ mousePosWhenLastDragged

Point<float> juce::Slider::Pimpl::mousePosWhenLastDragged

◆ normRange

NormalisableRange<double> juce::Slider::Pimpl::normRange { 0.0, 10.0 }

◆ numDecimalPlaces

int juce::Slider::Pimpl::numDecimalPlaces = 7

◆ owner

Slider& juce::Slider::Pimpl::owner

◆ parentForPopupDisplay

Component* juce::Slider::Pimpl::parentForPopupDisplay = nullptr

◆ pixelsForFullDragExtent

int juce::Slider::Pimpl::pixelsForFullDragExtent = 250

◆ popupDisplay

std::unique_ptr<PopupDisplayComponent> juce::Slider::Pimpl::popupDisplay

◆ popupHoverTimeout

int juce::Slider::Pimpl::popupHoverTimeout = 2000

◆ rotaryParams

RotaryParameters juce::Slider::Pimpl::rotaryParams

◆ scrollWheelEnabled

bool juce::Slider::Pimpl::scrollWheelEnabled = true

◆ sendChangeOnlyOnRelease

bool juce::Slider::Pimpl::sendChangeOnlyOnRelease = false

◆ showPopupOnDrag

bool juce::Slider::Pimpl::showPopupOnDrag = false

◆ showPopupOnHover

bool juce::Slider::Pimpl::showPopupOnHover = false

◆ singleClickModifiers

ModifierKeys juce::Slider::Pimpl::singleClickModifiers

◆ sliderBeingDragged

int juce::Slider::Pimpl::sliderBeingDragged = -1

◆ sliderRect

Rectangle<int> juce::Slider::Pimpl::sliderRect

◆ sliderRegionSize

int juce::Slider::Pimpl::sliderRegionSize = 1

◆ sliderRegionStart

int juce::Slider::Pimpl::sliderRegionStart = 0

◆ snapsToMousePos

bool juce::Slider::Pimpl::snapsToMousePos = true

◆ style

SliderStyle juce::Slider::Pimpl::style

◆ textBoxHeight

int juce::Slider::Pimpl::textBoxHeight = 20

◆ textBoxPos

TextEntryBoxPosition juce::Slider::Pimpl::textBoxPos

◆ textBoxWidth

int juce::Slider::Pimpl::textBoxWidth = 80

◆ textSuffix

String juce::Slider::Pimpl::textSuffix

◆ useDragEvents

bool juce::Slider::Pimpl::useDragEvents = false

◆ userKeyOverridesVelocity

bool juce::Slider::Pimpl::userKeyOverridesVelocity = true

◆ valueBox

std::unique_ptr<Label> juce::Slider::Pimpl::valueBox

◆ valueMax

Value juce::Slider::Pimpl::valueMax

◆ valueMin

Value juce::Slider::Pimpl::valueMin

◆ valueOnMouseDown

double juce::Slider::Pimpl::valueOnMouseDown = 0

◆ valueWhenLastDragged

double juce::Slider::Pimpl::valueWhenLastDragged = 0

◆ velocityModeOffset

double juce::Slider::Pimpl::velocityModeOffset = 0

◆ velocityModeSensitivity

double juce::Slider::Pimpl::velocityModeSensitivity = 1.0

◆ velocityModeThreshold

int juce::Slider::Pimpl::velocityModeThreshold = 1

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