1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 17:11:17 +02:00
Paul Licameli 2d0394796e
Facade class for basic UI, injection of a wxWidgets implementation...
... but none of the methods is defined yet.

The intention is to inject dependencies on wxWidgets (or other) toolkit so that
lower-level files have less build dependency on wxCore classes or on the
event loop.

Original commit: d20cf012556a819e68515d86bb66a2c047007539

Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
2021-10-05 08:06:23 +02:00

48 lines
1.2 KiB
C++

/*!********************************************************************
Audacity: A Digital Audio Editor
@file BasicUI.h
@brief Toolkit-neutral facade for basic user interface services
Paul Licameli
**********************************************************************/
#ifndef __AUDACITY_BASIC_UI__
#define __AUDACITY_BASIC_UI__
namespace BasicUI {
//! @name Types used in the Services interface
//! @{
//! @}
//! Abstract class defines a few user interface services, not mentioning particular toolkits
/*! The intention is that the application supplies a concrete implementation at
startup. Most code will not use this class directly, but call the inline
functions that follow. */
class BASIC_UI_API Services {
public:
virtual ~Services();
};
//! Fetch the global instance, or nullptr if none is yet installed
BASIC_UI_API Services *Get();
//! Install an implementation; return the previously installed instance
BASIC_UI_API Services *Install(Services *pInstance);
/*! @name Functions that invoke global Services
These dispatch to the global Services, if supplied. If none was supplied,
they are mostly no-ops, with exceptions as noted. All should be called on
the main thread only, except as noted.
*/
//! @{
//! @}
}
#endif