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

Added a parameter to Slider::setPopupDisplayEnabled() to allow the popup to optionally appear on a mouse-over as well as a drag

This commit is contained in:
jules 2017-08-15 09:53:29 +01:00
parent 723a15c7a0
commit 55f536078a
3 changed files with 91 additions and 46 deletions

View file

@ -616,7 +616,7 @@ public:
bool getSliderSnapsToMousePosition() const noexcept;
/** If enabled, this gives the slider a pop-up bubble which appears while the
slider is being dragged.
slider is being dragged or hovered-over.
This can be handy if your slider doesn't have a text-box, so that users can
see the value just when they're changing it.
@ -627,7 +627,9 @@ public:
transparent window, so if you're using an OS that can't do transparent windows
you'll have to add it to a parent component instead).
*/
void setPopupDisplayEnabled (bool isEnabled, Component* parentComponentToUse);
void setPopupDisplayEnabled (bool shouldShowOnMouseDrag,
bool shouldShowOnMouseHover,
Component* parentComponentToUse);
/** If a popup display is enabled and is currently visible, this returns the component
that is being shown, or nullptr if none is currently in use.
@ -904,6 +906,10 @@ public:
void focusOfChildComponentChanged (FocusChangeType) override;
/** @internal */
void colourChanged() override;
/** @internal */
void mouseMove (const MouseEvent&) override;
/** @internal */
void mouseExit (const MouseEvent&) override;
private:
//==============================================================================