Audacity  3.0.3
TrackInfo.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 TrackInfo.cpp
6 
7 Paul Licameli split from TrackPanel.cpp
8 
9 ********************************************************************/
29 #include "TrackInfo.h"
30 
31 
32 
33 #include <wx/dc.h>
34 #include <wx/frame.h>
35 
36 #include "AColor.h"
37 #include "AllThemeResources.h"
38 #include "Prefs.h"
39 #include "Project.h"
40 #include "Theme.h"
41 #include "Track.h"
43 #include "ViewInfo.h"
45 #include "tracks/ui/TrackView.h"
46 
47 // Subscribe to preference changes to update static variables
49  wxString gSoloPref;
50  wxFont gFont;
51 
52  bool mInitialized{ false };
53 
54  void UpdatePrefs() override
55  {
57 
58  // Calculation of best font size depends on language, so it should be redone in case
59  // the language preference changed.
60 
61  // wxWidgets seems to need a window to do this portably.
62  if ( !wxTheApp )
63  return;
64  auto window = wxTheApp->GetTopWindow();
65  if ( !window )
66  return;
67 
68  int fontSize = 10;
69  gFont.Create(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
70 
71  int allowableWidth =
72  // PRL: was it correct to include the margin?
74  - 2; // 2 to allow for left/right borders
75  int textWidth;
76  do {
77  gFont.SetPointSize(fontSize);
78  window->GetTextExtent(_("Stereo, 999999Hz"),
79  &textWidth, nullptr, nullptr, nullptr, &gFont);
80  fontSize--;
81  } while (textWidth >= allowableWidth);
82 
83  mInitialized = true;
84  }
85 };
86 
87 static Settings &settings()
88 {
89  static Settings theSettings;
90  if ( !theSettings.mInitialized )
91  theSettings.UpdatePrefs();
92  return theSettings;
93 }
94 
96 {
97  return settings().gSoloPref != wxT("None");
98 }
99 
100 #define RANGE(array) (array), (array) + sizeof(array)/sizeof(*(array))
103 
105 {
106  static const TCPLines theLines{
107 #ifdef EXPERIMENTAL_DA
108 
111 
112 #else
113 
116 
117 #endif
118  };
119  return theLines;
120 }
121 
124 {
125  return commonTrackTCPLines();
126 }
127 
128 namespace {
129 
130 int totalTCPLines( const TCPLines &lines, bool omitLastExtra )
131 {
132  int total = 0;
133  int lastExtra = 0;
134  for ( const auto line : lines ) {
135  lastExtra = line.extraSpace;
136  total += line.height + lastExtra;
137  }
138  if (omitLastExtra)
139  total -= lastExtra;
140  return total;
141 }
142 }
143 
144 // return y value and height
145 std::pair< int, int >
146 TrackInfo::CalcItemY( const TCPLines &lines, unsigned iItem )
147 {
148  int y = 0;
149  auto pLines = lines.begin();
150  while ( pLines != lines.end() &&
151  0 == (pLines->items & iItem) ) {
152  y += pLines->height + pLines->extraSpace;
153  ++pLines;
154  }
155  int height = 0;
156  if ( pLines != lines.end() )
157  height = pLines->height;
158  return { y, height };
159 }
160 
161 namespace {
162 
163 // Items for the bottom of the panel, listed bottom-upwards
164 // As also with the top items, the extra space is below the item
166  // The '0' avoids impinging on bottom line of TCP
167  // Use -1 if you do want to do so.
170 };
172 
173 // return y value and height
174 std::pair< int, int > CalcBottomItemY
175  ( const TCPLines &lines, unsigned iItem, int height )
176 {
177  int y = height;
178  auto pLines = lines.begin();
179  while ( pLines != lines.end() &&
180  0 == (pLines->items & iItem) ) {
181  y -= pLines->height + pLines->extraSpace;
182  ++pLines;
183  }
184  if (pLines != lines.end())
185  y -= (pLines->height + pLines->extraSpace );
186  return { y, pLines->height };
187 }
188 
189 }
190 
192 {
193  return commonTrackTCPLines();
194 }
195 
197 {
198  unsigned height = 0;
199  if (!commonTrackTCPLines().empty())
200  height += commonTrackTCPLines().front().height;
201  if (!commonTrackTCPBottomLines.empty())
202  height += commonTrackTCPBottomLines.front().height;
203  // + 1 prevents the top item from disappearing for want of enough space,
204  // according to the rules in HideTopItem.
205  return height + kTopMargin + kBottomMargin + 1;
206 }
207 
208 bool TrackInfo::HideTopItem( const wxRect &rect, const wxRect &subRect,
209  int allowance ) {
210  auto limit = CalcBottomItemY
212  // Return true if the rectangle is even touching the limit
213  // without an overlap. That was the behavior as of 2.1.3.
214  return subRect.y + subRect.height - allowance >= rect.y + limit;
215 }
216 
218 ( TrackPanelDrawingContext &context,
219  const wxRect &rect, const Track &track )
220 {
221  auto &trackControl = static_cast<const CommonTrackControls&>(
222  TrackControls::Get( track ) );
223  const auto &topLines = trackControl.GetTCPLines();
224  const auto &bottomLines = commonTrackTCPBottomLines;
225  DrawItems
226  ( context, rect, &track, topLines, bottomLines );
227 }
228 
230 ( TrackPanelDrawingContext &context,
231  const wxRect &rect, const Track *pTrack,
232  const std::vector<TCPLine> &topLines, const std::vector<TCPLine> &bottomLines )
233 {
234  auto dc = &context.dc;
236  dc->SetTextForeground(theTheme.Colour(clrTrackPanelText));
237 
238  {
239  int yy = 0;
240  for ( const auto &line : topLines ) {
241  wxRect itemRect{
242  rect.x, rect.y + yy,
243  rect.width, line.height
244  };
245  if ( !TrackInfo::HideTopItem( rect, itemRect ) &&
246  line.drawFunction )
247  line.drawFunction( context, itemRect, pTrack );
248  yy += line.height + line.extraSpace;
249  }
250  }
251  {
252  int yy = rect.height;
253  for ( const auto &line : bottomLines ) {
254  yy -= line.height + line.extraSpace;
255  if ( line.drawFunction ) {
256  wxRect itemRect{
257  rect.x, rect.y + yy,
258  rect.width, line.height
259  };
260  line.drawFunction( context, itemRect, pTrack );
261  }
262  }
263  }
264 }
265 
268  TrackPanelDrawingContext &context, const wxRect &bev,
269  const Track *pTrack, ButtonHandle *target )
270 {
271  auto dc = &context.dc;
272  bool selected = pTrack ? pTrack->GetSelected() : true;
273  bool hit = target && target->GetTrack().get() == pTrack;
274  bool captured = hit && target->IsClicked();
275  bool down = captured && bev.Contains( context.lastState.GetPosition());
276  AColor::Bevel2(*dc, !down, bev, selected, hit );
277 
278 #ifdef EXPERIMENTAL_THEMING
279  wxPen pen( theTheme.Colour( clrTrackPanelText ));
280  dc->SetPen( pen );
281 #else
282  dc->SetPen(*wxBLACK_PEN);
283 #endif
284  bev.Inflate( -1, -1 );
285  // Draw the "X"
286  const int s = 6;
287 
288  int ls = bev.x + ((bev.width - s) / 2);
289  int ts = bev.y + ((bev.height - s) / 2);
290  int rs = ls + s;
291  int bs = ts + s;
292 
293  AColor::Line(*dc, ls, ts, rs, bs);
294  AColor::Line(*dc, ls + 1, ts, rs + 1, bs);
295  AColor::Line(*dc, rs, ts, ls, bs);
296  AColor::Line(*dc, rs + 1, ts, ls + 1, bs);
297  // bev.Inflate(-1, -1);
298 }
299 
301 ( TrackPanelDrawingContext &context,
302  const wxRect &rect, const Track *pTrack )
303 {
304  auto dc = &context.dc;
305  bool selected = pTrack ? pTrack->GetSelected() : true;
306  {
307  wxRect bev = rect;
308  GetCloseBoxHorizontalBounds( rect, bev );
309  auto target = dynamic_cast<CloseButtonHandle*>( context.target.get() );
310  DrawCloseButton( context, bev, pTrack, target );
311  }
312 
313  {
314  wxRect bev = rect;
315  GetTitleBarHorizontalBounds( rect, bev );
316  auto target = dynamic_cast<MenuButtonHandle*>( context.target.get() );
317  bool hit = target && target->GetTrack().get() == pTrack;
318  bool captured = hit && target->IsClicked();
319  bool down = captured && bev.Contains( context.lastState.GetPosition());
320  wxString titleStr =
321  pTrack ? pTrack->GetName() : _("Name");
322 
323  //bev.Inflate(-1, -1);
324  AColor::Bevel2(*dc, !down, bev, selected, hit);
325 
326  // Draw title text
327  SetTrackInfoFont(dc);
328 
329  // Bug 1660 The 'k' of 'Audio Track' was being truncated.
330  // Constant of 32 found by counting pixels on a windows machine.
331  // I believe it's the size of the X close button + the size of the
332  // drop down arrow.
333  int allowableWidth = rect.width - 32;
334 
335  wxCoord textWidth, textHeight;
336  dc->GetTextExtent(titleStr, &textWidth, &textHeight);
337  while (textWidth > allowableWidth) {
338  titleStr = titleStr.Left(titleStr.length() - 1);
339  dc->GetTextExtent(titleStr, &textWidth, &textHeight);
340  }
341 
342  // Pop-up triangle
343  #ifdef EXPERIMENTAL_THEMING
344  wxColour c = theTheme.Colour( clrTrackPanelText );
345  #else
346  wxColour c = *wxBLACK;
347  #endif
348 
349  // wxGTK leaves little scraps (antialiasing?) of the
350  // characters if they are repeatedly drawn. This
351  // happens when holding down mouse button and moving
352  // in and out of the title bar. So clear it first.
353  // AColor::MediumTrackInfo(dc, t->GetSelected());
354  // dc->DrawRectangle(bev);
355 
356  dc->SetTextForeground( c );
357  dc->SetTextBackground( wxTRANSPARENT );
358  dc->DrawText(titleStr, bev.x + 2, bev.y + (bev.height - textHeight) / 2);
359 
360 
361 
362  dc->SetPen(c);
363  dc->SetBrush(c);
364 
365  int s = 10; // Width of dropdown arrow...height is half of width
366  AColor::Arrow(*dc,
367  bev.GetRight() - s - 3, // 3 to offset from right border
368  bev.y + ((bev.height - (s / 2)) / 2),
369  s);
370 
371  }
372 }
373 
375 ( TrackPanelDrawingContext &context,
376  const wxRect &rect, const Track *pTrack )
377 {
378  auto dc = &context.dc;
379  bool selected = pTrack ? pTrack->GetSelected() : true;
380  bool syncLockSelected = pTrack ? pTrack->IsSyncLockSelected() : true;
381  bool minimized =
382  pTrack ? TrackView::Get( *pTrack ).GetMinimized() : false;
383  {
384  wxRect bev = rect;
385  GetMinimizeHorizontalBounds(rect, bev);
386  auto target = dynamic_cast<MinimizeButtonHandle*>( context.target.get() );
387  bool hit = target && target->GetTrack().get() == pTrack;
388  bool captured = hit && target->IsClicked();
389  bool down = captured && bev.Contains( context.lastState.GetPosition());
390 
391  // Clear background to get rid of previous arrow
392  //AColor::MediumTrackInfo(dc, t->GetSelected());
393  //dc->DrawRectangle(bev);
394 
395  AColor::Bevel2(*dc, !down, bev, selected, hit);
396 
397 #ifdef EXPERIMENTAL_THEMING
398  wxColour c = theTheme.Colour(clrTrackPanelText);
399  dc->SetBrush(c);
400  dc->SetPen(c);
401 #else
402  AColor::Dark(dc, selected);
403 #endif
404 
405  AColor::Arrow(*dc,
406  bev.x - 5 + bev.width / 2,
407  bev.y - 2 + bev.height / 2,
408  10,
409  minimized);
410  }
411 
412  {
413  wxRect bev = rect;
415  auto target = dynamic_cast<SelectButtonHandle*>( context.target.get() );
416  bool hit = target && target->GetTrack().get() == pTrack;
417  bool captured = hit && target->IsClicked();
418  bool down = captured && bev.Contains( context.lastState.GetPosition());
419 
420  AColor::Bevel2(*dc, !down, bev, selected, hit);
421 
422 #ifdef EXPERIMENTAL_THEMING
423  wxColour c = theTheme.Colour(clrTrackPanelText);
424  dc->SetBrush(c);
425  dc->SetPen(c);
426 #else
427  AColor::Dark(dc, selected);
428 #endif
429 
430  wxString str = _("Select");
431  wxCoord textWidth;
432  wxCoord textHeight;
433  SetTrackInfoFont(dc);
434  dc->GetTextExtent(str, &textWidth, &textHeight);
435 
436  dc->SetTextForeground( c );
437  dc->SetTextBackground( wxTRANSPARENT );
438  dc->DrawText(str, bev.x + 2 + (bev.width-textWidth)/2, bev.y + (bev.height - textHeight) / 2);
439  }
440 
441 
442  // Draw the sync-lock indicator if this track is in a sync-lock selected group.
443  if (syncLockSelected)
444  {
445  wxRect syncLockIconRect = rect;
446 
447  GetSyncLockHorizontalBounds( rect, syncLockIconRect );
448  wxBitmap syncLockBitmap(theTheme.Image(bmpSyncLockIcon));
449  // Icon is 12x12 and syncLockIconRect is 16x16.
450  dc->DrawBitmap(syncLockBitmap,
451  syncLockIconRect.x + 3,
452  syncLockIconRect.y + 2,
453  true);
454  }
455 }
456 
457 void TrackInfo::GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest )
458 {
459  dest.x = rect.x;
460  dest.width = kTrackInfoBtnSize;
461 }
462 
463 void TrackInfo::GetCloseBoxRect(const wxRect & rect, wxRect & dest)
464 {
465  GetCloseBoxHorizontalBounds( rect, dest );
467  dest.y = rect.y + results.first;
468  dest.height = results.second;
469 }
470 
471 void TrackInfo::GetTitleBarHorizontalBounds( const wxRect & rect, wxRect &dest )
472 {
473  // to right of CloseBoxRect, plus a little more
474  wxRect closeRect;
475  GetCloseBoxHorizontalBounds( rect, closeRect );
476  dest.x = rect.x + closeRect.width + 1;
477  dest.width = rect.x + rect.width - dest.x + TitleSoloBorderOverlap;
478 }
479 
480 void TrackInfo::GetTitleBarRect(const wxRect & rect, wxRect & dest)
481 {
482  GetTitleBarHorizontalBounds( rect, dest );
484  dest.y = rect.y + results.first;
485  dest.height = results.second;
486 }
487 
488 void TrackInfo::GetSliderHorizontalBounds( const wxPoint &topleft, wxRect &dest )
489 {
490  dest.x = topleft.x + 6;
491  dest.width = kTrackInfoSliderWidth;
492 }
493 
494 void TrackInfo::GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest )
495 {
496  const int space = 0;// was 3.
497  dest.x = rect.x + space;
498 
499  wxRect syncLockRect;
500  GetSyncLockHorizontalBounds( rect, syncLockRect );
501 
502  // Width is rect.width less space on left for track select
503  // and on right for sync-lock icon.
504  dest.width = kTrackInfoBtnSize;
505 // rect.width - (space + syncLockRect.width);
506 }
507 
508 void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest)
509 {
510  GetMinimizeHorizontalBounds( rect, dest );
511  auto results = CalcBottomItemY
513  dest.y = rect.y + results.first;
514  dest.height = results.second;
515 }
516 
517 void TrackInfo::GetSelectButtonHorizontalBounds( const wxRect &rect, wxRect &dest )
518 {
519  const int space = 0;// was 3.
520  dest.x = rect.x + space;
521 
522  wxRect syncLockRect;
523  GetSyncLockHorizontalBounds( rect, syncLockRect );
524  wxRect minimizeRect;
525  GetMinimizeHorizontalBounds( rect, minimizeRect );
526 
527  dest.x = dest.x + space + minimizeRect.width;
528  // Width is rect.width less space on left for track select
529  // and on right for sync-lock icon.
530  dest.width = rect.width - (space + syncLockRect.width) - (space + minimizeRect.width);
531 }
532 
533 
534 void TrackInfo::GetSelectButtonRect(const wxRect & rect, wxRect &dest)
535 {
536  GetSelectButtonHorizontalBounds( rect, dest );
537  auto results = CalcBottomItemY
539  dest.y = rect.y + results.first;
540  dest.height = results.second;
541 }
542 
543 void TrackInfo::GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest )
544 {
545  dest.width = kTrackInfoBtnSize;
546  dest.x = rect.x + rect.width - dest.width;
547 }
548 
549 void TrackInfo::GetSyncLockIconRect(const wxRect & rect, wxRect &dest)
550 {
551  GetSyncLockHorizontalBounds( rect, dest );
552  auto results = CalcBottomItemY
554  dest.y = rect.y + results.first;
555  dest.height = results.second;
556 }
557 
560 {
561  dc->SetFont(settings().gFont);
562 }
563 
564 //#define USE_BEVELS
565 
566 unsigned TrackInfo::DefaultTrackHeight( const TCPLines &topLines )
567 {
568  int needed =
570  totalTCPLines( topLines, true ) +
572  return (unsigned) std::max( needed, (int) TrackView::DefaultHeight );
573 }
TrackView::DefaultHeight
@ DefaultHeight
Definition: TrackView.h:29
TrackInfo::GetSyncLockIconRect
AUDACITY_DLL_API void GetSyncLockIconRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:549
TracksBehaviorsSolo
ChoiceSetting TracksBehaviorsSolo
Definition: TracksBehaviorsPrefs.cpp:64
ButtonHandle::IsClicked
bool IsClicked() const
Definition: ButtonHandle.h:31
kBottomMargin
@ kBottomMargin
Definition: ViewInfo.h:106
TitleSoloBorderOverlap
static const int TitleSoloBorderOverlap
Definition: TrackInfo.h:29
TrackInfo::CloseTitleDrawFunction
AUDACITY_DLL_API void CloseTitleDrawFunction(TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
Definition: TrackInfo.cpp:301
Settings::gFont
wxFont gFont
Definition: TrackInfo.cpp:50
TCPLines
TrackInfo::TCPLines TCPLines
Definition: TrackInfo.cpp:102
TrackView::Get
static TrackView & Get(Track &)
Definition: TrackView.cpp:63
AllThemeResources.h
TrackInfo::TCPLine::kItemBarButtons
@ kItemBarButtons
Definition: TrackInfo.h:39
TrackInfo::GetCloseBoxRect
AUDACITY_DLL_API void GetCloseBoxRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:463
TrackView.h
TrackView::GetMinimized
bool GetMinimized() const
Definition: TrackView.h:49
Track::GetName
wxString GetName() const
Definition: Track.h:409
Settings
Definition: TrackInfo.cpp:48
Project.h
anonymous_namespace{TrackInfo.cpp}::totalTCPLines
int totalTCPLines(const TCPLines &lines, bool omitLastExtra)
Definition: TrackInfo.cpp:130
TrackInfo::MinimumTrackHeight
AUDACITY_DLL_API unsigned MinimumTrackHeight()
Definition: TrackInfo.cpp:196
TrackControls::Get
static TrackControls & Get(Track &track)
Definition: TrackControls.cpp:25
CommonTrackControls::StaticTCPLines
static const TCPLines & StaticTCPLines()
Definition: TrackInfo.cpp:123
AColor::Bevel2
static void Bevel2(wxDC &dc, bool up, const wxRect &r, bool bSel=false, bool bHighlight=false)
Definition: AColor.cpp:211
TrackPanelDrawingContext
Definition: TrackPanelDrawingContext.h:22
AColor::Line
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
Definition: AColor.cpp:112
CommonTrackControls
Definition: CommonTrackControls.h:27
CommonTrackControls.h
TrackInfo::CalcItemY
AUDACITY_DLL_API std::pair< int, int > CalcItemY(const TCPLines &lines, unsigned iItem)
Definition: TrackInfo.cpp:146
anonymous_namespace{TrackInfo.cpp}::CalcBottomItemY
std::pair< int, int > CalcBottomItemY(const TCPLines &lines, unsigned iItem, int height)
Definition: TrackInfo.cpp:175
kTrackInfoBtnSize
@ kTrackInfoBtnSize
Definition: ViewInfo.h:111
TrackPanelDrawingContext::dc
wxDC & dc
Definition: TrackPanelDrawingContext.h:23
MenuButtonHandle
Definition: TrackButtonHandles.h:100
TrackInfo::TCPLine::kItemMinimize
@ kItemMinimize
Definition: TrackInfo.h:47
ButtonHandle::GetTrack
std::shared_ptr< Track > GetTrack() const
Definition: ButtonHandle.h:30
kTopMargin
@ kTopMargin
Definition: ViewInfo.h:105
TracksBehaviorsPrefs.h
TrackInfo::DrawItems
AUDACITY_DLL_API void DrawItems(TrackPanelDrawingContext &context, const wxRect &rect, const Track &track)
Definition: TrackInfo.cpp:218
Track::IsSyncLockSelected
bool IsSyncLockSelected() const
Definition: Track.cpp:245
TrackInfo::GetCloseBoxHorizontalBounds
AUDACITY_DLL_API void GetCloseBoxHorizontalBounds(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:457
anonymous_namespace{TrackInfo.cpp}::defaultCommonTrackTCPBottomLines
const TrackInfo::TCPLine defaultCommonTrackTCPBottomLines[]
Definition: TrackInfo.cpp:165
TrackInfo::GetTitleBarRect
AUDACITY_DLL_API void GetTitleBarRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:480
TrackInfo::GetTitleBarHorizontalBounds
AUDACITY_DLL_API void GetTitleBarHorizontalBounds(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:471
PrefsListener
Definition: Prefs.h:388
TrackInfo::SetTrackInfoFont
AUDACITY_DLL_API void SetTrackInfoFont(wxDC *dc)
Definition: TrackInfo.cpp:559
TCPLine
TrackInfo::TCPLine TCPLine
Definition: TrackInfo.cpp:101
ButtonHandle
A UIHandle for a TrackPanel button, such as the Mute and Solo buttons.
Definition: ButtonHandle.h:26
TrackInfo::DrawCloseButton
AUDACITY_DLL_API void DrawCloseButton(TrackPanelDrawingContext &context, const wxRect &bev, const Track *pTrack, ButtonHandle *target)
Definition: TrackInfo.cpp:267
TrackInfo::TCPLines
std::vector< TCPLine > TCPLines
Definition: TrackInfo.h:66
TrackInfo::GetSelectButtonRect
AUDACITY_DLL_API void GetSelectButtonRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:534
Theme.h
TrackPanelDrawingContext::lastState
wxMouseState lastState
Definition: TrackPanelDrawingContext.h:25
ThemeBase::Image
wxImage & Image(int iIndex)
Definition: Theme.cpp:1219
RANGE
#define RANGE(array)
Definition: TrackInfo.cpp:100
CloseButtonHandle
Definition: TrackButtonHandles.h:71
AColor::Arrow
static void Arrow(wxDC &dc, wxCoord x, wxCoord y, int width, bool down=true)
Definition: AColor.cpp:85
TrackInfo::HasSoloButton
AUDACITY_DLL_API bool HasSoloButton()
Definition: TrackInfo.cpp:95
Settings::UpdatePrefs
void UpdatePrefs() override
Definition: TrackInfo.cpp:54
Settings::mInitialized
bool mInitialized
Definition: TrackInfo.cpp:52
ViewInfo.h
Track::GetSelected
bool GetSelected() const
Definition: Track.h:414
TrackInfo.h
Settings::gSoloPref
wxString gSoloPref
Definition: TrackInfo.cpp:49
ChoiceSetting::Read
wxString Read() const
Definition: Prefs.cpp:236
TrackPanelDrawingContext.h
TrackInfo::MinimizeSyncLockDrawFunction
AUDACITY_DLL_API void MinimizeSyncLockDrawFunction(TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
Definition: TrackInfo.cpp:375
TrackInfo::HideTopItem
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
Definition: TrackInfo.cpp:208
TrackInfo::GetMinimizeHorizontalBounds
AUDACITY_DLL_API void GetMinimizeHorizontalBounds(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:494
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:238
TrackInfo::DefaultTrackHeight
AUDACITY_DLL_API unsigned DefaultTrackHeight(const TCPLines &topLines)
Definition: TrackInfo.cpp:566
AColor::Dark
static void Dark(wxDC *dc, bool selected, bool highlight=false)
Definition: AColor.cpp:354
anonymous_namespace{TrackInfo.cpp}::commonTrackTCPBottomLines
TCPLines commonTrackTCPBottomLines
Definition: TrackInfo.cpp:171
_
#define _(s)
Definition: Internat.h:75
commonTrackTCPLines
static const TCPLines & commonTrackTCPLines()
Definition: TrackInfo.cpp:104
TrackInfo::GetSyncLockHorizontalBounds
AUDACITY_DLL_API void GetSyncLockHorizontalBounds(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:543
TrackInfo::TCPLine
Definition: TrackInfo.h:36
SelectButtonHandle
Definition: TrackButtonHandles.h:45
TrackInfo::GetMinimizeRect
AUDACITY_DLL_API void GetMinimizeRect(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:508
TrackInfo::TCPLine::kHighestBottomItem
@ kHighestBottomItem
Definition: TrackInfo.h:51
TrackPanelDrawingContext::target
UIHandlePtr target
Definition: TrackPanelDrawingContext.h:24
ThemeBase::Colour
wxColour & Colour(int iIndex)
Definition: Theme.cpp:1193
TrackButtonHandles.h
Track.h
declares abstract base class Track, TrackList, and iterators over TrackList
TrackInfo::GetSliderHorizontalBounds
AUDACITY_DLL_API void GetSliderHorizontalBounds(const wxPoint &topleft, wxRect &dest)
Definition: TrackInfo.cpp:488
theTheme
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:202
Prefs.h
TrackInfo::TCPLine::kItemSyncLock
@ kItemSyncLock
Definition: TrackInfo.h:48
settings
static Settings & settings()
Definition: TrackInfo.cpp:87
AColor.h
kTrackInfoWidth
@ kTrackInfoWidth
Definition: ZoomInfo.h:36
CommonTrackControls::GetTCPLines
virtual const TCPLines & GetTCPLines() const
Definition: TrackInfo.cpp:191
TrackInfo::GetSelectButtonHorizontalBounds
AUDACITY_DLL_API void GetSelectButtonHorizontalBounds(const wxRect &rect, wxRect &dest)
Definition: TrackInfo.cpp:517
MinimizeButtonHandle
Definition: TrackButtonHandles.h:19
kLeftMargin
@ kLeftMargin
Definition: ZoomInfo.h:33
kTrackInfoSliderWidth
@ kTrackInfoSliderWidth
Definition: ViewInfo.h:113