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 1567 of file TrackPanel.cpp.

Constructor & Destructor Documentation

◆ Subgroup()

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

Definition at line 1568 of file TrackPanel.cpp.

1568: mPanel{ panel } {}

Member Function Documentation

◆ Children()

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

Implements TrackPanelGroup.

Definition at line 1569 of file TrackPanel.cpp.

1570 {
1571 const auto &viewInfo = *mPanel.GetViewInfo();
1572 wxCoord yy = -viewInfo.vpos;
1573 Refinement refinement;
1574
1575 auto &tracks = *mPanel.GetTracks();
1576 if (!tracks.empty())
1577 refinement.emplace_back( yy, EmptyCell::Instance() ),
1578 yy += kTopMargin;
1579
1580 for (const auto leader : tracks) {
1581 wxCoord height = 0;
1582 for (auto pChannel : leader->Channels()) {
1583 auto &view = ChannelView::Get(*pChannel);
1584 height += view.GetHeight();
1585 }
1586 refinement.emplace_back( yy,
1587 std::make_shared<ResizingChannelGroup>(
1588 leader->SharedPointer(), viewInfo.GetLeftOffset())
1589 );
1590 yy += height;
1591 }
1592
1593 refinement.emplace_back(std::max(0, yy), mPanel.GetBackgroundCell());
1594
1595 return { Axis::Y, std::move(refinement) };
1596 }
const auto tracks
@ kTopMargin
static ChannelView & Get(Channel &channel)
std::vector< Child > Refinement
std::shared_ptr< CommonTrackPanelCell > GetBackgroundCell()
Definition: TrackPanel.cpp:887
ViewInfo * GetViewInfo()
Definition: TrackPanel.h:168
const TrackList * GetTracks() const
Definition: TrackPanel.h:166
int vpos
Pixel distance from top of tracks to top of visible scrolled area.
Definition: ViewInfo.h:221
static std::shared_ptr< EmptyCell > Instance()

References ChannelView::Get(), kTopMargin, and tracks.

Here is the call graph for this function:

Member Data Documentation

◆ mPanel

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

Definition at line 1597 of file TrackPanel.cpp.


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