Loading...
Searching...
No Matches
juce::ValueTree::Listener Class Reference

## Detailed Description

Listener class for events that happen to a ValueTree.

To get events from a ValueTree, make your class implement this interface, and use ValueTree::addListener() and ValueTree::removeListener() to register it.

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

- juce_data_structures/values/juce_ValueTree.h

Inheritance diagram for juce::ValueTree::Listener:

## Public Member Functions

virtual | ~Listener ()=default
| Destructor.
virtual void | valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property)
| This method is called when a property of this tree (or of one of its sub-trees) is changed.
virtual void | valueTreeChildAdded (ValueTree &parentTree, ValueTree &childWhichHasBeenAdded)
| This method is called when a child sub-tree is added.
virtual void | valueTreeChildRemoved (ValueTree &parentTree, ValueTree &childWhichHasBeenRemoved, int indexFromWhichChildWasRemoved)
| This method is called when a child sub-tree is removed.
virtual void | valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex)
| This method is called when a tree's children have been re-shuffled.
virtual void | valueTreeParentChanged (ValueTree &treeWhoseParentHasChanged)
| This method is called when a tree has been added or removed from a parent.
virtual void | valueTreeRedirected (ValueTree &treeWhichHasBeenChanged)
| This method is called when a tree is made to point to a different internal shared object.

## Constructors and Destructors

## ~Listener()

virtual juce::ValueTree::Listener::~Listener | ( |  | ) |

virtual default

Destructor.

## Member Functions

## valueTreePropertyChanged()

virtual void juce::ValueTree::Listener::valueTreePropertyChanged | ( | ValueTree & | treeWhosePropertyHasChanged,
|  | const Identifier & | property )

virtual

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.

References juce::ValueTree::ValueTree().

## valueTreeChildAdded()

virtual void juce::ValueTree::Listener::valueTreeChildAdded | ( | ValueTree & | parentTree,
|  | ValueTree & | childWhichHasBeenAdded )

virtual

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.

References juce::ValueTree::ValueTree().

## valueTreeChildRemoved()

virtual void juce::ValueTree::Listener::valueTreeChildRemoved | ( | ValueTree & | parentTree,
|  | ValueTree & | childWhichHasBeenRemoved,
|  | int | indexFromWhichChildWasRemoved )

virtual

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.

References juce::ValueTree::ValueTree().

## valueTreeChildOrderChanged()

virtual void juce::ValueTree::Listener::valueTreeChildOrderChanged | ( | ValueTree & | parentTreeWhoseChildrenHaveMoved,
|  | int | oldIndex,
|  | int | newIndex )

virtual

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.

References juce::ValueTree::ValueTree().

## valueTreeParentChanged()

virtual void juce::ValueTree::Listener::valueTreeParentChanged | ( | ValueTree & | treeWhoseParentHasChanged | ) |

virtual

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.

References juce::ValueTree::ValueTree().

## valueTreeRedirected()

virtual void juce::ValueTree::Listener::valueTreeRedirected | ( | ValueTree & | treeWhichHasBeenChanged | ) |

virtual

This method is called when a tree is made to point to a different internal shared object.

When operator= is used to make a ValueTree refer to a different object, this callback will be made.

References juce::ValueTree::ValueTree().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited