39 for (
auto* c :
other.children)
53 for (
auto i = children.size(); --i >= 0;)
55 const Ptr c (children.getObjectPointerUnchecked (i));
58 c->sendParentChangeMessage();
64 return parent ==
nullptr ? *
this : parent->getRoot();
67 template <
typename Function>
74 valueTreesWithListeners.getUnchecked (0)->listeners.callExcluding (
listenerToExclude, fn);
84 if (i == 0 || valueTreesWithListeners.contains (v))
90 template <
typename Function>
93 for (
auto* t =
this; t !=
nullptr; t = t->parent)
103 void sendChildAddedMessage (
ValueTree child)
106 callListenersForAllParents (
nullptr, [&] (
Listener&
l) {
l.valueTreeChildAdded (tree, child); });
109 void sendChildRemovedMessage (
ValueTree child,
int index)
112 callListenersForAllParents (
nullptr, [=, &tree, &child] (
Listener&
l) {
l.valueTreeChildRemoved (tree, child, index); });
121 void sendParentChangeMessage()
125 for (
auto j = children.size(); --
j >= 0;)
126 if (
auto* child = children.getObjectPointer (
j))
127 child->sendParentChangeMessage();
129 callListeners (
nullptr, [&] (
Listener&
l) {
l.valueTreeParentChanged (tree); });
135 if (undoManager ==
nullptr)
137 if (properties.
set (name, newValue))
156 bool hasProperty (
const Identifier& name)
const noexcept
163 if (undoManager ==
nullptr)
165 if (properties.
remove (name))
166 sendPropertyChangeMessage (name);
175 void removeAllProperties (
UndoManager* undoManager)
177 if (undoManager ==
nullptr)
179 while (properties.
size() > 0)
181 auto name = properties.
getName (properties.
size() - 1);
183 sendPropertyChangeMessage (name);
188 for (
auto i = properties.
size(); --i >= 0;)
196 for (
auto i = properties.
size(); --i >= 0;)
198 removeProperty (properties.
getName (i), undoManager);
200 for (
int i = 0; i < source.properties.
size(); ++i)
201 setProperty (source.properties.
getName (i), source.properties.
getValueAt (i), undoManager);
206 for (
auto* s : children)
215 for (
auto* s : children)
226 for (
auto* s : children)
235 for (
auto* p = parent; p !=
nullptr; p = p->parent)
242 int indexOf (
const ValueTree& child)
const noexcept
244 return children.indexOf (child.object);
249 if (child !=
nullptr && child->parent !=
this)
251 if (child !=
this && ! isAChildOf (child))
256 jassert (child->parent ==
nullptr);
258 if (child->parent !=
nullptr)
264 if (undoManager ==
nullptr)
266 children.insert (index, child);
267 child->parent =
this;
268 sendChildAddedMessage (
ValueTree (*child));
269 child->sendParentChangeMessage();
274 index = children.size();
288 void removeChild (
int childIndex,
UndoManager* undoManager)
290 if (
auto child =
Ptr (children.getObjectPointer (childIndex)))
292 if (undoManager ==
nullptr)
294 children.remove (childIndex);
295 child->parent =
nullptr;
296 sendChildRemovedMessage (
ValueTree (child), childIndex);
297 child->sendParentChangeMessage();
308 while (children.size() > 0)
309 removeChild (children.size() - 1, undoManager);
320 if (undoManager ==
nullptr)
339 for (
int i = 0; i < children.size(); ++i)
341 auto* child =
newOrder.getUnchecked (i)->object.get();
343 if (children.getObjectPointerUnchecked (i) != child)
345 auto oldIndex = children.indexOf (child);
347 moveChild (
oldIndex, i, undoManager);
354 if (type !=
other.type
355 || properties.
size() !=
other.properties.size()
356 || children.size() !=
other.children.size()
357 || properties !=
other.properties)
360 for (
int i = 0; i < children.size(); ++i)
361 if (! children.getObjectPointerUnchecked (i)->isEquivalentTo (*
other.children.getObjectPointerUnchecked (i)))
373 for (
auto i = children.size(); --i >= 0;)
374 xml->prependChildElement (children.getObjectPointerUnchecked (i)->createXml());
384 for (
int j = 0;
j < properties.
size(); ++
j)
392 for (
auto* c : children)
393 writeObjectToStream (output, c);
398 if (
object !=
nullptr)
400 object->writeToStream (output);
418 isAddingNewProperty (
isAdding), isDeletingProperty (isDeleting),
425 jassert (! (isAddingNewProperty && target->hasProperty (name)));
427 if (isDeletingProperty)
428 target->removeProperty (name,
nullptr);
430 target->setProperty (name, newValue,
nullptr, excludeListener);
437 if (isAddingNewProperty)
438 target->removeProperty (name,
nullptr);
440 target->setProperty (name, oldValue,
nullptr);
447 return (
int)
sizeof (*this);
452 if (! (isAddingNewProperty || isDeletingProperty))
455 if (next->target == target && next->name == name
456 && ! (next->isAddingNewProperty || next->isDeletingProperty))
457 return new SetPropertyAction (*target, name, next->newValue, oldValue,
false,
false);
468 const bool isAddingNewProperty : 1, isDeletingProperty : 1;
479 child (
newChild !=
nullptr ?
newChild : target->children.getObjectPointer (index)),
489 target->removeChild (childIndex,
nullptr);
491 target->addChild (child.get(), childIndex,
nullptr);
500 target->addChild (child.get(), childIndex,
nullptr);
507 target->removeChild (childIndex,
nullptr);
515 return (
int)
sizeof (*this);
519 const Ptr target, child;
520 const int childIndex;
521 const bool isDeleting;
536 parent->moveChild (startIndex, endIndex,
nullptr);
542 parent->moveChild (endIndex, startIndex,
nullptr);
548 return (
int)
sizeof (*this);
554 if (next->parent == parent && next->startIndex == endIndex)
562 const int startIndex, endIndex;
607 if (
object !=
other.object)
609 if (listeners.isEmpty())
611 object =
other.object;
615 if (
object !=
nullptr)
616 object->valueTreesWithListeners.removeValue (
this);
618 if (
other.object !=
nullptr)
619 other.object->valueTreesWithListeners.add (
this);
621 object =
other.object;
623 listeners.call ([
this] (
Listener&
l) {
l.valueTreeRedirected (*
this); });
631 : object (std::move (
other.object))
633 if (
object !=
nullptr)
634 object->valueTreesWithListeners.removeValue (&
other);
639 if (! listeners.isEmpty() &&
object !=
nullptr)
640 object->valueTreesWithListeners.removeValue (
this);
645 return object ==
other.object;
650 return object !=
other.object;
655 return object ==
other.object
656 || (
object !=
nullptr &&
other.object !=
nullptr
657 &&
object->isEquivalentTo (*
other.object));
662 if (
object !=
nullptr)
670 jassert (
object !=
nullptr || source.object ==
nullptr);
675 if (source.object ==
nullptr)
677 else if (
object !=
nullptr)
678 object->copyPropertiesFrom (*(source.object), undoManager);
683 jassert (
object !=
nullptr || source.object ==
nullptr);
691 if (
object !=
nullptr && source.object !=
nullptr)
692 for (
auto& child : source.object->children)
698 return object !=
nullptr &&
object->type == typeName;
703 return object !=
nullptr ?
object->type :
Identifier();
708 if (
object !=
nullptr)
709 if (
auto p = object->parent)
717 if (
object !=
nullptr)
725 if (
object !=
nullptr)
726 if (
auto* p = object->parent)
727 if (
auto* c = p->children.getObjectPointer (p->indexOf (*
this) + delta))
733static const var& getNullVarRef() noexcept
741 return object ==
nullptr ? getNullVarRef() :
object->properties[name];
746 return object ==
nullptr ? getNullVarRef() :
object->properties[name];
757 return object ==
nullptr ?
nullptr
758 :
object->properties.getVarPointer (name);
772 if (
object !=
nullptr)
780 return object !=
nullptr &&
object->hasProperty (name);
785 if (
object !=
nullptr)
786 object->removeProperty (name, undoManager);
791 if (
object !=
nullptr)
792 object->removeAllProperties (undoManager);
797 return object ==
nullptr ? 0 :
object->properties.size();
803 :
object->properties.getName (index);
808 return object !=
nullptr ?
object->getReferenceCount() : 0;
816 : tree (
vt), property (
prop), undoManager (
um), updateSynchronously (
sync)
833 const bool updateSynchronously;
841 void valueTreeChildAdded (ValueTree&, ValueTree&)
override {}
842 void valueTreeChildRemoved (ValueTree&, ValueTree&,
int)
override {}
843 void valueTreeChildOrderChanged (ValueTree&,
int,
int)
override {}
844 void valueTreeParentChanged (ValueTree&)
override {}
857 return object ==
nullptr ? 0 :
object->children.size();
862 if (
object !=
nullptr)
863 if (
auto* c = object->children.getObjectPointer (index))
874ValueTree::Iterator& ValueTree::Iterator::operator++()
880bool ValueTree::Iterator::operator== (
const Iterator&
other)
const {
return internal ==
other.internal; }
881bool ValueTree::Iterator::operator!= (
const Iterator&
other)
const {
return internal !=
other.internal; }
883ValueTree ValueTree::Iterator::operator*()
const
885 return ValueTree (SharedObject::Ptr (*internal));
908 return object !=
nullptr &&
object->isAChildOf (
possibleParent.object.get());
913 return object !=
nullptr ?
object->indexOf (child) : -1;
920 if (
object !=
nullptr)
921 object->addChild (child.object.get(), index, undoManager);
931 if (
object !=
nullptr)
932 object->removeChild (childIndex, undoManager);
937 if (
object !=
nullptr)
938 object->removeChild (object->children.indexOf (child.object), undoManager);
943 if (
object !=
nullptr)
944 object->removeAllChildren (undoManager);
949 if (
object !=
nullptr)
956 if (
object !=
nullptr)
957 for (
auto*
o : object->children)
964 if (
object !=
nullptr)
965 object->reorderChildren (
newOrder, undoManager);
971 if (listener !=
nullptr)
973 if (listeners.isEmpty() &&
object !=
nullptr)
974 object->valueTreesWithListeners.add (
this);
976 listeners.add (listener);
982 listeners.remove (listener);
984 if (listeners.isEmpty() &&
object !=
nullptr)
985 object->valueTreesWithListeners.removeValue (
this);
990 if (
object !=
nullptr)
991 object->sendPropertyChangeMessage (property);
1005 v.object->properties.setFromXmlAttributes (xml);
1029 return xml->toString (format);
1037 SharedObject::writeObjectToStream (output,
object.get());
1061 if (name.isNotEmpty())
1068 v.object->children.ensureStorageAllocated (
numChildren);
1074 if (! child.isValid())
1077 v.object->children.add (child.object);
1078 child.object->parent = v.object.get();
1105#if JUCE_ALLOW_STATIC_NULL_VARIABLES
1107JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE (
"-Wdeprecated-declarations")
1108JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
1112JUCE_END_IGNORE_WARNINGS_GCC_LIKE
1113JUCE_END_IGNORE_WARNINGS_MSVC
1125 :
UnitTest (
"ValueTrees", UnitTestCategories::values)
1130 char buffer[50] = { 0 };
1131 const char chars[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-:";
1133 for (
int i = 1 + r.
nextInt (numElementsInArray (buffer) - 2); --i >= 0;)
1134 buffer[i] = chars[r.
nextInt (sizeof (chars) - 1)];
1136 String result (buffer);
1138 if (! XmlElement::isValidXmlName (result))
1139 result = createRandomIdentifier (r);
1144 static String createRandomWideCharString (Random& r)
1154 buffer[i] = (
juce_wchar) (1 + r.nextInt (0x10ffff - 1));
1156 while (! CharPointer_UTF16::canRepresent (buffer[i]));
1159 buffer[i] = (
juce_wchar) (1 + r.nextInt (0x7e));
1162 return CharPointer_UTF32 (buffer);
1165 static ValueTree createRandomTree (UndoManager* undoManager,
int depth, Random& r)
1167 ValueTree v (createRandomIdentifier (r));
1169 for (
int i = r.nextInt (10); --i >= 0;)
1171 switch (r.nextInt (5))
1173 case 0: v.setProperty (createRandomIdentifier (r), createRandomWideCharString (r), undoManager);
break;
1174 case 1: v.setProperty (createRandomIdentifier (r), r.nextInt(), undoManager);
break;
1175 case 2:
if (depth < 5) v.addChild (createRandomTree (undoManager, depth + 1, r), r.nextInt (v.getNumChildren() + 1), undoManager);
break;
1176 case 3: v.setProperty (createRandomIdentifier (r), r.nextBool(), undoManager);
break;
1177 case 4: v.setProperty (createRandomIdentifier (r), r.nextDouble(), undoManager);
break;
1185 void runTest()
override
1188 beginTest (
"ValueTree");
1190 auto r = getRandom();
1192 for (
int i = 10; --i >= 0;)
1194 MemoryOutputStream mo;
1195 auto v1 = createRandomTree (
nullptr, 0, r);
1196 v1.writeToStream (mo);
1198 MemoryInputStream mi (mo.getData(), mo.getDataSize(),
false);
1199 auto v2 = ValueTree::readFromStream (mi);
1200 expect (v1.isEquivalentTo (v2));
1202 MemoryOutputStream zipped;
1204 GZIPCompressorOutputStream zippedOut (zipped);
1205 v1.writeToStream (zippedOut);
1207 expect (v1.isEquivalentTo (ValueTree::readFromGZIPData (zipped.getData(), zipped.getDataSize())));
1209 auto xml1 = v1.createXml();
1210 auto xml2 = v2.createCopy().createXml();
1211 expect (xml1->isEquivalentTo (xml2.get(),
false));
1213 auto v4 = v2.createCopy();
1214 expect (v1.isEquivalentTo (v4));
1219 beginTest (
"Float formatting");
1221 ValueTree testVT (
"Test");
1222 Identifier number (
"number");
1227 tests[1.01] =
"1.01";
1228 tests[0.76378] =
"0.76378";
1229 tests[-10] =
"-10.0";
1230 tests[10.01] =
"10.01";
1231 tests[0.0123] =
"0.0123";
1232 tests[-3.7e-27] =
"-3.7e-27";
1233 tests[1e+40] =
"1.0e40";
1234 tests[-12345678901234567.0] =
"-1.234567890123457e16";
1235 tests[192000] =
"192000.0";
1236 tests[1234567] =
"1.234567e6";
1237 tests[0.00006] =
"0.00006";
1238 tests[0.000006] =
"6.0e-6";
1240 for (
auto& test : tests)
1242 testVT.setProperty (number, test.first,
nullptr);
1243 auto lines = StringArray::fromLines (testVT.toXmlString());
1244 lines.removeEmptyStrings();
1245 auto numLines = lines.size();
1246 expect (numLines > 1);
1247 expectEquals (lines[numLines - 1],
"<Test number=\"" + test.second +
"\"/>");
Represents a string identifier, designed for accessing properties by name.
const String & toString() const noexcept
Returns this identifier as a string.
Holds a set of named var objects.
bool set(const Identifier &name, const var &newValue)
Changes or adds a named value.
bool contains(const Identifier &name) const noexcept
Returns true if the set contains an item with the specified name.
bool remove(const Identifier &name)
Removes a value from the set.
const var & getValueAt(int index) const noexcept
Returns the value of the item at a given index.
Identifier getName(int index) const noexcept
Returns the name of the value at a given index.
int size() const noexcept
Returns the total number of values that the set contains.
var * getVarPointer(const Identifier &name) noexcept
Returns a pointer to the var that holds a named value, or null if there is no value with this name.
void copyToXmlAttributes(XmlElement &xml) const
Sets attributes in an XML element corresponding to each of this object's properties.
The base class for streams that write data to some kind of destination.
virtual bool writeCompressedInt(int value)
Writes a condensed binary encoding of a 32-bit integer.
virtual bool writeString(const String &text)
Stores a string in the stream in a binary format.
An array designed for holding objects.
A random number generator.
int nextInt() noexcept
Returns the next random 32 bit integer.
Holds a list of objects derived from ReferenceCountedObject, or which implement basic reference-count...
A smart-pointer class which points to a reference-counted object.
A base class which provides methods for reference-counting.
ReferenceCountedObject()=default
Creates the reference-counted object (with an initial ref count of zero).
Holds a set of unique primitive objects, such as ints or doubles.
bool isNotEmpty() const noexcept
Returns true if the string contains at least one character.
Manages a list of undo/redo commands.
bool perform(UndoableAction *action)
Performs an action and adds it to the undo history list.
Used by the UndoManager class to store an action which can be done and undone.
This is a base class for classes that perform a unit test.
Listener class for events that happen to a ValueTree.
virtual void valueTreeRedirected(ValueTree &treeWhichHasBeenChanged)
This method is called when a tree is made to point to a different internal shared object.
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 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.
A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...
Value getPropertyAsValue(const Identifier &name, UndoManager *undoManager, bool shouldUpdateSynchronously=false)
Returns a Value object that can be used to control and respond to one of the tree's properties.
Identifier getPropertyName(int index) const noexcept
Returns the identifier of the property with a given index.
Iterator begin() const noexcept
Returns a start iterator for the children in this tree.
bool operator!=(const ValueTree &) const noexcept
Returns true if this and the other tree refer to different underlying structures.
std::unique_ptr< XmlElement > createXml() const
Creates an XmlElement that holds a complete image of this tree and all its children.
bool hasType(const Identifier &typeName) const noexcept
Returns true if the tree has this type.
static ValueTree readFromStream(InputStream &input)
Reloads a tree from a stream that was written with writeToStream().
void removeChild(const ValueTree &child, UndoManager *undoManager)
Removes the specified child from this tree's child-list.
String toXmlString(const XmlElement::TextFormat &format={}) const
This returns a string containing an XML representation of the tree.
static ValueTree readFromGZIPData(const void *data, size_t numBytes)
Reloads a tree from a data block that was written with writeToStream() and then zipped using GZIPComp...
ValueTree getChild(int index) const
Returns one of this tree's sub-trees.
int getNumProperties() const noexcept
Returns the total number of properties that the tree contains.
int getNumChildren() const noexcept
Returns the number of child trees inside this one.
void copyPropertiesFrom(const ValueTree &source, UndoManager *undoManager)
Overwrites all the properties in this tree with the properties of the source tree.
int getReferenceCount() const noexcept
Returns the total number of references to the shared underlying data structure that this ValueTree is...
const var * getPropertyPointer(const Identifier &name) const noexcept
Returns a pointer to the value of a named property, or nullptr if the property doesn't exist.
ValueTree & setProperty(const Identifier &name, const var &newValue, UndoManager *undoManager)
Changes a named property of the tree.
void removeAllChildren(UndoManager *undoManager)
Removes all child-trees.
bool isAChildOf(const ValueTree &possibleParent) const noexcept
Returns true if this tree is a sub-tree (at any depth) of the given parent.
void removeAllProperties(UndoManager *undoManager)
Removes all properties from the tree.
void addListener(Listener *listener)
Adds a listener to receive callbacks when this tree is changed in some way.
void appendChild(const ValueTree &child, UndoManager *undoManager)
Appends a new child sub-tree to this tree.
int indexOf(const ValueTree &child) const noexcept
Returns the index of a child item in this parent.
bool operator==(const ValueTree &) const noexcept
Returns true if both this and the other tree refer to the same underlying structure.
ValueTree & setPropertyExcludingListener(Listener *listenerToExclude, const Identifier &name, const var &newValue, UndoManager *undoManager)
Changes a named property of the tree, but will not notify a specified listener of the change.
void addChild(const ValueTree &child, int index, UndoManager *undoManager)
Adds a child to this tree.
ValueTree getParent() const noexcept
Returns the parent tree that contains this one.
const var & getProperty(const Identifier &name) const noexcept
Returns the value of a named property.
ValueTree() noexcept
Creates an empty, invalid ValueTree.
static ValueTree fromXml(const XmlElement &xml)
Tries to recreate a tree from its XML representation.
ValueTree createCopy() const
Returns a deep copy of this tree and all its sub-trees.
Identifier getType() const noexcept
Returns the type of this tree.
ValueTree getChildWithName(const Identifier &type) const
Returns the first sub-tree with the specified type name.
Iterator end() const noexcept
Returns an end iterator for the children in this tree.
ValueTree & operator=(const ValueTree &)
Changes this object to be a reference to the given tree.
void removeListener(Listener *listener)
Removes a listener that was previously added with addListener().
void writeToStream(OutputStream &output) const
Stores this tree (and all its children) in a binary format.
bool isEquivalentTo(const ValueTree &) const
Performs a deep comparison between the properties and children of two trees.
ValueTree getOrCreateChildWithName(const Identifier &type, UndoManager *undoManager)
Returns the first sub-tree with the specified type name, creating and adding a child with this name i...
void moveChild(int currentIndex, int newIndex, UndoManager *undoManager)
Moves one of the sub-trees to a different index.
void sendPropertyChangeMessage(const Identifier &property)
Causes a property-change callback to be triggered for the specified property, calling any listeners t...
void removeProperty(const Identifier &name, UndoManager *undoManager)
Removes a property from the tree.
const var & operator[](const Identifier &name) const noexcept
Returns the value of a named property.
ValueTree getSibling(int delta) const noexcept
Returns one of this tree's siblings in its parent's child list.
ValueTree getChildWithProperty(const Identifier &propertyName, const var &propertyValue) const
Looks for the first sub-tree that has the specified property value.
void copyPropertiesAndChildrenFrom(const ValueTree &source, UndoManager *undoManager)
Replaces all children and properties of this object with copies of those from the source object.
ValueTree getRoot() const noexcept
Recursively finds the highest-level parent tree that contains this one.
static ValueTree readFromData(const void *data, size_t numBytes)
Reloads a tree from a data block that was written with writeToStream().
bool hasProperty(const Identifier &name) const noexcept
Returns true if the tree contains a named property.
Used internally by the Value class as the base class for its shared value objects.
void sendChangeMessage(bool dispatchSynchronously)
Delivers a change message to all the listeners that are registered with this value.
Represents a shared variant value.
Used to build a tree of elements representing an XML document.
bool isTextElement() const noexcept
Returns true if this element is a section of text.
Iterator< GetNextElement > getChildIterator() const
Allows iterating the children of an XmlElement using range-for syntax.
const String & getTagName() const noexcept
Returns this element's tag type name.
A variant class, that can be used to hold a range of primitive values.
void writeToStream(OutputStream &output) const
Writes a binary representation of this value to a stream.
static var readFromStream(InputStream &input)
Reads back a stored binary representation of a value.
#define JUCE_LEAK_DETECTOR(OwnerClass)
This macro lets you embed a leak-detecting object inside a class.
Type * createCopyIfNotNull(const Type *objectToCopy)
If a pointer is non-null, this returns a new copy of the object that it points to,...
wchar_t juce_wchar
A platform-independent 32-bit unicode character type.
RangedDirectoryIterator end(const RangedDirectoryIterator &)
Returns a default-constructed sentinel value.
std::unique_ptr< XmlElement > parseXML(const String &textToParse)
Attempts to parse some XML text, returning a new XmlElement if it was valid.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Returns true if a value is at least zero, and also below a specified upper limit.
RangedDirectoryIterator begin(const RangedDirectoryIterator &it)
Returns the iterator that was passed in.
constexpr int numElementsInArray(Type(&)[N]) noexcept
Handy function for getting the number of elements in a simple const C array.
var getValue() const override
Returns the current value of this object.
void setValue(const var &newValue) override
Changes the current value.
Iterator for a ValueTree.
int getSizeInUnits() override
Returns a value to indicate how much memory this object takes up.
bool undo() override
Overridden by a subclass to undo the action.
bool perform() override
Overridden by a subclass to perform the action.
bool perform() override
Overridden by a subclass to perform the action.
bool undo() override
Overridden by a subclass to undo the action.
int getSizeInUnits() override
Returns a value to indicate how much memory this object takes up.
UndoableAction * createCoalescedAction(UndoableAction *nextAction) override
Allows multiple actions to be coalesced into a single action object, to reduce storage space.
bool undo() override
Overridden by a subclass to undo the action.
int getSizeInUnits() override
Returns a value to indicate how much memory this object takes up.
UndoableAction * createCoalescedAction(UndoableAction *nextAction) override
Allows multiple actions to be coalesced into a single action object, to reduce storage space.
bool perform() override
Overridden by a subclass to perform the action.
A struct containing options for formatting the text when representing an XML element as a string.