Audacity 3.2.0
|
#include <WaveformVRulerControls.h>
Public Member Functions | |
WaveformVRulerControls (const std::shared_ptr< ChannelView > &pChannelView) | |
~WaveformVRulerControls () override | |
std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *) override |
unsigned | HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
std::shared_ptr< WaveChannel > | FindWaveChannel () |
Public Member Functions inherited from ChannelVRulerControls | |
ChannelVRulerControls (const std::shared_ptr< ChannelView > &pChannelView) | |
virtual | ~ChannelVRulerControls ()=0 |
std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *pProject) override |
virtual void | UpdateRuler (const wxRect &rect)=0 |
std::shared_ptr< const ChannelView > | GetChannelView () const |
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... | |
Static Public Member Functions | |
static unsigned | DoHandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject, WaveChannel &wc) |
Static Public Member Functions inherited from ChannelVRulerControls | |
static ChannelVRulerControls & | Get (ChannelView &) |
static const ChannelVRulerControls & | Get (const ChannelView &) |
static void | DrawZooming (TrackPanelDrawingContext &context, const wxRect &rect, int zoomStart, int zoomEnd) |
static wxRect | ZoomingArea (const wxRect &rect, const wxRect &panelRect) |
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 | |
WaveformVRulerControls (const WaveformVRulerControls &)=delete | |
WaveformVRulerControls & | operator= (const WaveformVRulerControls &)=delete |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
void | UpdateRuler (const wxRect &rect) override |
Static Private Member Functions | |
static void | DoUpdateVRuler (const wxRect &rect, const WaveChannel &wc) |
Private Attributes | |
std::weak_ptr< WaveformVZoomHandle > | mVZoomHandle |
Additional Inherited Members | |
Protected Member Functions inherited from ChannelVRulerControls | |
std::shared_ptr< Track > | DoFindTrack () override |
wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override |
Track * | GetTrack () const |
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 |
Protected Attributes inherited from ChannelVRulerControls | |
std::weak_ptr< ChannelView > | mwChannelView |
Definition at line 19 of file WaveformVRulerControls.h.
|
privatedelete |
|
inlineexplicit |
Definition at line 26 of file WaveformVRulerControls.h.
|
overridedefault |
|
static |
Definition at line 139 of file WaveformVRulerControls.cpp.
References WaveformVZoomHandle::DoZoom(), TrackPanelMouseEvent::event, ProjectHistory::Get(), WaveformSettings::Get(), WaveformScale::Get(), WaveChannelViewConstants::kZoomIn, WaveChannelViewConstants::kZoomOut, LINEAR_TO_DB, min(), ProjectHistory::ModifyState(), TrackPanelMouseEvent::rect, RefreshCode::RefreshCell, RefreshCode::RefreshNone, anonymous_namespace{WaveformVRulerControls.cpp}::SetLastdBRange(), settings(), TrackPanelMouseEvent::steps, and RefreshCode::UpdateVRuler.
Referenced by HandleWheelRotation().
|
staticprivate |
Definition at line 249 of file WaveformVRulerControls.cpp.
References DB_TO_LINEAR, ChannelView::Get(), WaveformSettings::Get(), WaveformScale::Get(), LinearUpdater::Instance(), LINEAR_TO_DB, RealFormat::LinearInstance(), RealFormat::LogInstance(), majorValues, min(), minorMinorValues, minorValues, RegenerateLinearDBValues(), WaveChannelVRulerControls::ScratchRuler(), CustomUpdater::SetData(), anonymous_namespace{WaveformVRulerControls.cpp}::SetLastdBRange(), anonymous_namespace{WaveformVRulerControls.cpp}::SetLastScaleType(), settings(), size, WaveformSettings::stLinearAmp, WaveformSettings::stLinearDb, WaveformSettings::stLogarithmicDb, RulerUpdater::Label::text, updater, RulerUpdater::Label::value, values, Verbatim(), ChannelView::vrulerSize, and XO().
Referenced by UpdateRuler().
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 231 of file WaveformVRulerControls.cpp.
References WaveChannelVRulerControls::DoDraw(), and TrackPanelDrawable::Draw().
std::shared_ptr< WaveChannel > WaveformVRulerControls::FindWaveChannel | ( | ) |
Definition at line 110 of file WaveformVRulerControls.cpp.
Referenced by HandleWheelRotation(), HitTest(), and UpdateRuler().
|
overridevirtual |
Reimplemented from TrackPanelCell.
Definition at line 115 of file WaveformVRulerControls.cpp.
References DoHandleWheelRotation(), FindWaveChannel(), and RefreshCode::RefreshNone.
|
overridevirtual |
Implements TrackPanelCell.
Definition at line 89 of file WaveformVRulerControls.cpp.
References AssignUIHandlePtr(), staffpad::vo::copy(), FindWaveChannel(), ChannelVRulerControls::HitTest(), kGuard, mVZoomHandle, TrackPanelMouseState::rect, and TrackPanelMouseState::state.
|
privatedelete |
|
overrideprivatevirtual |
Implements ChannelVRulerControls.
Definition at line 239 of file WaveformVRulerControls.cpp.
References DoUpdateVRuler(), and FindWaveChannel().
|
private |
Definition at line 54 of file WaveformVRulerControls.h.
Referenced by HitTest().