From 19e1488e1895325bdac4c2bfc1e22ecd7b5e9df0 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 19 Jul 2021 17:43:36 +0100 Subject: [PATCH] Slider: Add getScrollWheelEnabled function --- modules/juce_gui_basics/widgets/juce_Slider.cpp | 1 + modules/juce_gui_basics/widgets/juce_Slider.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index a9b479c203..5fa6f69cd6 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1630,6 +1630,7 @@ void Slider::valueChanged() {} void Slider::setPopupMenuEnabled (bool menuEnabled) { pimpl->menuEnabled = menuEnabled; } void Slider::setScrollWheelEnabled (bool enabled) { pimpl->scrollWheelEnabled = enabled; } +bool Slider::isScrollWheelEnabled() const noexcept { return pimpl->scrollWheelEnabled; } bool Slider::isHorizontal() const noexcept { return pimpl->isHorizontal(); } bool Slider::isVertical() const noexcept { return pimpl->isVertical(); } bool Slider::isRotary() const noexcept { return pimpl->isRotary(); } diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index ae31701d91..146f5bd744 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -701,6 +701,9 @@ public: */ void setScrollWheelEnabled (bool enabled); + /** Returns true if the scroll wheel can move the slider. */ + bool isScrollWheelEnabled() const noexcept; + /** Returns a number to indicate which thumb is currently being dragged by the mouse. This will return 0 for the main thumb, 1 for the minimum-value thumb, 2 for