25 #ifndef JUCE_SLIDER_H_INCLUDED 26 #define JUCE_SLIDER_H_INCLUDED 71 RotaryHorizontalVerticalDrag,
154 void setRotaryParameters (
float startAngleRadians,
155 float endAngleRadians,
164 void setMouseDragSensitivity (
int distanceForFullScaleDrag);
178 void setVelocityBasedMode (
bool isVelocityBased);
183 bool getVelocityBasedMode()
const noexcept;
198 void setVelocityModeParameters (
double sensitivity = 1.0,
201 bool userCanPressKeyToSwapMode =
true);
206 double getVelocitySensitivity()
const noexcept;
211 int getVelocityThreshold()
const noexcept;
216 double getVelocityOffset()
const noexcept;
221 bool getVelocityModeIsSwappable()
const noexcept;
239 void setSkewFactor (
double factor);
248 void setSkewFactorFromMidPoint (
double sliderValueToShowAtMidPoint);
254 double getSkewFactor()
const noexcept;
264 incDecButtonsDraggable_Vertical
293 int textEntryBoxWidth,
294 int textEntryBoxHeight);
309 int getTextBoxHeight()
const noexcept;
318 void setTextBoxIsEditable (
bool shouldBeEditable);
323 bool isTextBoxEditable()
const noexcept;
339 void hideTextBox (
bool discardCurrentEditorContents);
359 double getValue()
const;
367 Value& getValueObject() noexcept;
377 void setRange (
double newMinimum,
379 double newInterval = 0);
384 double getMaximum() const noexcept;
389 double getMinimum() const noexcept;
394 double getInterval() const noexcept;
405 double getMinValue() const;
413 Value& getMinValueObject() noexcept;
433 void setMinValue (
double newValue,
435 bool allowNudgingOfOtherValues =
false);
445 double getMaxValue() const;
453 Value& getMaxValueObject() noexcept;
473 void setMaxValue (
double newValue,
475 bool allowNudgingOfOtherValues = false);
492 void setMinAndMaxValues (
double newMinValue,
double newMaxValue,
520 virtual void sliderValueChanged (
Slider* slider) = 0;
540 void addListener (
Listener* listener);
543 void removeListener (
Listener* listener);
554 void setDoubleClickReturnValue (
bool shouldDoubleClickBeEnabled,
555 double valueToSetOnDoubleClick);
560 double getDoubleClickReturnValue()
const noexcept;
565 bool isDoubleClickReturnEnabled()
const noexcept;
576 void setChangeNotificationOnlyOnRelease (
bool onlyNotifyOnRelease);
587 void setSliderSnapsToMousePosition (
bool shouldSnapToMouse);
590 bool getSliderSnapsToMousePosition()
const noexcept;
604 void setPopupDisplayEnabled (
bool isEnabled,
Component* parentComponentToUse);
619 void setPopupMenuEnabled (
bool menuEnabled);
624 void setScrollWheelEnabled (
bool enabled);
631 int getThumbBeingDragged()
const noexcept;
637 virtual void startedDragging();
642 virtual void stoppedDragging();
647 virtual void valueChanged();
658 virtual double getValueFromText (
const String& text);
670 virtual String getTextFromValue (
double value);
679 void setTextValueSuffix (
const String& suffix);
682 String getTextValueSuffix()
const;
689 int getNumDecimalPlacesToDisplay()
const noexcept;
703 virtual double proportionOfLengthToValue (
double proportion);
718 virtual double valueToProportionOfLength (
double value);
729 float getPositionOfValue (
double value);
744 virtual double snapValue (
double attemptedValue,
DragMode dragMode);
772 backgroundColourId = 0x1001200,
773 thumbColourId = 0x1001300,
775 trackColourId = 0x1001310,
776 rotarySliderFillColourId = 0x1001311,
777 rotarySliderOutlineColourId = 0x1001312,
779 textBoxTextColourId = 0x1001400,
780 textBoxBackgroundColourId = 0x1001500,
781 textBoxHighlightColourId = 0x1001600,
782 textBoxOutlineColourId = 0x1001700
804 virtual void drawLinearSlider (
Graphics&,
805 int x,
int y,
int width,
int height,
812 virtual void drawLinearSliderBackground (
Graphics&,
813 int x,
int y,
int width,
int height,
820 virtual void drawLinearSliderThumb (
Graphics&,
821 int x,
int y,
int width,
int height,
828 virtual int getSliderThumbRadius (
Slider&) = 0;
830 virtual void drawRotarySlider (
Graphics&,
831 int x,
int y,
int width,
int height,
832 float sliderPosProportional,
833 float rotaryStartAngle,
834 float rotaryEndAngle,
837 virtual Button* createSliderButton (
Slider&,
bool isIncrement) = 0;
842 virtual Font getSliderPopupFont (
Slider&) = 0;
843 virtual int getSliderPopupPlacement (
Slider&) = 0;
847 #if JUCE_CATCH_DEPRECATED_CODE_MISUSE 849 virtual void createSliderButton (
bool) {}
850 virtual void getSliderEffect() {}
851 virtual void getSliderPopupFont() {}
852 virtual void getSliderPopupPlacement() {}
860 void resized()
override;
868 void mouseDoubleClick (
const MouseEvent&)
override;
872 void modifierKeysChanged (
const ModifierKeys&)
override;
874 void lookAndFeelChanged()
override;
876 void enablementChanged()
override;
880 void colourChanged()
override;
891 #if JUCE_CATCH_DEPRECATED_CODE_MISUSE 901 JUCE_DEPRECATED (
void setMinAndMaxValues (
double,
double,
bool,
bool));
903 virtual void snapValue (
double,
bool) {}
912 #endif // JUCE_SLIDER_H_INCLUDED Definition: juce_Slider.h:62
Definition: juce_Slider.h:93
Rectangle< int > sliderBounds
Definition: juce_Slider.h:791
ColourIds
Definition: juce_Slider.h:770
Definition: juce_Slider.h:95
virtual ~LookAndFeelMethods()
Definition: juce_Slider.h:801
Definition: juce_Font.h:39
#define true
Definition: ordinals.h:82
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_Slider.h:63
Definition: juce_NotificationType.h:38
TextEntryBoxPosition
Definition: juce_Slider.h:91
SliderStyle
Definition: juce_Slider.h:59
FocusChangeType
Definition: juce_Component.h:1702
Definition: juce_ModifierKeys.h:38
Definition: juce_Slider.cpp:25
DragMode
Definition: juce_Slider.h:103
#define false
Definition: ordinals.h:83
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
#define JUCE_PUBLIC_IN_DLL_BUILD(declaration)
Definition: juce_StandardHeader.h:145
Definition: juce_Slider.h:96
png_structrp int mode
Definition: juce_PNGLoader.cpp:1243
Definition: juce_Rectangle.h:36
Definition: juce_Label.h:34
NotificationType
Definition: juce_NotificationType.h:33
virtual void sliderDragEnded(Slider *)
Definition: juce_Slider.h:536
Rectangle< int > textBoxBounds
Definition: juce_Slider.h:792
Definition: juce_Slider.h:263
Definition: juce_Slider.h:106
Definition: juce_Component.h:33
Definition: juce_ScopedPointer.h:70
IncDecButtonMode
Definition: juce_Slider.h:259
Definition: juce_MouseEvent.h:329
Definition: juce_Slider.h:73
png_const_structrp png_const_inforp int png_fixed_point * width
Definition: juce_PNGLoader.cpp:2339
Slider::Listener SliderListener
Definition: juce_Slider.h:910
Definition: juce_Slider.h:503
Definition: juce_ContainerDeletePolicy.h:44
Definition: juce_Slider.h:262
Definition: juce_Value.h:44
Definition: juce_Slider.h:789
Definition: juce_GraphicsContext.h:42
virtual void sliderDragStarted(Slider *)
Definition: juce_Slider.h:531
Definition: juce_Slider.h:105
Definition: juce_Slider.h:94
Definition: juce_Slider.h:61
Definition: juce_Slider.h:50
Definition: juce_Slider.h:799
Definition: juce_MouseEvent.h:36
Definition: juce_Slider.h:64
virtual ~Listener()
Definition: juce_Slider.h:508
Definition: juce_Slider.h:261
Definition: juce_ImageEffectFilter.h:40