1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Accessibility: Added ScopedDragNotification for sending slider drag notifications

This commit is contained in:
ed 2021-09-06 10:03:13 +01:00
parent 8d6ba3b54e
commit 3739fe4829
2 changed files with 116 additions and 91 deletions

View file

@ -886,6 +886,27 @@ public:
Rectangle<int> textBoxBounds;
};
//==============================================================================
/** An RAII class for sending slider listener drag messages.
This is useful if you are programatically updating the slider's value and want
to imitate a mouse event, for example in a custom AccessibilityHandler.
@see Slider::Listener
*/
class JUCE_API ScopedDragNotification
{
public:
explicit ScopedDragNotification (Slider&);
~ScopedDragNotification();
private:
Slider& sliderBeingDragged;
JUCE_DECLARE_NON_MOVEABLE (ScopedDragNotification)
JUCE_DECLARE_NON_COPYABLE (ScopedDragNotification)
};
//==============================================================================
/** This abstract base class is implemented by LookAndFeel classes to provide
slider drawing functionality.