OpenShot Audio Library | OpenShotAudio: juce_ValueTreeSynchroniser.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.1

Loading...
Searching...
No Matches
juce_ValueTreeSynchroniser.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 5 End-User License
11 Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
12 27th April 2017).
13
14 End User License Agreement: www.juce.com/juce-5-licence
15 Privacy Policy: www.juce.com/juce-5-privacy-policy
16
17 Or: You may also use this code under the terms of the GPL v3 (see
18 www.gnu.org/licenses).
19
20 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 DISCLAIMED.
23
24 ==============================================================================
25*/
26
27namespace juce
28{
29
30//==============================================================================
46 class JUCE_API ValueTreeSynchroniser : private ValueTree::Listener
47{
48public:
55 ValueTreeSynchroniser (const ValueTree& tree);
56
58 ~ValueTreeSynchroniser() override;
59
65 virtual void stateChanged (const void* encodedChange, size_t encodedChangeSize) = 0;
66
72 void sendFullSyncCallback();
73
80 static bool applyChange (ValueTree& target,
81 const void* encodedChangeData, size_t encodedChangeDataSize,
82 UndoManager* undoManager);
83
85 const ValueTree& getRoot() noexcept { return valueTree; }
86
87private:
88 ValueTree valueTree;
89
90 void valueTreePropertyChanged (ValueTree&, const Identifier&) override;
91 void valueTreeChildAdded (ValueTree&, ValueTree&) override;
92 void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override;
93 void valueTreeChildOrderChanged (ValueTree&, int, int) override;
94
95 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueTreeSynchroniser)
96};
97
98} // namespace juce
juce::Identifier
Definition: juce_Identifier.h:39
juce::UndoManager
Definition: juce_UndoManager.h:53
juce::ValueTreeSynchroniser
Definition: juce_ValueTreeSynchroniser.h:47
juce::ValueTreeSynchroniser::getRoot
const ValueTree & getRoot() noexcept
Definition: juce_ValueTreeSynchroniser.h:85
juce::ValueTreeSynchroniser::stateChanged
virtual void stateChanged(const void *encodedChange, size_t encodedChangeSize)=0
juce::ValueTree::Listener
Definition: juce_ValueTree.h:481
juce::ValueTree
Definition: juce_ValueTree.h:73