openshot-audio  0.1.7
Public Member Functions | List of all members
ColourSelector::ColourComponentSlider Class Reference
Inheritance diagram for ColourSelector::ColourComponentSlider:
Slider SettableTooltipClient TooltipClient

Public Member Functions

 ColourComponentSlider (const String &name)
 
String getTextFromValue (double value)
 
double getValueFromText (const String &text)
 
- Public Member Functions inherited from Slider
 Slider ()
 
 Slider (const String &componentName)
 
 Slider (SliderStyle style, TextEntryBoxPosition textBoxPosition)
 
 ~Slider ()
 
void setSliderStyle (SliderStyle newStyle)
 
SliderStyle getSliderStyle () const noexcept
 
void setRotaryParameters (float startAngleRadians, float endAngleRadians, bool stopAtEnd)
 
void setMouseDragSensitivity (int distanceForFullScaleDrag)
 
int getMouseDragSensitivity () const noexcept
 
void setVelocityBasedMode (bool isVelocityBased)
 
bool getVelocityBasedMode () const noexcept
 
void setVelocityModeParameters (double sensitivity=1.0, int threshold=1, double offset=0.0, bool userCanPressKeyToSwapMode=true)
 
double getVelocitySensitivity () const noexcept
 
int getVelocityThreshold () const noexcept
 
double getVelocityOffset () const noexcept
 
bool getVelocityModeIsSwappable () const noexcept
 
void setSkewFactor (double factor)
 
void setSkewFactorFromMidPoint (double sliderValueToShowAtMidPoint)
 
double getSkewFactor () const noexcept
 
void setIncDecButtonsMode (IncDecButtonMode mode)
 
void setTextBoxStyle (TextEntryBoxPosition newPosition, bool isReadOnly, int textEntryBoxWidth, int textEntryBoxHeight)
 
TextEntryBoxPosition getTextBoxPosition () const noexcept
 
int getTextBoxWidth () const noexcept
 
int getTextBoxHeight () const noexcept
 
void setTextBoxIsEditable (bool shouldBeEditable)
 
bool isTextBoxEditable () const noexcept
 
void showTextBox ()
 
void hideTextBox (bool discardCurrentEditorContents)
 
void setValue (double newValue, NotificationType notification=sendNotificationAsync)
 
double getValue () const
 
ValuegetValueObject () noexcept
 
void setRange (double newMinimum, double newMaximum, double newInterval=0)
 
double getMaximum () const noexcept
 
double getMinimum () const noexcept
 
double getInterval () const noexcept
 
double getMinValue () const
 
ValuegetMinValueObject () noexcept
 
void setMinValue (double newValue, NotificationType notification=sendNotificationAsync, bool allowNudgingOfOtherValues=false)
 
double getMaxValue () const
 
ValuegetMaxValueObject () noexcept
 
void setMaxValue (double newValue, NotificationType notification=sendNotificationAsync, bool allowNudgingOfOtherValues=false)
 
void setMinAndMaxValues (double newMinValue, double newMaxValue, NotificationType notification=sendNotificationAsync)
 
void addListener (Listener *listener)
 
void removeListener (Listener *listener)
 
void setDoubleClickReturnValue (bool shouldDoubleClickBeEnabled, double valueToSetOnDoubleClick)
 
double getDoubleClickReturnValue () const noexcept
 
bool isDoubleClickReturnEnabled () const noexcept
 
void setChangeNotificationOnlyOnRelease (bool onlyNotifyOnRelease)
 
void setSliderSnapsToMousePosition (bool shouldSnapToMouse)
 
bool getSliderSnapsToMousePosition () const noexcept
 
void setPopupDisplayEnabled (bool isEnabled, Component *parentComponentToUse)
 
ComponentgetCurrentPopupDisplay () const noexcept
 
void setPopupMenuEnabled (bool menuEnabled)
 
void setScrollWheelEnabled (bool enabled)
 
int getThumbBeingDragged () const noexcept
 
virtual void startedDragging ()
 
virtual void stoppedDragging ()
 
virtual void valueChanged ()
 
void setTextValueSuffix (const String &suffix)
 
String getTextValueSuffix () const
 
int getNumDecimalPlacesToDisplay () const noexcept
 
virtual double proportionOfLengthToValue (double proportion)
 
virtual double valueToProportionOfLength (double value)
 
float getPositionOfValue (double value)
 
virtual double snapValue (double attemptedValue, DragMode dragMode)
 
void updateText ()
 
bool isHorizontal () const noexcept
 
bool isVertical () const noexcept
 
bool isRotary () const noexcept
 
bool isBar () const noexcept
 
void paint (Graphics &) override
 
void resized () override
 
void mouseDown (const MouseEvent &) override
 
void mouseUp (const MouseEvent &) override
 
void mouseDrag (const MouseEvent &) override
 
void mouseDoubleClick (const MouseEvent &) override
 
void mouseWheelMove (const MouseEvent &, const MouseWheelDetails &) override
 
void modifierKeysChanged (const ModifierKeys &) override
 
void lookAndFeelChanged () override
 
void enablementChanged () override
 
void focusOfChildComponentChanged (FocusChangeType) override
 
void colourChanged () override
 
- Public Member Functions inherited from SettableTooltipClient
virtual ~SettableTooltipClient ()
 
virtual void setTooltip (const String &newTooltip)
 
virtual String getTooltip ()
 
- Public Member Functions inherited from TooltipClient
virtual ~TooltipClient ()
 

Additional Inherited Members

- Public Types inherited from Slider
enum  SliderStyle {
  LinearHorizontal, LinearVertical, LinearBar, LinearBarVertical,
  Rotary, RotaryHorizontalDrag, RotaryVerticalDrag, RotaryHorizontalVerticalDrag,
  IncDecButtons, TwoValueHorizontal, TwoValueVertical, ThreeValueHorizontal,
  ThreeValueVertical
}
 
enum  TextEntryBoxPosition {
  NoTextBox, TextBoxLeft, TextBoxRight, TextBoxAbove,
  TextBoxBelow
}
 
enum  DragMode { notDragging, absoluteDrag, velocityDrag }
 
enum  IncDecButtonMode { incDecButtonsNotDraggable, incDecButtonsDraggable_AutoDirection, incDecButtonsDraggable_Horizontal, incDecButtonsDraggable_Vertical }
 
enum  ColourIds {
  backgroundColourId = 0x1001200, thumbColourId = 0x1001300, trackColourId = 0x1001310, rotarySliderFillColourId = 0x1001311,
  rotarySliderOutlineColourId = 0x1001312, textBoxTextColourId = 0x1001400, textBoxBackgroundColourId = 0x1001500, textBoxHighlightColourId = 0x1001600,
  textBoxOutlineColourId = 0x1001700
}
 
- Protected Member Functions inherited from SettableTooltipClient
 SettableTooltipClient ()
 

Constructor & Destructor Documentation

ColourSelector::ColourComponentSlider::ColourComponentSlider ( const String name)
inline

Member Function Documentation

String ColourSelector::ColourComponentSlider::getTextFromValue ( double  value)
inlinevirtual

Turns the slider's current value into a text string.

Subclasses can override this to customise the formatting of the text-entry box.

The default implementation just turns the value into a string, using a number of decimal places based on the range interval. If a suffix string has been set using setTextValueSuffix(), this will be appended to the text.

See Also
getValueFromText

Reimplemented from Slider.

double ColourSelector::ColourComponentSlider::getValueFromText ( const String text)
inlinevirtual

Subclasses can override this to convert a text string to a value.

When the user enters something into the text-entry box, this method is called to convert it to a value. The default implementation just tries to convert it to a double.

See Also
getTextFromValue

Reimplemented from Slider.


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