![]() |
Audacity 3.2.0
|
Persistent appearance settings that apply to all channels of a track. More...
#include <WaveformAppearance.h>
Public Member Functions | |
| WaveformAppearance (WaveTrack &track) | |
| ~WaveformAppearance () override | |
| void | CopyTo (Track &track) const override |
| Copy state, for undo/redo purposes. More... | |
| void | Reparent (const std::shared_ptr< Track > &parent) override |
| Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
| void | WriteXMLAttributes (XMLWriter &writer) const override |
| Serialize persistent attributes. More... | |
| bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) override |
| Deserialize an attribute, returning true if recognized. More... | |
| int | GetColorIndex () const |
| void | SetColorIndex (int colorIndex) |
Public Member Functions inherited from TrackAttachment | |
| virtual | ~TrackAttachment () |
| virtual void | CopyTo (Track &track) const |
| Copy state, for undo/redo purposes. More... | |
| virtual void | Reparent (const std::shared_ptr< Track > &parent) |
| Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
| virtual void | WriteXMLAttributes (XMLWriter &) const |
| Serialize persistent attributes. More... | |
| virtual bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
| Deserialize an attribute, returning true if recognized. More... | |
Public Member Functions inherited from ClientData::Base | |
| virtual | ~Base () |
Static Public Member Functions | |
| static WaveformAppearance & | Get (WaveTrack &track) |
| static const WaveformAppearance & | Get (const WaveTrack &track) |
| static WaveformAppearance & | Get (WaveChannel &channel) |
| static const WaveformAppearance & | Get (const WaveChannel &channel) |
Private Member Functions | |
| void | Subscribe (const std::shared_ptr< WaveTrack > &pTrack) |
Private Attributes | |
| std::weak_ptr< WaveTrack > | mwTrack |
| Observer::Subscription | mSubscription |
| int | mColorIndex { 0 } |
Persistent appearance settings that apply to all channels of a track.
Definition at line 18 of file WaveformAppearance.h.
|
explicit |
Definition at line 45 of file WaveformAppearance.cpp.
References mwTrack, and Subscribe().
|
overridedefault |
|
overridevirtual |
Copy state, for undo/redo purposes.
Reimplemented from TrackAttachment.
Definition at line 71 of file WaveformAppearance.cpp.
References Get(), and mColorIndex.
|
static |
Definition at line 40 of file WaveformAppearance.cpp.
References Get().
|
static |
Definition at line 30 of file WaveformAppearance.cpp.
References Get().
|
static |
Definition at line 35 of file WaveformAppearance.cpp.
References Get(), and WaveChannel::GetTrack().
|
static |
Definition at line 25 of file WaveformAppearance.cpp.
References keyWA.
Referenced by SetTrackVisualsCommand::ApplyInner(), CopyTo(), Get(), and WaveColorMenuTable::OnWaveColorChange().
|
inline |
|
overridevirtual |
Deserialize an attribute, returning true if recognized.
default recognizes no attributes, and returns false
Reimplemented from TrackAttachment.
Definition at line 92 of file WaveformAppearance.cpp.
References ColorIndex_attr, mColorIndex, and XMLAttributeValueView::TryGet().
|
overridevirtual |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it.
default does nothing
Reimplemented from TrackAttachment.
Definition at line 79 of file WaveformAppearance.cpp.
References mwTrack, and Subscribe().
| void WaveformAppearance::SetColorIndex | ( | int | colorIndex | ) |
Definition at line 101 of file WaveformAppearance.cpp.
References WaveColorAttachment::Get(), mColorIndex, mwTrack, and WaveColorAttachment::SetColorIndex().
Referenced by SetTrackVisualsCommand::ApplyInner(), and WaveColorMenuTable::OnWaveColorChange().
|
private |
Definition at line 54 of file WaveformAppearance.cpp.
References mSubscription, Observer::Subscription::Reset(), and WaveTrackMessage::type.
Referenced by Reparent(), and WaveformAppearance().
|
overridevirtual |
Serialize persistent attributes.
default does nothing
Reimplemented from TrackAttachment.
Definition at line 87 of file WaveformAppearance.cpp.
References ColorIndex_attr, mColorIndex, and XMLWriter::WriteAttr().
|
private |
Definition at line 45 of file WaveformAppearance.h.
Referenced by CopyTo(), GetColorIndex(), HandleXMLAttribute(), SetColorIndex(), and WriteXMLAttributes().
|
private |
Definition at line 44 of file WaveformAppearance.h.
Referenced by Subscribe().
|
private |
Definition at line 43 of file WaveformAppearance.h.
Referenced by Reparent(), SetColorIndex(), and WaveformAppearance().