Audacity  3.0.3
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 ()
 
- 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  Axis { Axis::X, Axis::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 1526 of file TrackPanel.cpp.

Constructor & Destructor Documentation

◆ Subgroup()

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

Definition at line 1527 of file TrackPanel.cpp.

1527 : mPanel{ panel } {}

Member Function Documentation

◆ Children()

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

Implements TrackPanelGroup.

Definition at line 1528 of file TrackPanel.cpp.

1529  {
1530  const auto &viewInfo = *mPanel.GetViewInfo();
1531  wxCoord yy = -viewInfo.vpos;
1532  Refinement refinement;
1533 
1534  auto &tracks = *mPanel.GetTracks();
1535  if ( tracks.Any() )
1536  refinement.emplace_back( yy, EmptyCell::Instance() ),
1537  yy += kTopMargin;
1538 
1539  for ( const auto leader : tracks.Leaders() ) {
1540  wxCoord height = 0;
1541  for ( auto channel : TrackList::Channels( leader ) ) {
1542  auto &view = TrackView::Get( *channel );
1543  height += view.GetHeight();
1544 
1545  if (view.GetAffordanceControls())
1546  height += kAffordancesAreaHeight;
1547  }
1548  refinement.emplace_back( yy,
1549  std::make_shared< ResizingChannelGroup >(
1550  leader->SharedPointer(), viewInfo.GetLeftOffset() )
1551  );
1552  yy += height;
1553  }
1554 
1555  refinement.emplace_back( std::max( 0, yy ), mPanel.GetBackgroundCell() );
1556 
1557  return { Axis::Y, std::move( refinement ) };
1558  }

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

Here is the call graph for this function:

Member Data Documentation

◆ mPanel

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

Definition at line 1559 of file TrackPanel.cpp.


The documentation for this struct was generated from the following file:
ZoomInfo::vpos
int vpos
Definition: ZoomInfo.h:58
TrackPanel::GetTracks
const TrackList * GetTracks() const
Definition: TrackPanel.h:150
TrackPanelGroup::Refinement
std::vector< Child > Refinement
Definition: TrackPanelCell.h:64
TrackView::Get
static TrackView & Get(Track &)
Definition: TrackView.cpp:63
TrackPanel::GetBackgroundCell
std::shared_ptr< TrackPanelCell > GetBackgroundCell()
Definition: TrackPanel.cpp:858
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1468
kTopMargin
@ kTopMargin
Definition: ViewInfo.h:106
anonymous_namespace{TrackPanel.cpp}::EmptyCell::Instance
static std::shared_ptr< EmptyCell > Instance()
Definition: TrackPanel.cpp:1165
kAffordancesAreaHeight
@ kAffordancesAreaHeight
Definition: ViewInfo.h:104
TrackPanelGroup::Axis::Y
@ Y
TrackPanel::GetViewInfo
ViewInfo * GetViewInfo()
Definition: TrackPanel.h:152
anonymous_namespace{TrackPanel.cpp}::Subgroup::mPanel
TrackPanel & mPanel
Definition: TrackPanel.cpp:1559