![]() |
Audacity 3.2.0
|
#include <Clipboard.h>
Classes | |
| struct | Scope |
| Empty the clipboard at start of scope; restore its contents after. More... | |
Public Member Functions | |
| const TrackList & | GetTracks () const |
| double | T0 () const |
| double | T1 () const |
| double | Duration () const |
| const std::weak_ptr< AudacityProject > & | Project () const |
| void | Clear () |
| void | Assign (TrackList &&newContents, double t0, double t1, const std::weak_ptr< AudacityProject > &pProject) |
| ~Clipboard () | |
| void | Swap (Clipboard &other) |
Public Member Functions inherited from Observer::Publisher< ClipboardChangeMessage > | |
| Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
| Constructor supporting type-erased custom allocation/deletion. More... | |
| Publisher (Publisher &&)=default | |
| Publisher & | operator= (Publisher &&)=default |
| Subscription | Subscribe (Callback callback) |
| Connect a callback to the Publisher; later-connected are called earlier. More... | |
| Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
| Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Static Public Member Functions | |
| static Clipboard & | Get () |
Public Attributes | |
| struct AUDACITY_DLL_API | Scope |
Private Member Functions | |
| Clipboard () | |
| Clipboard (const Clipboard &)=delete | |
| Clipboard & | operator= (const Clipboard &)=delete |
Private Attributes | |
| std::shared_ptr< TrackList > | mTracks |
| std::weak_ptr< AudacityProject > | mProject {} |
| double | mT0 { 0 } |
| double | mT1 { 0 } |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< ClipboardChangeMessage > | |
| using | message_type = ClipboardChangeMessage |
| using | CallbackReturn = std::conditional_t< true, void, bool > |
| using | Callback = std::function< CallbackReturn(const ClipboardChangeMessage &) > |
| Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from Observer::Publisher< ClipboardChangeMessage > | |
| static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< ClipboardChangeMessage > | |
| CallbackReturn | Publish (const ClipboardChangeMessage &message) |
| Send a message to connected callbacks. More... | |
Definition at line 26 of file Clipboard.h.
|
default |
|
private |
Definition at line 13 of file Clipboard.cpp.
|
privatedelete |
| void Clipboard::Assign | ( | TrackList && | newContents, |
| double | t0, | ||
| double | t1, | ||
| const std::weak_ptr< AudacityProject > & | pProject | ||
| ) |
!newContents.GetOwner() Definition at line 53 of file Clipboard.cpp.
References BasicUI::CallAfter(), Get(), mProject, mT0, mT1, mTracks, and Observer::Publisher< ClipboardChangeMessage >::Publish().
| void Clipboard::Clear | ( | ) |
Definition at line 40 of file Clipboard.cpp.
References BasicUI::CallAfter(), Get(), mProject, mT0, mT1, mTracks, and Observer::Publisher< ClipboardChangeMessage >::Publish().
Referenced by HistoryDialog::OnDiscardClipboard(), and QuitAudacity().
|
inline |
Definition at line 36 of file Clipboard.h.
|
static |
Definition at line 28 of file Clipboard.cpp.
Referenced by Assign(), anonymous_namespace{HistoryWindow.cpp}::SpaceUsageCalculator::Calculate(), Clear(), ProjectFileManager::Compact(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), anonymous_namespace{EditMenus.cpp}::FindSourceTracks(), HistoryDialog::HistoryDialog(), ApplyMacroDialog::OnApplyToFiles(), ProjectManager::OnCloseWindow(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), HistoryDialog::OnDiscardClipboard(), anonymous_namespace{EditMenus.cpp}::OnPaste(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), QuitAudacity(), Clipboard::Scope::Scope(), and Clipboard::Scope::~Scope().
| const TrackList & Clipboard::GetTracks | ( | ) | const |
|
inline |
Definition at line 38 of file Clipboard.h.
| void Clipboard::Swap | ( | Clipboard & | other | ) |
Definition at line 20 of file Clipboard.cpp.
References mProject, mT0, mT1, mTracks, and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by Clipboard::Scope::Scope(), and Clipboard::Scope::~Scope().
|
inline |
Definition at line 34 of file Clipboard.h.
|
inline |
Definition at line 35 of file Clipboard.h.
|
private |
Definition at line 64 of file Clipboard.h.
|
private |
Definition at line 65 of file Clipboard.h.
|
private |
Definition at line 66 of file Clipboard.h.
|
private |
!mTracks->GetOwner() Definition at line 63 of file Clipboard.h.
Referenced by Assign(), Clear(), GetTracks(), and Swap().
| struct AUDACITY_DLL_API Clipboard::Scope |
Definition at line 53 of file Clipboard.h.