From 5b2b6df9361205e38ad8daf5ba9ad477709a8641 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Fri, 6 May 2016 21:39:19 -0400 Subject: [PATCH 01/18] Accessibility for time ruler --- src/widgets/Ruler.cpp | 256 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 4a59ad801..f0fca18d9 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1751,6 +1751,258 @@ void QuickPlayIndicatorOverlay::Draw **********************************************************************/ +#if wxUSE_ACCESSIBILITY + +class RulerAx final : public wxWindowAccessible +{ +public: + RulerAx(wxWindow * window); + + virtual ~ RulerAx(); + + // Retrieves the address of an IDispatch interface for the specified child. + // All objects must support this property. + wxAccStatus GetChild(int childId, wxAccessible** child) override; + + // Gets the number of children. + wxAccStatus GetChildCount(int* childCount) override; + + // Gets the default action for this object (0) or > 0 (the action for a child). + // Return wxACC_OK even if there is no action. actionName is the action, or the empty + // string if there is no action. + // The retrieved string describes the action that is performed on an object, + // not what the object does as a result. For example, a toolbar button that prints + // a document has a default action of "Press" rather than "Prints the current document." + wxAccStatus GetDefaultAction(int childId, wxString *actionName) override; + + // Returns the description for this object or a child. + wxAccStatus GetDescription(int childId, wxString *description) override; + + // Gets the window with the keyboard focus. + // If childId is 0 and child is NULL, no object in + // this subhierarchy has the focus. + // If this object has the focus, child should be 'this'. + wxAccStatus GetFocus(int *childId, wxAccessible **child) override; + + // Returns help text for this object or a child, similar to tooltip text. + wxAccStatus GetHelpText(int childId, wxString *helpText) override; + + // Returns the keyboard shortcut for this object or child. + // Return e.g. ALT+K + wxAccStatus GetKeyboardShortcut(int childId, wxString *shortcut) override; + + // Returns the rectangle for this object (id = 0) or a child element (id > 0). + // rect is in screen coordinates. + wxAccStatus GetLocation(wxRect& rect, int elementId) override; + + // Gets the name of the specified object. + wxAccStatus GetName(int childId, wxString *name) override; + + // Returns a role constant. + wxAccStatus GetRole(int childId, wxAccRole *role) override; + + // Gets a variant representing the selected children + // of this object. + // Acceptable values: + // - a null variant (IsNull() returns TRUE) + // - a list variant (GetType() == wxT("list")) + // - an integer representing the selected child element, + // or 0 if this object is selected (GetType() == wxT("long")) + // - a "void*" pointer to a wxAccessible child object + wxAccStatus GetSelections(wxVariant *selections) override; + + // Returns a state constant. + wxAccStatus GetState(int childId, long* state) override; + + // Returns a localized string representing the value for the object + // or child. + wxAccStatus GetValue(int childId, wxString* strValue) override; +}; + +RulerAx::RulerAx(wxWindow * window) : +wxWindowAccessible( window ) +{ +} + +RulerAx::~RulerAx() +{ +} + +// Retrieves the address of an IDispatch interface for the specified child. +// All objects must support this property. +wxAccStatus RulerAx::GetChild( int childId, wxAccessible** child ) +{ + if( childId == wxACC_SELF ) + { + *child = this; + } + else + { + *child = NULL; + } + + return wxACC_OK; +} + +// Gets the number of children. +wxAccStatus RulerAx::GetChildCount(int* childCount) +{ + *childCount = 4; + + return wxACC_OK; +} + +// Gets the default action for this object (0) or > 0 (the action for a child). +// Return wxACC_OK even if there is no action. actionName is the action, or the empty +// string if there is no action. +// The retrieved string describes the action that is performed on an object, +// not what the object does as a result. For example, a toolbar button that prints +// a document has a default action of "Press" rather than "Prints the current document." +wxAccStatus RulerAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionName ) +{ + actionName->Clear(); + + return wxACC_OK; +} + +// Returns the description for this object or a child. +wxAccStatus RulerAx::GetDescription( int WXUNUSED(childId), wxString *description ) +{ + description->Clear(); + + return wxACC_OK; +} + +// Gets the window with the keyboard focus. +// If childId is 0 and child is NULL, no object in +// this subhierarchy has the focus. +// If this object has the focus, child should be 'this'. +wxAccStatus RulerAx::GetFocus(int* childId, wxAccessible** child) +{ + *childId = 0; + *child = this; + + return wxACC_OK; +} + +// Returns help text for this object or a child, similar to tooltip text. +wxAccStatus RulerAx::GetHelpText( int WXUNUSED(childId), wxString *helpText ) +{ + helpText->Clear(); + + return wxACC_OK; +} + +// Returns the keyboard shortcut for this object or child. +// Return e.g. ALT+K +wxAccStatus RulerAx::GetKeyboardShortcut( int WXUNUSED(childId), wxString *shortcut ) +{ + shortcut->Clear(); + + return wxACC_OK; +} + +// Returns the rectangle for this object (id = 0) or a child element (id > 0). +// rect is in screen coordinates. +wxAccStatus RulerAx::GetLocation( wxRect& rect, int WXUNUSED(elementId) ) +{ + wxWindow *w = wxDynamicCast( GetWindow() ); + + rect = w->GetRect(); + rect.SetPosition( w->GetParent()->ClientToScreen( rect.GetPosition() ) ); + + return wxACC_OK; +} + +// Gets the name of the specified object. +wxAccStatus RulerAx::GetName(int WXUNUSED(childId), wxString* name) +{ + *name = _("Time Ruler"); + + return wxACC_OK; +} + +// Returns a role constant. +wxAccStatus RulerAx::GetRole(int childId, wxAccRole* role) +{ + switch( childId ) + { + case 0: + *role = wxROLE_SYSTEM_TABLE; + break; + + default: + *role = wxROLE_SYSTEM_ROW; + break; + } + + return wxACC_OK; +} + +// Gets a variant representing the selected children +// of this object. +// Acceptable values: +// - a null variant (IsNull() returns TRUE) +// - a list variant (GetType() == wxT("list")) +// - an integer representing the selected child element, +// or 0 if this object is selected (GetType() == wxT("long")) +// - a "void*" pointer to a wxAccessible child object +wxAccStatus RulerAx::GetSelections( wxVariant * WXUNUSED(selections) ) +{ + return wxACC_NOT_IMPLEMENTED; +} + +// Returns a state constant. +wxAccStatus RulerAx::GetState(int childId, long* state) +{ + wxSlider *s = wxDynamicCast( GetWindow(), wxSlider ); + + switch( childId ) + { + case 0: + *state = wxACC_STATE_SYSTEM_FOCUSABLE; + break; + + case 1: + if( s->GetValue() == s->GetMin() ) + { + *state = wxACC_STATE_SYSTEM_INVISIBLE; + } + break; + + case 3: + if( s->GetValue() == s->GetMax() ) + { + *state = wxACC_STATE_SYSTEM_INVISIBLE; + } + break; + } + + // Do not use mSliderIsFocused is not set until after this method + // is called. + *state |= ( s == wxWindow::FindFocus() ? wxACC_STATE_SYSTEM_FOCUSED : 0 ); + + return wxACC_OK; +} + +// Returns a localized string representing the value for the object +// or child. +wxAccStatus RulerAx::GetValue(int childId, wxString* strValue) +{ + wxSlider *s = wxDynamicCast( GetWindow(), wxSlider ); + + if( childId == 0 ) + { + strValue->Printf( mFmt, s->GetValue() ); + + return wxACC_OK; + } + + return wxACC_NOT_SUPPORTED; +} + +#endif // wxUSE_ACCESSIBILITY + #include "../ViewInfo.h" #include "../AColor.h" @@ -1856,6 +2108,10 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent, wxCommandEventHandler(AdornedRulerPanel::OnCapture), NULL, this); + +#if wxUSE_ACCESSIBILITY + SetAccessible( safenew RulerAx { this } ); +#endif } AdornedRulerPanel::~AdornedRulerPanel() From 34d0a5201102cbe929440b6134dfc54fb087622e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 May 2016 17:56:38 -0400 Subject: [PATCH 02/18] Better updating of the white guideline for scrub, and hiding it when scrub stops --- src/tracks/ui/Scrubbing.cpp | 50 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index d56891363..3a420820b 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -389,6 +389,8 @@ void Scrubber::StopScrubbing() const auto ctb = mProject->GetControlToolBar(); ctb->SetPlay(false, ControlToolBar::PlayAppearance::Straight); } + + mProject->GetRulerPanel()->HideQuickPlayIndicator(); } void Scrubber::SetScrollScrubbing(bool scrollScrubbing) @@ -465,24 +467,15 @@ void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event) void Scrubber::Forwarder::OnMouse(wxMouseEvent &event) { + auto ruler = scrubber.mProject->GetRulerPanel(); auto isScrubbing = scrubber.IsScrubbing(); - if (!isScrubbing && scrubber.HasStartedScrubbing()) { - if (!event.HasAnyModifiers() && - event.GetEventType() == wxEVT_MOTION) { - - // Really start scrub if motion is far enough - auto ruler = scrubber.mProject->GetRulerPanel(); - auto xx = ruler->ScreenToClient(::wxGetMousePosition()).x; - scrubber.MaybeStartScrubbing(xx); - } - } - else if (isScrubbing && !event.HasAnyModifiers()) { + if (isScrubbing && !event.HasAnyModifiers()) { if(event.LeftDown() || (event.LeftIsDown() && event.Dragging())) { scrubber.mScrubSeekPress = true; - auto ruler = scrubber.mProject->GetRulerPanel(); auto xx = ruler->ScreenToClient(::wxGetMousePosition()).x; ruler->UpdateQuickPlayPos(xx); + ruler->ShowQuickPlayIndicator(); } else if (event.m_wheelRotation) { double steps = event.m_wheelRotation / @@ -567,9 +560,25 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) event.Skip(); Scrubber &scrubber = GetScrubber(); - if (!GetScrubber().IsScrubbing()) { - mNextScrubRect = wxRect(); - return; + const auto isScrubbing = scrubber.IsScrubbing(); + const auto ruler = mProject->GetRulerPanel(); + auto position = ::wxGetMousePosition(); + + { + auto xx = ruler->ScreenToClient(position).x; + ruler->UpdateQuickPlayPos(xx); + + if(!isScrubbing && scrubber.HasStartedScrubbing()) { + // Really start scrub if motion is far enough + scrubber.MaybeStartScrubbing(xx); + } + + if (!isScrubbing) { + mNextScrubRect = wxRect(); + return; + } + else + ruler->ShowQuickPlayIndicator(); } // Call ContinueScrubbing() here in the timer handler @@ -587,9 +596,7 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) trackPanel->GetSize(&panelWidth, &panelHeight); // Where's the mouse? - int xx, yy; - ::wxGetMousePosition(&xx, &yy); - trackPanel->ScreenToClient(&xx, &yy); + position = trackPanel->ScreenToClient(position); const bool seeking = scrubber.PollIsSeeking(); @@ -599,7 +606,7 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) #ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL scrubber.IsScrollScrubbing() ? scrubber.FindScrubSpeed - (seeking, mProject->GetViewInfo().PositionToTime(xx, trackPanel->GetLeftOffset())) + (seeking, mProject->GetViewInfo().PositionToTime(position.x, trackPanel->GetLeftOffset())) : #endif maxScrubSpeed; @@ -624,11 +631,12 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) dc.SetFont(labelFont); dc.GetTextExtent(mNextScrubSpeedText, &width, &height); } - xx = std::max(0, std::min(panelWidth - width, xx - width / 2)); + const auto xx = + std::max(0, std::min(panelWidth - width, position.x - width / 2)); // Put the text above the cursor, if it fits. enum { offset = 20 }; - yy -= height + offset; + auto yy = position.y - height + offset; if (yy < 0) yy += height + 2 * offset; yy = std::max(0, std::min(panelHeight - height, yy)); From 1135ca5a3a8a63d28340dc0095cc3e357d50af95 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 May 2016 19:41:02 -0400 Subject: [PATCH 03/18] Revert "Accessibility for time ruler" This reverts commit 5b2b6df9361205e38ad8daf5ba9ad477709a8641. --- src/widgets/Ruler.cpp | 256 ------------------------------------------ 1 file changed, 256 deletions(-) diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 23c279ed7..c7917487d 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1904,258 +1904,6 @@ void QuickPlayIndicatorOverlay::Draw(OverlayPanel &panel, wxDC &dc) **********************************************************************/ -#if wxUSE_ACCESSIBILITY - -class RulerAx final : public wxWindowAccessible -{ -public: - RulerAx(wxWindow * window); - - virtual ~ RulerAx(); - - // Retrieves the address of an IDispatch interface for the specified child. - // All objects must support this property. - wxAccStatus GetChild(int childId, wxAccessible** child) override; - - // Gets the number of children. - wxAccStatus GetChildCount(int* childCount) override; - - // Gets the default action for this object (0) or > 0 (the action for a child). - // Return wxACC_OK even if there is no action. actionName is the action, or the empty - // string if there is no action. - // The retrieved string describes the action that is performed on an object, - // not what the object does as a result. For example, a toolbar button that prints - // a document has a default action of "Press" rather than "Prints the current document." - wxAccStatus GetDefaultAction(int childId, wxString *actionName) override; - - // Returns the description for this object or a child. - wxAccStatus GetDescription(int childId, wxString *description) override; - - // Gets the window with the keyboard focus. - // If childId is 0 and child is NULL, no object in - // this subhierarchy has the focus. - // If this object has the focus, child should be 'this'. - wxAccStatus GetFocus(int *childId, wxAccessible **child) override; - - // Returns help text for this object or a child, similar to tooltip text. - wxAccStatus GetHelpText(int childId, wxString *helpText) override; - - // Returns the keyboard shortcut for this object or child. - // Return e.g. ALT+K - wxAccStatus GetKeyboardShortcut(int childId, wxString *shortcut) override; - - // Returns the rectangle for this object (id = 0) or a child element (id > 0). - // rect is in screen coordinates. - wxAccStatus GetLocation(wxRect& rect, int elementId) override; - - // Gets the name of the specified object. - wxAccStatus GetName(int childId, wxString *name) override; - - // Returns a role constant. - wxAccStatus GetRole(int childId, wxAccRole *role) override; - - // Gets a variant representing the selected children - // of this object. - // Acceptable values: - // - a null variant (IsNull() returns TRUE) - // - a list variant (GetType() == wxT("list")) - // - an integer representing the selected child element, - // or 0 if this object is selected (GetType() == wxT("long")) - // - a "void*" pointer to a wxAccessible child object - wxAccStatus GetSelections(wxVariant *selections) override; - - // Returns a state constant. - wxAccStatus GetState(int childId, long* state) override; - - // Returns a localized string representing the value for the object - // or child. - wxAccStatus GetValue(int childId, wxString* strValue) override; -}; - -RulerAx::RulerAx(wxWindow * window) : -wxWindowAccessible( window ) -{ -} - -RulerAx::~RulerAx() -{ -} - -// Retrieves the address of an IDispatch interface for the specified child. -// All objects must support this property. -wxAccStatus RulerAx::GetChild( int childId, wxAccessible** child ) -{ - if( childId == wxACC_SELF ) - { - *child = this; - } - else - { - *child = NULL; - } - - return wxACC_OK; -} - -// Gets the number of children. -wxAccStatus RulerAx::GetChildCount(int* childCount) -{ - *childCount = 4; - - return wxACC_OK; -} - -// Gets the default action for this object (0) or > 0 (the action for a child). -// Return wxACC_OK even if there is no action. actionName is the action, or the empty -// string if there is no action. -// The retrieved string describes the action that is performed on an object, -// not what the object does as a result. For example, a toolbar button that prints -// a document has a default action of "Press" rather than "Prints the current document." -wxAccStatus RulerAx::GetDefaultAction( int WXUNUSED(childId), wxString *actionName ) -{ - actionName->Clear(); - - return wxACC_OK; -} - -// Returns the description for this object or a child. -wxAccStatus RulerAx::GetDescription( int WXUNUSED(childId), wxString *description ) -{ - description->Clear(); - - return wxACC_OK; -} - -// Gets the window with the keyboard focus. -// If childId is 0 and child is NULL, no object in -// this subhierarchy has the focus. -// If this object has the focus, child should be 'this'. -wxAccStatus RulerAx::GetFocus(int* childId, wxAccessible** child) -{ - *childId = 0; - *child = this; - - return wxACC_OK; -} - -// Returns help text for this object or a child, similar to tooltip text. -wxAccStatus RulerAx::GetHelpText( int WXUNUSED(childId), wxString *helpText ) -{ - helpText->Clear(); - - return wxACC_OK; -} - -// Returns the keyboard shortcut for this object or child. -// Return e.g. ALT+K -wxAccStatus RulerAx::GetKeyboardShortcut( int WXUNUSED(childId), wxString *shortcut ) -{ - shortcut->Clear(); - - return wxACC_OK; -} - -// Returns the rectangle for this object (id = 0) or a child element (id > 0). -// rect is in screen coordinates. -wxAccStatus RulerAx::GetLocation( wxRect& rect, int WXUNUSED(elementId) ) -{ - wxWindow *w = wxDynamicCast( GetWindow() ); - - rect = w->GetRect(); - rect.SetPosition( w->GetParent()->ClientToScreen( rect.GetPosition() ) ); - - return wxACC_OK; -} - -// Gets the name of the specified object. -wxAccStatus RulerAx::GetName(int WXUNUSED(childId), wxString* name) -{ - *name = _("Time Ruler"); - - return wxACC_OK; -} - -// Returns a role constant. -wxAccStatus RulerAx::GetRole(int childId, wxAccRole* role) -{ - switch( childId ) - { - case 0: - *role = wxROLE_SYSTEM_TABLE; - break; - - default: - *role = wxROLE_SYSTEM_ROW; - break; - } - - return wxACC_OK; -} - -// Gets a variant representing the selected children -// of this object. -// Acceptable values: -// - a null variant (IsNull() returns TRUE) -// - a list variant (GetType() == wxT("list")) -// - an integer representing the selected child element, -// or 0 if this object is selected (GetType() == wxT("long")) -// - a "void*" pointer to a wxAccessible child object -wxAccStatus RulerAx::GetSelections( wxVariant * WXUNUSED(selections) ) -{ - return wxACC_NOT_IMPLEMENTED; -} - -// Returns a state constant. -wxAccStatus RulerAx::GetState(int childId, long* state) -{ - wxSlider *s = wxDynamicCast( GetWindow(), wxSlider ); - - switch( childId ) - { - case 0: - *state = wxACC_STATE_SYSTEM_FOCUSABLE; - break; - - case 1: - if( s->GetValue() == s->GetMin() ) - { - *state = wxACC_STATE_SYSTEM_INVISIBLE; - } - break; - - case 3: - if( s->GetValue() == s->GetMax() ) - { - *state = wxACC_STATE_SYSTEM_INVISIBLE; - } - break; - } - - // Do not use mSliderIsFocused is not set until after this method - // is called. - *state |= ( s == wxWindow::FindFocus() ? wxACC_STATE_SYSTEM_FOCUSED : 0 ); - - return wxACC_OK; -} - -// Returns a localized string representing the value for the object -// or child. -wxAccStatus RulerAx::GetValue(int childId, wxString* strValue) -{ - wxSlider *s = wxDynamicCast( GetWindow(), wxSlider ); - - if( childId == 0 ) - { - strValue->Printf( mFmt, s->GetValue() ); - - return wxACC_OK; - } - - return wxACC_NOT_SUPPORTED; -} - -#endif // wxUSE_ACCESSIBILITY - #include "../ViewInfo.h" #include "../AColor.h" @@ -2256,10 +2004,6 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent, wxCommandEventHandler(AdornedRulerPanel::OnCapture), NULL, this); - -#if wxUSE_ACCESSIBILITY - SetAccessible( safenew RulerAx { this } ); -#endif } AdornedRulerPanel::~AdornedRulerPanel() From cc0190054ceaf42d9dea00eadcf68e6b1476bafb Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 May 2016 21:53:32 -0400 Subject: [PATCH 04/18] Fix regression in scroll scrub --- src/tracks/ui/Scrubbing.cpp | 18 +++++++----------- src/tracks/ui/Scrubbing.h | 1 - 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 3a420820b..a0ba72711 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -201,7 +201,7 @@ void Scrubber::MarkScrubStart( // needed for the decision to start scrubbing later when handling // drag events. #ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL - SetScrollScrubbing (smoothScrolling); + mSmoothScrollingScrub = smoothScrolling; #endif mAlwaysSeeking = alwaysSeeking; @@ -303,8 +303,10 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) // Wait to test again mScrubStartClockTimeMillis = ::wxGetLocalTimeMillis(); - if (IsScrubbing()) + if (IsScrubbing()) { + mProject->GetPlaybackScroller().Activate(mSmoothScrollingScrub); mScrubHasFocus = true; + } // Return true whether we started scrub, or are still waiting to decide. return true; @@ -380,7 +382,7 @@ void Scrubber::StopScrubbing() UncheckAllMenuItems(); mScrubStartPosition = -1; - SetScrollScrubbing (false); + mProject->GetPlaybackScroller().Activate(false); if (!IsScrubbing()) { @@ -393,12 +395,6 @@ void Scrubber::StopScrubbing() mProject->GetRulerPanel()->HideQuickPlayIndicator(); } -void Scrubber::SetScrollScrubbing(bool scrollScrubbing) -{ - mSmoothScrollingScrub = scrollScrubbing; - mProject->GetPlaybackScroller().Activate(scrollScrubbing); -} - bool Scrubber::IsScrubbing() const { if (mScrubToken <= 0) @@ -409,7 +405,6 @@ bool Scrubber::IsScrubbing() const const_cast(*this).mScrubToken = -1; const_cast(*this).mScrubStartPosition = -1; #ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL - // Don't call SetScrollScrubbing const_cast(*this).mSmoothScrollingScrub = false; #endif return false; @@ -677,7 +672,8 @@ void Scrubber::DoScrub(bool scroll, bool seek) MarkScrubStart(xx, scroll, seek); } else if(!match) { - SetScrollScrubbing(scroll); + mSmoothScrollingScrub = scroll; + mProject->GetPlaybackScroller().Activate(scroll); mAlwaysSeeking = seek; UncheckAllMenuItems(); CheckMenuItem(); diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index 315221008..b813ca7e4 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -57,7 +57,6 @@ public: bool IsScrollScrubbing() const // If true, implies HasStartedScrubbing() { return mSmoothScrollingScrub; } - void SetScrollScrubbing(bool scrollScrubbing); bool IsAlwaysSeeking() const { return mAlwaysSeeking; } From a3b7305386b6f6c393f07fbedb74b199e1c259db Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 May 2016 23:16:07 -0400 Subject: [PATCH 05/18] Remove obsolete instructions in Mouse Preferences for scrubbing --- src/prefs/MousePrefs.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/prefs/MousePrefs.cpp b/src/prefs/MousePrefs.cpp index 4e49aa059..e51bc752b 100644 --- a/src/prefs/MousePrefs.cpp +++ b/src/prefs/MousePrefs.cpp @@ -110,13 +110,6 @@ void MousePrefs::CreateList() AddItem(_("Left-Drag"), _("Select"), _("Set Selection Range")); AddItem(_("Shift-Left-Click"), _("Select"), _("Extend Selection Range")); AddItem(_("Left-Double-Click"), _("Select"), _("Select Clip or Entire Track")); -#ifdef EXPERIMENTAL_SCRUBBING_BASIC - AddItem(CTRL + _("-Left-Click"), _("Select"), _("Scrub")); - AddItem(CTRL + _("-Left-Drag"), _("Select"), _("Seek")); -#endif -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL - AddItem(CTRL + _("-Left-Double-Click"), _("Select"), _("Scroll-scrub")); -#endif #ifdef EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL AddItem(_("Wheel-Rotate"), _("Select"), _("Change scrub speed")); #endif From 5944391e24176b108abe3984b2fb0fccb1b936b3 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 9 May 2016 23:21:56 -0400 Subject: [PATCH 06/18] Let's commit to EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL --- src/Experimental.h | 1 - src/Project.cpp | 2 -- src/TrackPanel.cpp | 10 ++-------- src/tracks/ui/Scrubbing.cpp | 35 +++++------------------------------ src/tracks/ui/Scrubbing.h | 7 ++----- 5 files changed, 9 insertions(+), 46 deletions(-) diff --git a/src/Experimental.h b/src/Experimental.h index d69528842..d5f93f9df 100644 --- a/src/Experimental.h +++ b/src/Experimental.h @@ -173,7 +173,6 @@ // The following enable parts of the scrubbing user interface. #define EXPERIMENTAL_SCRUBBING_BASIC #ifdef EXPERIMENTAL_SCRUBBING_BASIC - #define EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL #define EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL #endif #endif diff --git a/src/Project.cpp b/src/Project.cpp index 02e85036c..487378388 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -5364,7 +5364,6 @@ void AudacityProject::PlaybackScroller::OnTimer(wxCommandEvent &event) // Let other listeners get the notification event.Skip(); -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (mActive && mProject->IsAudioActive()) { // Pan the view, so that we center the play indicator. @@ -5382,5 +5381,4 @@ void AudacityProject::PlaybackScroller::OnTimer(wxCommandEvent &event) viewInfo.h = std::max(0.0, viewInfo.h); trackPanel->Refresh(false); } -#endif } diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index f78c09c22..ce36069d1 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -5472,12 +5472,9 @@ void TrackPanel::HandleWheelRotation(wxMouseEvent & event) (event.m_wheelDelta > 0 ? (double)event.m_wheelDelta : 120.0); if (event.ShiftDown() -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL // Don't pan during smooth scrolling. That would conflict with keeping // the play indicator centered. - && !GetProject()->GetScrubber().IsScrollScrubbing() -#endif - ) + && !GetProject()->GetScrubber().IsScrollScrubbing()) { // MM: Scroll left/right when used with Shift key down mListener->TP_ScrollWindow( @@ -5506,15 +5503,12 @@ void TrackPanel::HandleWheelRotation(wxMouseEvent & event) // Time corresponding to mouse position wxCoord xx; double center_h; -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (GetProject()->GetScrubber().IsScrollScrubbing()) { // Expand or contract about the center, ignoring mouse position center_h = mViewInfo->h + (GetScreenEndTime() - mViewInfo->h) / 2.0; xx = mViewInfo->TimeToPosition(center_h, trackLeftEdge); } - else -#endif - { + else { xx = event.m_x; center_h = mViewInfo->PositionToTime(xx, trackLeftEdge); } diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index a0ba72711..19306230f 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -188,11 +188,7 @@ namespace { void Scrubber::MarkScrubStart( // Assume xx is relative to the left edge of TrackPanel! - wxCoord xx -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL - , bool smoothScrolling -#endif - , bool alwaysSeeking + wxCoord xx, bool smoothScrolling, bool alwaysSeeking ) { UncheckAllMenuItems(); @@ -200,9 +196,7 @@ void Scrubber::MarkScrubStart( // Don't actually start scrubbing, but collect some information // needed for the decision to start scrubbing later when handling // drag events. -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL mSmoothScrollingScrub = smoothScrolling; -#endif mAlwaysSeeking = alwaysSeeking; ControlToolBar * const ctb = mProject->GetControlToolBar(); @@ -350,15 +344,13 @@ void Scrubber::ContinueScrubbing() // Cause OnTimer() to suppress the speed display mScrubSpeedDisplayCountdown = 1; -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (mSmoothScrollingScrub) { const double speed = FindScrubSpeed(seek, time); result = gAudioIO->EnqueueScrubBySignedSpeed(speed, mMaxScrubSpeed, seek); } else -#endif result = gAudioIO->EnqueueScrubByPosition - (time, seek ? 1.0 : mMaxScrubSpeed, seek); + (time, seek ? 1.0 : mMaxScrubSpeed, seek); } if (result) @@ -366,12 +358,9 @@ void Scrubber::ContinueScrubbing() // else, if seek requested, try again at a later time when we might // enqueue a long enough stutter -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (mSmoothScrollingScrub) ; - else -#endif - { + else { if (mScrubSpeedDisplayCountdown > 0) --mScrubSpeedDisplayCountdown; } @@ -404,9 +393,7 @@ bool Scrubber::IsScrubbing() const else { const_cast(*this).mScrubToken = -1; const_cast(*this).mScrubStartPosition = -1; -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL const_cast(*this).mSmoothScrollingScrub = false; -#endif return false; } } @@ -417,10 +404,8 @@ bool Scrubber::ShouldDrawScrubSpeed() mScrubHasFocus && ( // Draw for (non-scroll) scrub, sometimes, but never for seek (!PollIsSeeking() && mScrubSpeedDisplayCountdown > 0) -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL // Draw always for scroll-scrub and for scroll-seek || mSmoothScrollingScrub -#endif ); } @@ -442,9 +427,7 @@ void Scrubber::HandleScrollWheel(int steps) newSpeed <= AudioIO::GetMaxScrubSpeed()) { mLogMaxScrubSpeed = newLogMaxScrubSpeed; mMaxScrubSpeed = newSpeed; -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (!mSmoothScrollingScrub) -#endif // Show the speed for one second mScrubSpeedDisplayCountdown = kOneSecondCountdown + 1; } @@ -539,11 +522,9 @@ void ScrubbingOverlay::Draw(OverlayPanel &, wxDC &dc) // (b) Error alerts // So they were changed to 'orange' and 'lime'. static const wxColour clrNoScroll(215, 162, 0), clrScroll(0, 204, 153); -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL if (scrubber.IsScrollScrubbing()) dc.SetTextForeground(clrScroll); else -#endif dc.SetTextForeground(clrNoScroll); dc.DrawText(mLastScrubSpeedText, mLastScrubRect.GetX(), mLastScrubRect.GetY()); @@ -598,23 +579,17 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) // Find the text const double maxScrubSpeed = GetScrubber().GetMaxScrubSpeed(); const double speed = -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL scrubber.IsScrollScrubbing() ? scrubber.FindScrubSpeed (seeking, mProject->GetViewInfo().PositionToTime(position.x, trackPanel->GetLeftOffset())) - : -#endif - maxScrubSpeed; + : maxScrubSpeed; const wxChar *format = -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL scrubber.IsScrollScrubbing() ? seeking ? wxT("%+.2fX") : wxT("%+.2f") - : -#endif - wxT("%.2f"); + : wxT("%.2f"); mNextScrubSpeedText = wxString::Format(format, speed); diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index b813ca7e4..c8d405758 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -29,11 +29,8 @@ public: // Assume xx is relative to the left edge of TrackPanel! void MarkScrubStart( - wxCoord xx -#ifdef EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL - , bool smoothScrolling -#endif - , bool alwaysSeeking // if false, can switch seeking or scrubbing + wxCoord xx, bool smoothScrolling, + bool alwaysSeeking // if false, can switch seeking or scrubbing // by mouse button state ); From 19ef2f66819c648e6c093ddecb6e5ef1fd663ffa Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 10 May 2016 09:28:06 -0400 Subject: [PATCH 07/18] Implement drag-scrub, compatibly with the existing move-scrub... ... Start scrub by click or double click on the scrub head; release button or not; then move. If you release before moving, you get scrubbing as before, controlled by motion. Click or drag to switch in and out of seeking. Stop with ESC, spacebar, etc. No change of selection. But now if you drag, then scrubbing contines until you release the mouse or otherwise stop with a key. If by release of the mouse, then the selection changes as if by a click at the last play position. If you hold shift, then, as if by shift-click. If drag begins with a double-click, then the play head remains centered and the track moves. --- src/AudioIO.cpp | 19 +++++++++- src/AudioIO.h | 4 +++ src/Menus.cpp | 38 ++++++++++++++++++-- src/Menus.h | 1 + src/tracks/ui/Scrubbing.cpp | 69 ++++++++++++++++++++++++++++++------- src/tracks/ui/Scrubbing.h | 4 ++- src/widgets/Ruler.cpp | 17 +++++++-- src/widgets/Ruler.h | 2 ++ 8 files changed, 135 insertions(+), 19 deletions(-) diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index b3b9c2443..d757e4da3 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -402,6 +402,14 @@ struct AudioIO::ScrubQueue } ~ScrubQueue() {} + double LastTimeInQueue() const + { + // Needed by the main thread sometimes + wxCriticalSectionLocker locker(mUpdating); + const Entry &previous = mEntries[(mLeadingIdx + Size - 1) % Size]; + return previous.mS1 / mRate; + } + bool Producer(double end, double maxSpeed, bool bySpeed, bool maySkip) { // Main thread indicates a scrubbing interval @@ -670,7 +678,7 @@ private: const double mRate; const long mMinStutter; wxLongLong mLastScrubTimeMillis; - wxCriticalSection mUpdating; + mutable wxCriticalSection mUpdating; }; #endif @@ -2426,6 +2434,15 @@ bool AudioIO::EnqueueScrubBySignedSpeed(double speed, double maxSpeed, bool mayS else return false; } + +double AudioIO::GetLastTimeInScrubQueue() const +{ + if (mScrubQueue) + return mScrubQueue->LastTimeInQueue(); + else + return -1.0; +} + #endif bool AudioIO::IsBusy() diff --git a/src/AudioIO.h b/src/AudioIO.h index 8bb62bc67..c57501276 100644 --- a/src/AudioIO.h +++ b/src/AudioIO.h @@ -208,6 +208,10 @@ class AUDACITY_DLL_API AudioIO final { * Return true if some work was really enqueued. */ bool EnqueueScrubBySignedSpeed(double speed, double maxSpeed, bool maySkip); + + /** \brief return the ending time of the last enqueued scrub interval. + */ + double GetLastTimeInScrubQueue() const; #endif /** \brief Returns true if audio i/o is busy starting, stopping, playing, diff --git a/src/Menus.cpp b/src/Menus.cpp index d78b6aecf..0aa854920 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -2281,8 +2281,13 @@ void AudacityProject::OnRecordAppend() GetControlToolBar()->OnRecord(evt); } -// The code for "OnPlayStopSelect" is simply the code of "OnPlayStop" and "OnStopSelect" merged. void AudacityProject::OnPlayStopSelect() +{ + DoPlayStopSelect(false, false); +} + +// The code for "OnPlayStopSelect" is simply the code of "OnPlayStop" and "OnStopSelect" merged. +void AudacityProject::DoPlayStopSelect(bool click, bool shift) { wxCommandEvent evt; ControlToolBar *toolbar = GetControlToolBar(); @@ -2291,7 +2296,36 @@ void AudacityProject::OnPlayStopSelect() if (gAudioIO->IsStreamActive(GetAudioIOToken())) { toolbar->SetPlay(false); //Pops toolbar->SetStop(true); //Pushes stop down - mViewInfo.selectedRegion.setT0(gAudioIO->GetStreamTime(), false); + + // change the selection + auto time = gAudioIO->GetStreamTime(); + auto &selection = mViewInfo.selectedRegion; + if (shift && click) { + // Change the region selection, as if by shift-click at the play head + auto t0 = selection.t0(), t1 = selection.t1(); + if (time < t0) + // Grow selection + t0 = time; + else if (time > t1) + // Grow selection + t1 = time; + else { + // Shrink selection, changing the nearer boundary + if (fabs(t0 - time) < fabs(t1 - time)) + t0 = time; + else + t1 = time; + } + selection.setTimes(t0, t1); + } + else if (click) + // Set a point selection, as if by a click at the play head + selection.setTimes(time, time); + else + // How stop and set cursor always worked + // -- change t0, collapsing to point only if t1 was greater + selection.setT0(time, false); + ModifyState(false); // without bWantsAutoSave toolbar->OnStop(evt); } diff --git a/src/Menus.h b/src/Menus.h index edd2d8fbd..7a32590d7 100644 --- a/src/Menus.h +++ b/src/Menus.h @@ -80,6 +80,7 @@ void OnSeekRightLong(); bool MakeReadyToPlay(bool loop = false, bool cutpreview = false); // Helper function that sets button states etc. void OnPlayStop(); +void DoPlayStopSelect(bool click, bool shift); void OnPlayStopSelect(); void OnPlayOneSecond(); void OnPlayToSelection(); diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 19306230f..7175175ad 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -230,6 +230,9 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) if (IsScrubbing()) return false; else { + const auto state = ::wxGetMouseState(); + mDragging = state.LeftIsDown(); + const bool busy = gAudioIO->IsBusy(); if (busy && gAudioIO->GetNumCaptureChannels() > 0) { // Do not stop recording, and don't try to start scrubbing after @@ -259,6 +262,14 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) mScrubStartPosition = position; } + if (mDragging && mSmoothScrollingScrub) { + auto delta = time0 - time1; + time0 = std::max(0.0, std::min(maxTime, + (viewInfo.h + mProject->GetScreenEndTime()) / 2 + )); + time1 = time0 + delta; + } + AudioIOStartStreamOptions options(mProject->GetDefaultPlayOptions()); options.timeTrack = NULL; options.scrubDelay = (kTimerInterval / 1000.0); @@ -272,8 +283,10 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) p->GetTranscriptionToolBar()->GetPlaySpeed(); } #else - // That idea seems unpopular... just make it one - mMaxScrubSpeed = options.maxScrubSpeed = 1.0; + // That idea seems unpopular... just make it one for move-scrub, + // but big for drag-scrub + mMaxScrubSpeed = options.maxScrubSpeed = + mDragging ? AudioIO::GetMaxScrubSpeed() : 1.0; #endif options.maxScrubTime = mProject->GetTracks()->GetEndTime(); ControlToolBar::PlayAppearance appearance = @@ -300,6 +313,7 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) if (IsScrubbing()) { mProject->GetPlaybackScroller().Activate(mSmoothScrollingScrub); mScrubHasFocus = true; + mLastScrubPosition = xx; } // Return true whether we started scrub, or are still waiting to decide. @@ -309,13 +323,19 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) void Scrubber::ContinueScrubbing() { + const wxMouseState state(::wxGetMouseState()); + + if (mDragging && !state.LeftIsDown()) { + // Stop and set cursor + mProject->DoPlayStopSelect(true, state.ShiftDown()); + return; + } // Thus scrubbing relies mostly on periodic polling of mouse and keys, // not event notifications. But there are a few event handlers that // leave messages for this routine, in mScrubSeekPress and in mScrubHasFocus. // Seek only when the pointer is in the panel. Else, scrub. - const wxMouseState state(::wxGetMouseState()); TrackPanel *const trackPanel = mProject->GetTrackPanel(); // Decide whether to skip play, because either mouse is down now, @@ -333,13 +353,21 @@ void Scrubber::ContinueScrubbing() } const wxPoint position = trackPanel->ScreenToClient(state.GetPosition()); - // When we don't have focus, enqueue silent scrubs until we regain focus. + const auto &viewInfo = mProject->GetViewInfo(); + bool result = false; if (!mScrubHasFocus) + // When we don't have focus, enqueue silent scrubs until we regain focus. result = gAudioIO->EnqueueScrubBySignedSpeed(0, mMaxScrubSpeed, false); + else if (mDragging && mSmoothScrollingScrub) { + const auto lastTime = gAudioIO->GetLastTimeInScrubQueue(); + const auto delta = mLastScrubPosition - position.x; + const double time = viewInfo.OffsetTimeByPixels(lastTime, delta); + result = gAudioIO->EnqueueScrubByPosition(time, mMaxScrubSpeed, false); + mLastScrubPosition = position.x; + } else { - const double time = mProject->GetViewInfo().PositionToTime(position.x, trackPanel->GetLeftOffset()); - + const double time = viewInfo.PositionToTime(position.x, trackPanel->GetLeftOffset()); if (seek) // Cause OnTimer() to suppress the speed display mScrubSpeedDisplayCountdown = 1; @@ -372,6 +400,7 @@ void Scrubber::StopScrubbing() mScrubStartPosition = -1; mProject->GetPlaybackScroller().Activate(false); + mDragging = false; if (!IsScrubbing()) { @@ -382,6 +411,11 @@ void Scrubber::StopScrubbing() } mProject->GetRulerPanel()->HideQuickPlayIndicator(); + + // Need this in case ruler gets the mouse-up event after escaping scrubbing: + // prevent reappearance of the + // quick play guideline + mProject->GetRulerPanel()->IgnoreMouseUp(); } bool Scrubber::IsScrubbing() const @@ -400,6 +434,9 @@ bool Scrubber::IsScrubbing() const bool Scrubber::ShouldDrawScrubSpeed() { + if (mDragging) + return false; + return IsScrubbing() && mScrubHasFocus && ( // Draw for (non-scroll) scrub, sometimes, but never for seek @@ -419,6 +456,10 @@ double Scrubber::FindScrubSpeed(bool seeking, double time) const void Scrubber::HandleScrollWheel(int steps) { + if (mDragging) + // Not likely you would spin it with the left button down, but... + return; + const int newLogMaxScrubSpeed = mLogMaxScrubSpeed + steps; static const double maxScrubSpeedBase = pow(2.0, 1.0 / ScrubSpeedStepsPerOctave); @@ -450,7 +491,8 @@ void Scrubber::Forwarder::OnMouse(wxMouseEvent &event) if (isScrubbing && !event.HasAnyModifiers()) { if(event.LeftDown() || (event.LeftIsDown() && event.Dragging())) { - scrubber.mScrubSeekPress = true; + if (!scrubber.mDragging) + scrubber.mScrubSeekPress = true; auto xx = ruler->ScreenToClient(::wxGetMousePosition()).x; ruler->UpdateQuickPlayPos(xx); ruler->ShowQuickPlayIndicator(); @@ -541,12 +583,13 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) auto position = ::wxGetMousePosition(); { - auto xx = ruler->ScreenToClient(position).x; - ruler->UpdateQuickPlayPos(xx); + if(scrubber.HasStartedScrubbing()) { + auto xx = ruler->ScreenToClient(position).x; + ruler->UpdateQuickPlayPos(xx); - if(!isScrubbing && scrubber.HasStartedScrubbing()) { - // Really start scrub if motion is far enough - scrubber.MaybeStartScrubbing(xx); + if (!isScrubbing) + // Really start scrub if motion is far enough + scrubber.MaybeStartScrubbing(xx); } if (!isScrubbing) { @@ -627,7 +670,7 @@ Scrubber &ScrubbingOverlay::GetScrubber() bool Scrubber::PollIsSeeking() { - return mAlwaysSeeking || ::wxGetMouseState().LeftIsDown(); + return !mDragging && (mAlwaysSeeking || ::wxGetMouseState().LeftIsDown()); } void Scrubber::DoScrub(bool scroll, bool seek) diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index c8d405758..9a1a6d797 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -109,10 +109,12 @@ private: bool mScrubHasFocus; int mScrubSpeedDisplayCountdown; wxCoord mScrubStartPosition; + wxCoord mLastScrubPosition {}; double mMaxScrubSpeed; bool mScrubSeekPress; bool mSmoothScrollingScrub; - bool mAlwaysSeeking{}; + bool mAlwaysSeeking {}; + bool mDragging {}; #ifdef EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL int mLogMaxScrubSpeed; diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 23c279ed7..9174b2272 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -2582,6 +2582,17 @@ bool AdornedRulerPanel::IsWithinMarker(int mousePosX, double markerTime) void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) { + if (mIgnoreMouseUp) { + if (evt.Dragging()) + return; + else if (evt.ButtonUp()) { + mIgnoreMouseUp = false; + return; + } + else + mIgnoreMouseUp = false; + } + // PRL: why do I need these two lines on Windows but not on Mac? if (evt.ButtonDown(wxMOUSE_BTN_ANY)) SetFocus(); @@ -2910,10 +2921,12 @@ void AdornedRulerPanel::HandleQPRelease(wxMouseEvent &evt) if (mDoubleClick) return; - HideQuickPlayIndicator(); - if (HasCapture()) ReleaseMouse(); + else + return; + + HideQuickPlayIndicator(); mCaptureState = CaptureState{}; diff --git a/src/widgets/Ruler.h b/src/widgets/Ruler.h index 177177a0b..f533c0736 100644 --- a/src/widgets/Ruler.h +++ b/src/widgets/Ruler.h @@ -350,6 +350,7 @@ public: void ShowQuickPlayIndicator(); void HideQuickPlayIndicator(); void UpdateQuickPlayPos(wxCoord &mousPosX); + void IgnoreMouseUp() { mIgnoreMouseUp = true; } private: void OnCapture(wxCommandEvent & evt); @@ -531,6 +532,7 @@ private: mutable wxFont mButtonFont; bool mDoubleClick {}; + bool mIgnoreMouseUp {}; DECLARE_EVENT_TABLE() From 4394ad1b70f672d8fe0a36c23fde9b7d859a2acc Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 10 May 2016 12:47:34 -0400 Subject: [PATCH 08/18] Add a check item to Tracks menu for the scrolling beyond zero preference --- src/Menus.cpp | 20 ++++++++++++++++++++ src/Menus.h | 2 ++ src/ViewInfo.cpp | 4 +++- src/prefs/TracksPrefs.cpp | 10 ++++++++-- src/prefs/TracksPrefs.h | 3 +++ src/widgets/Ruler.cpp | 4 +++- 6 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index 0aa854920..12ca8bf94 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -134,6 +134,7 @@ simplifies construction of menu items. #endif /* EXPERIMENTAL_SCOREALIGN */ #include "tracks/ui/Scrubbing.h" +#include "prefs/TracksPrefs.h" enum { kAlignStartZero = 0, @@ -928,6 +929,16 @@ void AudacityProject::CreateMenusAndCommands() ////////////////////////////////////////////////////////////////////////// + c->AddSeparator(); + c->AddCheck(wxT("ScrollLeftOfZero"), _("Scroll left of zero"), + FN(OnToggleScrollLeftOfZero), + gPrefs->ReadBool( + TracksPrefs::ScrollingPreferenceKey(), + TracksPrefs::ScrollingPreferenceDefault()), + AudioIONotBusyFlag, AudioIONotBusyFlag); + + ////////////////////////////////////////////////////////////////////////// + c->EndMenu(); // All of this is a bit hacky until we can get more things connected into @@ -2511,6 +2522,15 @@ void AudacityProject::OnSortName() mTrackPanel->Refresh(false); } +void AudacityProject::OnToggleScrollLeftOfZero() +{ + auto key = TracksPrefs::ScrollingPreferenceKey(); + auto value = gPrefs->ReadBool(key, TracksPrefs::ScrollingPreferenceDefault()); + gPrefs->Write(key, !value); + gPrefs->Flush(); + UpdatePrefs(); +} + void AudacityProject::OnSkipStart() { wxCommandEvent evt; diff --git a/src/Menus.h b/src/Menus.h index 7a32590d7..d88c187d3 100644 --- a/src/Menus.h +++ b/src/Menus.h @@ -179,6 +179,8 @@ double GetTime(const Track *t); void OnSortTime(); void OnSortName(); +void OnToggleScrollLeftOfZero(); + void OnSnapToOff(); void OnSnapToNearest(); void OnSnapToPrior(); diff --git a/src/ViewInfo.cpp b/src/ViewInfo.cpp index b3ea4db9d..34d747df0 100644 --- a/src/ViewInfo.cpp +++ b/src/ViewInfo.cpp @@ -18,6 +18,7 @@ Paul Licameli #include "prefs/GUISettings.h" #include "Prefs.h" #include "xml/XMLWriter.h" +#include "prefs/TracksPrefs.h" namespace { static const double gMaxZoom = 6000000; @@ -133,7 +134,8 @@ void ViewInfo::UpdatePrefs() { ZoomInfo::UpdatePrefs(); #ifdef EXPERIMENTAL_SCROLLING_LIMITS - gPrefs->Read(wxT("/GUI/ScrollBeyondZero"), &bScrollBeyondZero, false); + gPrefs->Read(TracksPrefs::ScrollingPreferenceKey(), &bScrollBeyondZero, + TracksPrefs::ScrollingPreferenceDefault()); #endif } diff --git a/src/prefs/TracksPrefs.cpp b/src/prefs/TracksPrefs.cpp index 5507979cf..990720139 100644 --- a/src/prefs/TracksPrefs.cpp +++ b/src/prefs/TracksPrefs.cpp @@ -45,6 +45,12 @@ TracksPrefs::~TracksPrefs() { } +const wxChar *TracksPrefs::ScrollingPreferenceKey() +{ + static auto string = wxT("/GUI/ScrollBeyondZero"); + return string; +} + void TracksPrefs::Populate() { mSoloCodes.Add(wxT("Simple")); @@ -134,8 +140,8 @@ void TracksPrefs::PopulateOrExchange(ShuttleGui & S) true); #ifdef EXPERIMENTAL_SCROLLING_LIMITS S.TieCheckBox(_("Enable scrolling left of &zero"), - wxT("/GUI/ScrollBeyondZero"), - false); + ScrollingPreferenceKey(), + ScrollingPreferenceDefault()); #endif S.AddSpace(10); diff --git a/src/prefs/TracksPrefs.h b/src/prefs/TracksPrefs.h index b8edba17b..b8df5001f 100644 --- a/src/prefs/TracksPrefs.h +++ b/src/prefs/TracksPrefs.h @@ -29,6 +29,9 @@ class TracksPrefs final : public PrefsPanel ~TracksPrefs(); bool Apply() override; + static const wxChar *ScrollingPreferenceKey(); + static inline bool ScrollingPreferenceDefault() { return false; } + private: void Populate(); void PopulateOrExchange(ShuttleGui & S); diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 8e1f78b48..c48e8b9ff 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -82,6 +82,7 @@ array of Ruler::Label. #include "../Prefs.h" #include "../Snap.h" #include "../tracks/ui/Scrubbing.h" +#include "../prefs/TracksPrefs.h" //#define SCRUB_ABOVE #define RULER_DOUBLE_CLICK @@ -2044,7 +2045,8 @@ void AdornedRulerPanel::UpdatePrefs() #ifdef EXPERIMENTAL_TWO_TONE_TIME_RULER { bool scrollBeyondZero = false; - gPrefs->Read(wxT("/GUI/ScrollBeyondZero"), &scrollBeyondZero, false); + gPrefs->Read(TracksPrefs::ScrollingPreferenceKey(), &scrollBeyondZero, + TracksPrefs::ScrollingPreferenceDefault()); mRuler.SetTwoTone(scrollBeyondZero); } #endif From 7d7865c1a601f5ec85bce93749d7d377728736ed Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Tue, 10 May 2016 18:29:20 +0100 Subject: [PATCH 09/18] Update generated autotool files --- Makefile.in | 16 +-- help/Makefile.in | 16 +-- images/Makefile.in | 16 +-- lib-src/Makefile.in | 16 +-- src/Makefile.in | 231 +++++++++++++++++++++++++++++++++----------- tests/Makefile.in | 16 +-- 6 files changed, 186 insertions(+), 125 deletions(-) diff --git a/Makefile.in b/Makefile.in index 205f9bb06..e9e8dde51 100644 --- a/Makefile.in +++ b/Makefile.in @@ -129,9 +129,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -308,12 +307,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -354,8 +347,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -369,8 +360,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -417,7 +406,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ diff --git a/help/Makefile.in b/help/Makefile.in index 527156799..c04f41ec0 100644 --- a/help/Makefile.in +++ b/help/Makefile.in @@ -116,9 +116,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -187,12 +186,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -233,8 +226,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -248,8 +239,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -296,7 +285,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ diff --git a/images/Makefile.in b/images/Makefile.in index c8c7bdf5d..cbe5db54d 100644 --- a/images/Makefile.in +++ b/images/Makefile.in @@ -118,9 +118,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -191,12 +190,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -237,8 +230,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -252,8 +243,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -300,7 +289,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index e5f363a97..bcefd8f94 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -134,9 +134,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -232,12 +231,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -278,8 +271,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -293,8 +284,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -341,7 +330,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ diff --git a/src/Makefile.in b/src/Makefile.in index a08d73cef..4b21d150e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -226,9 +226,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -290,7 +289,7 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ LabelTrack.cpp LabelTrack.h LangChoice.cpp LangChoice.h \ Languages.cpp Languages.h Legacy.cpp Legacy.h Lyrics.cpp \ Lyrics.h LyricsWindow.cpp LyricsWindow.h MacroMagic.h \ - Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp Mix.h \ + Matrix.cpp Matrix.h MemoryX.h Menus.cpp Menus.h Mix.cpp Mix.h \ MixerBoard.cpp MixerBoard.h ModuleManager.cpp ModuleManager.h \ NumberScale.h PitchName.cpp PitchName.h \ PlatformCompatibility.cpp PlatformCompatibility.h \ @@ -308,21 +307,22 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \ TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \ TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \ - TrackPanelListener.h TranslatableStringArray.h UndoManager.cpp \ - UndoManager.h ViewInfo.cpp ViewInfo.h VoiceKey.cpp VoiceKey.h \ - WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ - WaveTrackLocation.h WrappedType.cpp WrappedType.h \ + TrackPanelCell.h TrackPanelCellIterator.h TrackPanelListener.h \ + TranslatableStringArray.h UndoManager.cpp UndoManager.h \ + ViewInfo.cpp ViewInfo.h VoiceKey.cpp VoiceKey.h WaveClip.cpp \ + WaveClip.h WaveTrack.cpp WaveTrack.h WaveTrackLocation.h \ + WrappedType.cpp WrappedType.h wxFileNameWrapper.h \ commands/AppCommandEvent.cpp commands/AppCommandEvent.h \ commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \ commands/Command.cpp commands/Command.h \ commands/CommandBuilder.cpp commands/CommandBuilder.h \ commands/CommandDirectory.cpp commands/CommandDirectory.h \ - commands/CommandHandler.cpp commands/CommandHandler.h \ - commands/CommandManager.cpp commands/CommandManager.h \ - commands/CommandMisc.h commands/CommandSignature.cpp \ - commands/CommandSignature.h commands/CommandTargets.h \ - commands/CommandType.cpp commands/CommandType.h \ - commands/CompareAudioCommand.cpp \ + commands/CommandFunctors.h commands/CommandHandler.cpp \ + commands/CommandHandler.h commands/CommandManager.cpp \ + commands/CommandManager.h commands/CommandMisc.h \ + commands/CommandSignature.cpp commands/CommandSignature.h \ + commands/CommandTargets.h commands/CommandType.cpp \ + commands/CommandType.h commands/CompareAudioCommand.cpp \ commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \ commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \ commands/GetAllMenuCommands.h \ @@ -439,9 +439,14 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ toolbars/ToolManager.cpp toolbars/ToolManager.h \ toolbars/ToolsToolBar.cpp toolbars/ToolsToolBar.h \ toolbars/TranscriptionToolBar.cpp \ - toolbars/TranscriptionToolBar.h widgets/AButton.cpp \ - widgets/AButton.h widgets/ASlider.cpp widgets/ASlider.h \ + toolbars/TranscriptionToolBar.h \ + tracks/ui/EditCursorOverlay.cpp tracks/ui/EditCursorOverlay.h \ + tracks/ui/PlayIndicatorOverlay.cpp \ + tracks/ui/PlayIndicatorOverlay.h tracks/ui/Scrubbing.cpp \ + tracks/ui/Scrubbing.h widgets/AButton.cpp widgets/AButton.h \ + widgets/ASlider.cpp widgets/ASlider.h \ widgets/AttachableScrollBar.cpp widgets/AttachableScrollBar.h \ + widgets/BackedPanel.cpp widgets/BackedPanel.h \ widgets/ErrorDialog.cpp widgets/ErrorDialog.h \ widgets/ExpandingToolBar.cpp widgets/ExpandingToolBar.h \ widgets/FileHistory.cpp widgets/FileHistory.h \ @@ -454,11 +459,13 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \ widgets/MultiDialog.cpp widgets/MultiDialog.h \ widgets/NumericTextCtrl.cpp widgets/NumericTextCtrl.h \ widgets/numformatter.cpp widgets/numformatter.h \ - widgets/ProgressDialog.cpp widgets/ProgressDialog.h \ - widgets/Ruler.cpp widgets/Ruler.h widgets/valnum.cpp \ - widgets/valnum.h widgets/Warning.cpp widgets/Warning.h \ - xml/XMLFileReader.cpp xml/XMLFileReader.h xml/XMLWriter.cpp \ - xml/XMLWriter.h effects/audiounits/AudioUnitEffect.cpp \ + widgets/Overlay.cpp widgets/Overlay.h widgets/OverlayPanel.cpp \ + widgets/OverlayPanel.h widgets/ProgressDialog.cpp \ + widgets/ProgressDialog.h widgets/Ruler.cpp widgets/Ruler.h \ + widgets/valnum.cpp widgets/valnum.h widgets/Warning.cpp \ + widgets/Warning.h xml/XMLFileReader.cpp xml/XMLFileReader.h \ + xml/XMLWriter.cpp xml/XMLWriter.h \ + effects/audiounits/AudioUnitEffect.cpp \ effects/audiounits/AudioUnitEffect.h export/ExportFFmpeg.cpp \ export/ExportFFmpeg.h export/ExportFFmpegDialogs.cpp \ export/ExportFFmpegDialogs.h import/ImportFFmpeg.cpp \ @@ -689,9 +696,13 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \ toolbars/audacity-ToolManager.$(OBJEXT) \ toolbars/audacity-ToolsToolBar.$(OBJEXT) \ toolbars/audacity-TranscriptionToolBar.$(OBJEXT) \ + tracks/ui/audacity-EditCursorOverlay.$(OBJEXT) \ + tracks/ui/audacity-PlayIndicatorOverlay.$(OBJEXT) \ + tracks/ui/audacity-Scrubbing.$(OBJEXT) \ widgets/audacity-AButton.$(OBJEXT) \ widgets/audacity-ASlider.$(OBJEXT) \ widgets/audacity-AttachableScrollBar.$(OBJEXT) \ + widgets/audacity-BackedPanel.$(OBJEXT) \ widgets/audacity-ErrorDialog.$(OBJEXT) \ widgets/audacity-ExpandingToolBar.$(OBJEXT) \ widgets/audacity-FileHistory.$(OBJEXT) \ @@ -706,6 +717,8 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \ widgets/audacity-MultiDialog.$(OBJEXT) \ widgets/audacity-NumericTextCtrl.$(OBJEXT) \ widgets/audacity-numformatter.$(OBJEXT) \ + widgets/audacity-Overlay.$(OBJEXT) \ + widgets/audacity-OverlayPanel.$(OBJEXT) \ widgets/audacity-ProgressDialog.$(OBJEXT) \ widgets/audacity-Ruler.$(OBJEXT) \ widgets/audacity-valnum.$(OBJEXT) \ @@ -863,12 +876,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -909,8 +916,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -924,8 +929,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -972,7 +975,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ @@ -1159,7 +1161,7 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ LabelTrack.cpp LabelTrack.h LangChoice.cpp LangChoice.h \ Languages.cpp Languages.h Legacy.cpp Legacy.h Lyrics.cpp \ Lyrics.h LyricsWindow.cpp LyricsWindow.h MacroMagic.h \ - Matrix.cpp Matrix.h Menus.cpp Menus.h Mix.cpp Mix.h \ + Matrix.cpp Matrix.h MemoryX.h Menus.cpp Menus.h Mix.cpp Mix.h \ MixerBoard.cpp MixerBoard.h ModuleManager.cpp ModuleManager.h \ NumberScale.h PitchName.cpp PitchName.h \ PlatformCompatibility.cpp PlatformCompatibility.h \ @@ -1177,21 +1179,22 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ TimerRecordDialog.cpp TimerRecordDialog.h TimeTrack.cpp \ TimeTrack.h Track.cpp Track.h TrackArtist.cpp TrackArtist.h \ TrackPanel.cpp TrackPanel.h TrackPanelAx.cpp TrackPanelAx.h \ - TrackPanelListener.h TranslatableStringArray.h UndoManager.cpp \ - UndoManager.h ViewInfo.cpp ViewInfo.h VoiceKey.cpp VoiceKey.h \ - WaveClip.cpp WaveClip.h WaveTrack.cpp WaveTrack.h \ - WaveTrackLocation.h WrappedType.cpp WrappedType.h \ + TrackPanelCell.h TrackPanelCellIterator.h TrackPanelListener.h \ + TranslatableStringArray.h UndoManager.cpp UndoManager.h \ + ViewInfo.cpp ViewInfo.h VoiceKey.cpp VoiceKey.h WaveClip.cpp \ + WaveClip.h WaveTrack.cpp WaveTrack.h WaveTrackLocation.h \ + WrappedType.cpp WrappedType.h wxFileNameWrapper.h \ commands/AppCommandEvent.cpp commands/AppCommandEvent.h \ commands/BatchEvalCommand.cpp commands/BatchEvalCommand.h \ commands/Command.cpp commands/Command.h \ commands/CommandBuilder.cpp commands/CommandBuilder.h \ commands/CommandDirectory.cpp commands/CommandDirectory.h \ - commands/CommandHandler.cpp commands/CommandHandler.h \ - commands/CommandManager.cpp commands/CommandManager.h \ - commands/CommandMisc.h commands/CommandSignature.cpp \ - commands/CommandSignature.h commands/CommandTargets.h \ - commands/CommandType.cpp commands/CommandType.h \ - commands/CompareAudioCommand.cpp \ + commands/CommandFunctors.h commands/CommandHandler.cpp \ + commands/CommandHandler.h commands/CommandManager.cpp \ + commands/CommandManager.h commands/CommandMisc.h \ + commands/CommandSignature.cpp commands/CommandSignature.h \ + commands/CommandTargets.h commands/CommandType.cpp \ + commands/CommandType.h commands/CompareAudioCommand.cpp \ commands/CompareAudioCommand.h commands/ExecMenuCommand.cpp \ commands/ExecMenuCommand.h commands/GetAllMenuCommands.cpp \ commands/GetAllMenuCommands.h \ @@ -1308,9 +1311,14 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ toolbars/ToolManager.cpp toolbars/ToolManager.h \ toolbars/ToolsToolBar.cpp toolbars/ToolsToolBar.h \ toolbars/TranscriptionToolBar.cpp \ - toolbars/TranscriptionToolBar.h widgets/AButton.cpp \ - widgets/AButton.h widgets/ASlider.cpp widgets/ASlider.h \ + toolbars/TranscriptionToolBar.h \ + tracks/ui/EditCursorOverlay.cpp tracks/ui/EditCursorOverlay.h \ + tracks/ui/PlayIndicatorOverlay.cpp \ + tracks/ui/PlayIndicatorOverlay.h tracks/ui/Scrubbing.cpp \ + tracks/ui/Scrubbing.h widgets/AButton.cpp widgets/AButton.h \ + widgets/ASlider.cpp widgets/ASlider.h \ widgets/AttachableScrollBar.cpp widgets/AttachableScrollBar.h \ + widgets/BackedPanel.cpp widgets/BackedPanel.h \ widgets/ErrorDialog.cpp widgets/ErrorDialog.h \ widgets/ExpandingToolBar.cpp widgets/ExpandingToolBar.h \ widgets/FileHistory.cpp widgets/FileHistory.h \ @@ -1323,14 +1331,16 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \ widgets/MultiDialog.cpp widgets/MultiDialog.h \ widgets/NumericTextCtrl.cpp widgets/NumericTextCtrl.h \ widgets/numformatter.cpp widgets/numformatter.h \ - widgets/ProgressDialog.cpp widgets/ProgressDialog.h \ - widgets/Ruler.cpp widgets/Ruler.h widgets/valnum.cpp \ - widgets/valnum.h widgets/Warning.cpp widgets/Warning.h \ - xml/XMLFileReader.cpp xml/XMLFileReader.h xml/XMLWriter.cpp \ - xml/XMLWriter.h $(NULL) $(am__append_3) $(am__append_6) \ - $(am__append_9) $(am__append_12) $(am__append_17) \ - $(am__append_24) $(am__append_33) $(am__append_36) \ - $(am__append_39) $(am__append_44) $(am__append_47) + widgets/Overlay.cpp widgets/Overlay.h widgets/OverlayPanel.cpp \ + widgets/OverlayPanel.h widgets/ProgressDialog.cpp \ + widgets/ProgressDialog.h widgets/Ruler.cpp widgets/Ruler.h \ + widgets/valnum.cpp widgets/valnum.h widgets/Warning.cpp \ + widgets/Warning.h xml/XMLFileReader.cpp xml/XMLFileReader.h \ + xml/XMLWriter.cpp xml/XMLWriter.h $(NULL) $(am__append_3) \ + $(am__append_6) $(am__append_9) $(am__append_12) \ + $(am__append_17) $(am__append_24) $(am__append_33) \ + $(am__append_36) $(am__append_39) $(am__append_44) \ + $(am__append_47) # TODO: Check *.cpp and *.h files if they are needed. EXTRA_DIST = audacity.desktop.in xml/audacityproject.dtd \ @@ -1817,6 +1827,18 @@ toolbars/audacity-ToolsToolBar.$(OBJEXT): toolbars/$(am__dirstamp) \ toolbars/$(DEPDIR)/$(am__dirstamp) toolbars/audacity-TranscriptionToolBar.$(OBJEXT): \ toolbars/$(am__dirstamp) toolbars/$(DEPDIR)/$(am__dirstamp) +tracks/ui/$(am__dirstamp): + @$(MKDIR_P) tracks/ui + @: > tracks/ui/$(am__dirstamp) +tracks/ui/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tracks/ui/$(DEPDIR) + @: > tracks/ui/$(DEPDIR)/$(am__dirstamp) +tracks/ui/audacity-EditCursorOverlay.$(OBJEXT): \ + tracks/ui/$(am__dirstamp) tracks/ui/$(DEPDIR)/$(am__dirstamp) +tracks/ui/audacity-PlayIndicatorOverlay.$(OBJEXT): \ + tracks/ui/$(am__dirstamp) tracks/ui/$(DEPDIR)/$(am__dirstamp) +tracks/ui/audacity-Scrubbing.$(OBJEXT): tracks/ui/$(am__dirstamp) \ + tracks/ui/$(DEPDIR)/$(am__dirstamp) widgets/$(am__dirstamp): @$(MKDIR_P) widgets @: > widgets/$(am__dirstamp) @@ -1829,6 +1851,8 @@ widgets/audacity-ASlider.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-AttachableScrollBar.$(OBJEXT): \ widgets/$(am__dirstamp) widgets/$(DEPDIR)/$(am__dirstamp) +widgets/audacity-BackedPanel.$(OBJEXT): widgets/$(am__dirstamp) \ + widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-ErrorDialog.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-ExpandingToolBar.$(OBJEXT): widgets/$(am__dirstamp) \ @@ -1857,6 +1881,10 @@ widgets/audacity-NumericTextCtrl.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-numformatter.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) +widgets/audacity-Overlay.$(OBJEXT): widgets/$(am__dirstamp) \ + widgets/$(DEPDIR)/$(am__dirstamp) +widgets/audacity-OverlayPanel.$(OBJEXT): widgets/$(am__dirstamp) \ + widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-ProgressDialog.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/audacity-Ruler.$(OBJEXT): widgets/$(am__dirstamp) \ @@ -1968,6 +1996,7 @@ mostlyclean-compile: -rm -f ondemand/*.$(OBJEXT) -rm -f prefs/*.$(OBJEXT) -rm -f toolbars/*.$(OBJEXT) + -rm -f tracks/ui/*.$(OBJEXT) -rm -f widgets/*.$(OBJEXT) -rm -f xml/*.$(OBJEXT) -rm -f xml/*.lo @@ -2227,9 +2256,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@toolbars/$(DEPDIR)/audacity-ToolManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@toolbars/$(DEPDIR)/audacity-ToolsToolBar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@toolbars/$(DEPDIR)/audacity-TranscriptionToolBar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tracks/ui/$(DEPDIR)/audacity-Scrubbing.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-AButton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-ASlider.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-AttachableScrollBar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-BackedPanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-ErrorDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-ExpandingToolBar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-FileHistory.Po@am__quote@ @@ -2243,6 +2276,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-Meter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-MultiDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-NumericTextCtrl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-Overlay.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-OverlayPanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-ProgressDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-Ruler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/audacity-Warning.Po@am__quote@ @@ -5469,6 +5504,48 @@ toolbars/audacity-TranscriptionToolBar.obj: toolbars/TranscriptionToolBar.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o toolbars/audacity-TranscriptionToolBar.obj `if test -f 'toolbars/TranscriptionToolBar.cpp'; then $(CYGPATH_W) 'toolbars/TranscriptionToolBar.cpp'; else $(CYGPATH_W) '$(srcdir)/toolbars/TranscriptionToolBar.cpp'; fi` +tracks/ui/audacity-EditCursorOverlay.o: tracks/ui/EditCursorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-EditCursorOverlay.o -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Tpo -c -o tracks/ui/audacity-EditCursorOverlay.o `test -f 'tracks/ui/EditCursorOverlay.cpp' || echo '$(srcdir)/'`tracks/ui/EditCursorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Tpo tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/EditCursorOverlay.cpp' object='tracks/ui/audacity-EditCursorOverlay.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-EditCursorOverlay.o `test -f 'tracks/ui/EditCursorOverlay.cpp' || echo '$(srcdir)/'`tracks/ui/EditCursorOverlay.cpp + +tracks/ui/audacity-EditCursorOverlay.obj: tracks/ui/EditCursorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-EditCursorOverlay.obj -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Tpo -c -o tracks/ui/audacity-EditCursorOverlay.obj `if test -f 'tracks/ui/EditCursorOverlay.cpp'; then $(CYGPATH_W) 'tracks/ui/EditCursorOverlay.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/EditCursorOverlay.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Tpo tracks/ui/$(DEPDIR)/audacity-EditCursorOverlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/EditCursorOverlay.cpp' object='tracks/ui/audacity-EditCursorOverlay.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-EditCursorOverlay.obj `if test -f 'tracks/ui/EditCursorOverlay.cpp'; then $(CYGPATH_W) 'tracks/ui/EditCursorOverlay.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/EditCursorOverlay.cpp'; fi` + +tracks/ui/audacity-PlayIndicatorOverlay.o: tracks/ui/PlayIndicatorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-PlayIndicatorOverlay.o -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Tpo -c -o tracks/ui/audacity-PlayIndicatorOverlay.o `test -f 'tracks/ui/PlayIndicatorOverlay.cpp' || echo '$(srcdir)/'`tracks/ui/PlayIndicatorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Tpo tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/PlayIndicatorOverlay.cpp' object='tracks/ui/audacity-PlayIndicatorOverlay.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-PlayIndicatorOverlay.o `test -f 'tracks/ui/PlayIndicatorOverlay.cpp' || echo '$(srcdir)/'`tracks/ui/PlayIndicatorOverlay.cpp + +tracks/ui/audacity-PlayIndicatorOverlay.obj: tracks/ui/PlayIndicatorOverlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-PlayIndicatorOverlay.obj -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Tpo -c -o tracks/ui/audacity-PlayIndicatorOverlay.obj `if test -f 'tracks/ui/PlayIndicatorOverlay.cpp'; then $(CYGPATH_W) 'tracks/ui/PlayIndicatorOverlay.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/PlayIndicatorOverlay.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Tpo tracks/ui/$(DEPDIR)/audacity-PlayIndicatorOverlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/PlayIndicatorOverlay.cpp' object='tracks/ui/audacity-PlayIndicatorOverlay.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-PlayIndicatorOverlay.obj `if test -f 'tracks/ui/PlayIndicatorOverlay.cpp'; then $(CYGPATH_W) 'tracks/ui/PlayIndicatorOverlay.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/PlayIndicatorOverlay.cpp'; fi` + +tracks/ui/audacity-Scrubbing.o: tracks/ui/Scrubbing.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-Scrubbing.o -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-Scrubbing.Tpo -c -o tracks/ui/audacity-Scrubbing.o `test -f 'tracks/ui/Scrubbing.cpp' || echo '$(srcdir)/'`tracks/ui/Scrubbing.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-Scrubbing.Tpo tracks/ui/$(DEPDIR)/audacity-Scrubbing.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/Scrubbing.cpp' object='tracks/ui/audacity-Scrubbing.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-Scrubbing.o `test -f 'tracks/ui/Scrubbing.cpp' || echo '$(srcdir)/'`tracks/ui/Scrubbing.cpp + +tracks/ui/audacity-Scrubbing.obj: tracks/ui/Scrubbing.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT tracks/ui/audacity-Scrubbing.obj -MD -MP -MF tracks/ui/$(DEPDIR)/audacity-Scrubbing.Tpo -c -o tracks/ui/audacity-Scrubbing.obj `if test -f 'tracks/ui/Scrubbing.cpp'; then $(CYGPATH_W) 'tracks/ui/Scrubbing.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/Scrubbing.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tracks/ui/$(DEPDIR)/audacity-Scrubbing.Tpo tracks/ui/$(DEPDIR)/audacity-Scrubbing.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tracks/ui/Scrubbing.cpp' object='tracks/ui/audacity-Scrubbing.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o tracks/ui/audacity-Scrubbing.obj `if test -f 'tracks/ui/Scrubbing.cpp'; then $(CYGPATH_W) 'tracks/ui/Scrubbing.cpp'; else $(CYGPATH_W) '$(srcdir)/tracks/ui/Scrubbing.cpp'; fi` + widgets/audacity-AButton.o: widgets/AButton.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-AButton.o -MD -MP -MF widgets/$(DEPDIR)/audacity-AButton.Tpo -c -o widgets/audacity-AButton.o `test -f 'widgets/AButton.cpp' || echo '$(srcdir)/'`widgets/AButton.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-AButton.Tpo widgets/$(DEPDIR)/audacity-AButton.Po @@ -5511,6 +5588,20 @@ widgets/audacity-AttachableScrollBar.obj: widgets/AttachableScrollBar.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-AttachableScrollBar.obj `if test -f 'widgets/AttachableScrollBar.cpp'; then $(CYGPATH_W) 'widgets/AttachableScrollBar.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/AttachableScrollBar.cpp'; fi` +widgets/audacity-BackedPanel.o: widgets/BackedPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-BackedPanel.o -MD -MP -MF widgets/$(DEPDIR)/audacity-BackedPanel.Tpo -c -o widgets/audacity-BackedPanel.o `test -f 'widgets/BackedPanel.cpp' || echo '$(srcdir)/'`widgets/BackedPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-BackedPanel.Tpo widgets/$(DEPDIR)/audacity-BackedPanel.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/BackedPanel.cpp' object='widgets/audacity-BackedPanel.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-BackedPanel.o `test -f 'widgets/BackedPanel.cpp' || echo '$(srcdir)/'`widgets/BackedPanel.cpp + +widgets/audacity-BackedPanel.obj: widgets/BackedPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-BackedPanel.obj -MD -MP -MF widgets/$(DEPDIR)/audacity-BackedPanel.Tpo -c -o widgets/audacity-BackedPanel.obj `if test -f 'widgets/BackedPanel.cpp'; then $(CYGPATH_W) 'widgets/BackedPanel.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/BackedPanel.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-BackedPanel.Tpo widgets/$(DEPDIR)/audacity-BackedPanel.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/BackedPanel.cpp' object='widgets/audacity-BackedPanel.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-BackedPanel.obj `if test -f 'widgets/BackedPanel.cpp'; then $(CYGPATH_W) 'widgets/BackedPanel.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/BackedPanel.cpp'; fi` + widgets/audacity-ErrorDialog.o: widgets/ErrorDialog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-ErrorDialog.o -MD -MP -MF widgets/$(DEPDIR)/audacity-ErrorDialog.Tpo -c -o widgets/audacity-ErrorDialog.o `test -f 'widgets/ErrorDialog.cpp' || echo '$(srcdir)/'`widgets/ErrorDialog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-ErrorDialog.Tpo widgets/$(DEPDIR)/audacity-ErrorDialog.Po @@ -5707,6 +5798,34 @@ widgets/audacity-numformatter.obj: widgets/numformatter.cpp @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-numformatter.obj `if test -f 'widgets/numformatter.cpp'; then $(CYGPATH_W) 'widgets/numformatter.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/numformatter.cpp'; fi` +widgets/audacity-Overlay.o: widgets/Overlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-Overlay.o -MD -MP -MF widgets/$(DEPDIR)/audacity-Overlay.Tpo -c -o widgets/audacity-Overlay.o `test -f 'widgets/Overlay.cpp' || echo '$(srcdir)/'`widgets/Overlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-Overlay.Tpo widgets/$(DEPDIR)/audacity-Overlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Overlay.cpp' object='widgets/audacity-Overlay.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-Overlay.o `test -f 'widgets/Overlay.cpp' || echo '$(srcdir)/'`widgets/Overlay.cpp + +widgets/audacity-Overlay.obj: widgets/Overlay.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-Overlay.obj -MD -MP -MF widgets/$(DEPDIR)/audacity-Overlay.Tpo -c -o widgets/audacity-Overlay.obj `if test -f 'widgets/Overlay.cpp'; then $(CYGPATH_W) 'widgets/Overlay.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/Overlay.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-Overlay.Tpo widgets/$(DEPDIR)/audacity-Overlay.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Overlay.cpp' object='widgets/audacity-Overlay.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-Overlay.obj `if test -f 'widgets/Overlay.cpp'; then $(CYGPATH_W) 'widgets/Overlay.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/Overlay.cpp'; fi` + +widgets/audacity-OverlayPanel.o: widgets/OverlayPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-OverlayPanel.o -MD -MP -MF widgets/$(DEPDIR)/audacity-OverlayPanel.Tpo -c -o widgets/audacity-OverlayPanel.o `test -f 'widgets/OverlayPanel.cpp' || echo '$(srcdir)/'`widgets/OverlayPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-OverlayPanel.Tpo widgets/$(DEPDIR)/audacity-OverlayPanel.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/OverlayPanel.cpp' object='widgets/audacity-OverlayPanel.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-OverlayPanel.o `test -f 'widgets/OverlayPanel.cpp' || echo '$(srcdir)/'`widgets/OverlayPanel.cpp + +widgets/audacity-OverlayPanel.obj: widgets/OverlayPanel.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-OverlayPanel.obj -MD -MP -MF widgets/$(DEPDIR)/audacity-OverlayPanel.Tpo -c -o widgets/audacity-OverlayPanel.obj `if test -f 'widgets/OverlayPanel.cpp'; then $(CYGPATH_W) 'widgets/OverlayPanel.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/OverlayPanel.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-OverlayPanel.Tpo widgets/$(DEPDIR)/audacity-OverlayPanel.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/OverlayPanel.cpp' object='widgets/audacity-OverlayPanel.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o widgets/audacity-OverlayPanel.obj `if test -f 'widgets/OverlayPanel.cpp'; then $(CYGPATH_W) 'widgets/OverlayPanel.cpp'; else $(CYGPATH_W) '$(srcdir)/widgets/OverlayPanel.cpp'; fi` + widgets/audacity-ProgressDialog.o: widgets/ProgressDialog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT widgets/audacity-ProgressDialog.o -MD -MP -MF widgets/$(DEPDIR)/audacity-ProgressDialog.Tpo -c -o widgets/audacity-ProgressDialog.o `test -f 'widgets/ProgressDialog.cpp' || echo '$(srcdir)/'`widgets/ProgressDialog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/audacity-ProgressDialog.Tpo widgets/$(DEPDIR)/audacity-ProgressDialog.Po @@ -6237,6 +6356,8 @@ distclean-generic: -rm -f prefs/$(am__dirstamp) -rm -f toolbars/$(DEPDIR)/$(am__dirstamp) -rm -f toolbars/$(am__dirstamp) + -rm -f tracks/ui/$(DEPDIR)/$(am__dirstamp) + -rm -f tracks/ui/$(am__dirstamp) -rm -f widgets/$(DEPDIR)/$(am__dirstamp) -rm -f widgets/$(am__dirstamp) -rm -f xml/$(DEPDIR)/$(am__dirstamp) @@ -6251,7 +6372,7 @@ clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-generic \ clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) blockfile/$(DEPDIR) commands/$(DEPDIR) effects/$(DEPDIR) effects/VST/$(DEPDIR) effects/audiounits/$(DEPDIR) effects/ladspa/$(DEPDIR) effects/lv2/$(DEPDIR) effects/nyquist/$(DEPDIR) effects/vamp/$(DEPDIR) export/$(DEPDIR) import/$(DEPDIR) ondemand/$(DEPDIR) prefs/$(DEPDIR) toolbars/$(DEPDIR) widgets/$(DEPDIR) xml/$(DEPDIR) + -rm -rf ./$(DEPDIR) blockfile/$(DEPDIR) commands/$(DEPDIR) effects/$(DEPDIR) effects/VST/$(DEPDIR) effects/audiounits/$(DEPDIR) effects/ladspa/$(DEPDIR) effects/lv2/$(DEPDIR) effects/nyquist/$(DEPDIR) effects/vamp/$(DEPDIR) export/$(DEPDIR) import/$(DEPDIR) ondemand/$(DEPDIR) prefs/$(DEPDIR) toolbars/$(DEPDIR) tracks/ui/$(DEPDIR) widgets/$(DEPDIR) xml/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -6297,7 +6418,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) blockfile/$(DEPDIR) commands/$(DEPDIR) effects/$(DEPDIR) effects/VST/$(DEPDIR) effects/audiounits/$(DEPDIR) effects/ladspa/$(DEPDIR) effects/lv2/$(DEPDIR) effects/nyquist/$(DEPDIR) effects/vamp/$(DEPDIR) export/$(DEPDIR) import/$(DEPDIR) ondemand/$(DEPDIR) prefs/$(DEPDIR) toolbars/$(DEPDIR) widgets/$(DEPDIR) xml/$(DEPDIR) + -rm -rf ./$(DEPDIR) blockfile/$(DEPDIR) commands/$(DEPDIR) effects/$(DEPDIR) effects/VST/$(DEPDIR) effects/audiounits/$(DEPDIR) effects/ladspa/$(DEPDIR) effects/lv2/$(DEPDIR) effects/nyquist/$(DEPDIR) effects/vamp/$(DEPDIR) export/$(DEPDIR) import/$(DEPDIR) ondemand/$(DEPDIR) prefs/$(DEPDIR) toolbars/$(DEPDIR) tracks/ui/$(DEPDIR) widgets/$(DEPDIR) xml/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/tests/Makefile.in b/tests/Makefile.in index 245e0660d..a1f91ca53 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -117,9 +117,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_c99_func_lrint.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -414,12 +413,6 @@ AUDACITY_NAME = @AUDACITY_NAME@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ -AVCODEC_CFLAGS = @AVCODEC_CFLAGS@ -AVCODEC_LIBS = @AVCODEC_LIBS@ -AVFORMAT_CFLAGS = @AVFORMAT_CFLAGS@ -AVFORMAT_LIBS = @AVFORMAT_LIBS@ -AVUTIL_CFLAGS = @AVUTIL_CFLAGS@ -AVUTIL_LIBS = @AVUTIL_LIBS@ AWK = @AWK@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ CC = @CC@ @@ -460,8 +453,6 @@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ HAVE_GTK = @HAVE_GTK@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ HAVE_VISIBILITY = @HAVE_VISIBILITY@ @@ -475,8 +466,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -JACK_CFLAGS = @JACK_CFLAGS@ -JACK_LIBS = @JACK_LIBS@ LAME_CFLAGS = @LAME_CFLAGS@ LAME_LIBS = @LAME_LIBS@ LD = @LD@ @@ -523,7 +512,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ PORTAUDIO_CFLAGS = @PORTAUDIO_CFLAGS@ PORTAUDIO_LIBS = @PORTAUDIO_LIBS@ PORTMIXER_LIBS = @PORTMIXER_LIBS@ From 80e19f21300fb0d80717a2f85e098a49da3fdae2 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 10 May 2016 13:52:05 -0400 Subject: [PATCH 10/18] Ruler is in the ctrl+f6 cycle instead of reachable by arrows; experimental... ... flag for turning off navigability of the ruler. --- src/AudacityApp.h | 2 - src/Experimental.h | 4 + src/Menus.cpp | 43 +++++----- src/TrackPanel.cpp | 179 ++++++++++++++++++++++++------------------ src/widgets/Ruler.cpp | 1 - src/widgets/Ruler.h | 4 + 6 files changed, 134 insertions(+), 99 deletions(-) diff --git a/src/AudacityApp.h b/src/AudacityApp.h index 3d43762b8..60ba23038 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -96,8 +96,6 @@ enum CommandFlag : unsigned long long = 0x80000000ULL, // prl RulerHasFocus = 0x100000000ULL, // prl - TrackPanelOrRulerHasFocus - = 0x200000000ULL, // prl NoFlagsSpecifed = ~0ULL }; diff --git a/src/Experimental.h b/src/Experimental.h index d5f93f9df..1b58ceb5e 100644 --- a/src/Experimental.h +++ b/src/Experimental.h @@ -200,5 +200,9 @@ // interpolating in frequency domain. #define EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS +// Paul Licameli (PRL) 10 May 2016 +// Time ruler accepts focus, buttons can be reached with TAB +#define EXPERIMENTAL_TIME_RULER_NAVIGATION + #endif diff --git a/src/Menus.cpp b/src/Menus.cpp index 12ca8bf94..a7110fe45 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -1139,8 +1139,8 @@ void AudacityProject::CreateMenusAndCommands() c->AddCommand(wxT("SeekLeftLong"), _("Long seek left during playback"), FN(OnSeekLeftLong), wxT("Shift+Left\tallowDup")); c->AddCommand(wxT("SeekRightLong"), _("Long Seek right during playback"), FN(OnSeekRightLong), wxT("Shift+Right\tallowDup")); - c->SetDefaultFlags(TrackPanelOrRulerHasFocus, - TrackPanelOrRulerHasFocus); + c->SetDefaultFlags(TracksExistFlag | TrackPanelHasFocus, + TracksExistFlag | TrackPanelHasFocus); c->AddCommand(wxT("PrevTrack"), _("Move Focus to Previous Track"), FN(OnCursorUp), wxT("Up")); c->AddCommand(wxT("NextTrack"), _("Move Focus to Next Track"), FN(OnCursorDown), wxT("Down")); @@ -1152,9 +1152,6 @@ void AudacityProject::CreateMenusAndCommands() c->AddCommand(wxT("ShiftDown"), _("Move Focus to Next and Select"), FN(OnShiftDown), wxT("Shift+Down")); - c->SetDefaultFlags(TracksExistFlag | TrackPanelHasFocus, - TracksExistFlag | TrackPanelHasFocus); - c->AddCommand(wxT("Toggle"), _("Toggle Focused Track"), FN(OnToggle), wxT("Return")); c->AddCommand(wxT("ToggleAlt"), _("Toggle Focused Track"), FN(OnToggle), wxT("NUMPAD_ENTER")); @@ -1745,8 +1742,6 @@ CommandFlag AudacityProject::GetUpdateFlags() flags |= TextClipFlag; flags |= GetFocusedFrame(); - if (flags & (TrackPanelHasFocus | RulerHasFocus)) - flags |= TrackPanelOrRulerHasFocus; double start, end; GetPlayRegion(&start, &end); @@ -2745,13 +2740,17 @@ void AudacityProject::NextFrame() switch( GetFocusedFrame() ) { case TopDockHasFocus: - if(mTrackPanel->GetFocusedTrack()) - mTrackPanel->SetFocus(); - else - mRuler->SetFocus(); + +#ifdef EXPERIMENTAL_TIME_RULER_NAVIGATION + mRuler->SetFocus(); break; case RulerHasFocus: +#endif + + mTrackPanel->SetFocus(); + break; + case TrackPanelHasFocus: mToolManager->GetBotDock()->SetFocus(); break; @@ -2769,20 +2768,24 @@ void AudacityProject::PrevFrame() { switch( GetFocusedFrame() ) { - case TopDockHasFocus: - mToolManager->GetBotDock()->SetFocus(); + case BotDockHasFocus: + mTrackPanel->SetFocus(); + break; + + case TrackPanelHasFocus: + +#ifdef EXPERIMENTAL_TIME_RULER_NAVIGATION + mRuler->SetFocus(); break; - case TrackPanelHasFocus: case RulerHasFocus: +#endif + mToolManager->GetTopDock()->SetFocus(); break; - - case BotDockHasFocus: - if(mTrackPanel->GetFocusedTrack()) - mTrackPanel->SetFocus(); - else - mRuler->SetFocus(); + + case TopDockHasFocus: + mToolManager->GetBotDock()->SetFocus(); break; default: diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index ce36069d1..5bbe2b9f0 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -7113,49 +7113,46 @@ void TrackPanel::UpdateVRulerSize() /// TrackPanel::OnNextTrack. void TrackPanel::OnPrevTrack( bool shift ) { - bool rulerFocus = mRuler->HasFocus(); - bool stealFocus = (mCircularTrackNavigation && rulerFocus); - if(stealFocus) // if there isn't one, focus on last + TrackListIterator iter( mTracks ); + Track* t = GetFocusedTrack(); + if( t == NULL ) // if there isn't one, focus on last { - if(rulerFocus) { - this->SetFocus(); - mRuler->Refresh(); - } - TrackListIterator iter( mTracks ); - auto t = iter.Last(); + t = iter.Last(); SetFocusedTrack( t ); EnsureVisible( t ); MakeParentModifyState(false); return; } - else if (rulerFocus) { - // JKC: wxBell() is probably for accessibility, so a blind - // user knows they were at the top track. - wxBell(); - return; - } - - Track* t = GetFocusedTrack(); - Track* p = mTracks->GetPrev( t, true ); // Get previous track - if (!p) { - SetFocusedTrack(nullptr); - mRuler->SetFocus(); - Refresh(false); - mRuler->Refresh(); - return; - } + Track* p = NULL; bool tSelected = false; bool pSelected = false; if( shift ) { + p = mTracks->GetPrev( t, true ); // Get previous track + if( p == NULL ) // On first track + { + // JKC: wxBell() is probably for accessibility, so a blind + // user knows they were at the top track. + wxBell(); + if( mCircularTrackNavigation ) + { + TrackListIterator iter( mTracks ); + p = iter.Last(); + } + else + { + EnsureVisible( t ); + return; + } + } tSelected = t->GetSelected(); if (p) pSelected = p->GetSelected(); if( tSelected && pSelected ) { mTracks->Select( t, false ); - SetFocusedTrack( p ); // move focus to next track up + SetFocusedTrack( p ); // move focus to next track down EnsureVisible( p ); MakeParentModifyState(false); return; @@ -7163,7 +7160,7 @@ void TrackPanel::OnPrevTrack( bool shift ) if( tSelected && !pSelected ) { mTracks->Select( p, true ); - SetFocusedTrack( p ); // move focus to next track up + SetFocusedTrack( p ); // move focus to next track down EnsureVisible( p ); MakeParentModifyState(false); return; @@ -7171,7 +7168,7 @@ void TrackPanel::OnPrevTrack( bool shift ) if( !tSelected && pSelected ) { mTracks->Select( p, false ); - SetFocusedTrack( p ); // move focus to next track up + SetFocusedTrack( p ); // move focus to next track down EnsureVisible( p ); MakeParentModifyState(false); return; @@ -7179,7 +7176,7 @@ void TrackPanel::OnPrevTrack( bool shift ) if( !tSelected && !pSelected ) { mTracks->Select( t, true ); - SetFocusedTrack( p ); // move focus to next track up + SetFocusedTrack( p ); // move focus to next track down EnsureVisible( p ); MakeParentModifyState(false); return; @@ -7187,10 +7184,35 @@ void TrackPanel::OnPrevTrack( bool shift ) } else { - SetFocusedTrack( p ); // move focus to next track up - EnsureVisible( p ); - MakeParentModifyState(false); - return; + p = mTracks->GetPrev( t, true ); // Get next track + if( p == NULL ) // On last track so stay there? + { + wxBell(); + if( mCircularTrackNavigation ) + { + TrackListIterator iter( mTracks ); + for( Track *d = iter.First(); d; d = iter.Next( true ) ) + { + p = d; + } + SetFocusedTrack( p ); // Wrap to the first track + EnsureVisible( p ); + MakeParentModifyState(false); + return; + } + else + { + EnsureVisible( t ); + return; + } + } + else + { + SetFocusedTrack( p ); // move focus to next track down + EnsureVisible( p ); + MakeParentModifyState(false); + return; + } } } @@ -7199,46 +7221,37 @@ void TrackPanel::OnPrevTrack( bool shift ) /// block or not. void TrackPanel::OnNextTrack( bool shift ) { - if(mRuler->HasFocus()) { - TrackListIterator iter(mTracks); - auto first = iter.First(); - if(first != nullptr) { - // Steal focus - this->SetFocus(); - SetFocusedTrack(first); - EnsureVisible(first); - MakeParentModifyState(false); - mRuler->Refresh(); - } - return; - } - Track *t; - Track *n = nullptr; - bool tSelected, nSelected; + Track *n; + TrackListIterator iter( mTracks ); + bool tSelected,nSelected; t = GetFocusedTrack(); // Get currently focused track - bool surrenderFocus = - t == nullptr || - ((n = mTracks->GetNext( t, true )) == nullptr && - mCircularTrackNavigation); - - if( surrenderFocus ) // if there is no next, give focus to the ruler + if( t == NULL ) // if there isn't one, focus on first { - SetFocusedTrack(nullptr); - mRuler->SetFocus(); - mRuler->Refresh(); - Refresh(false); + t = iter.First(); + SetFocusedTrack( t ); + EnsureVisible( t ); + MakeParentModifyState(false); return; } if( shift ) { + n = mTracks->GetNext( t, true ); // Get next track if( n == NULL ) // On last track so stay there { wxBell(); - EnsureVisible( t ); - return; + if( mCircularTrackNavigation ) + { + TrackListIterator iter( mTracks ); + n = iter.First(); + } + else + { + EnsureVisible( t ); + return; + } } tSelected = t->GetSelected(); nSelected = n->GetSelected(); @@ -7277,11 +7290,24 @@ void TrackPanel::OnNextTrack( bool shift ) } else { + n = mTracks->GetNext( t, true ); // Get next track if( n == NULL ) // On last track so stay there { wxBell(); - EnsureVisible( t ); - return; + if( mCircularTrackNavigation ) + { + TrackListIterator iter( mTracks ); + n = iter.First(); + SetFocusedTrack( n ); // Wrap to the first track + EnsureVisible( n ); + MakeParentModifyState(false); + return; + } + else + { + EnsureVisible( t ); + return; + } } else { @@ -7295,25 +7321,26 @@ void TrackPanel::OnNextTrack( bool shift ) void TrackPanel::OnFirstTrack() { - SetFocusedTrack(nullptr); - if (!mRuler->HasFocus()) { - mRuler->SetFocus(); - mRuler->Refresh(); + Track *t = GetFocusedTrack(); + if (!t) + return; + + TrackListIterator iter(mTracks); + Track *f = iter.First(); + if (t != f) + { + SetFocusedTrack(f); + MakeParentModifyState(false); } + EnsureVisible(f); } void TrackPanel::OnLastTrack() { - if (mTracks->empty()) { - OnFirstTrack(); - return; - } - else if(mRuler->HasFocus()) { - this->SetFocus(); - mRuler->Refresh(); - } - Track *t = GetFocusedTrack(); + if (!t) + return; + TrackListIterator iter(mTracks); Track *l = iter.Last(); if (t != l) diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index c48e8b9ff..75e802356 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -2923,7 +2923,6 @@ void AdornedRulerPanel::OnKeyDown(wxKeyEvent &event) void AdornedRulerPanel::OnSetFocus(wxFocusEvent & WXUNUSED(event)) { AudacityProject::CaptureKeyboard(this); - mProject->GetTrackPanel()->SetFocusedTrack(nullptr); mTabState = TabState{}; Refresh( false ); } diff --git a/src/widgets/Ruler.h b/src/widgets/Ruler.h index f533c0736..543e88c79 100644 --- a/src/widgets/Ruler.h +++ b/src/widgets/Ruler.h @@ -293,6 +293,10 @@ public: ~AdornedRulerPanel(); +#ifndef EXPERIMENTAL_TIME_RULER_NAVIGATION + bool AcceptsFocus() const override { return false; } +#endif + public: static int GetRulerHeight(); static int GetRulerHeight(bool showScrubBar); From 928e96c6cc8d344ffeef46c0ced1af37d6fbfe13 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 10 May 2016 15:35:46 -0400 Subject: [PATCH 11/18] Fix assertion violations about double capture; while still making sure... ... that if you drag-scrub and ESC, you don't get a leftover white guide line. --- src/tracks/ui/Scrubbing.cpp | 5 ----- src/widgets/Ruler.cpp | 22 +++++++--------------- src/widgets/Ruler.h | 2 -- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 7175175ad..00893bbaa 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -411,11 +411,6 @@ void Scrubber::StopScrubbing() } mProject->GetRulerPanel()->HideQuickPlayIndicator(); - - // Need this in case ruler gets the mouse-up event after escaping scrubbing: - // prevent reappearance of the - // quick play guideline - mProject->GetRulerPanel()->IgnoreMouseUp(); } bool Scrubber::IsScrubbing() const diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 75e802356..f7725f417 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -2328,17 +2328,6 @@ bool AdornedRulerPanel::IsWithinMarker(int mousePosX, double markerTime) void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) { - if (mIgnoreMouseUp) { - if (evt.Dragging()) - return; - else if (evt.ButtonUp()) { - mIgnoreMouseUp = false; - return; - } - else - mIgnoreMouseUp = false; - } - // PRL: why do I need these two lines on Windows but not on Mac? if (evt.ButtonDown(wxMOUSE_BTN_ANY)) SetFocus(); @@ -2516,13 +2505,16 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) mDoubleClick = false; HandleQPClick(evt, mousePosX); HandleQPDrag(evt, mousePosX); + ShowQuickPlayIndicator(); } - else if (evt.LeftIsDown()) + else if (evt.LeftIsDown() && HasCapture()) { HandleQPDrag(evt, mousePosX); - else if (evt.LeftUp()) + ShowQuickPlayIndicator(); + } + else if (evt.LeftUp() && HasCapture()) { HandleQPRelease(evt); - - ShowQuickPlayIndicator(); + ShowQuickPlayIndicator(); + } } } diff --git a/src/widgets/Ruler.h b/src/widgets/Ruler.h index 543e88c79..3e63ca49a 100644 --- a/src/widgets/Ruler.h +++ b/src/widgets/Ruler.h @@ -354,7 +354,6 @@ public: void ShowQuickPlayIndicator(); void HideQuickPlayIndicator(); void UpdateQuickPlayPos(wxCoord &mousPosX); - void IgnoreMouseUp() { mIgnoreMouseUp = true; } private: void OnCapture(wxCommandEvent & evt); @@ -536,7 +535,6 @@ private: mutable wxFont mButtonFont; bool mDoubleClick {}; - bool mIgnoreMouseUp {}; DECLARE_EVENT_TABLE() From 2cd3a5d751c8ecd78328fb6c3a7fa215f8f41405 Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Wed, 11 May 2016 17:46:39 +0100 Subject: [PATCH 12/18] Display Audio Position when stopped When play is stopped, display the start of play region as the 'Audio Position' in Selection Toolbar. --- src/Project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Project.cpp b/src/Project.cpp index 487378388..df65fc3c8 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -4708,7 +4708,8 @@ void AudacityProject::TP_DisplaySelection() if (gAudioIO->IsBusy()) audioTime = gAudioIO->GetStreamTime(); else { - audioTime = 0; + double playEnd; + GetPlayRegion(&audioTime, &playEnd); } GetSelectionBar()->SetTimes(mViewInfo.selectedRegion.t0(), From 9bfd66b06ca908efe9bd3adfd7f78cf143d18688 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 11 May 2016 13:23:33 -0400 Subject: [PATCH 13/18] Help for debugging of some event handling --- src/Menus.cpp | 8 ++++++++ src/Project.cpp | 20 ++++++++++++-------- src/Project.h | 1 + src/commands/CommandManager.cpp | 2 +- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index a7110fe45..1e8902059 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -2762,6 +2762,10 @@ void AudacityProject::NextFrame() default: break; } + + // This is not strictly needed, except when trying to debug focus changes themselves, + // and therefore the main window misses the deactivation event + UpdateLastFocus(); } void AudacityProject::PrevFrame() @@ -2791,6 +2795,10 @@ void AudacityProject::PrevFrame() default: break; } + + // This is not strictly needed, except when trying to debug focus changes themselves, + // and therefore the main window misses the deactivation event + UpdateLastFocus(); } void AudacityProject::NextWindow() diff --git a/src/Project.cpp b/src/Project.cpp index df65fc3c8..b6fbddb64 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -2147,14 +2147,8 @@ void AudacityProject::OnActivate(wxActivateEvent & event) // remember which child had the focus. Then, when we receive the // activate event, we restore that focus to the child or the track // panel if no child had the focus (which probably should never happen). - if (!mActive) { - // We only want to remember the last focused window if FindFocus() returns - // a window within the current project frame. - wxWindow *w = FindFocus(); - if (wxGetTopLevelParent(w) ==this) { - mLastFocusedWindow = w; - } - } + if (!mActive) + UpdateLastFocus(); else { SetActiveProject(this); if (mLastFocusedWindow) { @@ -2173,6 +2167,16 @@ void AudacityProject::OnActivate(wxActivateEvent & event) event.Skip(); } +void AudacityProject::UpdateLastFocus() +{ + // We only want to remember the last focused window if FindFocus() returns + // a window within the current project frame. + wxWindow *w = FindFocus(); + if (wxGetTopLevelParent(w) ==this) { + mLastFocusedWindow = w; + } +} + bool AudacityProject::IsActive() { return mActive; diff --git a/src/Project.h b/src/Project.h index e7e3d613e..6bda75f16 100644 --- a/src/Project.h +++ b/src/Project.h @@ -312,6 +312,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame, void OnUpdateUI(wxUpdateUIEvent & event); void OnActivate(wxActivateEvent & event); + void UpdateLastFocus(); void OnMouseEvent(wxMouseEvent & event); void OnIconize(wxIconizeEvent &event); void OnSize(wxSizeEvent & event); diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index fc9b28164..2a86720e9 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -178,7 +178,7 @@ public: #endif } - int FilterEvent(wxEvent& event) + int FilterEvent(wxEvent& event) override { // Quickly bail if this isn't something we want. wxEventType type = event.GetEventType(); From 03ec02008553f637a370d978184785fa24935a0b Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 11 May 2016 13:46:32 -0400 Subject: [PATCH 14/18] Revert "Help for debugging of some event handling" This reverts commit 9bfd66b06ca908efe9bd3adfd7f78cf143d18688. --- src/Menus.cpp | 8 -------- src/Project.cpp | 20 ++++++++------------ src/Project.h | 1 - src/commands/CommandManager.cpp | 2 +- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index 1e8902059..a7110fe45 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -2762,10 +2762,6 @@ void AudacityProject::NextFrame() default: break; } - - // This is not strictly needed, except when trying to debug focus changes themselves, - // and therefore the main window misses the deactivation event - UpdateLastFocus(); } void AudacityProject::PrevFrame() @@ -2795,10 +2791,6 @@ void AudacityProject::PrevFrame() default: break; } - - // This is not strictly needed, except when trying to debug focus changes themselves, - // and therefore the main window misses the deactivation event - UpdateLastFocus(); } void AudacityProject::NextWindow() diff --git a/src/Project.cpp b/src/Project.cpp index b6fbddb64..df65fc3c8 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -2147,8 +2147,14 @@ void AudacityProject::OnActivate(wxActivateEvent & event) // remember which child had the focus. Then, when we receive the // activate event, we restore that focus to the child or the track // panel if no child had the focus (which probably should never happen). - if (!mActive) - UpdateLastFocus(); + if (!mActive) { + // We only want to remember the last focused window if FindFocus() returns + // a window within the current project frame. + wxWindow *w = FindFocus(); + if (wxGetTopLevelParent(w) ==this) { + mLastFocusedWindow = w; + } + } else { SetActiveProject(this); if (mLastFocusedWindow) { @@ -2167,16 +2173,6 @@ void AudacityProject::OnActivate(wxActivateEvent & event) event.Skip(); } -void AudacityProject::UpdateLastFocus() -{ - // We only want to remember the last focused window if FindFocus() returns - // a window within the current project frame. - wxWindow *w = FindFocus(); - if (wxGetTopLevelParent(w) ==this) { - mLastFocusedWindow = w; - } -} - bool AudacityProject::IsActive() { return mActive; diff --git a/src/Project.h b/src/Project.h index 6bda75f16..e7e3d613e 100644 --- a/src/Project.h +++ b/src/Project.h @@ -312,7 +312,6 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame, void OnUpdateUI(wxUpdateUIEvent & event); void OnActivate(wxActivateEvent & event); - void UpdateLastFocus(); void OnMouseEvent(wxMouseEvent & event); void OnIconize(wxIconizeEvent &event); void OnSize(wxSizeEvent & event); diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index 2a86720e9..fc9b28164 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -178,7 +178,7 @@ public: #endif } - int FilterEvent(wxEvent& event) override + int FilterEvent(wxEvent& event) { // Quickly bail if this isn't something we want. wxEventType type = event.GetEventType(); From 9055681f11c68ee67bad2b1f08181d276dc2a9c4 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 11 May 2016 18:58:37 -0400 Subject: [PATCH 15/18] Right click on the scrub handle pops up the menu, during scrubbing too --- src/widgets/Ruler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index f7725f417..610576393 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -2382,7 +2382,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) auto &scrubber = mProject->GetScrubber(); if (scrubber.HasStartedScrubbing()) { - if (IsButton(zone)) + if (IsButton(zone) || evt.RightDown()) // Fall through to pushbutton handling ; else if (zone == StatusChoice::EnteringQP && From 737e24e24e0025fad91bea7a71ebf3bfbe2f9d38 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 11 May 2016 19:59:11 -0400 Subject: [PATCH 16/18] Allow pausing and unpausing of scrub. Just treat it differently internally. --- src/AudacityApp.h | 6 ++--- src/Menus.cpp | 7 +----- src/toolbars/ControlToolBar.cpp | 39 +++++++++++++++++++-------------- src/toolbars/ControlToolBar.h | 3 ++- src/tracks/ui/Scrubbing.cpp | 12 +++++----- src/tracks/ui/Scrubbing.h | 2 ++ 6 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/AudacityApp.h b/src/AudacityApp.h index 60ba23038..9f3906478 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -92,10 +92,10 @@ enum CommandFlag : unsigned long long IsRealtimeNotActiveFlag= 0x10000000, //lll CaptureNotBusyFlag = 0x20000000, CanStopAudioStreamFlag = 0x40000000, - AudioStreamNotScrubbingFlag - = 0x80000000ULL, // prl RulerHasFocus - = 0x100000000ULL, // prl + = 0x80000000ULL, // prl +// nextOneHas33BitsWow +// = 0x100000000ULL, // prl NoFlagsSpecifed = ~0ULL }; diff --git a/src/Menus.cpp b/src/Menus.cpp index a7110fe45..57c7e3af0 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -754,9 +754,7 @@ void AudacityProject::CreateMenusAndCommands() // Scrubbing sub-menu GetScrubber().AddMenuItems(); - c->AddItem(wxT("Pause"), _("&Pause"), FN(OnPause), wxT("P"), - c->GetDefaultFlags() | AudioStreamNotScrubbingFlag, - c->GetDefaultMask() | AudioStreamNotScrubbingFlag); + c->AddItem(wxT("Pause"), _("&Pause"), FN(OnPause), wxT("P")); c->AddItem(wxT("SkipStart"), _("S&kip to Start"), FN(OnSkipStart), wxT("Home"), AudioIONotBusyFlag, AudioIONotBusyFlag); c->AddItem(wxT("SkipEnd"), _("Skip to E&nd"), FN(OnSkipEnd), wxT("End"), @@ -1776,9 +1774,6 @@ CommandFlag AudacityProject::GetUpdateFlags() if (bar->ControlToolBar::CanStopAudioStream()) flags |= CanStopAudioStreamFlag; - if(!GetScrubber().HasStartedScrubbing()) - flags |= AudioStreamNotScrubbingFlag; - return flags; } diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 042c3de14..764cb757f 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -431,9 +431,7 @@ void ControlToolBar::EnableDisableButtons() mFF->SetEnabled(tracks && !playing && !recording); auto pProject = GetActiveProject(); - mPause->SetEnabled(CanStopAudioStream() && - !(pProject && - pProject->GetScrubber().HasStartedScrubbing())); + mPause->SetEnabled(CanStopAudioStream()); } void ControlToolBar::SetPlay(bool down, PlayAppearance appearance) @@ -479,7 +477,12 @@ void ControlToolBar::SetRecord(bool down, bool append) EnableDisableButtons(); } -bool ControlToolBar::IsRecordDown() +bool ControlToolBar::IsPauseDown() const +{ + return mPause->IsDown(); +} + +bool ControlToolBar::IsRecordDown() const { return mRecord->IsDown(); } @@ -1090,12 +1093,6 @@ void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt)) return; } -#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT - if (gAudioIO->IsScrubbing()) - // Pausing does not make sense. Force the button - // to pop up below. - mPaused = true; -#endif if(mPaused) { @@ -1108,7 +1105,15 @@ void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt)) mPaused=true; } - gAudioIO->SetPaused(mPaused); +#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT + if (gAudioIO->IsScrubbing()) + GetActiveProject()->GetScrubber().Pause(mPaused); + else +#endif + { + gAudioIO->SetPaused(mPaused); + } + UpdateStatusBar(GetActiveProject()); } @@ -1190,22 +1195,22 @@ int ControlToolBar::WidthForStatusBar(wxStatusBar* const sb) int xMax = 0; const auto pauseString = wxT(" ") + wxGetTranslation(mStatePause); - auto update = [&] (const wxString &state, bool pauseToo) { + auto update = [&] (const wxString &state) { int x, y; sb->GetTextExtent( - wxGetTranslation(state) + ( pauseToo ? pauseString : wxString{} ) + wxT("."), + wxGetTranslation(state) + pauseString + wxT("."), &x, &y ); xMax = std::max(x, xMax); }; - update(mStatePlay, true); - update(mStateStop, true); - update(mStateRecord, true); + update(mStatePlay); + update(mStateStop); + update(mStateRecord); // Note that Scrubbing + Paused is not allowed. for(const auto &state : Scrubber::GetAllUntranslatedStatusStrings()) - update(state, false); + update(state); return xMax + 30; // added constant needed because xMax isn't large enough for some reason, plus some space. } diff --git a/src/toolbars/ControlToolBar.h b/src/toolbars/ControlToolBar.h index c4244e0f5..989e3a168 100644 --- a/src/toolbars/ControlToolBar.h +++ b/src/toolbars/ControlToolBar.h @@ -70,7 +70,8 @@ class ControlToolBar final : public ToolBar { void SetStop(bool down); void SetRecord(bool down, bool append=false); - bool IsRecordDown(); + bool IsPauseDown() const; + bool IsRecordDown() const; // A project is only allowed to stop an audio stream that it owns. bool CanStopAudioStream (); diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 00893bbaa..b096fd967 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -210,9 +210,6 @@ void Scrubber::MarkScrubStart( ctb->SetPlay(true, ControlToolBar::PlayAppearance::Scrub); - // This disables the pause button. - ctb->EnableDisableButtons(); - ctb->UpdateStatusBar(mProject); mScrubStartPosition = xx; @@ -469,12 +466,17 @@ void Scrubber::HandleScrollWheel(int steps) } } +void Scrubber::Pause( bool paused ) +{ + mScrubHasFocus = !paused; +} + void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event) { if (event.GetActive()) - mScrubHasFocus = IsScrubbing(); + Pause(!IsScrubbing() || mProject->GetControlToolBar()->IsPauseDown()); else - mScrubHasFocus = false; + Pause(true); event.Skip(); } diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index 9a1a6d797..92e631929 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -85,6 +85,8 @@ public: // All possible status strings. static std::vector GetAllUntranslatedStatusStrings(); + void Pause(bool paused); + private: void DoScrub(bool scroll, bool seek); void OnActivateOrDeactivateApp(wxActivateEvent & event); From 6ab33f8fe5ac5f4cb7bfc3e92bc9f0f8bc9479ac Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 11 May 2016 22:54:55 -0400 Subject: [PATCH 17/18] Revert another piece of the navigation to ruler by arrow keys --- src/Project.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index df65fc3c8..5a4162592 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -2161,11 +2161,9 @@ void AudacityProject::OnActivate(wxActivateEvent & event) mLastFocusedWindow->SetFocus(); } else { - if (mTrackPanel->GetFocusedTrack()) { + if (mTrackPanel) { mTrackPanel->SetFocus(); } - else - mRuler->SetFocus(); } // No longer need to remember the last focused window mLastFocusedWindow = NULL; From 1bff08a75a65fd7cda8c4074840df6746d7cf1e6 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 12 May 2016 01:22:07 -0400 Subject: [PATCH 18/18] Make drag-scrub seek, rather than playing at more than unit speed --- src/tracks/ui/Scrubbing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index b096fd967..ee6ccb071 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -360,7 +360,7 @@ void Scrubber::ContinueScrubbing() const auto lastTime = gAudioIO->GetLastTimeInScrubQueue(); const auto delta = mLastScrubPosition - position.x; const double time = viewInfo.OffsetTimeByPixels(lastTime, delta); - result = gAudioIO->EnqueueScrubByPosition(time, mMaxScrubSpeed, false); + result = gAudioIO->EnqueueScrubByPosition(time, mMaxScrubSpeed, true); mLastScrubPosition = position.x; } else { @@ -667,7 +667,7 @@ Scrubber &ScrubbingOverlay::GetScrubber() bool Scrubber::PollIsSeeking() { - return !mDragging && (mAlwaysSeeking || ::wxGetMouseState().LeftIsDown()); + return mDragging || (mAlwaysSeeking || ::wxGetMouseState().LeftIsDown()); } void Scrubber::DoScrub(bool scroll, bool seek)