tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_ArrangerClip.cpp
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14ArrangerClip::ArrangerClip (const juce::ValueTree& v, EditItemID id, ClipOwner& targetParent)
15 : Clip (v, targetParent, id, Type::arranger)
16{
17}
18
19ArrangerClip::~ArrangerClip()
20{
21 notifyListenersOfDeletion();
22}
23
24void ArrangerClip::initialise()
25{
26 Clip::initialise();
27}
28
29juce::String ArrangerClip::getSelectableDescription()
30{
31 return TRANS("Arranger Clip") + " - \"" + getName() + "\"";
32}
33
34juce::Colour ArrangerClip::getDefaultColour() const
35{
36 return juce::Colours::red.withHue (7.0f / 9.0f);
37}
38
39//==============================================================================
40bool ArrangerClip::canBeAddedTo (ClipOwner& co)
41{
42 return isArrangerTrack (co);
43}
44
45void ArrangerClip::valueTreePropertyChanged (juce::ValueTree& v, const juce::Identifier& i)
46{
47 if (v == state)
48 {
49 if (i == IDs::sync)
50 {
51 SelectionManager::refreshAllPropertyPanels();
52 changed();
53 }
54 }
55
56 Clip::valueTreePropertyChanged (v, i);
57}
58
59}} // namespace tracktion { inline namespace engine
Colour withHue(float newHue) const noexcept
Base class for items that can contain clips.
#define TRANS(stringLiteral)
juce::String getName(LaunchQType t)
Retuns the name of a LaunchQType for display purposes.
bool isArrangerTrack(const Track &t)
Returns true if this is an ArrangerTrack.