Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{TrackPanel.cpp}::Subgroup Struct Referencefinal
Inheritance diagram for anonymous_namespace{TrackPanel.cpp}::Subgroup:
[legend]
Collaboration diagram for anonymous_namespace{TrackPanel.cpp}::Subgroup:
[legend]

Public Member Functions

 Subgroup (TrackPanel &panel)
 
Subdivision Children (const wxRect &rect) override
 
- Public Member Functions inherited from TrackPanelGroup
 TrackPanelGroup ()
 
virtual ~TrackPanelGroup ()
 
virtual Subdivision Children (const wxRect &rect)=0
 
- Public Member Functions inherited from TrackPanelNode
 TrackPanelNode ()
 
virtual ~TrackPanelNode ()=0
 
- Public Member Functions inherited from TrackPanelDrawable
virtual ~TrackPanelDrawable ()=0
 
virtual void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass)
 
virtual wxRect DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)
 

Public Attributes

TrackPanelmPanel
 

Additional Inherited Members

- Public Types inherited from TrackPanelGroup
enum class  Axis { X , Y }
 
using Child = std::pair< wxCoord, std::shared_ptr< TrackPanelNode > >
 
using Refinement = std::vector< Child >
 
using Subdivision = std::pair< Axis, Refinement >
 
- Static Public Member Functions inherited from TrackPanelDrawable
static wxRect MaximizeWidth (const wxRect &rect, const wxRect &panelRect)
 
static wxRect MaximizeHeight (const wxRect &rect, const wxRect &panelRect)
 

Detailed Description

Definition at line 1590 of file TrackPanel.cpp.

Constructor & Destructor Documentation

◆ Subgroup()

anonymous_namespace{TrackPanel.cpp}::Subgroup::Subgroup ( TrackPanel panel)
inlineexplicit

Definition at line 1591 of file TrackPanel.cpp.

1591: mPanel{ panel } {}

Member Function Documentation

◆ Children()

Subdivision anonymous_namespace{TrackPanel.cpp}::Subgroup::Children ( const wxRect &  rect)
inlineoverridevirtual

Implements TrackPanelGroup.

Definition at line 1592 of file TrackPanel.cpp.

1593 {
1594 const auto &viewInfo = *mPanel.GetViewInfo();
1595 wxCoord yy = -viewInfo.vpos;
1596 Refinement refinement;
1597
1598 auto &tracks = *mPanel.GetTracks();
1599 if ( tracks.Any() )
1600 refinement.emplace_back( yy, EmptyCell::Instance() ),
1601 yy += kTopMargin;
1602
1603 for ( const auto leader : tracks.Leaders() ) {
1604 wxCoord height = 0;
1605 for ( auto channel : TrackList::Channels( leader ) ) {
1606 auto &view = TrackView::Get( *channel );
1607 height += view.GetHeight();
1608 }
1609 refinement.emplace_back( yy,
1610 std::make_shared< ResizingChannelGroup >(
1611 leader->SharedPointer(), viewInfo.GetLeftOffset() )
1612 );
1613 yy += height;
1614 }
1615
1616 refinement.emplace_back( std::max( 0, yy ), mPanel.GetBackgroundCell() );
1617
1618 return { Axis::Y, std::move( refinement ) };
1619 }
@ kTopMargin
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1533
std::vector< Child > Refinement
std::shared_ptr< CommonTrackPanelCell > GetBackgroundCell()
Definition: TrackPanel.cpp:865
ViewInfo * GetViewInfo()
Definition: TrackPanel.h:170
const TrackList * GetTracks() const
Definition: TrackPanel.h:168
static TrackView & Get(Track &)
Definition: TrackView.cpp:69
int vpos
Definition: ZoomInfo.h:58
static std::shared_ptr< EmptyCell > Instance()

References TrackList::Channels(), TrackView::Get(), and kTopMargin.

Here is the call graph for this function:

Member Data Documentation

◆ mPanel

TrackPanel& anonymous_namespace{TrackPanel.cpp}::Subgroup::mPanel

Definition at line 1620 of file TrackPanel.cpp.


The documentation for this struct was generated from the following file: