Audacity 3.2.0
|
#include <SpectrumVZoomHandle.h>
Public Member Functions | |
SpectrumVZoomHandle (const std::shared_ptr< WaveChannel > &pChannel, const wxRect &rect, int y) | |
SpectrumVZoomHandle & | operator= (const SpectrumVZoomHandle &)=default |
~SpectrumVZoomHandle () override | |
std::shared_ptr< const Track > | FindTrack () const override |
std::shared_ptr< WaveChannel > | FindWaveChannel () |
void | Enter (bool forward, AudacityProject *) override |
bool | HandlesRightClick () override |
Whether the handle has any special right-button handling. More... | |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Result | Cancel (AudacityProject *pProject) override |
Public Member Functions inherited from UIHandle | |
virtual | ~UIHandle ()=0 |
virtual void | Enter (bool forward, AudacityProject *pProject) |
virtual bool | HasRotation () const |
virtual bool | Rotate (bool forward) |
virtual bool | HasEscape (AudacityProject *pProject) const |
virtual bool | Escape (AudacityProject *pProject) |
virtual bool | HandlesRightClick () |
Whether the handle has any special right-button handling. More... | |
virtual Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0 |
virtual Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual Result | Cancel (AudacityProject *pProject)=0 |
virtual bool | StopsOnKeystroke () |
virtual void | OnProjectChange (AudacityProject *pProject) |
virtual std::shared_ptr< const Track > | FindTrack () const =0 |
virtual bool | IsDragging () const |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
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) |
Static Public Member Functions | |
static void | DoZoom (AudacityProject *pProject, WaveChannel &wc, WaveChannelViewConstants::ZoomActions ZoomKind, const wxRect &rect, int zoomStart, int zoomEnd, bool fixedMousePoint) |
Static Public Member Functions inherited from UIHandle | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
static std::shared_ptr< const Track > | TrackFromChannel (const std::shared_ptr< const Channel > &pChannel) |
A frequent convenience in the definition of UIHandles. More... | |
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) |
Private Member Functions | |
SpectrumVZoomHandle (const SpectrumVZoomHandle &) | |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override |
Private Attributes | |
std::weak_ptr< WaveChannel > | mpChannel |
int | mZoomStart {} |
int | mZoomEnd {} |
wxRect | mRect {} |
Additional Inherited Members | |
Public Types inherited from UIHandle | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
Protected Attributes inherited from UIHandle | |
Result | mChangeHighlight { 0 } |
Definition at line 20 of file SpectrumVZoomHandle.h.
|
private |
SpectrumVZoomHandle::SpectrumVZoomHandle | ( | const std::shared_ptr< WaveChannel > & | pChannel, |
const wxRect & | rect, | ||
int | y | ||
) |
Definition at line 25 of file SpectrumVZoomHandle.cpp.
|
overridedefault |
|
overridevirtual |
Implements UIHandle.
Definition at line 89 of file SpectrumVZoomHandle.cpp.
References RefreshCode::RefreshAll.
|
overridevirtual |
Implements UIHandle.
Definition at line 55 of file SpectrumVZoomHandle.cpp.
References RefreshCode::RefreshNone.
|
static |
Definition at line 117 of file SpectrumVZoomHandle.cpp.
References ProjectHistory::Get(), SpectrogramSettings::Get(), SpectrogramBounds::Get(), WaveChannel::GetRate(), WaveChannelVZoomHandle::IsDragZooming(), WaveChannelViewConstants::kZoom1to1, WaveChannelViewConstants::kZoomHalfWave, WaveChannelViewConstants::kZoomIn, WaveChannelViewConstants::kZoomInByDrag, WaveChannelViewConstants::kZoomOut, WaveChannelViewConstants::kZoomReset, min(), ProjectHistory::ModifyState(), NumberScale::PositionToValue(), Setting< T >::Read(), SpectrumMaxFreq, SpectrogramSettings::stLinear, and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by SpectrumVRulerControls::DoHandleWheelRotation(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 61 of file SpectrumVZoomHandle.cpp.
References Cancelled, WaveChannelVZoomHandle::DoDrag(), FindTrack(), mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 96 of file SpectrumVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDraw(), FindTrack(), mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 107 of file SpectrumVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDrawingArea().
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 43 of file SpectrumVZoomHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 33 of file SpectrumVZoomHandle.cpp.
References mpChannel, and UIHandle::TrackFromChannel().
Referenced by Drag(), and Draw().
std::shared_ptr< WaveChannel > SpectrumVZoomHandle::FindWaveChannel | ( | ) |
Definition at line 38 of file SpectrumVZoomHandle.cpp.
References mpChannel.
Referenced by Release().
|
overridevirtual |
Whether the handle has any special right-button handling.
If not, then Click() will not be called for right click. Default is always false
Reimplemented from UIHandle.
Definition at line 50 of file SpectrumVZoomHandle.cpp.
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 70 of file SpectrumVZoomHandle.cpp.
References WaveChannelVZoomHandle::HitPreview().
|
overridevirtual |
Implements UIHandle.
Definition at line 76 of file SpectrumVZoomHandle.cpp.
References RefreshCode::Cancelled, WaveChannelVZoomHandle::DoRelease(), DoZoom(), FindWaveChannel(), SpectrumVRulerMenuTable::Instance(), mRect, mZoomEnd, and mZoomStart.
|
private |
Definition at line 72 of file SpectrumVZoomHandle.h.
Referenced by FindTrack(), and FindWaveChannel().
|
private |
Definition at line 75 of file SpectrumVZoomHandle.h.
Referenced by Release().
|
private |
Definition at line 74 of file SpectrumVZoomHandle.h.
|
private |
Definition at line 74 of file SpectrumVZoomHandle.h.