openshot-audio  0.1.5
juce_ValueTreeSynchroniser.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_VALUETREESYNCHRONISER_H_INCLUDED
26 #define JUCE_VALUETREESYNCHRONISER_H_INCLUDED
27 
28 
29 //==============================================================================
44 {
45 public:
52  ValueTreeSynchroniser (const ValueTree& tree);
53 
55  virtual ~ValueTreeSynchroniser();
56 
62  virtual void stateChanged (const void* encodedChange, size_t encodedChangeSize) = 0;
63 
69  void sendFullSyncCallback();
70 
77  static bool applyChange (ValueTree& target,
78  const void* encodedChangeData, size_t encodedChangeDataSize,
79  UndoManager* undoManager);
80 
82  const ValueTree& getRoot() noexcept { return valueTree; }
83 
84 private:
85  ValueTree valueTree;
86 
87  void valueTreePropertyChanged (ValueTree&, const Identifier&) override;
88  void valueTreeChildAdded (ValueTree&, ValueTree&) override;
89  void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override;
90  void valueTreeChildOrderChanged (ValueTree&, int, int) override;
91  void valueTreeParentChanged (ValueTree&) override;
92 
94 };
95 
96 
97 
98 #endif // JUCE_VALUETREESYNCHRONISER_H_INCLUDED
const ValueTree & getRoot() noexcept
Definition: juce_ValueTreeSynchroniser.h:82
#define noexcept
Definition: juce_CompilerSupport.h:141
virtual void valueTreeChildAdded(ValueTree &parentTree, ValueTree &childWhichHasBeenAdded)=0
Definition: juce_ValueTree.h:368
virtual void valueTreeChildOrderChanged(ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex)=0
#define JUCE_API
Definition: juce_StandardHeader.h:139
virtual void valueTreeChildRemoved(ValueTree &parentTree, ValueTree &childWhichHasBeenRemoved, int indexFromWhichChildWasRemoved)=0
virtual void valueTreePropertyChanged(ValueTree &treeWhosePropertyHasChanged, const Identifier &property)=0
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_ValueTreeSynchroniser.h:43
Definition: juce_ValueTree.h:64
virtual void valueTreeParentChanged(ValueTree &treeWhoseParentHasChanged)=0
Definition: juce_UndoManager.h:49
Definition: juce_Identifier.h:43