Paul Licameli
1b329b0e36
Error messages for disallowed commands are table-driven too
2019-06-16 01:21:05 -04:00
Paul Licameli
b09a1af564
Separate the flags mentioned in TellUserWhyDisallowed
2019-06-16 01:21:04 -04:00
Paul Licameli
f9b0281b47
Move TellUserWhyDisallowed into MenuManager...
...
... so we don't have MenuManager calling CommandManager which calls it back.
2019-06-16 01:21:04 -04:00
Paul Licameli
76996bf0cd
TryToMakeActionAllowed is also table driven...
...
... and also the logic for relaxing the conditions for enabling the menu items
2019-06-16 01:21:02 -04:00
Paul Licameli
9a4c18255e
Eliminate type alias CommandMask
2019-06-14 10:12:45 -04:00
Paul Licameli
6c6d0b869e
So we prove that MissingFlags was always reassigned zero...
...
... so remove this piece of confused logic that did nothing
2019-06-14 10:12:45 -04:00
Paul Licameli
94d9593df8
3rd arg of TryToMakeActionAllows always == 2nd; eliminate it
2019-06-14 10:12:45 -04:00
Paul Licameli
e5a786c420
4th arg of ReportIfActionNotAllowed always == 3rd; eliminate it
2019-06-14 10:12:45 -04:00
Paul Licameli
ca5259712c
HandleCommandEntry's 3rd parameter was two-valued, make it bool...
...
... false when it was NoFlagsSpecified, true when it was AlwaysEnabledFlag
2019-06-14 10:12:45 -04:00
Paul Licameli
0f2278d394
Eliminate the confusing mask from CommandManager entries...
...
... In fact it was only ever different from flags when flags had the special
NoAutoSelect and mask did not. Now put that bit in the mask too, and make
the special NoAutoSelect always true in MenuManager::GetUpdateFlags(). This
still preserves the intended effects of NoAutoSelect.
2019-06-14 10:12:45 -04:00
Paul Licameli
64650b9a55
Third argument of EnableUsingFlags was always all-ones; eliminate it
2019-06-14 10:12:45 -04:00
Paul Licameli
a34f1cbba5
Reimplement the rejection of select-all-on-none for certain commands...
...
... Specify it in the menu descriptions. Don't put special ad hoc logic
in Menus.cpp.
2019-06-14 10:12:44 -04:00
Paul Licameli
3847b66638
MenuManager::GetUpdateFlags is now table-driven
2019-06-14 10:12:00 -04:00
Paul Licameli
82ea023843
Distinguish the quick-to-compute command flags
2019-06-14 10:11:58 -04:00
Paul Licameli
705b4b28e7
Register a predicate with each CommandFlag bit
2019-06-14 00:31:15 -04:00
Paul Licameli
36e3a03c7f
Redo CommandFlags as std::bitset, allow registration of values
2019-06-14 00:31:15 -04:00
Paul Licameli
1f763984c9
Remove unused command flags
2019-06-14 00:31:15 -04:00
Paul Licameli
6c860229e8
Free two more toolbars and one other file from cycles to high levels
2019-06-14 00:29:43 -04:00
Paul Licameli
352380d58f
Scrubbing.cpp does not depend on TranscriptionToolBar...
...
... Freeing the latter from cycles, and also VoiceKey.
As with ToolsToolBar, use low-level ProjectSettings as the chalkboard for
sending a message.
2019-06-14 00:27:31 -04:00
Paul Licameli
1884eb8619
Fix #include
2019-06-13 10:21:51 -04:00
Paul Licameli
2f18c624f8
ToolsToolBar.cpp is free from cycles...
...
... Use ProjectSettings instead to communicate just an integer to the rest of
the program.
2019-06-13 10:13:09 -04:00
Paul Licameli
4cc35b145b
Comment out #includes only needed for exprimental drawing...
...
... The extra highlightings for mouseover that aren't yet used.
This lets three files escape cycles to high levels:
CutlineHandle
SampleHandle
TimeShiftHandle
But EnvelopeHandle is still in cycles.
2019-06-12 22:22:22 -04:00
Paul Licameli
ee32c77f81
Toolbar related changes, and 6 files freed from big s.c.c. leaving 64
2019-06-12 21:25:04 -04:00
Paul Licameli
f0ae4c3858
ProjectWindow does not depend on selection toolbars...
...
... Freeing SelectionBar and SpectralSelectionBar from cycles.
Also fixing a minor problem: if two projects are open, and one is playing or
recording, and you switch windows -- then the audio time in the selection bar
of the other project could be updated.
2019-06-12 21:02:11 -04:00
Paul Licameli
c6f24d864b
Construct all toolbars with back-reference to the project...
...
... and eliminate many uses of GetActiveProject
2019-06-12 20:52:36 -04:00
Paul Licameli
5751ddba4f
ControlToolBar.cpp doesn't depend directly on TranscriptionToolBar...
...
... TranscriptionToolBar updates its own button, doesn't need a push from the
ControlToolBar
2019-06-12 20:49:21 -04:00
Paul Licameli
f179de7a82
Fix #include
2019-06-12 19:56:19 -04:00
Paul Licameli
e6d7a72a73
Registration of toolbar factory functions...
...
... reduces direct dependencies of ToolManager.cpp.
This frees four files from cycles:
DeviceToolBar
EditToolBar
MeterToolBar
MixerToolBar
Leaving 66 files still in the big s.c.c.
2019-06-12 16:01:53 -04:00
Paul Licameli
0a29afb933
Remove some unnecessary #include directives
2019-06-12 15:13:58 -04:00
Paul Licameli
9fde5a9812
Fewer direct dependencies for Track and ProjectHistory...
...
... though no cycles are broken yet
2019-06-12 11:21:02 -04:00
Paul Licameli
291bd7258f
Track.cpp does not depend directly on its subclasses
2019-06-12 11:14:19 -04:00
Paul Licameli
98960c4fc3
Track.cpp does not depend directly on AudioIO
2019-06-12 11:14:19 -04:00
Paul Licameli
d85b297ca5
TrackPanel listens for Undo events, doesn't intrude in ProjectHistory
2019-06-12 11:11:41 -04:00
Paul Licameli
d1a1b112ba
ProjectHistory does not depend on ViewMenus ...
...
... Remove the last dependency by making the special vertical zoom fit on undo
push an event callback
2019-06-12 11:08:50 -04:00
Paul Licameli
e2c6720436
MenuManager listens for undo events, intrudes less in other code
2019-06-12 11:08:50 -04:00
Paul Licameli
5eaf0a649b
ProjectWindow listens for undo events, intrudes less in other code
2019-06-12 11:08:50 -04:00
Paul Licameli
e17fc86c23
Distinguish another undo event type
2019-06-12 11:08:50 -04:00
Paul Licameli
06c9896498
Send Undo events through the project, not the UndoManager
2019-06-12 11:08:50 -04:00
Paul Licameli
ef8c100cee
MenuManager holds a back-reference to project; simplifies calls
2019-06-12 11:08:50 -04:00
Paul Licameli
b7386c2db1
Use idle events to update TrackPanel cursor...
...
... As when recording starts or stops, or the Tools button has changed, or
scrolling has changed the results of hit-test.
This reduces TrackPanel's intrusions into other code, including ProjectHistory.
Also for AdornedRulerPanel, which shares the base class CellularPanel
2019-06-12 11:05:55 -04:00
Paul Licameli
702199f9d9
Remove an uncompiled source file mistakenly added at 4f940c8
2019-06-11 19:43:35 -04:00
Henric Jungheim
f320612f10
Fix comment typo.
2019-06-11 08:07:19 -07:00
Henric Jungheim
7fbbdb5c5c
Add AUDACITY_DLL_API to class AudioIOBase.
...
Derived classes use it, so the base class needs it to.
This is needed to get mod-nyq-bench to link.
2019-06-11 08:07:14 -07:00
David Bailes
2c2cf587b4
Bug 496 - NumericTextCtrls shouldn't accept numbers when any modifier keys are pressed
...
Problem:
NumericTextCtrls act on numeric keys, even when modifier keys are pressed.
This shouldn't be the case, and has the knock on effect that shortcuts like ctrl + 1, don't work when a NumericTextCtrl is the focus.
Fix:
Check that there are no modifier keys pressed.
2019-06-11 14:38:34 +01:00
Paul Licameli
6b5161f9d9
NoteTrackVZoomHandle.cpp compilable with WaveTrack.h ...
...
... which it doesn't actually include, except with precompiled headers in
the Windows build
2019-06-11 03:44:28 -04:00
Paul Licameli
94f6f8d2ad
Fix Linux build
2019-06-10 22:28:28 -04:00
Paul Licameli
7708453947
Fix #include directive
2019-06-10 22:12:44 -04:00
Paul Licameli
1a0d0c651b
Various cycle-busting shrinks the big s.c.c. from 102 files to 70
2019-06-10 22:03:02 -04:00
Paul Licameli
1f4bf262b1
Demote vertical zooming code into WaveTrack.cpp ...
...
... Freeing WaveTrackVRulerControls and WaveTrackVZoomHandle from the big
s.c.c., to higher levels, though still in a cycle of two
2019-06-10 21:56:46 -04:00
Paul Licameli
e969315c90
Free TrackControls and TrackSelectHandle from cycles, to high levels
2019-06-10 21:56:46 -04:00