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
17#include "ThemedWrappers.h"
18#include "Observer.h"
19
20class SampleTrack;
21
22class wxButton;
23class wxStaticText;
24class wxBitmapButton;
25
27class AudacityProject;
28
34class RealtimeEffectPanel : public wxPanel
35{
37 wxStaticText* mTrackTitle {nullptr};
39 wxWindow* mHeader{nullptr};
41
42 std::weak_ptr<SampleTrack> mCurrentTrack;
43
47
48 std::vector<std::shared_ptr<SampleTrack>> mPotentiallyRemovedTracks;
49
50 // RealtimeEffectPanel is wrapped using ThemedWindowWrapper,
51 // so we cannot subscribe to Prefs directly
53 std::unique_ptr<PrefsListenerHelper> mPrefsListenerHelper;
54
55public:
57 static const RealtimeEffectPanel &Get(const AudacityProject &project);
58
60 AudacityProject& project, wxWindow* parent,
61 wxWindowID id,
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxString& name = wxPanelNameStr);
66
67 ~RealtimeEffectPanel() override;
68
69 void ShowPanel(SampleTrack* track, bool focus);
70 void HidePanel();
71
76 void SetTrack(const std::shared_ptr<SampleTrack>& track);
77 void ResetTrack();
78
79 bool IsTopNavigationDomain(NavigationKind) const override { return true; }
80
81 void SetFocus() override;
82
83private:
84 void OnCharHook(wxKeyEvent& evt);
85};
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,...
Observer::Subscription mUndoSubscription
bool IsTopNavigationDomain(NavigationKind) const override
wxStaticText * mTrackTitle
void ShowPanel(SampleTrack *track, bool focus)
RealtimeEffectListWindow * mEffectList
void OnCharHook(wxKeyEvent &evt)
std::weak_ptr< SampleTrack > mCurrentTrack
static RealtimeEffectPanel & Get(AudacityProject &project)
std::unique_ptr< PrefsListenerHelper > mPrefsListenerHelper
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.