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