Audacity 3.2.0
RealtimeEffectPanel.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file RealtimeEffectPanel.cpp
6
7 @author Vitaly Sverchinsky
8
9**********************************************************************/
10
11#pragma once
12
13#include <memory>
14#include <wx/scrolwin.h>
15#include <wx/weakref.h>
16#include <wx/splitter.h>
17
18#include "ThemedWrappers.h"
19#include "Observer.h"
20
21class SampleTrack;
22
23class wxButton;
24class wxStaticText;
25class wxBitmapButton;
26
28class AudacityProject;
29
35class RealtimeEffectPanel : public wxSplitterWindow
36{
39 wxStaticText* mTrackTitle {nullptr};
40 wxWindow* mTrackEffectsPanel{nullptr};
41 wxWindow* mProjectEffectsPanel{nullptr};
44 wxWindow* mTrackEffectsHeader{nullptr};
46
47 std::weak_ptr<SampleTrack> mCurrentTrack;
48
52
53 std::vector<std::shared_ptr<SampleTrack>> mPotentiallyRemovedTracks;
54
55 // RealtimeEffectPanel is wrapped using ThemedWindowWrapper,
56 // so we cannot subscribe to Prefs directly
58 std::unique_ptr<PrefsListenerHelper> mPrefsListenerHelper;
59
60public:
62 static const RealtimeEffectPanel &Get(const AudacityProject &project);
63
65 AudacityProject& project, wxWindow* parent,
66 wxWindowID id,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxDefaultSize,
69 long style = 0,
70 const wxString& name = wxPanelNameStr);
71
72 ~RealtimeEffectPanel() override;
73
74 void ShowPanel(SampleTrack* track, bool focus);
75 void HidePanel();
76
81 void SetTrack(const std::shared_ptr<SampleTrack>& track);
82 void ResetTrack();
83
84 bool IsTopNavigationDomain(NavigationKind) const override { return true; }
85
86 void SetFocus() override;
87
88private:
89
92
93 void OnCharHook(wxKeyEvent& evt);
94};
const TranslatableString name
Definition: Distortion.cpp:76
const auto project
A wxButton with mouse-over behaviour.
Definition: AButton.h:104
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
UI Panel that displays realtime effects from the effect stack of an individual track,...
RealtimeEffectListWindow * mTrackEffectList
Observer::Subscription mUndoSubscription
bool IsTopNavigationDomain(NavigationKind) const override
wxStaticText * mTrackTitle
void ShowPanel(SampleTrack *track, bool focus)
void OnCharHook(wxKeyEvent &evt)
std::weak_ptr< SampleTrack > mCurrentTrack
static RealtimeEffectPanel & Get(AudacityProject &project)
std::unique_ptr< PrefsListenerHelper > mPrefsListenerHelper
RealtimeEffectListWindow * mMasterEffectList
std::vector< std::shared_ptr< SampleTrack > > mPotentiallyRemovedTracks
RealtimeEffectPanel(AudacityProject &project, wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
Observer::Subscription mFocusChangeSubscription
AudacityProject & mProject
Observer::Subscription mTrackListChanged
void SetTrack(const std::shared_ptr< SampleTrack > &track)
Shows effects from the effect stack of the track.