ffGuiAttachments
Attaches JUCE Components to ValueTrees to synchronise
 All Classes Namespaces Files Functions Pages
Public Member Functions | List of all members
ValueTreeLabelAttachment Class Reference

Connects a Label to a ValueTree node to synchronise. More...

+ Inheritance diagram for ValueTreeLabelAttachment:

Public Member Functions

 ValueTreeLabelAttachment (juce::ValueTree &attachToTree, juce::Label *attachToLabel, juce::Identifier textProperty, juce::UndoManager *undoManagerToUse=nullptr)
 Creates an attachment to synchronise a Label to a ValueTree node. More...
 
 ~ValueTreeLabelAttachment ()
 
void labelTextChanged (juce::Label *_label) override
 This updates the ValueTree to the Label's text. More...
 
void valueTreePropertyChanged (juce::ValueTree &treeWhosePropertyHasChanged, const juce::Identifier &_property) override
 This updates the Label to display the ValueTree's property. More...
 
void valueTreeChildAdded (juce::ValueTree &parentTree, juce::ValueTree &childWhichHasBeenAdded) override
 
void valueTreeChildRemoved (juce::ValueTree &parentTree, juce::ValueTree &childWhichHasBeenRemoved, int indexFromWhichChildWasRemoved) override
 
void valueTreeChildOrderChanged (juce::ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex) override
 
void valueTreeParentChanged (juce::ValueTree &treeWhoseParentHasChanged) override
 
void valueTreeRedirected (juce::ValueTree &treeWhichHasBeenChanged) override
 

Detailed Description

Connects a Label to a ValueTree node to synchronise.

Constructor & Destructor Documentation

ValueTreeLabelAttachment::ValueTreeLabelAttachment ( juce::ValueTree &  attachToTree,
juce::Label *  attachToLabel,
juce::Identifier  textProperty,
juce::UndoManager *  undoManagerToUse = nullptr 
)

Creates an attachment to synchronise a Label to a ValueTree node.

You can set a

Parameters
property,inwhich the text the label is showing is stored
ValueTreeLabelAttachment::~ValueTreeLabelAttachment ( )

Member Function Documentation

void ValueTreeLabelAttachment::labelTextChanged ( juce::Label *  _label)
override

This updates the ValueTree to the Label's text.

void ValueTreeLabelAttachment::valueTreePropertyChanged ( juce::ValueTree &  treeWhosePropertyHasChanged,
const juce::Identifier &  _property 
)
override

This updates the Label to display the ValueTree's property.

void ValueTreeLabelAttachment::valueTreeChildAdded ( juce::ValueTree &  parentTree,
juce::ValueTree &  childWhichHasBeenAdded 
)
override
void ValueTreeLabelAttachment::valueTreeChildRemoved ( juce::ValueTree &  parentTree,
juce::ValueTree &  childWhichHasBeenRemoved,
int  indexFromWhichChildWasRemoved 
)
override
void ValueTreeLabelAttachment::valueTreeChildOrderChanged ( juce::ValueTree &  parentTreeWhoseChildrenHaveMoved,
int  oldIndex,
int  newIndex 
)
override
void ValueTreeLabelAttachment::valueTreeParentChanged ( juce::ValueTree &  treeWhoseParentHasChanged)
override
void ValueTreeLabelAttachment::valueTreeRedirected ( juce::ValueTree &  treeWhichHasBeenChanged)
override

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