![]() |
Audacity 3.2.0
|
#include <WaveformVZoomHandle.h>
Public Member Functions | |
WaveformVZoomHandle (const std::shared_ptr< WaveTrack > &pTrack, const wxRect &rect, int y) | |
WaveformVZoomHandle & | operator= (const WaveformVZoomHandle &)=default |
~WaveformVZoomHandle () override | |
std::shared_ptr< const Channel > | FindChannel () const override |
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 |
![]() | |
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 Channel > | FindChannel () const =0 |
virtual bool | IsDragging () const |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
![]() | |
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, WaveTrack *pTrack, WaveChannelViewConstants::ZoomActions ZoomKind, const wxRect &rect, int zoomStart, int zoomEnd, bool fixedMousePoint) |
![]() | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Private Member Functions | |
WaveformVZoomHandle (const WaveformVZoomHandle &) | |
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< WaveTrack > | mpTrack |
int | mZoomStart {} |
int | mZoomEnd {} |
wxRect | mRect {} |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
Result | mChangeHighlight { 0 } |
Definition at line 19 of file WaveformVZoomHandle.h.
|
private |
|
explicit |
Definition at line 25 of file WaveformVZoomHandle.cpp.
|
overridedefault |
|
overridevirtual |
Implements UIHandle.
Definition at line 83 of file WaveformVZoomHandle.cpp.
References RefreshCode::RefreshAll.
|
overridevirtual |
Implements UIHandle.
Definition at line 50 of file WaveformVZoomHandle.cpp.
References RefreshCode::RefreshNone.
|
static |
Definition at line 110 of file WaveformVZoomHandle.cpp.
References ProjectHistory::Get(), WaveformSettings::Get(), WaveformScale::Get(), WaveTrack::GetRate(), WaveChannelVZoomHandle::IsDragZooming(), WaveChannelViewConstants::kZoom1to1, WaveChannelViewConstants::kZoomDiv2, WaveChannelViewConstants::kZoomHalfWave, WaveChannelViewConstants::kZoomIn, WaveChannelViewConstants::kZoomInByDrag, WaveChannelViewConstants::kZoomOut, WaveChannelViewConstants::kZoomReset, WaveChannelViewConstants::kZoomTimes2, LINEAR_TO_DB, min(), ProjectHistory::ModifyState(), WaveformScale::SetDisplayBounds(), and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by WaveformVRulerControls::DoHandleWheelRotation(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 56 of file WaveformVZoomHandle.cpp.
References Cancelled, WaveChannelVZoomHandle::DoDrag(), TrackList::Get(), TrackList::Lock(), mpTrack, mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 90 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDraw(), mpTrack, mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 100 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDrawingArea().
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 38 of file WaveformVZoomHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 33 of file WaveformVZoomHandle.cpp.
References mpTrack.
|
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 45 of file WaveformVZoomHandle.cpp.
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 66 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::HitPreview(), and TrackPanelMouseState::state.
|
overridevirtual |
Implements UIHandle.
Definition at line 72 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoRelease(), DoZoom(), TrackList::Get(), WaveformVRulerMenuTable::Instance(), TrackList::Lock(), mpTrack, mRect, mZoomEnd, and mZoomStart.
|
private |
Definition at line 70 of file WaveformVZoomHandle.h.
Referenced by Drag(), Draw(), FindChannel(), and Release().
|
private |
Definition at line 73 of file WaveformVZoomHandle.h.
Referenced by Release().
|
private |
Definition at line 72 of file WaveformVZoomHandle.h.
|
private |
Definition at line 72 of file WaveformVZoomHandle.h.