Audacity  3.0.3
Functions | Variables
anonymous_namespace{TrackInfo.cpp} Namespace Reference

Functions

int totalTCPLines (const TCPLines &lines, bool omitLastExtra)
 
std::pair< int, int > CalcBottomItemY (const TCPLines &lines, unsigned iItem, int height)
 

Variables

const TrackInfo::TCPLine defaultCommonTrackTCPBottomLines []
 
TCPLines commonTrackTCPBottomLines { RANGE(defaultCommonTrackTCPBottomLines) }
 

Function Documentation

◆ CalcBottomItemY()

std::pair< int, int > anonymous_namespace{TrackInfo.cpp}::CalcBottomItemY ( const TCPLines lines,
unsigned  iItem,
int  height 
)

Definition at line 173 of file TrackInfo.cpp.

175 {
176  int y = height;
177  auto pLines = lines.begin();
178  while ( pLines != lines.end() &&
179  0 == (pLines->items & iItem) ) {
180  y -= pLines->height + pLines->extraSpace;
181  ++pLines;
182  }
183  if (pLines != lines.end())
184  y -= (pLines->height + pLines->extraSpace );
185  return { y, pLines->height };
186 }

Referenced by TrackInfo::GetMinimizeRect(), TrackInfo::GetSelectButtonRect(), TrackInfo::GetSyncLockIconRect(), and TrackInfo::HideTopItem().

Here is the caller graph for this function:

◆ totalTCPLines()

int anonymous_namespace{TrackInfo.cpp}::totalTCPLines ( const TCPLines lines,
bool  omitLastExtra 
)

Definition at line 129 of file TrackInfo.cpp.

130 {
131  int total = 0;
132  int lastExtra = 0;
133  for ( const auto line : lines ) {
134  lastExtra = line.extraSpace;
135  total += line.height + lastExtra;
136  }
137  if (omitLastExtra)
138  total -= lastExtra;
139  return total;
140 }

Referenced by TrackInfo::DefaultTrackHeight().

Here is the caller graph for this function:

Variable Documentation

◆ commonTrackTCPBottomLines

TCPLines anonymous_namespace{TrackInfo.cpp}::commonTrackTCPBottomLines { RANGE(defaultCommonTrackTCPBottomLines) }

◆ defaultCommonTrackTCPBottomLines

const TrackInfo::TCPLine anonymous_namespace{TrackInfo.cpp}::defaultCommonTrackTCPBottomLines[]
kTrackInfoBtnSize
@ kTrackInfoBtnSize
Definition: ViewInfo.h:108
TrackInfo::TCPLine::kItemMinimize
@ kItemMinimize
Definition: TrackInfo.h:47
TrackInfo::MinimizeSyncLockDrawFunction
AUDACITY_DLL_API void MinimizeSyncLockDrawFunction(TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
Definition: TrackInfo.cpp:374
TrackInfo::TCPLine::kItemSyncLock
@ kItemSyncLock
Definition: TrackInfo.h:48