Commit Graph

23 Commits

Author SHA1 Message Date
Paul Licameli
8792e08bb9 MessageForScreenReader takes TranslatableString 2019-12-23 19:22:06 -05:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
25f4d6cf8b TrackPanelAx does not depend on TrackPanel...
... TrackPanelAx now sends an event to the project when track focus changes,
and TrackPanel listens for it.

TrackPanel also initializes TrackPanelAx with a callback to do the details of
rectangle calculation.
2019-06-25 11:24:40 -04:00
Paul Licameli
ed29ab89f8 Many WindowAccessible subclasses moved out of header files 2019-03-31 13:27:18 -04:00
Paul Licameli
2587a4adba Remove wx/panel.h from headers 2019-03-30 12:26:59 -04:00
Paul Licameli
bcc2e0d13b Remove wx/frame.h, wx/sizer.h, wx/access.h from headers 2019-03-28 11:21:15 -04:00
Paul Licameli
b1ce24c087 Remove wx/window.h from headers 2019-03-27 14:43:06 -04:00
Paul Licameli
a915a510bd include <wx/setup.h> in all files where wxUSE* macros are used...
... even if it's redundant; improving on what was done at b47e2f9
2019-03-23 14:56:02 -04:00
Paul Licameli
b47e2f91e2 Make header dependencies for wxUSE_ACCESSIBILITY explicit 2019-03-18 12:14:16 -04:00
Paul Licameli
43899da80d Remove some nested #include from TrackPanelAx.h 2019-03-17 15:05:24 -04:00
Paul Licameli
a5c50a112a more const in drawing functions 2018-09-13 13:53:58 -04:00
David Bailes
8b87e18c6d Accessibility: clean up track focus events after an effect is applied.
Problem. When an effect is applied, whatever track is the original focus, there is a focus event for track one. This causes NVDA to read out the track name of track 1, which is unnecessary noise.
The reason for this is that the execution of the Progress dialog destructor causes AudacityProject::OnActivate() to be called which causes a set focus on the TrackPanel. When this happens, the pointers to the selected tracks have changed, but the final focus has not been set (at the end of AudacityProject::DoEffect()). So TrackPanelAx::GetFocus returns the first track.

Fix: Modify TrackPanelAx::GetFocus so that if the existing pointer to the focused track is null, then use the track at the same position, if it exists.
2018-06-26 09:13:29 +01:00
David Bailes
f027708fe1 Fix an issue caused by the accessibility changes in wxWidgets 3.1.1
The main change in wx accessibility is this:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)

However wxWindowAccessible has not been updated to take into account of that change. In particular wxWindowAccessible::GetParent() was always wrong, but it was consistent with the rest of the framework. Now it's wrong and inconsistent. This function should return an object with role window, and which has the same name.

The fix is to introduce class WindowAccessible, which is effectively our own version of wxWindowAccessible. This class does not override GetParent(), and so just relies on a standard accessible object to to the right thing in wxIAccessible::get_accParent() (which is does). This class also allows us to have our own version of GetName(), which allows us to set the accessibility names of buttons.

These changes will break the accessibility of Audacity if it is built with wxWidgets 3.0.X. If this is a problem, then there could be some #if stuff in WindowAccessible.h to turn the WindowAccessible class into one which simply inherits from wxWindowAccessible, and doesn't override anything.
2018-04-03 14:57:59 +01:00
David Bailes
59d1ca46df TrackPanelAx: add Select function
Added an override for Select. This enables NVDA to move the focus to the current navigator object, and Jaws to move the focus to the current element when using the touch cursor.

For info on accSelect:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318474(v=vs.85).aspx
2018-03-12 13:47:27 +00:00
David Bailes
0c2c956893 TrackPanelAx: add Navigate function for NVDA object navigation
accNavigate is deprecated, but NVDA uses it for object navigation. (Jaws and narrator do not).
So add Navigate function to TrackPanelAx.

Info on accNavigate:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318473(v=vs.85).aspx
2018-03-12 08:55:30 +00:00
Paul Licameli
050824f467 Remove some unnecessary #includes 2017-07-12 14:15:16 -04:00
Paul Licameli
321919301e Use weak_ptr to remember focused track, don't ask for trouble 2017-06-25 13:35:15 -04:00
Paul Licameli
251976d93d TrackPanel no longer implements the time shift tool...
... also implement ESC key for it
2017-06-15 08:21:01 -04:00
David Bailes
ff9763f984 Add two commands to move the cursor/selection to next/prev label
The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.

A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.

If the commands are used during playback of the project, playback continues from the new cursor/selection.

The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
2016-10-24 14:24:20 +01:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00