![]() |
Audacity 3.2.0
|
#include <Channel.h>
Classes | |
| class | ChannelIterator |
| class | IntervalIterator |
Public Types | |
| enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
| For two tracks describes the type of the linkage. More... | |
| using | Attachments = ChannelGroupAttachments |
Public Types inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
| using | DataType = ClientData |
| using | DataPointer = Pointer< ClientData > |
| using | DataFactory = std::function< DataPointer(Host &) > |
| Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Member Functions | |
| virtual | ~ChannelGroup () |
| double | GetStartTime () const |
| Get the minimum of Start() values of intervals, or 0 when none. More... | |
| double | GetEndTime () const |
| Get the maximum of End() values of intervals, or 0 when none. More... | |
| void | ShiftBy (double t) |
| Change start time by given duration. More... | |
| virtual void | ShiftBy (double t0, double delta)=0 |
Shift all intervals that starts after t0 by delta seconds. More... | |
| virtual void | MoveTo (double o)=0 |
| Change start time to given time point. More... | |
Acesss to channels | |
| virtual size_t | NChannels () const =0 |
| Report the number of channels. More... | |
| template<typename ChannelType = Channel> | |
| std::shared_ptr< ChannelType > | GetChannel (size_t iChannel) |
| Retrieve a channel, cast to the given type. More... | |
| template<typename ChannelType = const Channel> | |
| auto | GetChannel (size_t iChannel) const -> std::enable_if_t< std::is_const_v< ChannelType >, std::shared_ptr< ChannelType > > |
| template<typename ChannelType = Channel> | |
| IteratorRange< ChannelIterator< ChannelType > > | Channels () |
| Get range of channels with mutative access. More... | |
| template<typename ChannelType = const Channel> | |
| auto | Channels () const -> std::enable_if_t< std::is_const_v< ChannelType >, IteratorRange< ChannelIterator< ChannelType > > > |
| Get range of channels with read-only access. More... | |
| std::shared_ptr< Channel > | NthChannel (size_t nChannel) |
| std::shared_ptr< const Channel > | NthChannel (size_t nChannel) const |
Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
| ~Site () | |
| Site () | |
| Site (const Site &other) | |
| Site & | operator= (const Site &other) |
| Site (Site &&other) | |
| Site & | operator= (Site &&other) |
| size_t | size () const |
| How many attachment pointers are in the Site. More... | |
| template<typename Subclass = ClientData> | |
| Subclass & | Get (const RegisteredFactory &key) |
| Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
| template<typename Subclass = const ClientData> | |
| auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
| Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
| template<typename Subclass = ClientData> | |
| Subclass * | Find (const RegisteredFactory &key) |
| Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
| template<typename Subclass = const ClientData> | |
| auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
| Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
| template<typename ReplacementPointer > | |
| void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
| Reassign Site's pointer to ClientData. More... | |
Protected Member Functions | |
| virtual std::shared_ptr< Channel > | DoGetChannel (size_t iChannel)=0 |
| virtual std::shared_ptr< Interval > | DoGetInterval (size_t iInterval)=0 |
| Retrieve an interval. More... | |
Protected Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
| template<typename Function > | |
| void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this. More... | |
| template<typename Function > | |
| void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this. More... | |
| template<typename Function > | |
| void | ForCorresponding (Site &other, const Function &function, bool create=true) |
| template<typename Function > | |
| ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
| template<typename Function > | |
| const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
| template<typename Function > | |
| void | EraseIf (const Function &function) |
| Erase attached objects satisfying a predicate. More... | |
| void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this, build and store it. More... | |
Acesss to intervals | |
| using | Interval = WideChannelGroupInterval |
| virtual size_t | NIntervals () const =0 |
| Report the number of intervals. More... | |
| template<typename IntervalType = Interval> | |
| std::shared_ptr< IntervalType > | GetInterval (size_t iInterval) |
| Retrieve an interval, cast to the given type. More... | |
| template<typename IntervalType = const Interval> | |
| auto | GetInterval (size_t iInterval) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > > |
| template<typename IntervalType = Interval> | |
| IteratorRange< IntervalIterator< IntervalType > > | Intervals () |
| Get range of intervals with mutative access. More... | |
| template<typename IntervalType = const Interval> | |
| auto | Intervals () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< IntervalIterator< IntervalType > > > |
| Get range of intervals with read-only access. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
| static size_t | numFactories () |
| How many static factories have been registered with this specialization of Site. More... | |
|
strong |
For two tracks describes the type of the linkage.
|
virtualdefault |
|
inline |
Get range of channels with mutative access.
Definition at line 384 of file Channel.h.
Referenced by SetTrackVisualsCommand::ApplyInner(), TrackPanelResizeHandle::Click(), TrackShifter::CommonMayMigrateTo(), TrackPanelResizeHandle::Drag(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), ChannelView::GetChannelGroupHeight(), ChannelView::GetCumulativeHeight(), TrackPanelResizeHandle::NextChannel(), TrackPanelResizeHandle::PrevChannel(), ProjectWindow::SetChannelHeights(), ProjectWindow::SetMinimized(), TrackPanelResizeHandle::TrackPanelResizeHandle(), and TrackPanel::UpdateTrackVRuler().
|
inline |
|
protectedpure virtual |
Retrieve a channel For fixed iChannel, resulting address must be unchanging, if there has been no other mutation of this ChannelGroup
!(iChannel < NChannels()) || result Implemented in UniqueChannelTrack< Base >, UniqueChannelTrack< PlayableTrack >, and WaveTrack.
|
protectedpure virtual |
Retrieve an interval.
!(iInterval < NIntervals()) || result Implemented in LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
|
inline |
Retrieve a channel, cast to the given type.
Postconditions imply that GetChannel(0) is always non-null
!(iChannel < NChannels()) || result Definition at line 323 of file Channel.h.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
Referenced by CommonTrackInfo::CloseTitleDrawFunction(), LabelTrackView::CopyTo(), WaveChannelView::CopyTo(), ProjectWindow::IsTrackMinimized(), anonymous_namespace{NoteTrackControls.cpp}::MidiControlsDrawFunction(), TrackPanel::OnTrackMenu(), and TrackPanel::RefreshTrack().
|
inline |
Postconditions imply that GetChannel(0) is always non-null
!(iChannel < NChannels()) || result Definition at line 333 of file Channel.h.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
| double ChannelGroup::GetEndTime | ( | ) | const |
Get the maximum of End() values of intervals, or 0 when none.
Definition at line 61 of file Channel.cpp.
References Intervals().
Referenced by anonymous_namespace{TrackMenus.cpp}::DoAlign(), TrackList::GetEndTime(), WaveTrack::GetEndTime(), StretchHandle::GetT1(), ModifiedAnalysisTrack::ModifiedAnalysisTrack(), SelectActions::Handler::OnCursorTrackEnd(), ProjectAudioManager::OnRecord(), SelectActions::Handler::OnSelectCursorEnd(), SelectActions::Handler::OnSelectTrackStartToEnd(), NoteTrack::Paste(), SelectionState::SelectTrackLength(), Track::SyncLockAdjust(), and LabelTrack::SyncLockAdjust().
|
inline |
Retrieve an interval, cast to the given type.
!(iInterval < NIntervals()) || result Definition at line 430 of file Channel.h.
Referenced by Channel::GetInterval().
|
inline |
!(iInterval < NIntervals()) || result Definition at line 440 of file Channel.h.
| double ChannelGroup::GetStartTime | ( | ) | const |
Get the minimum of Start() values of intervals, or 0 when none.
Definition at line 50 of file Channel.cpp.
References Intervals().
Referenced by anonymous_namespace{TrackMenus.cpp}::DoAlign(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), TrackList::GetStartTime(), WaveTrack::GetStartTime(), StretchHandle::GetT0(), ModifiedAnalysisTrack::ModifiedAnalysisTrack(), SelectActions::Handler::OnCursorTrackStart(), ExportAudioDialog::OnExport(), SelectActions::Handler::OnSelectStartCursor(), SelectActions::Handler::OnSelectTrackStartToEnd(), and SelectionState::SelectTrackLength().
|
inline |
Get range of intervals with mutative access.
Definition at line 495 of file Channel.h.
Referenced by GetEndTime(), and GetStartTime().
|
inline |
Get range of intervals with read-only access.
|
pure virtual |
Change start time to given time point.
Implemented in LabelTrack, WaveTrack, NoteTrack, and TimeTrack.
|
pure virtual |
Report the number of channels.
result >= 1 Implemented in UniqueChannelTrack< Base >, UniqueChannelTrack< PlayableTrack >, WaveTrack, and WritableSampleTrack.
Referenced by ChannelAttachmentsBase::ChannelAttachmentsBase(), ChannelAttachmentsBase::CopyTo(), anonymous_namespace{FileMenus.cpp}::DoExport(), ProjectAudioManager::DoRecord(), anonymous_namespace{EditMenus.cpp}::FitsInto(), ChannelAttachmentsBase::Get(), and Viewport::ZoomFitVertically().
|
pure virtual |
Report the number of intervals.
Implemented in LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
Referenced by Channel::NIntervals().
|
inline |
Definition at line 399 of file Channel.h.
|
inline |
|
inline |
Change start time by given duration.
Definition at line 296 of file Channel.h.
Referenced by TrackShifter::DoHorizontalOffset().
|
pure virtual |
Shift all intervals that starts after t0 by delta seconds.
Implemented in LabelTrack, NoteTrack, WaveTrack, and TimeTrack.