mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
Added Value support to the Button's toggle state and TextEditor content. Refactored the atomic operation functions to live inside a class called Atomic, and the byte order functions into a class called ByteOrder.
This commit is contained in:
parent
3ddbc82f9f
commit
18ffeba9da
64 changed files with 3721 additions and 3609 deletions
|
|
@ -457,9 +457,9 @@ void Slider::valueChanged (Value& value)
|
|||
setValue (currentValue.getValue(), false, false);
|
||||
}
|
||||
else if (value.refersToSameSourceAs (valueMin))
|
||||
setMinValue (valueMin.getValue(), false, false);
|
||||
setMinValue (valueMin.getValue(), false, false, true);
|
||||
else if (value.refersToSameSourceAs (valueMax))
|
||||
setMaxValue (valueMax.getValue(), false, false);
|
||||
setMaxValue (valueMax.getValue(), false, false, true);
|
||||
}
|
||||
|
||||
double Slider::getValue() const
|
||||
|
|
@ -496,7 +496,7 @@ void Slider::setValue (double newValue,
|
|||
valueBox->hideEditor (true);
|
||||
|
||||
lastCurrentValue = newValue;
|
||||
currentValue = var (newValue);
|
||||
currentValue = newValue;
|
||||
updateText();
|
||||
repaint();
|
||||
|
||||
|
|
@ -546,10 +546,10 @@ void Slider::setMinValue (double newValue, const bool sendUpdateMessage, const b
|
|||
}
|
||||
else
|
||||
{
|
||||
if (allowNudgingOfOtherValues && newValue > (double) currentValue.getValue())
|
||||
if (allowNudgingOfOtherValues && newValue > lastCurrentValue)
|
||||
setValue (newValue, sendUpdateMessage, sendMessageSynchronously);
|
||||
|
||||
newValue = jmin ((double) currentValue.getValue(), newValue);
|
||||
newValue = jmin (lastCurrentValue, newValue);
|
||||
}
|
||||
|
||||
if (lastValueMin != newValue)
|
||||
|
|
@ -586,10 +586,10 @@ void Slider::setMaxValue (double newValue, const bool sendUpdateMessage, const b
|
|||
}
|
||||
else
|
||||
{
|
||||
if (allowNudgingOfOtherValues && newValue < (double) currentValue.getValue())
|
||||
if (allowNudgingOfOtherValues && newValue < lastCurrentValue)
|
||||
setValue (newValue, sendUpdateMessage, sendMessageSynchronously);
|
||||
|
||||
newValue = jmax ((double) currentValue.getValue(), newValue);
|
||||
newValue = jmax (lastCurrentValue, newValue);
|
||||
}
|
||||
|
||||
if (lastValueMax != newValue)
|
||||
|
|
@ -824,7 +824,7 @@ void Slider::paint (Graphics& g)
|
|||
{
|
||||
if (style == Rotary || style == RotaryHorizontalDrag || style == RotaryVerticalDrag)
|
||||
{
|
||||
const float sliderPos = (float) valueToProportionOfLength (currentValue.getValue());
|
||||
const float sliderPos = (float) valueToProportionOfLength (lastCurrentValue);
|
||||
jassert (sliderPos >= 0 && sliderPos <= 1.0f);
|
||||
|
||||
getLookAndFeel().drawRotarySlider (g,
|
||||
|
|
@ -843,9 +843,9 @@ void Slider::paint (Graphics& g)
|
|||
sliderRect.getY(),
|
||||
sliderRect.getWidth(),
|
||||
sliderRect.getHeight(),
|
||||
getLinearSliderPos (currentValue.getValue()),
|
||||
getLinearSliderPos (valueMin.getValue()),
|
||||
getLinearSliderPos (valueMax.getValue()),
|
||||
getLinearSliderPos (lastCurrentValue),
|
||||
getLinearSliderPos (lastValueMin),
|
||||
getLinearSliderPos (lastValueMax),
|
||||
style,
|
||||
*this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue