Audacity  3.0.3
ActiveProject.h
Go to the documentation of this file.
1 /*!********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  @file ActiveProject.h
6  @brief Handle changing of active project and keep global project pointer
7 
8  Paul Licameli split from Project.h
9 
10  **********************************************************************/
11 
12 #ifndef __AUDACITY_ACTIVE_PROJECT__
13 #define __AUDACITY_ACTIVE_PROJECT__
14 
15 #include <wx/event.h> // to declare custom event type
16 #include <memory>
17 
18 class AudacityProject;
19 
20 AUDACITY_DLL_API std::weak_ptr<AudacityProject> GetActiveProject();
21 // For use by ProjectManager only:
22 AUDACITY_DLL_API void SetActiveProject(AudacityProject * project);
23 
24 // This event is emitted by the application object when there is a change
25 // in the activated project
26 wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
27  EVT_PROJECT_ACTIVATION, wxCommandEvent);
28 
29 #endif
SetActiveProject
AUDACITY_DLL_API void SetActiveProject(AudacityProject *project)
Definition: ActiveProject.cpp:29
wxDECLARE_EXPORTED_EVENT
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_PROJECT_ACTIVATION, wxCommandEvent)
GetActiveProject
AUDACITY_DLL_API std::weak_ptr< AudacityProject > GetActiveProject()
Definition: ActiveProject.cpp:24
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92