1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-13 16:16:33 +01:00

Changes to seeking and scrubbing from Paul Licameli.

These are mostly under an EXPERIMENTAL_ #ifdef.  Also has a change for the prompt string for preferences so the displayed keybinding is adjusted when in multitool mode.
This commit is contained in:
james.k.crook@gmail.com
2014-11-29 22:09:57 +00:00
parent 94c243cb2e
commit c71397beae
13 changed files with 1783 additions and 1644 deletions

View File

@@ -310,6 +310,10 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
// AS: Selection handling
virtual void HandleSelect(wxMouseEvent & event);
virtual void SelectionHandleDrag(wxMouseEvent &event, Track *pTrack);
void StartOrJumpPlayback(wxMouseEvent &event);
#ifdef EXPERIMENTAL_SCRUBBING
void StartScrubbing(double position);
#endif
virtual void SelectionHandleClick(wxMouseEvent &event,
Track* pTrack, wxRect r);
virtual void StartSelection (int mouseXCoordinate, int trackLeftEdge);
@@ -317,6 +321,12 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
Track *pTrack);
virtual void UpdateSelectionDisplay();
// Handle small cursor and play head movements
void SeekLeftOrRight
(bool left, bool shift, bool ctrl, bool keyup,
int snapToTime, bool mayAccelerateQuiet, bool mayAccelerateAudio,
double quietSeekStepPositive, double audioSeekStepPositive);
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
void StartSnappingFreqSelection (WaveTrack *pTrack);
void MoveSnappingFreqSelection (int mouseYCoordinate,
@@ -688,6 +698,9 @@ protected:
SBBottom, SBTop, SBCenter, SBWidth,
#endif
};
SelectionBoundary ChooseTimeBoundary
(double selend, bool onlyWithinSnapDistance,
wxInt64 *pPixelDist = NULL, double *pPinValue = NULL) const;
SelectionBoundary ChooseBoundary
(wxMouseEvent & event, const Track *pTrack,
const wxRect &rect,
@@ -739,6 +752,12 @@ protected:
int mMoveUpThreshold;
int mMoveDownThreshold;
#ifdef EXPERIMENTAL_SCRUBBING
bool mScrubbing;
wxLongLong mLastScrubTime; // milliseconds
double mLastScrubPosition;
#endif
wxCursor *mArrowCursor;
wxCursor *mPencilCursor;
wxCursor *mSelectCursor;