17 [](
Track &track) -> std::shared_ptr<WaveformAppearance> {
18 if (
const auto pTrack =
dynamic_cast<WaveTrack *
>(&track))
19 return std::make_shared<WaveformAppearance>(*pTrack);
47 std::static_pointer_cast<
WaveTrack>(track.shared_from_this()) }
59 switch (message.
type) {
60 case WaveTrackMessage::New:
61 case WaveTrackMessage::Deserialized:
62 WaveColorAttachment::Get(*message.pClip).SetColorIndex(mColorIndex);
73 if (
const auto pTrack =
dynamic_cast<WaveTrack *
>(&track)) {
74 auto &other =
Get(*pTrack);
81 mwTrack = std::dynamic_pointer_cast<WaveTrack>(parent);
104 const auto pTrack =
mwTrack.lock();
107 for (
const auto &pInterval : pTrack->Intervals())
108 for (
const auto &pChannel : pInterval->Channels())
123 auto result = std::make_unique<WaveColorAttachment>(*
this);
128 return std::make_unique<WaveColorAttachment>();
139 .Attachments::Get<WaveColorAttachment>(
keyWCA);
166 if (!valueView.
TryGet(longValue))
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
void Reset() noexcept
Breaks the connection (constant time)
Abstract base class for an object holding data associated with points on a time axis.
This allows multiple clips to be a part of one WaveTrack.
A Track that contains audio waveform data.
A view into an attribute value. The class does not take the ownership of the data.
bool TryGet(bool &value) const noexcept
Try to get a boolean value from the view.
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
void WriteAttr(const wxString &name, const Identifier &value)
void MarkChanged() noexcept override
void WriteXMLAttributes(XMLWriter &writer) const override
static WaveColorAttachment & Get(WaveClip &clip)
std::unique_ptr< WaveClipListener > Clone() const override
void SetColorIndex(int colorIndex)
void Invalidate() override
~WaveColorAttachment() override
bool HandleXMLAttribute(const std::string_view &attr, const XMLAttributeValueView &valueView) override
enum WaveTrackMessage::Type type