|
| CutlineHandle (const std::shared_ptr< WaveTrack > &pTrack, WaveTrackLocations locations, WaveTrackLocation location) |
|
CutlineHandle & | operator= (const CutlineHandle &)=default |
|
virtual | ~CutlineHandle () |
|
std::shared_ptr< const Track > | FindTrack () const override |
|
const WaveTrackLocation & | GetLocation () |
|
std::shared_ptr< WaveTrack > | GetTrack () |
|
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 |
|
bool | StopsOnKeystroke () 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) |
|
Definition at line 21 of file CutlineHandle.h.
Someone has just clicked the mouse. What do we do?
Implements UIHandle.
Definition at line 118 of file CutlineHandle.cpp.
120{
123 if ( unsafe )
125
126 const wxMouseEvent &event = evt.event;
128
129
130
131
132
134
135
136
137
138
140
141 if (event.LeftDown())
142 {
145 mEndTime = viewInfo.selectedRegion.t1();
146
147
148 double cutlineStart = 0, cutlineEnd = 0;
151 viewInfo.selectedRegion.setTimes(cutlineStart, cutlineEnd);
152 }
153 else if (event.RightDown())
154 {
156 if (!removed)
157
160 }
161 else
163
164 return result;
165}
bool IsAudioActive() const
static ProjectAudioIO & Get(AudacityProject &project)
WAVE_TRACK_API void ExpandCutLine(WaveTrack &track, double cutLinePosition, double *cutlineStart=nullptr, double *cutlineEnd=nullptr)
WAVE_TRACK_API bool RemoveCutLine(WaveTrack &track, double cutLinePosition)
Remove cut line, without expanding the audio in it.
References Cancelled, TrackPanelMouseEvent::event, Expand, WaveTrackUtilities::ExpandCutLine(), ProjectAudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::IsAudioActive(), mEndTime, mLocation, mOperation, mpTrack, mStartTime, WaveTrackLocation::pos, RefreshCode::RefreshCell, RefreshCode::RefreshNone, Remove, and WaveTrackUtilities::RemoveCutLine().