11#ifndef __AUDACITY_WAVE_TRACK_VIEW__
12#define __AUDACITY_WAVE_TRACK_VIEW__
14#include "../../../ui/CommonChannelView.h"
59 std::vector<UIHandlePtr>
63 const std::shared_ptr<WaveTrack> &wt );
66 static void DrawBoldBoundaries(
70 std::weak_ptr<WaveChannelView> GetWaveChannelView()
const;
73 const wxRect &rect,
const wxPoint *pPosition,
AudacityProject *pProject )
127 void Reparent(
const std::shared_ptr<Track> &parent )
override;
131 std::vector<UIHandlePtr>
135 const std::shared_ptr<WaveTrack> &wt,
138 std::vector<WaveChannelSubView::Type> GetDisplays()
const;
139 void SetDisplay(
Display display,
bool exclusive =
true);
142 {
return DoGetPlacements(); }
144 { DoGetPlacements() = placements; }
148 bool ToggleSubView(
Display id );
152 std::vector<std::shared_ptr<WaveChannelSubView>> GetAllSubViews();
161 std::weak_ptr<WaveClip> GetSelectedClip();
170 Refinement
GetSubViews(
const wxRect* rect =
nullptr);
173 (wxKeyEvent& event,
ViewInfo& viewInfo, wxWindow* pParent,
176 unsigned KeyDown(wxKeyEvent& event,
ViewInfo& viewInfo, wxWindow* pParent,
180 (wxKeyEvent& event,
ViewInfo& viewInfo, wxWindow* pParent,
185 static bool ClipDetailsVisible(
187 static wxRect ClipHitTestArea(
const WaveClip& clip,
const ZoomInfo& zoomInfo,
const wxRect& viewRect);
201 void BuildSubViews()
const;
202 void DoSetDisplay(
Display display,
bool exclusive =
true);
208 const wxRect &rect,
unsigned iPass )
override;
216 Refinement
GetSubViews(
const wxRect& rect)
override;
228 mutable wxCoord mLastHeight{};
230 bool &DoGetMultiView();
231 bool DoGetMultiView()
const;
233 std::shared_ptr<CommonTrackCell> DoGetAffordance(
const std::shared_ptr<Track>& track);
271 static wxRect GetClipRect(
273 const wxRect& viewRect,
bool* outShowSamples =
nullptr);
Utility ClientData::Site to register hooks into a host class that attach client data.
@ kChannelSeparatorThickness
std::vector< WaveChannelSubViewPlacement > WaveChannelSubViewPlacements
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
virtual std::shared_ptr< ChannelVRulerControls > DoGetVRulerControls()=0
static ChannelView * Find(Channel *pChannel)
static ChannelView & Get(Channel &channel)
virtual std::shared_ptr< CommonTrackCell > GetAffordanceControls()
virtual void DoSetMinimized(bool isMinimized)
virtual Refinement GetSubViews(const wxRect &rect)
void CopyTo(Track &track) const override
Copy state, for undo/redo purposes.
Utility to register hooks into a host class that attach client data.
Implements some hit-testing shared by many ChannelView subtypes.
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &, const AudacityProject *pProject) final
virtual std::vector< UIHandlePtr > DetailedHitTest(const TrackPanelMouseState &, const AudacityProject *pProject, int currentTool, bool bMultiTool)=0
void Reparent(const std::shared_ptr< Track > &parent) override
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it.
virtual std::vector< MenuItem > GetMenuItems(const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject)
Return a list of items for DoContextMenu() (empties for separators)
Defines a selected portion of a project.
Abstract base class for an object holding data associated with points on a time axis.
virtual unsigned KeyDown(wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned CaptureKey(wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned LoseFocus(AudacityProject *project)
virtual unsigned Char(wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass)
Constructed from one channel, but changes height of all channels in a track.
Holds a msgid for the translation catalog; may also bind format arguments.
std::weak_ptr< SubViewAdjustHandle > mAdjustHandle
virtual const Type & SubViewType() const =0
std::weak_ptr< CutlineHandle > mCutlineHandle
std::weak_ptr< TrackPanelResizeHandle > mResizeHandle
std::weak_ptr< WaveChannelView > mwWaveChannelView
std::weak_ptr< WaveClipAdjustBorderHandle > mClipBorderAdjustHandle
std::weak_ptr< SubViewCloseHandle > mCloseHandle
std::weak_ptr< SubViewRearrangeHandle > mRearrangeHandle
void SetMultiView(bool value)
const WaveChannelSubViewPlacements & SavePlacements() const
bool GetMultiView() const
std::weak_ptr< WaveTrackAffordanceHandle > mAffordanceHandle
WaveChannelView & operator=(const WaveChannelView &)=delete
std::shared_ptr< CommonTrackCell > mpAffordanceCellControl
WaveChannelView(const WaveChannelView &)=delete
std::weak_ptr< TrackPanelCell > mKeyEventDelegate
wxCoord GetLastHeight() const
void RestorePlacements(const WaveChannelSubViewPlacements &placements)
This allows multiple clips to be a part of one WaveTrack.
Implements some features which are specific to Wave Clips.
A Track that contains audio waveform data.
@ SkipCopying
ignore the source and leave empty
const double averagePixelsPerSecond
const bool showIndividualSamples