LMMS
Loading...
Searching...
No Matches
juce::ValueTreePropertyValueSource Struct Reference
Inheritance diagram for juce::ValueTreePropertyValueSource:
juce::Value::ValueSource juce::ValueTree::Listener juce::ReferenceCountedObject juce::AsyncUpdater

Public Member Functions

 ValueTreePropertyValueSource (const ValueTree &vt, const Identifier &prop, UndoManager *um, bool sync)
 ~ValueTreePropertyValueSource () override
var getValue () const override
void setValue (const var &newValue) override
Public Member Functions inherited from juce::Value::ValueSource
 ValueSource ()
 ~ValueSource () override
void sendChangeMessage (bool dispatchSynchronously)
Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
void decReferenceCount () noexcept
bool decReferenceCountWithoutDeleting () noexcept
int getReferenceCount () const noexcept

Private Member Functions

void valueTreePropertyChanged (ValueTree &changedTree, const Identifier &changedProperty) override
void valueTreeChildAdded (ValueTree &, ValueTree &) override
void valueTreeChildRemoved (ValueTree &, ValueTree &, int) override
void valueTreeChildOrderChanged (ValueTree &, int, int) override
void valueTreeParentChanged (ValueTree &) override
Private Member Functions inherited from juce::ValueTree::Listener
virtual ~Listener ()=default
virtual void valueTreeRedirected (ValueTree &treeWhichHasBeenChanged)

Private Attributes

ValueTree tree
const Identifier property
UndoManager *const undoManager
const bool updateSynchronously

Additional Inherited Members

Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject ()=default
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
virtual ~ReferenceCountedObject ()
void resetReferenceCount () noexcept
Protected Attributes inherited from juce::Value::ValueSource
SortedSet< Value * > valuesWithListeners

Constructor & Destructor Documentation

◆ ValueTreePropertyValueSource()

juce::ValueTreePropertyValueSource::ValueTreePropertyValueSource ( const ValueTree & vt,
const Identifier & prop,
UndoManager * um,
bool sync )
inline

◆ ~ValueTreePropertyValueSource()

juce::ValueTreePropertyValueSource::~ValueTreePropertyValueSource ( )
inlineoverride

Member Function Documentation

◆ getValue()

var juce::ValueTreePropertyValueSource::getValue ( ) const
inlineoverridevirtual

Returns the current value of this object.

Implements juce::Value::ValueSource.

◆ setValue()

void juce::ValueTreePropertyValueSource::setValue ( const var & newValue)
inlineoverridevirtual

Changes the current value. This must also trigger a change message if the value actually changes.

Implements juce::Value::ValueSource.

◆ valueTreeChildAdded()

void juce::ValueTreePropertyValueSource::valueTreeChildAdded ( ValueTree & parentTree,
ValueTree & childWhichHasBeenAdded )
inlineoverrideprivatevirtual

This method is called when a child sub-tree is added. Note that when you register a listener to a tree, it will receive this callback for child changes in both that tree and any of its children, (recursively, at any depth). If your tree has sub-trees but you only want to know about changes to the top level tree, just check the parentTree parameter to make sure it's the one that you're interested in.

Reimplemented from juce::ValueTree::Listener.

◆ valueTreeChildOrderChanged()

void juce::ValueTreePropertyValueSource::valueTreeChildOrderChanged ( ValueTree & parentTreeWhoseChildrenHaveMoved,
int oldIndex,
int newIndex )
inlineoverrideprivatevirtual

This method is called when a tree's children have been re-shuffled.

Note that when you register a listener to a tree, it will receive this callback for child changes in both that tree and any of its children, (recursively, at any depth). If your tree has sub-trees but you only want to know about changes to the top level tree, just check the parameter to make sure it's the tree that you're interested in.

Reimplemented from juce::ValueTree::Listener.

◆ valueTreeChildRemoved()

void juce::ValueTreePropertyValueSource::valueTreeChildRemoved ( ValueTree & parentTree,
ValueTree & childWhichHasBeenRemoved,
int indexFromWhichChildWasRemoved )
inlineoverrideprivatevirtual

This method is called when a child sub-tree is removed.

Note that when you register a listener to a tree, it will receive this callback for child changes in both that tree and any of its children, (recursively, at any depth). If your tree has sub-trees but you only want to know about changes to the top level tree, just check the parentTree parameter to make sure it's the one that you're interested in.

Reimplemented from juce::ValueTree::Listener.

◆ valueTreeParentChanged()

void juce::ValueTreePropertyValueSource::valueTreeParentChanged ( ValueTree & treeWhoseParentHasChanged)
inlineoverrideprivatevirtual

This method is called when a tree has been added or removed from a parent.

This callback happens when the tree to which the listener was registered is added or removed from a parent. Unlike the other callbacks, it applies only to the tree to which the listener is registered, and not to any of its children.

Reimplemented from juce::ValueTree::Listener.

◆ valueTreePropertyChanged()

void juce::ValueTreePropertyValueSource::valueTreePropertyChanged ( ValueTree & treeWhosePropertyHasChanged,
const Identifier & property )
inlineoverrideprivatevirtual

This method is called when a property of this tree (or of one of its sub-trees) is changed. Note that when you register a listener to a tree, it will receive this callback for property changes in that tree, and also for any of its children, (recursively, at any depth). If your tree has sub-trees but you only want to know about changes to the top level tree, simply check the tree parameter in this callback to make sure it's the tree you're interested in.

Reimplemented from juce::ValueTree::Listener.

Member Data Documentation

◆ property

const Identifier juce::ValueTreePropertyValueSource::property
private

◆ tree

ValueTree juce::ValueTreePropertyValueSource::tree
private

◆ undoManager

UndoManager* const juce::ValueTreePropertyValueSource::undoManager
private

◆ updateSynchronously

const bool juce::ValueTreePropertyValueSource::updateSynchronously
private

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