JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
ValueTree::Listener Class Reference

Listener class for events that happen to a ValueTree. More...

Inherited by ComponentBuilder.

List of all members.

Public Member Functions

virtual ~Listener ()
 Destructor.
virtual void valueTreePropertyChanged (ValueTree &treeWhosePropertyHasChanged, const Identifier &property)=0
 This method is called when a property of this node (or of one of its sub-nodes) has changed.
virtual void valueTreeChildAdded (ValueTree &parentTree, ValueTree &childWhichHasBeenAdded)=0
 This method is called when a child sub-tree is added.
virtual void valueTreeChildRemoved (ValueTree &parentTree, ValueTree &childWhichHasBeenRemoved)=0
 This method is called when a child sub-tree is removed.
virtual void valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved)=0
 This method is called when a tree's children have been re-shuffled.
virtual void valueTreeParentChanged (ValueTree &treeWhoseParentHasChanged)=0
 This method is called when a tree has been added or removed from a parent node.

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.


Constructor & Destructor Documentation

virtual ValueTree::Listener::~Listener ( ) [virtual]

Destructor.


Member Function Documentation

virtual void ValueTree::Listener::valueTreePropertyChanged ( ValueTree treeWhosePropertyHasChanged,
const Identifier property 
) [pure virtual]

This method is called when a property of this node (or of one of its sub-nodes) has changed.

The tree parameter indicates which tree has had its property changed, and the property parameter indicates the property.

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.

Implemented in ComponentBuilder.

virtual void ValueTree::Listener::valueTreeChildAdded ( ValueTree parentTree,
ValueTree childWhichHasBeenAdded 
) [pure 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.

Implemented in ComponentBuilder.

virtual void ValueTree::Listener::valueTreeChildRemoved ( ValueTree parentTree,
ValueTree childWhichHasBeenRemoved 
) [pure 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.

Implemented in ComponentBuilder.

virtual void ValueTree::Listener::valueTreeChildOrderChanged ( ValueTree parentTreeWhoseChildrenHaveMoved) [pure 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.

Implemented in ComponentBuilder.

virtual void ValueTree::Listener::valueTreeParentChanged ( ValueTree treeWhoseParentHasChanged) [pure virtual]

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

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.

Implemented in ComponentBuilder.


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