![]() |
Audacity 3.2.0
|
#include <WaveformVZoomHandle.h>
Public Member Functions | |
| WaveformVZoomHandle (const std::shared_ptr< WaveChannel > &pChannel, const wxRect &rect, int y) | |
| WaveformVZoomHandle & | operator= (const WaveformVZoomHandle &)=default |
| ~WaveformVZoomHandle () override | |
| std::shared_ptr< const Track > | FindTrack () 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 |
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 | |
| 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< 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 WaveformVZoomHandle.h.
|
private |
|
explicit |
Definition at line 26 of file WaveformVZoomHandle.cpp.
|
overridedefault |
|
overridevirtual |
Implements UIHandle.
Definition at line 86 of file WaveformVZoomHandle.cpp.
References RefreshCode::RefreshAll.
|
overridevirtual |
Implements UIHandle.
Definition at line 51 of file WaveformVZoomHandle.cpp.
References RefreshCode::RefreshNone.
|
static |
Definition at line 114 of file WaveformVZoomHandle.cpp.
References ProjectHistory::Get(), WaveformSettings::Get(), WaveformScale::Get(), WaveChannel::GetRate(), WaveChannelViewConstants::kZoom1to1, WaveChannelViewConstants::kZoomHalfWave, WaveChannelViewConstants::kZoomIn, WaveChannelViewConstants::kZoomInByDrag, WaveChannelViewConstants::kZoomOut, WaveChannelViewConstants::kZoomReset, LINEAR_TO_DB, min(), ProjectHistory::ModifyState(), and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by WaveformVRulerControls::DoHandleWheelRotation(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 57 of file WaveformVZoomHandle.cpp.
References Cancelled, WaveChannelVZoomHandle::DoDrag(), mpChannel, mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 93 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDraw(), mpChannel, mZoomEnd, and mZoomStart.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 104 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::DoDrawingArea().
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 39 of file WaveformVZoomHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 34 of file WaveformVZoomHandle.cpp.
References mpChannel, and UIHandle::TrackFromChannel().
|
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 46 of file WaveformVZoomHandle.cpp.
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 67 of file WaveformVZoomHandle.cpp.
References WaveChannelVZoomHandle::HitPreview().
|
overridevirtual |
Implements UIHandle.
Definition at line 73 of file WaveformVZoomHandle.cpp.
References RefreshCode::Cancelled, WaveChannelVZoomHandle::DoRelease(), DoZoom(), WaveformVRulerMenuTable::Instance(), mpChannel, mRect, mZoomEnd, and mZoomStart.
|
private |
Definition at line 71 of file WaveformVZoomHandle.h.
Referenced by Drag(), Draw(), FindTrack(), and Release().
|
private |
Definition at line 74 of file WaveformVZoomHandle.h.
Referenced by Release().
|
private |
Definition at line 73 of file WaveformVZoomHandle.h.
|
private |
Definition at line 73 of file WaveformVZoomHandle.h.