mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 15:50:05 +02:00
Don't include CommandManager.h in other headers
This commit is contained in:
parent
8f5629a2a6
commit
16ab48079b
@ -42,6 +42,7 @@ AliasedFile s.
|
|||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/hashmap.h>
|
#include <wx/hashmap.h>
|
||||||
|
#include <wx/menu.h>
|
||||||
#include <wx/progdlg.h>
|
#include <wx/progdlg.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/clipbrd.h>
|
#include <wx/clipbrd.h>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "Internat.h"
|
#include "Internat.h"
|
||||||
#include "Project.h" // for GetActiveProject
|
#include "Project.h" // for GetActiveProject
|
||||||
#include "LabelTrack.h"
|
#include "LabelTrack.h"
|
||||||
|
#include "commands/CommandManager.h"
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(HighlightTextCtrl, wxTextCtrl)
|
BEGIN_EVENT_TABLE(HighlightTextCtrl, wxTextCtrl)
|
||||||
|
@ -68,6 +68,7 @@ menu items.
|
|||||||
#include "Dependencies.h"
|
#include "Dependencies.h"
|
||||||
#include "float_cast.h"
|
#include "float_cast.h"
|
||||||
#include "LabelTrack.h"
|
#include "LabelTrack.h"
|
||||||
|
#include "commands/CommandManager.h"
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
#include "import/ImportMIDI.h"
|
#include "import/ImportMIDI.h"
|
||||||
#endif // USE_MIDI
|
#endif // USE_MIDI
|
||||||
@ -849,7 +850,7 @@ void MenuCreator::CreateMenusAndCommands(AudacityProject &project)
|
|||||||
// // to show the Redo's on stack.
|
// // to show the Redo's on stack.
|
||||||
// // "UndoHistory" might already be enabled, but add this check for RedoAvailableFlag.
|
// // "UndoHistory" might already be enabled, but add this check for RedoAvailableFlag.
|
||||||
// if (flags & RedoAvailableFlag)
|
// if (flags & RedoAvailableFlag)
|
||||||
// mCommandManager.Enable(wxT("UndoHistory"), true);
|
// GetCommandManager()->Enable(wxT("UndoHistory"), true);
|
||||||
// So for now, enable the command regardless of stack. It will just show empty sometimes.
|
// So for now, enable the command regardless of stack. It will just show empty sometimes.
|
||||||
// FOR REDESIGN, clearly there are some limitations with the flags/mask bitmaps.
|
// FOR REDESIGN, clearly there are some limitations with the flags/mask bitmaps.
|
||||||
|
|
||||||
@ -2641,8 +2642,8 @@ void MenuManager::UpdateMenus(AudacityProject &project, bool checkActive)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (flags & CutCopyAvailableFlag) {
|
if (flags & CutCopyAvailableFlag) {
|
||||||
mCommandManager.Enable(wxT("Copy"), true);
|
GetCommandManager()->Enable(wxT("Copy"), true);
|
||||||
mCommandManager.Enable(wxT("Cut"), true);
|
GetCommandManager()->Enable(wxT("Cut"), true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "../images/AudacityLogo48x48.xpm"
|
#include "../images/AudacityLogo48x48.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "commands/CommandManager.h"
|
||||||
|
|
||||||
// class MixerTrackSlider
|
// class MixerTrackSlider
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ scroll information. It also has some status flags.
|
|||||||
#include "TrackPanel.h"
|
#include "TrackPanel.h"
|
||||||
#include "WaveTrack.h"
|
#include "WaveTrack.h"
|
||||||
#include "DirManager.h"
|
#include "DirManager.h"
|
||||||
|
#include "commands/CommandManager.h"
|
||||||
#include "effects/Effect.h"
|
#include "effects/Effect.h"
|
||||||
#include "prefs/PrefsDialog.h"
|
#include "prefs/PrefsDialog.h"
|
||||||
#include "widgets/LinkingHtmlWindow.h"
|
#include "widgets/LinkingHtmlWindow.h"
|
||||||
@ -939,6 +940,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
|||||||
NumericConverter::BANDWIDTH,
|
NumericConverter::BANDWIDTH,
|
||||||
gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT("")) ) ),
|
gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT("")) ) ),
|
||||||
mUndoManager(std::make_unique<UndoManager>())
|
mUndoManager(std::make_unique<UndoManager>())
|
||||||
|
, mCommandManager( std::make_unique<CommandManager>() )
|
||||||
{
|
{
|
||||||
if (!gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, AudioIO::GetOptimalSupportedSampleRate())) {
|
if (!gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, AudioIO::GetOptimalSupportedSampleRate())) {
|
||||||
// The default given above can vary with host/devices. So unless there is an entry for
|
// The default given above can vary with host/devices. So unless there is an entry for
|
||||||
@ -1570,7 +1572,7 @@ void AudacityProject::AS_SetSnapTo(int snap)
|
|||||||
mSnapTo = snap;
|
mSnapTo = snap;
|
||||||
|
|
||||||
// LLL: TODO - what should this be changed to???
|
// LLL: TODO - what should this be changed to???
|
||||||
// mCommandManager.Check(wxT("Snap"), mSnapTo);
|
// GetCommandManager()->Check(wxT("Snap"), mSnapTo);
|
||||||
gPrefs->Write(wxT("/SnapTo"), mSnapTo);
|
gPrefs->Write(wxT("/SnapTo"), mSnapTo);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
|
|
||||||
@ -2358,7 +2360,7 @@ void AudacityProject::OnMenu(wxCommandEvent & event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
bool handled = mCommandManager.HandleMenuID(
|
bool handled = GetCommandManager()->HandleMenuID(
|
||||||
event.GetId(), GetMenuManager(*this).GetUpdateFlags(*this),
|
event.GetId(), GetMenuManager(*this).GetUpdateFlags(*this),
|
||||||
NoFlagsSpecified);
|
NoFlagsSpecified);
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "ViewInfo.h"
|
#include "ViewInfo.h"
|
||||||
#include "TrackPanelListener.h"
|
#include "TrackPanelListener.h"
|
||||||
#include "AudioIOListener.h"
|
#include "AudioIOListener.h"
|
||||||
#include "commands/CommandManager.h"
|
|
||||||
#include "effects/EffectManager.h"
|
#include "effects/EffectManager.h"
|
||||||
#include "xml/XMLTagHandler.h"
|
#include "xml/XMLTagHandler.h"
|
||||||
#include "toolbars/SelectionBarListener.h"
|
#include "toolbars/SelectionBarListener.h"
|
||||||
@ -170,8 +169,6 @@ class WaveTrack;
|
|||||||
#include "./commands/CommandFlag.h"
|
#include "./commands/CommandFlag.h"
|
||||||
#include "../include/audacity/EffectInterface.h"
|
#include "../include/audacity/EffectInterface.h"
|
||||||
|
|
||||||
#include "./commands/CommandManager.h"
|
|
||||||
|
|
||||||
class MenuCommandHandler;
|
class MenuCommandHandler;
|
||||||
class MenuManager;
|
class MenuManager;
|
||||||
|
|
||||||
@ -347,8 +344,10 @@ public:
|
|||||||
// Converts number of minutes to human readable format
|
// Converts number of minutes to human readable format
|
||||||
wxString GetHoursMinsString(int iMinutes);
|
wxString GetHoursMinsString(int iMinutes);
|
||||||
|
|
||||||
CommandManager *GetCommandManager() { return &mCommandManager; }
|
CommandManager *GetCommandManager()
|
||||||
const CommandManager *GetCommandManager() const { return &mCommandManager; }
|
{ return mCommandManager.get(); }
|
||||||
|
const CommandManager *GetCommandManager() const
|
||||||
|
{ return mCommandManager.get(); }
|
||||||
|
|
||||||
// Keyboard capture
|
// Keyboard capture
|
||||||
static bool HasKeyboardCapture(const wxWindow *handler);
|
static bool HasKeyboardCapture(const wxWindow *handler);
|
||||||
@ -653,7 +652,7 @@ private:
|
|||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
|
|
||||||
CommandManager mCommandManager;
|
std::unique_ptr<CommandManager> mCommandManager;
|
||||||
|
|
||||||
// Window elements
|
// Window elements
|
||||||
|
|
||||||
|
@ -69,7 +69,6 @@ preferences.
|
|||||||
//#include "Project.h"
|
//#include "Project.h"
|
||||||
#include "Shuttle.h"
|
#include "Shuttle.h"
|
||||||
#include "WrappedType.h"
|
#include "WrappedType.h"
|
||||||
//#include "commands/CommandManager.h"
|
|
||||||
//#include "effects/Effect.h"
|
//#include "effects/Effect.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ small calculations of rectangles.
|
|||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
#include "CommandContext.h"
|
#include "CommandContext.h"
|
||||||
|
#include "CommandManager.h"
|
||||||
|
|
||||||
|
|
||||||
static const IdentInterfaceSymbol
|
static const IdentInterfaceSymbol
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
|
class CommandManager;
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
@ -25,7 +26,6 @@ class ShuttleGui;
|
|||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
|
|
||||||
#include "../commands/CommandManager.h"
|
|
||||||
#include "../widgets/KeyView.h"
|
#include "../widgets/KeyView.h"
|
||||||
|
|
||||||
#include "PrefsPanel.h"
|
#include "PrefsPanel.h"
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
#include "../commands/CommandContext.h"
|
#include "../commands/CommandContext.h"
|
||||||
|
#include "../commands/CommandManager.h"
|
||||||
|
|
||||||
IMPLEMENT_CLASS(EditToolBar, ToolBar);
|
IMPLEMENT_CLASS(EditToolBar, ToolBar);
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ in which buttons can be placed.
|
|||||||
#include "../Project.h"
|
#include "../Project.h"
|
||||||
#include "../Theme.h"
|
#include "../Theme.h"
|
||||||
#include "../commands/Keyboard.h"
|
#include "../commands/Keyboard.h"
|
||||||
|
#include "../commands/CommandManager.h"
|
||||||
#include "../widgets/AButton.h"
|
#include "../widgets/AButton.h"
|
||||||
#include "../widgets/Grabber.h"
|
#include "../widgets/Grabber.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
|
@ -33,6 +33,8 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
#include "../../widgets/Ruler.h"
|
#include "../../widgets/Ruler.h"
|
||||||
#include "../../commands/CommandFunctors.h"
|
#include "../../commands/CommandFunctors.h"
|
||||||
#include "../../commands/CommandContext.h"
|
#include "../../commands/CommandContext.h"
|
||||||
|
#include "../../commands/CommandManager.h"
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
#include "../../TrackPanelMouseEvent.h"
|
#include "../../TrackPanelMouseEvent.h"
|
||||||
#include "../../ViewInfo.h"
|
#include "../../ViewInfo.h"
|
||||||
#include "../../WaveTrack.h"
|
#include "../../WaveTrack.h"
|
||||||
|
#include "../../commands/CommandManager.h"
|
||||||
#include "../../commands/Keyboard.h"
|
#include "../../commands/Keyboard.h"
|
||||||
#include "../../ondemand/ODManager.h"
|
#include "../../ondemand/ODManager.h"
|
||||||
#include "../../prefs/SpectrogramSettings.h"
|
#include "../../prefs/SpectrogramSettings.h"
|
||||||
|
@ -16,6 +16,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
#include "../../RefreshCode.h"
|
#include "../../RefreshCode.h"
|
||||||
#include "../../Track.h"
|
#include "../../Track.h"
|
||||||
#include "../../TrackPanel.h"
|
#include "../../TrackPanel.h"
|
||||||
|
#include "../../commands/CommandManager.h"
|
||||||
|
|
||||||
MinimizeButtonHandle::MinimizeButtonHandle
|
MinimizeButtonHandle::MinimizeButtonHandle
|
||||||
( const std::shared_ptr<Track> &pTrack, const wxRect &rect )
|
( const std::shared_ptr<Track> &pTrack, const wxRect &rect )
|
||||||
|
@ -23,6 +23,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
#include <wx/textdlg.h>
|
#include <wx/textdlg.h>
|
||||||
#include "../../commands/CommandType.h"
|
#include "../../commands/CommandType.h"
|
||||||
#include "../../commands/Command.h"
|
#include "../../commands/Command.h"
|
||||||
|
#include "../../commands/CommandManager.h"
|
||||||
#include "../../ShuttleGui.h"
|
#include "../../ShuttleGui.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/vlbox.h>
|
#include <wx/vlbox.h>
|
||||||
|
|
||||||
|
#include "../commands/Keyboard.h"
|
||||||
|
|
||||||
// Class holding all information about a node. Rather than a real tree
|
// Class holding all information about a node. Rather than a real tree
|
||||||
// we store these in an array and simulate a tree.
|
// we store these in an array and simulate a tree.
|
||||||
class KeyNode
|
class KeyNode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user