71 explicit Value (
const var& initialValue);
98 void setValue (
const var& newValue);
107 Value& operator= (
const var& newValue);
120 void referTo (
const Value& valueToReferTo);
124 bool refersToSameSourceAs (
const Value& other)
const;
130 bool operator== (
const Value& other)
const;
136 bool operator!= (
const Value& other)
const;
168 void addListener (
Listener* listener);
171 void removeListener (
Listener* listener);
203 void sendChangeMessage (
bool dispatchSynchronously);
211 void handleAsyncUpdate()
override;
213 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
ValueSource)
227 friend class ValueSource;
231 void callListeners();
232 void removeFromListenerList();
240 explicit Value (
void*) =
delete;
244 OutputStream& JUCE_CALLTYPE operator<< (OutputStream&,
const Value&);
Has a callback method that is triggered asynchronously.
Holds a set of objects and can invoke a member function callback on each object in the set with a sin...
A smart-pointer class which points to a reference-counted object.
A base class which provides methods for reference-counting.
Holds a set of unique primitive objects, such as ints or doubles.
Receives callbacks when a Value object changes.
virtual void valueChanged(Value &value)=0
Called when a Value object is changed.
Used internally by the Value class as the base class for its shared value objects.
virtual var getValue() const =0
Returns the current value of this object.
virtual void setValue(const var &newValue)=0
Changes the current value.
Represents a shared variant value.
ValueSource & getValueSource() noexcept
Returns the ValueSource that this value is referring to.
A variant class, that can be used to hold a range of primitive values.
#define JUCE_API
This macro is added to all JUCE public class declarations.