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 Track;
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<Track> mCurrentTrack;
43
47
48 std::vector<std::shared_ptr<Track>> mPotentiallyRemovedTracks;
49
50 // RealtimeEffectPanel is wrapped using ThemedWindowWrapper,
51 // so we cannot subscribe to Prefs directly
53 std::unique_ptr<PrefsListenerHelper> mPrefsListenerHelper;
54
55public:
56 static RealtimeEffectPanel &Get(AudacityProject &project);
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(Track* track, bool focus);
70 void HidePanel();
71
76 void SetTrack(const std::shared_ptr<Track>& 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:74
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,...
std::weak_ptr< Track > mCurrentTrack
Observer::Subscription mUndoSubscription
void ShowPanel(Track *track, bool focus)
std::vector< std::shared_ptr< Track > > mPotentiallyRemovedTracks
bool IsTopNavigationDomain(NavigationKind) const override
wxStaticText * mTrackTitle
void SetTrack(const std::shared_ptr< Track > &track)
Shows effects from the effect stack of the track.
RealtimeEffectListWindow * mEffectList
void OnCharHook(wxKeyEvent &evt)
static RealtimeEffectPanel & Get(AudacityProject &project)
std::unique_ptr< PrefsListenerHelper > mPrefsListenerHelper
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
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225