Commit Graph

76 Commits

Author SHA1 Message Date
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
Leland Lucius
ffa4701247 Bug 2402 - Mac: Zoomed in, timeline still zoomed out. 2020-04-29 12:03:31 -05:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli
d0a99d5ae5 Each toolbar registers its menu item 2020-02-14 14:51:11 -05:00
Paul Licameli
c682718ee4 TranslatableString for toolbar button labels 2019-12-23 15:35:47 -05:00
Paul Licameli
54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli
681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
Paul Licameli
72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00
Paul Licameli
e4a7c9ba5b Uses of TranslatableString as value of XO macro...
... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
2019-12-01 18:05:20 -05: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
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
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
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
ef8c100cee MenuManager holds a back-reference to project; simplifies calls 2019-06-12 11:08:50 -04:00
Paul Licameli
0b85251885 Fewer inclusions of AudioIO.h and Import.h 2019-06-06 12:53:20 -04:00
Paul Licameli
0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli
4ba4d0978b static CommandManager::Get()...
... not member functions of AudacityProject
2019-05-23 13:17:29 -04:00
Paul Licameli
62899a32f4 All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
2019-05-20 21:38:13 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
2b32884596 Remove some unnecessary toolbar related declarations, fix comments 2019-04-23 17:02:04 -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
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
Paul Licameli
9b7ccc4dff Use TranslatedInternalString for tips of toolbar buttons 2018-03-15 20:13:19 -04:00
James Crook
fa49d94530 Script work
Add Envelope script
Add Clips and Boundaries Scripts.
Add docimages_oddments.py for the weirder cases.
Add make html script.
Add more spectral images
Add Dark versions of spectrograms (paul's comment)
Clean up oddments script.

- This commit also adds an option NOT to bring Audacity to the top when screenshotting.
-- That's because QuickPlay will disappear if you do -because you lose mouse capture.
- Also allow negative window IDs in the drag command.

- Registration names of align commands sorted.  They had &, : and / in them.
- Fixed bug in SetTrackInfo where bFocused was being ignored
- Fixed bug where command manager ignored multi-commands.
- Commit docimages_oddments.py again, to fix line endings.
2018-02-24 14:20:29 -05:00
James Crook
1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
Paul Licameli
aa72cae61b Follow wxWidgets argument conventions for other window factories 2018-02-21 19:21:05 -05:00
Paul Licameli
9dd5b521ea Make the experimental effects rack window compilable and usable...
... though there remain crash bugs to figure out, turning it on and off
during play.
2018-02-21 19:20:54 -05:00
James Crook
c0fceb3b66 Wording changes.
- Losing a ':' on a toolbar
- Clarity that we are fitting project/selection to width, not height.
2018-01-17 11:15:32 +00:00
James Crook
5da84b74ae Zooming Tweaks (for repair work) and Wording changes.
Repair work involves lots of zooming in and out, to use the repair effect on up to 128 samples.
Ctrl Mouse-Wheel zooming now will zoom to ends of selection, if available, or mouse position otherwise.
Zoom-Toggle hyphen removed and Preset2 changed.
Button tooltips tweaked to match menu entries.
2018-01-10 12:00:27 +00:00
Paul Licameli
6967925e48 Redo CommandManager::DescribeCommandsAndShortcuts with pairs...
... Later we may make other types for the members of that pair.
2018-01-08 14:14:22 -05:00
James Crook
21192a7e7b ZoomToggle - Changes from user feedback.
- Enable ZoomToggle Button by default.
- Set less extreme defaults.
- Repurpose 'Z' shortcut (from Zero Crossings)
2018-01-08 12:51:16 +00:00
James Crook
0cc9c6bc3b Zoom Toggle
Added preferences for Zoom-Toggle and put into menus.
New helper functions for determining zoom scaling.

Optional EXPERIMENTAL_ZOOM_TOGGLE_BUTTON added, and Light theme updated.
Not enabled for 2.2.2.
2018-01-07 17:14:33 +00:00
James Crook
41ac4cd47a Add Hover-Over-Down State for Button
Previously hovering over a down button made no difference.
Also tweaked the appearance of hover-over thumbs on dark theme sliders.
Also tweaked hover images and colours generally.

Classic retains the old style.
Hi Contrast does not distinguish between hover-up and hover-down.
2017-12-14 14:39:56 +00:00
Henric Jungheim
88dfb5d7a2 Avoid false warning about uninitialized pointer. 2017-07-12 21:01:15 +01:00
James Crook
adc7312954 Auto-Select off by default.
I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
2017-06-09 19:40:28 +01:00
James Crook
6e440056f9 Cleaner code to pop non toggle buttons up. 2017-04-09 19:07:28 +01:00
James Crook
b3d6186cf9 Bug 1629 - Edit Toolbar buttons work once only. 2017-04-08 22:26:06 +01:00
James Crook
ae95bc6cce Remove Sync-Lock Button
Feature is still available from Tracks menus.
2017-04-07 21:34:33 +01:00
James Crook
c17a7f535e Improve repainting after a theme change.
Now most things repaint properly after a theme change.  The sliders on the tracks don't yet.
2017-04-04 14:43:47 +01:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Paul Licameli
40aa70a255 Exception safety for Edit toolbar button presses 2017-03-21 14:11:21 -04:00
Steve Daulton
0364f8e894 Additional fix for bug 1536
Check project exists before call to Command Manager
2016-11-02 18:16:35 +00:00
Steve Daulton
d39dbc4162 Fix bug 1536
The Edit buttons now enable/disable whenever their Menu counterparts
are enabled/disabled, but there are residual issues due to incorrect
behavior in "Select all if none selected" (noted in comments).
2016-10-27 16:12:31 +01:00