![]() |
Audacity 3.2.0
|
#include <SpectrumView.h>
Classes | |
class | SpectralDataSaver |
Public Member Functions | |
SpectrumView (WaveChannelView &waveChannelView, const SpectrumView &src)=delete | |
SpectrumView (WaveChannelView &waveChannelView) | |
~SpectrumView () override | |
const Type & | SubViewType () const override |
std::shared_ptr< ChannelVRulerControls > | DoGetVRulerControls () override |
std::shared_ptr< SpectralData > | GetSpectralData () |
bool | IsSpectral () const override |
void | CopyToSubView (WaveChannelSubView *destSubView) const override |
![]() | |
WaveChannelSubView (WaveChannelView &waveChannelView) | |
std::shared_ptr< WaveChannel > | FindWaveChannel () |
virtual const Type & | SubViewType () const =0 |
virtual void | CopyToSubView (WaveChannelSubView *destSubView) const |
std::pair< bool, std::vector< UIHandlePtr > > | DoDetailedHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject, int currentTool, bool bMultiTool, const std::shared_ptr< WaveChannel > &wt) |
![]() | |
std::shared_ptr< TrackPanelCell > | ContextMenuDelegate () override |
std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &, const AudacityProject *pProject) final |
void | TimeShiftHitTest () |
virtual int | GetMinimizedHeight () const override |
ChannelView (const std::shared_ptr< Channel > &pChannel) | |
![]() | |
ChannelView (const std::shared_ptr< Channel > &pChannel) | |
virtual | ~ChannelView ()=0 |
void | Reparent (const std::shared_ptr< Track > &parent, size_t iChannel) override |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
void | CopyTo (Track &track, size_t iChannel) const override |
Copy state, for undo/redo purposes. More... | |
bool | GetMinimized () const |
void | SetMinimized (bool minimized) |
int | GetCumulativeHeightBefore () const |
int | GetExpandedHeight () const |
virtual int | GetMinimizedHeight () const =0 |
int | GetHeight () const |
void | SetCumulativeHeightBefore (int y) |
Set cached value dependent on position within the track list. More... | |
void | SetExpandedHeight (int height) |
std::shared_ptr< ChannelVRulerControls > | GetVRulerControls () |
std::shared_ptr< const ChannelVRulerControls > | GetVRulerControls () const |
virtual std::shared_ptr< CommonTrackCell > | GetAffordanceControls () |
void | WriteXMLAttributes (XMLWriter &writer, size_t iChannel) const override |
Serialize persistent attributes. More... | |
bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView, size_t iChannel) override |
Deserialize an attribute, returning true if recognized. More... | |
virtual Refinement | GetSubViews (const wxRect &rect) |
virtual bool | IsSpectral () const |
virtual void | DoSetMinimized (bool isMinimized) |
![]() | |
CommonChannelCell (const std::shared_ptr< Channel > &pChannel) | |
Construct from a channel. More... | |
~CommonChannelCell () | |
std::shared_ptr< Track > | DoFindTrack () override |
void | Reparent (const std::shared_ptr< Track > &parent, size_t iChannel) override |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
template<typename Subtype = Channel> | |
auto | FindChannel () -> std::shared_ptr< Subtype > |
May return null. More... | |
template<typename Subtype = const Channel> | |
auto | FindChannel () const -> std::enable_if_t< std::is_const_v< Subtype >, std::shared_ptr< Subtype > > |
May return null. More... | |
![]() | |
CommonTrackPanelCell () | |
virtual | ~CommonTrackPanelCell ()=0 |
HitTestPreview | DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override |
std::shared_ptr< Track > | FindTrack () |
std::shared_ptr< const Track > | FindTrack () const |
virtual std::vector< MenuItem > | GetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject) |
Return a list of items for DoContextMenu() (empties for separators) More... | |
![]() | |
TrackPanelCell ()=default | |
TrackPanelCell (const TrackPanelCell &)=delete | |
TrackPanelCell & | operator= (const TrackPanelCell &)=delete |
virtual | ~TrackPanelCell ()=0 |
virtual HitTestPreview | DefaultPreview (const TrackPanelMouseState &state, const AudacityProject *pProject) |
virtual std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *pProject)=0 |
virtual unsigned | HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) |
virtual std::shared_ptr< TrackPanelCell > | ContextMenuDelegate () |
virtual unsigned | DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) |
virtual unsigned | CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | KeyUp (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | LoseFocus (AudacityProject *project) |
![]() | |
TrackPanelNode () | |
virtual | ~TrackPanelNode ()=0 |
![]() | |
virtual | ~TrackPanelDrawable ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
![]() | |
virtual | ~ChannelAttachment () |
virtual void | CopyTo (Track &track, size_t iChannel) const |
Copy state, for undo/redo purposes. More... | |
virtual void | Reparent (const std::shared_ptr< Track > &parent, size_t iChannel) |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
virtual void | WriteXMLAttributes (XMLWriter &writer, size_t iChannel) const |
Serialize persistent attributes. More... | |
virtual bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView, size_t iChannel) |
Deserialize an attribute, returning true if recognized. More... | |
Static Public Attributes | |
static int | mBrushRadius |
Private Member Functions | |
SpectrumView & | operator= (const SpectrumView &)=delete |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
void | DoDraw (TrackPanelDrawingContext &context, const WaveChannel &channel, const WaveTrack::Interval *selectedClip, const wxRect &rect) |
std::vector< UIHandlePtr > | DetailedHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject, int currentTool, bool bMultiTool) override |
unsigned | CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) override |
unsigned | KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) override |
unsigned | Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) override |
void | DoSetMinimized (bool minimized) override |
Static Private Member Functions | |
static void | ForAll (AudacityProject &project, std::function< void(SpectrumView &view)> fn) |
Private Attributes | |
std::weak_ptr< BrushHandle > | mBrushHandle |
std::shared_ptr< SpectralData > | mpSpectralData |
std::shared_ptr< SpectralData > | mpBackupSpectralData |
bool | mOnBrushTool |
Additional Inherited Members | |
![]() | |
using | Display = WaveChannelViewConstants::Display |
using | Type = WaveChannelSubViewType |
![]() | |
enum | : unsigned { DefaultHeight = 150 } |
using | Refinement = std::vector< std::pair< wxCoord, std::shared_ptr< ChannelView > > > |
![]() | |
static void | GetEnvelopeValues (const Envelope &env, double aligned_time, double sampleDur, double *buffer, int bufferLen, int leftOffset, const ZoomInfo &zoomInfo) |
Get many envelope points for pixel columns at once, but don't assume uniform time per pixel. More... | |
![]() | |
static ChannelView & | Get (Channel &channel) |
static const ChannelView & | Get (const Channel &channel) |
static ChannelView * | Find (Channel *pChannel) |
static const ChannelView * | Find (const Channel *pChannel) |
static int | GetChannelGroupHeight (const Track *pTrack) |
static int | GetCumulativeHeight (const Channel *pChannel) |
static int | GetCumulativeHeight (const Track *pTrack) |
static int | GetTotalHeight (const TrackList &list) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
![]() | |
std::weak_ptr< TimeShiftHandle > | mTimeShiftHandle |
![]() | |
std::pair< int, int > | vrulerSize |
![]() | |
std::weak_ptr< WaveChannelView > | GetWaveChannelView () const |
std::vector< MenuItem > | GetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject) override |
Return a list of items for DoContextMenu() (empties for separators) More... | |
virtual std::vector< UIHandlePtr > | DetailedHitTest (const TrackPanelMouseState &, const AudacityProject *pProject, int currentTool, bool bMultiTool)=0 |
virtual std::shared_ptr< ChannelVRulerControls > | DoGetVRulerControls ()=0 |
![]() | |
virtual std::shared_ptr< Track > | DoFindTrack ()=0 |
unsigned | DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) override |
unsigned | HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
![]() | |
static void | DrawBoldBoundaries (TrackPanelDrawingContext &context, const WaveChannel &channel, const wxRect &rect) |
![]() | |
std::weak_ptr< SelectHandle > | mSelectHandle |
![]() | |
std::shared_ptr< ChannelVRulerControls > | mpVRulerControls |
Definition at line 123 of file SpectrumView.h.
|
delete |
|
explicit |
Definition at line 59 of file SpectrumView.cpp.
References WaveChannelSubView::FindWaveChannel(), mOnBrushTool, and mpSpectralData.
|
overridedefault |
|
overrideprivatevirtual |
Reimplemented from TrackPanelCell.
Definition at line 1066 of file SpectrumView.cpp.
References mpSpectralData, RefreshCode::RefreshNone, and ShouldCaptureEvent().
|
overrideprivatevirtual |
Reimplemented from TrackPanelCell.
Definition at line 1084 of file SpectrumView.cpp.
References mpSpectralData, RefreshCode::RefreshNone, and ShouldCaptureEvent().
|
overridevirtual |
Reimplemented from WaveChannelSubView.
Definition at line 237 of file SpectrumView.cpp.
References mpSpectralData.
|
overrideprivatevirtual |
Implements CommonChannelView.
Definition at line 173 of file SpectrumView.cpp.
References BrushHandleHitTest(), WaveChannelSubView::DoDetailedHitTest(), WaveChannelSubView::FindWaveChannel(), mBrushHandle, mOnBrushTool, and mpSpectralData.
|
private |
Definition at line 862 of file SpectrumView.cpp.
References TrackArt::DrawBackgroundWithSelection(), WaveChannelSubView::DrawBoldBoundaries(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), TrackArtist::Get(), WaveChannel::Intervals(), and mpSpectralData.
Referenced by Draw().
|
overridevirtual |
Implements ChannelView.
Definition at line 228 of file SpectrumView.cpp.
|
overrideprivatevirtual |
Reimplemented from ChannelView.
Definition at line 197 of file SpectrumView.cpp.
References ChannelView::DoSetMinimized(), WaveChannelSubView::FindWaveChannel(), SpectrogramSettings::Get(), SpectrogramBounds::Get(), gPrefs, audacity::BasicSettings::Read(), SpectrogramSettings::scaleType, SpectrogramBounds::SetBounds(), SpectrogramSettings::stLinear, and wxT().
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 882 of file SpectrumView.cpp.
References TrackPanelDrawingContext::dc, DoDraw(), TrackPanelDrawable::Draw(), CommonChannelCell::FindChannel(), TrackArtist::Get(), WaveChannelSubView::GetWaveChannelView(), and TrackArtist::PassTracks.
|
staticprivate |
Definition at line 155 of file SpectrumView.cpp.
References fn, TrackList::Get(), ChannelView::Get(), and project.
Referenced by SpectrumView::SpectralDataSaver::Init(), and SpectrumView::SpectralDataSaver::~SpectralDataSaver().
std::shared_ptr< SpectralData > SpectrumView::GetSpectralData | ( | ) |
Definition at line 233 of file SpectrumView.cpp.
References mpSpectralData.
|
overridevirtual |
Reimplemented from ChannelView.
Definition at line 69 of file SpectrumView.cpp.
|
overrideprivatevirtual |
Reimplemented from TrackPanelCell.
Definition at line 1074 of file SpectrumView.cpp.
References mpSpectralData, SpectralDataManager::ProcessTracks(), project, RefreshCode::RefreshAll, RefreshCode::RefreshNone, and ShouldCaptureEvent().
|
privatedelete |
|
overridevirtual |
Implements WaveChannelSubView.
Definition at line 223 of file SpectrumView.cpp.
References sType.
|
private |
Definition at line 147 of file SpectrumView.h.
Referenced by DetailedHitTest().
|
static |
Definition at line 140 of file SpectrumView.h.
|
private |
Definition at line 149 of file SpectrumView.h.
Referenced by DetailedHitTest(), and SpectrumView().
|
private |
Definition at line 148 of file SpectrumView.h.
Referenced by SpectrumView::SpectralDataSaver::Init(), and SpectrumView::SpectralDataSaver::~SpectralDataSaver().
|
private |
Definition at line 148 of file SpectrumView.h.
Referenced by CaptureKey(), Char(), CopyToSubView(), DetailedHitTest(), DoDraw(), GetSpectralData(), SpectrumView::SpectralDataSaver::Init(), KeyDown(), and SpectrumView().