Paul Licameli
bc2eda2ac8
Remove another unnecessary #include
2019-06-18 16:00:23 -04:00
Henric Jungheim
9a02e93604
Add AUDACITY_DLL_API to CommonCommandFlags.h
2019-06-18 16:00:18 -04:00
Paul Licameli
1594fc0cb1
Remove some unncessary #include directives
2019-06-18 14:33:38 -04:00
Paul Licameli
4c5b65d7f6
Move some constants and GetVRulerOffset() out of TrackPanel.h
2019-06-18 11:36:50 -04:00
Paul Licameli
98f322d685
Move writing and reading of common Track fields into functions...
...
... also now writing selected state of TimeTrack as for other tracks, fixing
an omission, with no harm to forward compatibility
2019-06-18 11:36:50 -04:00
Paul Licameli
2b2d13d5be
TimeShiftHandle.h doesn't need Track.h
2019-06-18 11:36:50 -04:00
Steve Daulton
722cb67baf
Fix bug 2132
...
Selected audio tracks should be NOT empty. The test for Note Tracks is
incorrect - Note tracks are NOT audio - but this needs fixing elsewhere.
2019-06-18 12:22:39 +01:00
Paul Licameli
d84ab5948d
Reduce dependencies of Menus, CommandManager, ToolManager...
...
... so that they and a few others will be in a small s.c.c. that breaks off
the big one -- when the dependencies of Track and its subclasses on TrackPanel
are severed.
2019-06-16 01:24:30 -04:00
Paul Licameli
e1908ab8e2
ToolManager does not depend on ProjectWindow
2019-06-16 01:24:29 -04:00
Paul Licameli
0b897c81b0
ToolManager.cpp does not depend on Meter
2019-06-16 01:24:29 -04:00
Paul Licameli
b84f5b66f0
CommandManager.cpp does not depend on EffectManager...
...
... some code lifted into BatchCommands.cpp to realize this.
It also doesn't depend on PluginManager, but that is not important for breaking
cycles.
2019-06-16 01:24:29 -04:00
Paul Licameli
c506536912
Menus.cpp does not depend directly on ProjectWindow
2019-06-16 01:24:29 -04:00
Paul Licameli
3d71edca52
Testing of conditions to enable menu commands is table driven...
...
... allowing the registered test functions to live in other files that
Menus.cpp does not depend on.
2019-06-16 01:21:06 -04:00
Paul Licameli
c0adb35839
Command flag functions out of Menus.cpp, reducing its dependencies...
...
... Mostly into CommonCommandFlags.cpp, but some elsewhere, to avoid giving
that new file problematic dependencies on LabelTrack, ControlToolBar, and
EffectManager.
Note that CutCopyAvailableFlag is critically ordered, for message purposes,
only with AudioIONotAvailableFlag, the only flag with a message that it combines
with in menu item definitions.
The dependency on LabelTrack.cpp might not be a bad one later, if the track and
its view can be separated, and that would allow CutCopyAvailableFlag to be
put with the others. But much other work on LabelTrack must happen first.
2019-06-16 01:21:05 -04:00
Paul Licameli
45436db166
New files for CommonCommandFlags
2019-06-16 01:21:05 -04:00
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