Audacity 3.2.0
|
#include <WaveChannelView.h>
Public Types | |
using | Display = WaveChannelViewConstants::Display |
using | Type = WaveChannelSubViewType |
Public Types inherited from ChannelView | |
enum | : unsigned { DefaultHeight = 150 } |
using | Refinement = std::vector< std::pair< wxCoord, std::shared_ptr< ChannelView > > > |
Public Member Functions | |
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) |
Public Member Functions inherited from CommonChannelView | |
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) | |
Public Member Functions inherited from ChannelView | |
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) |
Public Member Functions inherited from CommonChannelCell | |
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... | |
Public Member Functions inherited from CommonTrackPanelCell | |
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... | |
Public Member Functions inherited from TrackPanelCell | |
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) |
Public Member Functions inherited from TrackPanelNode | |
TrackPanelNode () | |
virtual | ~TrackPanelNode ()=0 |
Public Member Functions inherited from TrackPanelDrawable | |
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) |
Public Member Functions inherited from ChannelAttachment | |
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... | |
Protected Member Functions | |
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... | |
Protected Member Functions inherited from CommonChannelView | |
virtual std::vector< UIHandlePtr > | DetailedHitTest (const TrackPanelMouseState &, const AudacityProject *pProject, int currentTool, bool bMultiTool)=0 |
Protected Member Functions inherited from ChannelView | |
virtual std::shared_ptr< ChannelVRulerControls > | DoGetVRulerControls ()=0 |
Protected Member Functions inherited from CommonTrackPanelCell | |
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 Protected Member Functions | |
static void | DrawBoldBoundaries (TrackPanelDrawingContext &context, const WaveChannel &channel, const wxRect &rect) |
Private Attributes | |
std::weak_ptr< SubViewCloseHandle > | mCloseHandle |
std::weak_ptr< TrackPanelResizeHandle > | mResizeHandle |
std::weak_ptr< SubViewAdjustHandle > | mAdjustHandle |
std::weak_ptr< SubViewRearrangeHandle > | mRearrangeHandle |
std::weak_ptr< WaveClipAdjustBorderHandle > | mClipBorderAdjustHandle |
std::weak_ptr< CutlineHandle > | mCutlineHandle |
std::weak_ptr< WaveChannelView > | mwWaveChannelView |
Additional Inherited Members | |
Static Public Member Functions inherited from CommonChannelView | |
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 Public Member Functions inherited from ChannelView | |
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 Public Member Functions inherited from TrackPanelDrawable | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Public Attributes inherited from CommonChannelView | |
std::weak_ptr< TimeShiftHandle > | mTimeShiftHandle |
Public Attributes inherited from ChannelView | |
std::pair< int, int > | vrulerSize |
Protected Attributes inherited from CommonChannelView | |
std::weak_ptr< SelectHandle > | mSelectHandle |
Protected Attributes inherited from ChannelView | |
std::shared_ptr< ChannelVRulerControls > | mpVRulerControls |
Definition at line 39 of file WaveChannelView.h.
Definition at line 43 of file WaveChannelView.h.
Definition at line 44 of file WaveChannelView.h.
|
explicit |
Definition at line 954 of file WaveChannelView.cpp.
References mwWaveChannelView.
|
virtual |
std::pair< bool, std::vector< UIHandlePtr > > WaveChannelSubView::DoDetailedHitTest | ( | const TrackPanelMouseState & | state, |
const AudacityProject * | pProject, | ||
int | currentTool, | ||
bool | bMultiTool, | ||
const std::shared_ptr< WaveChannel > & | wt | ||
) |
Definition at line 764 of file WaveChannelView.cpp.
References AssignUIHandlePtr(), WaveTrack::Channels(), WaveChannelView::DoDetailedHitTest(), CutlineHandle::HitTest(), SubViewAdjustHandle::HitTest(), SubViewCloseHandle::HitTest(), SubViewRearrangeHandle::HitTest(), WaveClipAdjustBorderHandle::HitTest(), WaveChannelView::kChannelSeparatorThickness, mAdjustHandle, mClipBorderAdjustHandle, mCloseHandle, mCutlineHandle, mRearrangeHandle, mResizeHandle, mwWaveChannelView, TrackPanelMouseState::rect, and TrackPanelMouseState::state.
Referenced by SpectrumView::DetailedHitTest(), and WaveformView::DetailedHitTest().
|
staticprotected |
Definition at line 848 of file WaveChannelView.cpp.
References TrackPanelDrawingContext::dc, FindWaveTrackLocations(), TrackArtist::Get(), WaveChannel::GetTrack(), CutlineHandle::GetTrack(), AColor::Line(), TrackPanelDrawingContext::target, and AColor::uglyPen.
Referenced by SpectrumView::DoDraw(), and WaveformView::DoDraw().
std::shared_ptr< WaveChannel > WaveChannelSubView::FindWaveChannel | ( | ) |
Definition at line 961 of file WaveChannelView.cpp.
Referenced by SpectrumView::DetailedHitTest(), SpectrumView::DoSetMinimized(), WaveformView::DoSetMinimized(), and SpectrumView::SpectrumView().
|
overrideprotectedvirtual |
Return a list of items for DoContextMenu() (empties for separators)
If the vector is empty (as in the default), there is no context menu.
Commands are invoked with temporary selection fields of CommandContext set to a point selected region at the mouse pick, and the cell's track.
A function may be given, but if it is null, then the command can be found by name in the CommandManager.
An item in the list with no command name marks a menu separator.
The menu item is enabled only if it contains a true flag, but if looked up in the command manager, it must also satisfy the command manager's conditions.
Reimplemented from CommonTrackPanelCell.
Definition at line 885 of file WaveChannelView.cpp.
References ViewInfo::Get(), WaveChannelUtilities::GetClipAtTime(), WaveTrackUtilities::GetClipsIntersecting(), WaveClipUIUtilities::GetWaveClipMenuItems(), and XO().
|
protected |
Definition at line 880 of file WaveChannelView.cpp.
References mwWaveChannelView.
Referenced by SpectrumView::Draw(), and WaveformView::Draw().
|
pure virtual |
Implemented in SpectrumView, and WaveformView.
Referenced by WaveChannelView::DoSetDisplay(), WaveChannelView::GetDisplays(), and WaveChannelView::ToggleSubView().
|
private |
Definition at line 79 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 81 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 77 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 82 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 80 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 78 of file WaveChannelView.h.
Referenced by DoDetailedHitTest().
|
private |
Definition at line 83 of file WaveChannelView.h.
Referenced by DoDetailedHitTest(), GetWaveChannelView(), and WaveChannelSubView().