This attachment connects a node in a ValueTree with a combobox.
More...
|
| ValueTreeComboBoxAttachment (juce::ValueTree &attachToTree, juce::ComboBox *comboBoxToAttach, juce::Identifier indexProperty, bool shouldSelectSubNodes, juce::UndoManager *undoManagerToUse=nullptr) |
| Create a ValueTreeComboBoxAttachment It handles updates from a ValueTree to a ComboBox and vice versa. More...
|
|
| ~ValueTreeComboBoxAttachment () |
|
void | comboBoxChanged (juce::ComboBox *comboBoxThatHasChanged) override |
| Updates the ValueTree's property if the ComboBox has changed. More...
|
|
void | valueTreePropertyChanged (juce::ValueTree &treeWhosePropertyHasChanged, const juce::Identifier &changedProperty) override |
| Updates the ComboBox property if the ValueTree has changed. More...
|
|
void | valueTreeChildAdded (juce::ValueTree &parentTree, juce::ValueTree &childWhichHasBeenAdded) override |
| If the ValueTree has new child nodes, they will be added as options in the ComboBox. More...
|
|
void | valueTreeChildRemoved (juce::ValueTree &parentTree, juce::ValueTree &childWhichHasBeenRemoved, int indexFromWhichChildWasRemoved) override |
| If child nodes were removed from the ValueTree, the options of the ComboBox are updated. More...
|
|
void | valueTreeChildOrderChanged (juce::ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex) override |
|
void | valueTreeParentChanged (juce::ValueTree &treeWhoseParentHasChanged) override |
|
void | valueTreeRedirected (juce::ValueTree &treeWhichHasBeenChanged) override |
|
This attachment connects a node in a ValueTree with a combobox.
The ValueTreeComboBoxAttachment supports two modes: selectSubNodes == true: The Combobox is filled with the sub nodes. As combobox items the property is used.
selectSubNodes == false: The combobox has already it's items and the selected index is stored in the property.
ValueTreeComboBoxAttachment::ValueTreeComboBoxAttachment |
( |
juce::ValueTree & |
attachToTree, |
|
|
juce::ComboBox * |
comboBoxToAttach, |
|
|
juce::Identifier |
indexProperty, |
|
|
bool |
shouldSelectSubNodes, |
|
|
juce::UndoManager * |
undoManagerToUse = nullptr |
|
) |
| |
Create a ValueTreeComboBoxAttachment It handles updates from a ValueTree to a ComboBox and vice versa.
If you set
- Parameters
-
selectSubNodes,the | ComboBox will get the child nodes as options. The selected child node will get the property "selected" == 1. |
ValueTreeComboBoxAttachment::~ValueTreeComboBoxAttachment |
( |
| ) |
|
void ValueTreeComboBoxAttachment::comboBoxChanged |
( |
juce::ComboBox * |
comboBoxThatHasChanged | ) |
|
|
override |
Updates the ValueTree's property if the ComboBox has changed.
void ValueTreeComboBoxAttachment::valueTreePropertyChanged |
( |
juce::ValueTree & |
treeWhosePropertyHasChanged, |
|
|
const juce::Identifier & |
changedProperty |
|
) |
| |
|
override |
Updates the ComboBox property if the ValueTree has changed.
void ValueTreeComboBoxAttachment::valueTreeChildAdded |
( |
juce::ValueTree & |
parentTree, |
|
|
juce::ValueTree & |
childWhichHasBeenAdded |
|
) |
| |
|
override |
If the ValueTree has new child nodes, they will be added as options in the ComboBox.
void ValueTreeComboBoxAttachment::valueTreeChildRemoved |
( |
juce::ValueTree & |
parentTree, |
|
|
juce::ValueTree & |
childWhichHasBeenRemoved, |
|
|
int |
indexFromWhichChildWasRemoved |
|
) |
| |
|
override |
If child nodes were removed from the ValueTree, the options of the ComboBox are updated.
void ValueTreeComboBoxAttachment::valueTreeChildOrderChanged |
( |
juce::ValueTree & |
parentTreeWhoseChildrenHaveMoved, |
|
|
int |
oldIndex, |
|
|
int |
newIndex |
|
) |
| |
|
override |
void ValueTreeComboBoxAttachment::valueTreeParentChanged |
( |
juce::ValueTree & |
treeWhoseParentHasChanged | ) |
|
|
override |
void ValueTreeComboBoxAttachment::valueTreeRedirected |
( |
juce::ValueTree & |
treeWhichHasBeenChanged | ) |
|
|
override |
The documentation for this class was generated from the following file: