#include <WaveTrackSliderHandles.h>
|
| VolumeSliderHandle (SliderFn sliderFn, const wxRect &rect, const std::shared_ptr< Track > &pTrack) |
|
VolumeSliderHandle & | operator= (const VolumeSliderHandle &)=default |
|
virtual | ~VolumeSliderHandle () |
|
Public Member Functions inherited from SliderHandle |
| SliderHandle (SliderFn sliderFn, const wxRect &rect, const std::shared_ptr< Track > &pTrack) |
|
SliderHandle & | operator= (const SliderHandle &)=default |
|
std::shared_ptr< const Track > | FindTrack () const override |
|
std::shared_ptr< Track > | GetTrack () const |
|
bool | IsDragging () const 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) |
|
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) |
|
|
float | GetValue () override |
|
Result | SetValue (AudacityProject *pProject, float newValue) override |
|
Result | CommitChanges (const wxMouseEvent &event, AudacityProject *pProject) override |
|
TranslatableString | Tip (const wxMouseState &state, AudacityProject &) const override |
|
bool | StopsOnKeystroke () override |
|
Protected Member Functions inherited from SliderHandle |
virtual | ~SliderHandle () |
|
virtual float | GetValue ()=0 |
|
virtual Result | SetValue (AudacityProject *pProject, float newValue)=0 |
|
virtual Result | CommitChanges (const wxMouseEvent &event, AudacityProject *pProject)=0 |
|
virtual TranslatableString | Tip (const wxMouseState &state, AudacityProject &project) const =0 |
|
void | Enter (bool forward, AudacityProject *) override |
|
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
|
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
|
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) final override |
|
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) final override |
|
Result | Cancel (AudacityProject *pProject) final override |
|
LWSlider * | GetSlider (AudacityProject *pProject) |
|
Definition at line 19 of file WaveTrackSliderHandles.h.
◆ VolumeSliderHandle() [1/2]
◆ VolumeSliderHandle() [2/2]
VolumeSliderHandle::VolumeSliderHandle |
( |
SliderFn |
sliderFn, |
|
|
const wxRect & |
rect, |
|
|
const std::shared_ptr< Track > & |
pTrack |
|
) |
| |
|
explicit |
◆ ~VolumeSliderHandle()
VolumeSliderHandle::~VolumeSliderHandle |
( |
| ) |
|
|
virtual |
◆ CommitChanges()
◆ GetValue()
float VolumeSliderHandle::GetValue |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ GetWaveTrack()
std::shared_ptr< WaveTrack > VolumeSliderHandle::GetWaveTrack |
( |
| ) |
const |
|
private |
◆ HitTest()
UIHandlePtr VolumeSliderHandle::HitTest |
( |
std::weak_ptr< VolumeSliderHandle > & |
holder, |
|
|
const wxMouseState & |
state, |
|
|
const wxRect & |
rect, |
|
|
const std::shared_ptr< Track > & |
pTrack |
|
) |
| |
|
static |
Definition at line 85 of file WaveTrackSliderHandles.cpp.
89{
90 if (!state.ButtonIsDown(wxMOUSE_BTN_LEFT))
91 return {};
92
93 wxRect sliderRect;
96 return {};
97 if (sliderRect.Contains(state.m_x, state.m_y)) {
98 wxRect sliderRect2;
100 auto sliderFn =
103 (sliderRect,
static_cast<WaveTrack*
>( pTrack ),
true,
105 };
106 auto result =
107 std::make_shared<VolumeSliderHandle>( sliderFn, sliderRect2, pTrack );
109
110 return result;
111 }
112 else
113 return {};
114}
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Abstract base class for an object holding data associated with points on a time axis.
static TrackPanel & Get(AudacityProject &project)
static void GetVolumeRect(const wxRect &rect, wxRect &dest)
static LWSlider * VolumeSlider(CellularPanel &panel, const WaveTrack &wt)
A Track that contains audio waveform data.
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
References AssignUIHandlePtr(), TrackPanel::Get(), WaveTrackControls::GetVolumeRect(), CommonTrackInfo::HideTopItem(), and WaveTrackControls::VolumeSlider().
Referenced by WaveTrackControls::HitTest().
◆ operator=()
◆ SetValue()
◆ StopsOnKeystroke()
bool VolumeSliderHandle::StopsOnKeystroke |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ Tip()
The documentation for this class was generated from the following files: