Audacity  2.2.0
TrackPanel.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  TrackPanel.h
6 
7  Dominic Mazzoni
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_TRACK_PANEL__
12 #define __AUDACITY_TRACK_PANEL__
13 
14 #include "MemoryX.h"
15 #include <vector>
16 
17 #include <wx/timer.h>
18 
19 #include "Experimental.h"
20 
21 #include "HitTestResult.h"
22 
23 #include "SelectedRegion.h"
24 
25 #include "widgets/OverlayPanel.h"
26 
27 #include "SelectionState.h"
28 
29 class wxMenu;
30 class wxRect;
31 
32 class LabelTrack;
33 class SpectrumAnalyst;
34 class Track;
35 class TrackList;
36 class TrackPanel;
37 class TrackPanelCell;
38 class TrackArtist;
39 class Ruler;
40 class SnapManager;
41 class AdornedRulerPanel;
42 class LWSlider;
43 class ControlToolBar; //Needed because state of controls can affect what gets drawn.
44 class ToolsToolBar; //Needed because state of controls can affect what gets drawn.
45 class MixerBoard;
46 class AudacityProject;
47 
48 class TrackPanelAx;
52 
53 class ViewInfo;
54 
55 class NoteTrack;
56 class WaveTrack;
57 class WaveClip;
58 class UIHandle;
59 using UIHandlePtr = std::shared_ptr<UIHandle>;
60 
61 // Declared elsewhere, to reduce compilation dependencies
62 class TrackPanelListener;
63 
65 
66 enum class UndoPush : unsigned char;
67 
68 // JKC Nov 2011: Disabled warning C4251 which is to do with DLL linkage
69 // and only a worry when there are DLLs using the structures.
70 // Array classes are private in TrackInfo, so we will not
71 // access them directly from the DLL.
72 // TrackClipArray in TrackPanel needs to be handled with care in the derived
73 // class, but the C4251 warning is no worry in core Audacity.
74 // wxWidgets doesn't cater to the exact details we need in
75 // WX_DECLARE_EXPORTED_OBJARRAY to be able to use that for these two arrays.
76 #ifdef _MSC_VER
77 #pragma warning( push )
78 #pragma warning( disable: 4251 )
79 #endif
80 
81 DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_TRACK_PANEL_TIMER, -1);
82 
83 enum {
84  kTimerInterval = 50, // milliseconds
85 };
86 
87 
88 class AUDACITY_DLL_API TrackInfo
89 {
90 public:
91  TrackInfo(TrackPanel * pParentIn);
92  ~TrackInfo();
93  void ReCreateSliders();
94 
95  static unsigned MinimumTrackHeight();
96 
97  struct TCPLine;
98 
99  static void DrawItems
100  ( TrackPanelDrawingContext &context,
101  const wxRect &rect, const Track &track );
102 
103  static void DrawItems
104  ( TrackPanelDrawingContext &context,
105  const wxRect &rect, const Track *pTrack,
106  const std::vector<TCPLine> &topLines,
107  const std::vector<TCPLine> &bottomLines );
108 
109  static void CloseTitleDrawFunction
110  ( TrackPanelDrawingContext &context,
111  const wxRect &rect, const Track *pTrack );
112 
113  static void MinimizeSyncLockDrawFunction
114  ( TrackPanelDrawingContext &context,
115  const wxRect &rect, const Track *pTrack );
116 
117  static void MidiControlsDrawFunction
118  ( TrackPanelDrawingContext &context,
119  const wxRect &rect, const Track *pTrack );
120 
121  template<typename TrackClass>
122  static void SliderDrawFunction
123  ( LWSlider *(*Selector)
124  (const wxRect &sliderRect, const TrackClass *t, bool captured,
125  wxWindow*),
126  wxDC *dc, const wxRect &rect, const Track *pTrack,
127  bool captured, bool highlight );
128 
129  static void PanSliderDrawFunction
130  ( TrackPanelDrawingContext &context,
131  const wxRect &rect, const Track *pTrack );
132 
133  static void GainSliderDrawFunction
134  ( TrackPanelDrawingContext &context,
135  const wxRect &rect, const Track *pTrack );
136 
137 #ifdef EXPERIMENTAL_MIDI_OUT
138  static void VelocitySliderDrawFunction
139  ( TrackPanelDrawingContext &context,
140  const wxRect &rect, const Track *pTrack );
141 #endif
142 
143  static void MuteOrSoloDrawFunction
144  ( wxDC *dc, const wxRect &rect, const Track *pTrack, bool down,
145  bool captured, bool solo, bool hit );
146 
147  static void WideMuteDrawFunction
148  ( TrackPanelDrawingContext &context,
149  const wxRect &rect, const Track *pTrack );
150 
151  static void WideSoloDrawFunction
152  ( TrackPanelDrawingContext &context,
153  const wxRect &rect, const Track *pTrack );
154 
155  static void MuteAndSoloDrawFunction
156  ( TrackPanelDrawingContext &context,
157  const wxRect &rect, const Track *pTrack );
158 
159  static void StatusDrawFunction
160  ( const wxString &string, wxDC *dc, const wxRect &rect );
161 
162  static void Status1DrawFunction
163  ( TrackPanelDrawingContext &context,
164  const wxRect &rect, const Track *pTrack );
165 
166  static void Status2DrawFunction
167  ( TrackPanelDrawingContext &context,
168  const wxRect &rect, const Track *pTrack );
169 
170 public:
171  int GetTrackInfoWidth() const;
172  static void SetTrackInfoFont(wxDC *dc);
173 
174 
175  void DrawBackground(wxDC * dc, const wxRect & rect, bool bSelected, bool bHasMuteSolo, const int labelw, const int vrul) const;
176  void DrawBordersWithin(wxDC * dc, const wxRect & rect, const Track &track ) const;
177 
178  static void GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest );
179  static void GetCloseBoxRect(const wxRect & rect, wxRect &dest);
180 
181  static void GetTitleBarHorizontalBounds( const wxRect & rect, wxRect &dest );
182  static void GetTitleBarRect(const wxRect & rect, wxRect &dest);
183 
184  static void GetNarrowMuteHorizontalBounds
185  ( const wxRect & rect, wxRect &dest );
186  static void GetNarrowSoloHorizontalBounds
187  ( const wxRect & rect, wxRect &dest );
188  static void GetWideMuteSoloHorizontalBounds
189  ( const wxRect & rect, wxRect &dest );
190  static void GetMuteSoloRect
191  (const wxRect & rect, wxRect &dest, bool solo, bool bHasSoloButton,
192  const Track *pTrack);
193 
194  static void GetSliderHorizontalBounds( const wxPoint &topleft, wxRect &dest );
195 
196  static void GetGainRect(const wxPoint & topLeft, wxRect &dest);
197 
198  static void GetPanRect(const wxPoint & topLeft, wxRect &dest);
199 
200 #ifdef EXPERIMENTAL_MIDI_OUT
201  static void GetVelocityRect(const wxPoint & topLeft, wxRect &dest);
202 #endif
203 
204  static void GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest );
205  static void GetMinimizeRect(const wxRect & rect, wxRect &dest);
206 
207  static void GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest );
208  static void GetSyncLockIconRect(const wxRect & rect, wxRect &dest);
209 
210 #ifdef USE_MIDI
211  static void GetMidiControlsHorizontalBounds
212  ( const wxRect &rect, wxRect &dest );
213  static void GetMidiControlsRect(const wxRect & rect, wxRect &dest);
214 #endif
215 
216  static bool HideTopItem( const wxRect &rect, const wxRect &subRect,
217  int allowance = 0 );
218 
219  static unsigned DefaultNoteTrackHeight();
220  static unsigned DefaultWaveTrackHeight();
221 
222  static LWSlider * GainSlider
223  (const wxRect &sliderRect, const WaveTrack *t, bool captured,
224  wxWindow *pParent);
225  static LWSlider * PanSlider
226  (const wxRect &sliderRect, const WaveTrack *t, bool captured,
227  wxWindow *pParent);
228 
229 #ifdef EXPERIMENTAL_MIDI_OUT
230  static LWSlider * VelocitySlider
231  (const wxRect &sliderRect, const NoteTrack *t, bool captured,
232  wxWindow *pParent);
233 #endif
234 
235 private:
236  void UpdatePrefs();
237 
239  static wxFont gFont;
240  // These are on separate lines to work around an MSVC 2013 compiler bug.
241  static std::unique_ptr<LWSlider> gGainCaptured;
242  static std::unique_ptr<LWSlider> gPanCaptured;
243  static std::unique_ptr<LWSlider> gGain;
244  static std::unique_ptr<LWSlider> gPan;
245 #ifdef EXPERIMENTAL_MIDI_OUT
246  static std::unique_ptr<LWSlider> gVelocityCaptured;
247  static std::unique_ptr<LWSlider> gVelocity;
248 #endif
249 
250  friend class TrackPanel;
251 };
252 
253 
254 const int DragThreshold = 3;// Anything over 3 pixels is a drag, else a click.
255 
256 
257 class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
258  public:
259 
260  TrackPanel(wxWindow * parent,
261  wxWindowID id,
262  const wxPoint & pos,
263  const wxSize & size,
264  const std::shared_ptr<TrackList> &tracks,
265  ViewInfo * viewInfo,
266  TrackPanelListener * listener,
267  AdornedRulerPanel * ruler );
268 
269  virtual ~ TrackPanel();
270 
272 
273  void UpdatePrefs();
274  void ApplyUpdatedTheme();
275 
276  void OnPaint(wxPaintEvent & event);
277  void OnMouseEvent(wxMouseEvent & event);
278  void OnCaptureLost(wxMouseCaptureLostEvent & event);
279  void OnCaptureKey(wxCommandEvent & event);
280  void OnKeyDown(wxKeyEvent & event);
281  void OnChar(wxKeyEvent & event);
282  void OnKeyUp(wxKeyEvent & event);
283 
284  void OnSetFocus(wxFocusEvent & event);
285  void OnKillFocus(wxFocusEvent & event);
286 
287  void OnContextMenu(wxContextMenuEvent & event);
288 
289  void OnPlayback(wxCommandEvent &);
290  void OnTrackListResizing(wxCommandEvent & event);
291  void OnTrackListDeletion(wxCommandEvent & event);
292  void UpdateViewIfNoTracks(); // Call this to update mViewInfo, etc, after track(s) removal, before Refresh().
293 
294  double GetMostRecentXPos();
295 
296  void OnIdle(wxIdleEvent & event);
297  void OnTimer(wxTimerEvent& event);
298 
299  int GetLeftOffset() const { return GetLabelWidth() + 1;}
300 
301  // Width and height, relative to upper left corner at (GetLeftOffset(), 0)
302  // Either argument may be NULL
303  void GetTracksUsableArea(int *width, int *height) const;
304 
305  void Refresh
306  (bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL)
307  override;
308 
309  void RefreshTrack(Track *trk, bool refreshbacking = true);
310 
311  void DisplaySelection();
312 
313  // These two are neither used nor defined as of Nov-2011
314  // void SetSelectionFormat(int iformat)
315  // void SetSnapTo(int snapto)
316 
317  void HandleInterruptedDrag();
318  void Uncapture( wxMouseState *pState = nullptr );
319  bool CancelDragging();
320  bool HandleEscapeKey(bool down);
321  void UpdateMouseState(const wxMouseState &state);
322  void HandleModifierKey();
323  void HandlePageUpKey();
324  void HandlePageDownKey();
325  AudacityProject * GetProject() const;
326 
327  void ScrollIntoView(double pos);
328  void ScrollIntoView(int x);
329 
330  void OnTrackMenu(Track *t = NULL);
331  Track * GetFirstSelectedTrack();
332  bool IsMouseCaptured();
333 
334  void EnsureVisible(Track * t);
335 
336  Track *GetFocusedTrack();
337  void SetFocusedTrack(Track *t);
338 
339  void HandleCursorForPresentMouseState(bool doHit = true);
340 
341  void UpdateVRulers();
342  void UpdateVRuler(Track *t);
343  void UpdateTrackVRuler(const Track *t);
344  void UpdateVRulerSize();
345 
346  // Returns the time corresponding to the pixel column one past the track area
347  // (ignoring any fisheye)
348  double GetScreenEndTime() const;
349 
350  protected:
351  bool IsAudioActive();
352  void HandleClick( const TrackPanelMouseEvent &tpmEvent );
353 
354 public:
355  size_t GetTrackCount() const;
356  size_t GetSelectedTrackCount() const;
357 
358 protected:
359  void UpdateSelectionDisplay();
360 
361 public:
362  void UpdateAccessibility();
363  void MessageForScreenReader(const wxString& message);
364 
365  // MM: Handle mouse wheel rotation
366  void HandleWheelRotation( TrackPanelMouseEvent &tpmEvent );
367 
368  void MakeParentRedrawScrollbars();
369 
370 protected:
371  void MakeParentModifyState(bool bWantsAutoSave); // if true, writes auto-save file. Should set only if you really want the state change restored after
372  // a crash, as it can take many seconds for large (eg. 10 track-hours) projects
373 
374  // Find track info by coordinate
375  struct FoundCell {
376  std::shared_ptr<Track> pTrack;
377  std::shared_ptr<TrackPanelCell> pCell;
378  wxRect rect;
379  };
380  FoundCell FindCell(int mouseX, int mouseY);
381 
382  void HandleMotion( wxMouseState &state, bool doHit = true );
383  void HandleMotion
384  ( const TrackPanelMouseState &tpmState, bool doHit = true );
385 
386  // If label, rectangle includes track control panel only.
387  // If !label, rectangle includes all of that, and the vertical ruler, and
388  // the proper track area.
389  wxRect FindTrackRect( const Track * target, bool label );
390 
391  int GetVRulerWidth() const;
392  int GetVRulerOffset() const { return mTrackInfo.GetTrackInfoWidth(); }
393 
394  int GetLabelWidth() const { return mTrackInfo.GetTrackInfoWidth() + GetVRulerWidth(); }
395 
396 // JKC Nov-2011: These four functions only used from within a dll such as mod-track-panel
397 // They work around some messy problems with constructors.
398 public:
399  const TrackList * GetTracks() const { return mTracks.get(); }
400  TrackList * GetTracks() { return mTracks.get(); }
401  ViewInfo * GetViewInfo(){ return mViewInfo;}
402  TrackPanelListener * GetListener(){ return mListener;}
403  AdornedRulerPanel * GetRuler(){ return mRuler;}
404 // JKC and here is a factory function which just does 'NEW' in standard Audacity.
405  // Precondition: parent != NULL
406  static TrackPanel *(*FactoryFunction)(wxWindow * parent,
407  wxWindowID id,
408  const wxPoint & pos,
409  const wxSize & size,
410  const std::shared_ptr<TrackList> &tracks,
411  ViewInfo * viewInfo,
412  TrackPanelListener * listener,
413  AdornedRulerPanel * ruler);
414 
415 protected:
416  void DrawTracks(wxDC * dc);
417 
418  void DrawEverythingElse(TrackPanelDrawingContext &context,
419  const wxRegion & region,
420  const wxRect & clip);
421  void DrawOutside
422  (TrackPanelDrawingContext &context,
423  Track *t, const wxRect & rec);
424 
425  void HighlightFocusedTrack (wxDC* dc, const wxRect &rect);
426  void DrawShadow (Track *t, wxDC* dc, const wxRect & rect);
427  void DrawBordersAroundTrack(Track *t, wxDC* dc, const wxRect & rect, const int labelw, const int vrul);
428  void DrawOutsideOfTrack
429  (TrackPanelDrawingContext &context,
430  Track *t, const wxRect & rect);
431 
432 public:
433  // Set the object that performs catch-all event handling when the pointer
434  // is not in any track or ruler or control panel.
435  void SetBackgroundCell
436  (const std::shared_ptr< TrackPanelCell > &pCell);
437  std::shared_ptr< TrackPanelCell > GetBackgroundCell();
438 
439 #ifdef EXPERIMENTAL_OUTPUT_DISPLAY
440  void UpdateVirtualStereoOrder();
441 #endif
442 
443 public:
444  // Accessors...
445  static bool HasSoloButton(){ return gSoloPref!=wxT("None");}
446 
447 protected:
448 
450 
451 public:
452 
453  LWSlider *GainSlider( const WaveTrack *wt );
454  LWSlider *PanSlider( const WaveTrack *wt );
455 #ifdef EXPERIMENTAL_MIDI_OUT
456  LWSlider *VelocitySlider( const NoteTrack *nt );
457 #endif
458 
459  TrackInfo *GetTrackInfo() { return &mTrackInfo; }
460  const TrackInfo *GetTrackInfo() const { return &mTrackInfo; }
461 
462 protected:
464 
465  std::shared_ptr<TrackList> mTracks;
467 
469 
470  std::unique_ptr<TrackArtist> mTrackArtist;
471 
472  class AUDACITY_DLL_API AudacityTimer final : public wxTimer {
473  public:
474  void Notify() override{
475  // (From Debian)
476  //
477  // Don't call parent->OnTimer(..) directly here, but instead post
478  // an event. This ensures that this is a pure wxWidgets event
479  // (no GDK event behind it) and that it therefore isn't processed
480  // within the YieldFor(..) of the clipboard operations (workaround
481  // for Debian bug #765341).
482  // QueueEvent() will take ownership of the event
483  parent->GetEventHandler()->QueueEvent(safenew wxTimerEvent(*this));
484  }
486  } mTimer;
487 
489 
491 
492 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
493 
494 protected:
495 
496 #endif
497 
499 
500  wxMouseState mLastMouseState;
501 
504 
505  friend class TrackPanelAx;
506 
507 #if wxUSE_ACCESSIBILITY
508  TrackPanelAx *mAx{};
509 #else
510  std::unique_ptr<TrackPanelAx> mAx;
511 #endif
512 
513 public:
514  TrackPanelAx &GetAx() { return *mAx; }
515 
516 protected:
517 
518  static wxString gSoloPref;
519 
520  // The screenshot class needs to access internals
521  friend class ScreenshotCommand;
522 
523  SelectedRegion mLastDrawnSelectedRegion {};
524 
525  public:
526  wxSize vrulerSize;
527 
528  protected:
529  std::weak_ptr<TrackPanelCell> mLastCell;
530  std::vector<UIHandlePtr> mTargets;
531  size_t mTarget {};
532  unsigned mMouseOverUpdateFlags{};
533 
534  public:
536  {
537  if (mTargets.size())
538  return mTargets[mTarget];
539  else
540  return {};
541  }
542 
543  protected:
545  {
546  // Forget the rotation of hit test candidates when the mouse moves from
547  // cell to cell or outside of the TrackPanel entirely.
548  mLastCell.reset();
549  mTargets.clear();
550  mTarget = 0;
551  mMouseOverUpdateFlags = 0;
552  }
553 
554  bool HasRotation();
555  bool HasEscape();
556 
557  bool ChangeTarget(bool forward, bool cycle);
558 
559  std::weak_ptr<Track> mpClickedTrack;
561 
562  std::shared_ptr<TrackPanelCell> mpBackground;
563 
564  bool mEnableTab{};
565 
566  DECLARE_EVENT_TABLE()
567 };
568 
569 // See big pictorial comment in TrackPanel for explanation of these numbers
570 enum : int {
580 };
581 
582 enum : int {
584  kTrackInfoBtnSize = 18, // widely used dimension, usually height
589 };
590 
591 #ifdef USE_MIDI
592 enum : int {
593  kMidiCellWidth = (kTrackInfoWidth / 4) - 2,
594  kMidiCellHeight = kTrackInfoBtnSize
595 };
596 #endif
597 
598 #ifdef _MSC_VER
599 #pragma warning( pop )
600 #endif
601 
602 #endif
int GetLabelWidth() const
Definition: TrackPanel.h:394
A ToolBar that has the main Transport buttons.
Definition: ControlToolBar.h:42
A list of TrackListNode items.
Definition: Track.h:550
This class handles the actual rendering of WaveTracks (both waveforms and spectra), NoteTracks, LabelTracks and TimeTracks.
Definition: TrackArtist.h:50
static wxFont gFont
Definition: TrackPanel.h:239
const TrackInfo * GetTrackInfo() const
Definition: TrackPanel.h:460
const TrackList * GetTracks() const
Definition: TrackPanel.h:399
std::shared_ptr< TrackPanelCell > pCell
Definition: TrackPanel.h:377
ViewInfo is used mainly to hold the zooming, selection and scroll information. It also has some statu...
Definition: ViewInfo.h:138
const int DragThreshold
Definition: TrackPanel.h:254
A now badly named class which is used to give access to a subset of the TrackPanel methods from all o...
Definition: TrackPanelListener.h:18
wxRect rect
Definition: TrackPanel.h:378
std::shared_ptr< Track > pTrack
Definition: TrackPanel.h:376
Definition: TrackPanel.h:573
std::shared_ptr< TrackList > mTracks
Definition: TrackPanel.h:465
Definition: RefreshCode.h:30
std::weak_ptr< TrackPanelCell > mLastCell
Definition: TrackPanel.h:529
int mMouseMostRecentX
Definition: TrackPanel.h:502
Definition: TrackPanel.h:583
wxString label
Definition: Tags.cpp:728
void OnTrackMenu()
static bool HasSoloButton()
Definition: TrackPanel.h:445
Definition: TrackPanel.h:574
static std::unique_ptr< LWSlider > gPanCaptured
Definition: TrackPanel.h:242
Definition: MemoryX.h:853
Definition: TrackPanelMouseEvent.h:27
static wxString gSoloPref
Definition: TrackPanel.h:518
Timer class dedicated to infomring the TrackPanel that it is time to refresh some aspect of the scree...
Definition: TrackPanel.h:472
#define safenew
Definition: Audacity.h:254
UIHandlePtr Target()
Definition: TrackPanel.h:535
void ClearTargets()
Definition: TrackPanel.h:544
Definition: TrackPanel.h:587
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:114
Definition: TrackPanel.h:588
TrackList * GetTracks()
Definition: TrackPanel.h:400
ViewInfo * mViewInfo
Definition: TrackPanel.h:466
Definition: TrackPanelCellIterator.h:25
void Notify() override
Definition: TrackPanel.h:474
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:161
wxSize vrulerSize
Definition: TrackPanel.h:526
TrackInfo * GetTrackInfo()
Definition: TrackPanel.h:459
Definition: TrackPanel.h:579
Defines a selected portion of a project.
Definition: SelectedRegion.h:37
UIHandlePtr mUIHandle
Definition: TrackPanel.h:560
The TrackInfo is shown to the side of a track It has the menus, pan and gain controls displayed in it...
Definition: TrackPanel.h:88
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Definition: TrackPanel.h:257
TrackPanel * pParent
Definition: TrackPanel.h:238
Lightweight version of ASlider. In other words it does not have a window permanently associated with ...
Definition: ASlider.h:72
Definition: TrackPanel.h:575
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:177
Definition: TrackPanel.h:586
UndoPush
Definition: UndoManager.h:82
A Track that contains audio waveform data.
Definition: WaveTrack.h:76
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:85
TrackPanelAx & GetAx()
Definition: TrackPanel.h:514
Definition: RefreshCode.h:31
TrackInfo mTrackInfo
Definition: TrackPanel.h:449
Helper to TrackPanel to give accessibility.
Definition: TrackPanelAx.h:24
Definition: OverlayPanel.h:17
Implements a command for capturing various areas of the screen or project window. ...
Definition: ScreenshotCommand.h:34
Definition: MixerBoard.h:204
std::shared_ptr< UIHandle > UIHandlePtr
Definition: TrackPanel.h:59
TrackPanelListener * mListener
Definition: TrackPanel.h:463
Used for finding the peaks, for snapping to peaks.
Definition: FreqWindow.h:44
Definition: Snap.h:83
Definition: TrackPanel.h:375
Definition: TrackPanel.h:585
Definition: TrackPanel.h:571
int mTimeCount
Definition: TrackPanel.h:488
Definition: TrackPanel.h:576
TrackPanelListener * GetListener()
Definition: TrackPanel.h:402
int mMouseMostRecentY
Definition: TrackPanel.h:503
Used to display a Ruler.
Definition: Ruler.h:32
std::unique_ptr< TrackArtist > mTrackArtist
Definition: TrackPanel.h:470
Definition: TrackPanel.cpp:1190
Definition: TrackPanel.h:577
Definition: TrackPanelCell.h:32
TrackPanel * parent
Definition: TrackPanel.h:485
Definition: TrackPanel.h:584
bool mRefreshBacking
Definition: TrackPanel.h:490
A kind of ToolBar with Tools on it.
Definition: ToolsToolBar.h:47
bool mRedrawAfterStop
Definition: TrackPanel.h:498
static std::unique_ptr< LWSlider > gPan
Definition: TrackPanel.h:244
Definition: UIHandle.h:33
std::shared_ptr< TrackPanelCell > mpBackground
Definition: TrackPanel.h:562
This is an Audacity Specific ruler panel which additionally has border, selection markers...
Definition: Ruler.h:280
std::vector< UIHandlePtr > mTargets
Definition: TrackPanel.h:530
int GetLeftOffset() const
Definition: TrackPanel.h:299
AdornedRulerPanel * GetRuler()
Definition: TrackPanel.h:403
std::unique_ptr< TrackPanelAx > mAx
Definition: TrackPanel.h:510
Definition: TrackPanel.h:84
Definition: TrackPanel.h:578
wxMouseState mLastMouseState
Definition: TrackPanel.h:500
AdornedRulerPanel * mRuler
Definition: TrackPanel.h:468
std::weak_ptr< Track > mpClickedTrack
Definition: TrackPanel.h:559
static std::unique_ptr< LWSlider > gGain
Definition: TrackPanel.h:243
Definition: TrackPanel.h:572
Definition: TrackPanelMouseEvent.h:45
static std::unique_ptr< LWSlider > gGainCaptured
Definition: TrackPanel.h:241
int GetVRulerOffset() const
Definition: TrackPanel.h:392
Definition: TrackPanelDrawingContext.h:24
ViewInfo * GetViewInfo()
Definition: TrackPanel.h:401
enum UndoPush unsigned char DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_TRACK_PANEL_TIMER,-1)
A Track that is used for Midi notes. (Somewhat old code).