diff --git a/images/Cursors.h b/images/Cursors.h index dfab7e8c6..e5b441664 100644 --- a/images/Cursors.h +++ b/images/Cursors.h @@ -30,4 +30,5 @@ #endif #include "Cursors32/SubViewsCursor.xpm" +AUDACITY_DLL_API std::unique_ptr MakeCursor(int WXUNUSED(CursorId), const char * const pXpm[36], int HotX, int HotY); diff --git a/include/audacity/PluginInterface.h b/include/audacity/PluginInterface.h index cee49b78f..c937c3b00 100644 --- a/include/audacity/PluginInterface.h +++ b/include/audacity/PluginInterface.h @@ -51,7 +51,7 @@ class ModuleInterface; -class PluginManagerInterface /* not final */ +class AUDACITY_DLL_API PluginManagerInterface /* not final */ { public: diff --git a/include/audacity/Types.h b/include/audacity/Types.h index fb12ebc5f..5bc870d5d 100644 --- a/include/audacity/Types.h +++ b/include/audacity/Types.h @@ -287,7 +287,7 @@ using CommandIDs = std::vector; // The msgid should be used only in unusual cases and the translation more often // // Implicit conversions to and from wxString are intentionally disabled -class TranslatableString { +class AUDACITY_DLL_API TranslatableString { enum class Request; template< size_t N > struct PluralTemp; diff --git a/src/AColor.h b/src/AColor.h index 8e4ae37cd..26138822b 100644 --- a/src/AColor.h +++ b/src/AColor.h @@ -22,7 +22,7 @@ class wxDC; class wxGraphicsContext; class wxRect; -class AColor { +class AUDACITY_DLL_API AColor { public: enum ColorGradientChoice { diff --git a/src/AboutDialog.h b/src/AboutDialog.h index d3059f84c..07694a13f 100644 --- a/src/AboutDialog.h +++ b/src/AboutDialog.h @@ -29,7 +29,7 @@ struct AboutDialogCreditItem { using AboutDialogCreditItemsList = std::vector; -class AboutDialog final : public wxDialogWrapper { +class AUDACITY_DLL_API AboutDialog final : public wxDialogWrapper { DECLARE_DYNAMIC_CLASS(AboutDialog) public: diff --git a/src/AudacityException.h b/src/AudacityException.h index 8f522e41d..df6d10c16 100644 --- a/src/AudacityException.h +++ b/src/AudacityException.h @@ -45,7 +45,8 @@ protected: //! Abstract AudacityException subclass displays a message, specified by further subclass /*! At most one message will be displayed for each pass through the main event idle loop, no matter how many exceptions were caught. */ -class MessageBoxException /* not final */ : public AudacityException +class AUDACITY_DLL_API MessageBoxException /* not final */ + : public AudacityException { //! Privatize the inherited function using AudacityException::DelayedHandlerAction; @@ -74,7 +75,8 @@ protected: }; //! A MessageBoxException that shows a given, unvarying string. -class SimpleMessageBoxException /* not final */ : public MessageBoxException +class AUDACITY_DLL_API SimpleMessageBoxException /* not final */ + : public MessageBoxException { public: explicit SimpleMessageBoxException( diff --git a/src/AudacityLogger.h b/src/AudacityLogger.h index caab2b194..769aaea95 100644 --- a/src/AudacityLogger.h +++ b/src/AudacityLogger.h @@ -26,7 +26,7 @@ class wxFrame; class wxTextCtrl; -class AudacityLogger final : public wxEvtHandler, +class AUDACITY_DLL_API AudacityLogger final : public wxEvtHandler, public wxLog, public PrefsListener { diff --git a/src/Benchmark.h b/src/Benchmark.h index 9bedfdff1..4bd6eab47 100644 --- a/src/Benchmark.h +++ b/src/Benchmark.h @@ -14,6 +14,7 @@ class wxWindow; class AudacityProject; +AUDACITY_DLL_API void RunBenchmark( wxWindow *parent, AudacityProject &project ); #endif // define __AUDACITY_BENCHMARK__ diff --git a/src/ClientData.h b/src/ClientData.h index a3c0e5c2d..64c41ed60 100644 --- a/src/ClientData.h +++ b/src/ClientData.h @@ -44,7 +44,7 @@ template< typename Object > using BarePtr = Object*; */ template< template class Owner = UniquePtr -> struct Cloneable +> struct AUDACITY_DLL_API Cloneable { using Base = Cloneable; using PointerType = Owner< Base >; diff --git a/src/Clipboard.h b/src/Clipboard.h index 6c446aad4..36d02cb09 100644 --- a/src/Clipboard.h +++ b/src/Clipboard.h @@ -23,7 +23,7 @@ class TrackList; wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API, EVT_CLIPBOARD_CHANGE, wxCommandEvent ); -class Clipboard final +class AUDACITY_DLL_API Clipboard final : public wxEvtHandler { public: diff --git a/src/CommonCommandFlags.h b/src/CommonCommandFlags.h index af5052657..dbbd92af7 100644 --- a/src/CommonCommandFlags.h +++ b/src/CommonCommandFlags.h @@ -15,10 +15,17 @@ Paul Licameli split from Menus.cpp #include "commands/CommandFlag.h" +AUDACITY_DLL_API bool EditableTracksSelectedPred( const AudacityProject &project ); + +AUDACITY_DLL_API bool AudioIOBusyPred( const AudacityProject &project ); + +AUDACITY_DLL_API bool TimeSelectedPred( const AudacityProject &project ); -extern const CommandFlagOptions &cutCopyOptions(); + +AUDACITY_DLL_API +const CommandFlagOptions &cutCopyOptions(); extern AUDACITY_DLL_API const ReservedCommandFlag &AudioIONotBusyFlag(), diff --git a/src/CrashReport.h b/src/CrashReport.h index 96e21a5f9..78946c542 100644 --- a/src/CrashReport.h +++ b/src/CrashReport.h @@ -26,6 +26,7 @@ namespace CrashReport { + AUDACITY_DLL_API void Generate(wxDebugReport::Context ctx); } #endif diff --git a/src/DBConnection.h b/src/DBConnection.h index e6eeaa05d..fe18f5552 100644 --- a/src/DBConnection.h +++ b/src/DBConnection.h @@ -131,7 +131,7 @@ private: Commit() must not be called again after one successful call. An exception is thrown from the constructor if the transaction cannot open. */ -class TransactionScope +class AUDACITY_DLL_API TransactionScope { public: TransactionScope(DBConnection &connection, const char *name); diff --git a/src/DeviceManager.h b/src/DeviceManager.h index 9fefadaef..2da844d22 100644 --- a/src/DeviceManager.h +++ b/src/DeviceManager.h @@ -18,8 +18,6 @@ #ifndef __AUDACITY_DEVICEMANAGER__ #define __AUDACITY_DEVICEMANAGER__ - - #include #include @@ -45,9 +43,10 @@ typedef struct DeviceSourceMap { wxString hostString; } DeviceSourceMap; +AUDACITY_DLL_API wxString MakeDeviceSourceString(const DeviceSourceMap *map); -class DeviceManager final +class AUDACITY_DLL_API DeviceManager final #if defined(EXPERIMENTAL_DEVICE_CHANGE_HANDLER) #if defined(HAVE_DEVICE_CHANGE) : public DeviceChangeHandler diff --git a/src/Dither.h b/src/Dither.h index a84e46bce..e257243ef 100644 --- a/src/Dither.h +++ b/src/Dither.h @@ -25,7 +25,7 @@ public: static DitherType FastDitherChoice(); static DitherType BestDitherChoice(); - static EnumSetting< DitherType > FastSetting, BestSetting; + static AUDACITY_DLL_API EnumSetting< DitherType > FastSetting, BestSetting; /// Default constructor Dither(); diff --git a/src/Envelope.h b/src/Envelope.h index b87788f76..c140ab9e7 100644 --- a/src/Envelope.h +++ b/src/Envelope.h @@ -68,7 +68,7 @@ private: typedef std::vector EnvArray; struct TrackPanelDrawingContext; -class Envelope /* not final */ : public XMLTagHandler { +class AUDACITY_DLL_API Envelope /* not final */ : public XMLTagHandler { public: // Envelope can define a piecewise linear function, or piecewise exponential. Envelope(bool exponential, double minValue, double maxValue, double defaultValue); diff --git a/src/EnvelopeEditor.h b/src/EnvelopeEditor.h index 016d7079a..20dc90e8b 100644 --- a/src/EnvelopeEditor.h +++ b/src/EnvelopeEditor.h @@ -19,7 +19,7 @@ class ZoomInfo; // A class that holds state for the duration of dragging // of an envelope point. -class EnvelopeEditor +class AUDACITY_DLL_API EnvelopeEditor { public: static void DrawPoints( diff --git a/src/FFT.h b/src/FFT.h index 3e6fa29f2..20fe262b1 100644 --- a/src/FFT.h +++ b/src/FFT.h @@ -72,6 +72,7 @@ void PowerSpectrum(size_t NumSamples, const float *In, float *Out); * NumSamples must be a power of two. */ +AUDACITY_DLL_API void RealFFT(size_t NumSamples, const float *RealIn, float *RealOut, float *ImagOut); @@ -80,6 +81,7 @@ void RealFFT(size_t NumSamples, * so the output is purely real. NumSamples must be a power of * two. */ +AUDACITY_DLL_API void InverseRealFFT(size_t NumSamples, const float *RealIn, const float *ImagIn, float *RealOut); @@ -89,6 +91,7 @@ void InverseRealFFT(size_t NumSamples, * inverse transform as well. */ +AUDACITY_DLL_API void FFT(size_t NumSamples, bool InverseTransform, const float *RealIn, const float *ImagIn, float *RealOut, float *ImagOut); @@ -117,6 +120,7 @@ enum eWindowFunctions eWinFuncCount }; +AUDACITY_DLL_API void WindowFunc(int whichFunction, size_t NumSamples, float *data); /* @@ -125,6 +129,7 @@ void WindowFunc(int whichFunction, size_t NumSamples, float *data); * otherwise about (NumSamples - 1) / 2 * All functions have 0 in data[0] except Rectangular, Hamming and Gaussians */ +AUDACITY_DLL_API void NewWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data); /* @@ -134,19 +139,20 @@ void NewWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float * otherwise about (NumSamples - 1) / 2 * All functions have 0 in data[0] except Rectangular, Hamming and Gaussians */ +AUDACITY_DLL_API void DerivativeOfWindowFunc(int whichFunction, size_t NumSamples, bool extraSample, float *data); /* * Returns the name of the windowing function (for UI display) */ -const TranslatableString WindowFuncName(int whichFunction); +AUDACITY_DLL_API const TranslatableString WindowFuncName(int whichFunction); /* * Returns the number of windowing functions supported */ -int NumWindowFuncs(); +AUDACITY_DLL_API int NumWindowFuncs(); void DeinitFFT(); diff --git a/src/FileException.h b/src/FileException.h index 2c096a901..3f4760e05 100644 --- a/src/FileException.h +++ b/src/FileException.h @@ -14,7 +14,8 @@ #include // wxFileName member variable //! Thrown for failure of file or database operations in deeply nested places -class FileException /* not final */ : public MessageBoxException +class AUDACITY_DLL_API FileException /* not final */ + : public MessageBoxException { public: //! Identifies file operation that failed diff --git a/src/FileFormats.h b/src/FileFormats.h index 596fb54a9..3af5bccea 100644 --- a/src/FileFormats.h +++ b/src/FileFormats.h @@ -30,6 +30,7 @@ class wxString; /** @brief Get the number of container formats supported by libsndfile * * Uses SFC_GET_FORMAT_MAJOR_COUNT in sf_command interface */ +AUDACITY_DLL_API int sf_num_headers(); /** @brief Get the name of a container format from libsndfile @@ -39,8 +40,10 @@ int sf_num_headers(); * @param format_num The libsndfile format number for the container format * required */ +AUDACITY_DLL_API wxString sf_header_index_name(int format_num); +AUDACITY_DLL_API unsigned int sf_header_index_to_type(int format_num); // @@ -48,11 +51,14 @@ unsigned int sf_header_index_to_type(int format_num); // /** @brief Get the number of data encodings libsndfile supports (in any * container or none */ +AUDACITY_DLL_API int sf_num_encodings(); /** @brief Get the string name of the data encoding of the requested format * * uses SFC_GET_FORMAT_SUBTYPE */ +AUDACITY_DLL_API wxString sf_encoding_index_name(int encoding_num); +AUDACITY_DLL_API unsigned int sf_encoding_index_to_subtype(int encoding_num); // @@ -64,6 +70,7 @@ unsigned int sf_encoding_index_to_subtype(int encoding_num); * then use SFC_GET_FORMAT_INFO to get the description * @param format the libsndfile format to get the name for (only the container * part is used) */ +AUDACITY_DLL_API wxString sf_header_name(int format); /** @brief Get an abbreviated form of the string name of the specified format * @@ -71,6 +78,7 @@ wxString sf_header_name(int format); * to get just the first word of the format name. * @param format the libsndfile format to get the name for (only the container * part is used) */ +AUDACITY_DLL_API wxString sf_header_shortname(int format); /** @brief Get the most common file extension for the given format * @@ -78,6 +86,7 @@ wxString sf_header_shortname(int format); * format, then retrieve the most common extension using SFC_GET_FORMAT_INFO. * @param format the libsndfile format to get the name for (only the container * part is used) */ +AUDACITY_DLL_API wxString sf_header_extension(int format); /** @brief Get the string name of the specified data encoding * @@ -98,13 +107,18 @@ SF_FORMAT_INFO *sf_simple_format(int i); // other utility functions // +AUDACITY_DLL_API bool sf_subtype_more_than_16_bits(unsigned int format); +AUDACITY_DLL_API bool sf_subtype_is_integer(unsigned int format); +AUDACITY_DLL_API int sf_subtype_bytes_per_sample(unsigned int format); +AUDACITY_DLL_API //! Choose the narrowest value in the sampleFormat enumeration for a given libsndfile format sampleFormat sf_subtype_to_effective_format(unsigned int format); +AUDACITY_DLL_API extern FileExtensions sf_get_all_extensions(); wxString sf_normalize_name(const char *name); @@ -123,7 +137,7 @@ inline R SFCall(F fun, Args&&... args) } //RAII for SNDFILE* -struct SFFileCloser { int operator () (SNDFILE*) const; }; +struct AUDACITY_DLL_API SFFileCloser { int operator () (SNDFILE*) const; }; struct SFFile : public std::unique_ptr { SFFile() = default; diff --git a/src/FileIO.h b/src/FileIO.h index a1ee7f2e4..e970946e6 100644 --- a/src/FileIO.h +++ b/src/FileIO.h @@ -18,7 +18,7 @@ class wxOutputStream; class wxFFileOutputStream; class wxFileNameWrapper; -class FileIO +class AUDACITY_DLL_API FileIO { public: typedef enum FileIOMode diff --git a/src/FileNames.h b/src/FileNames.h index c7a8212e0..70c46dfb8 100644 --- a/src/FileNames.h +++ b/src/FileNames.h @@ -69,7 +69,7 @@ namespace FileNames }; // Frequently used types - extern const FileType + extern AUDACITY_DLL_API const FileType AllFiles // * , AudacityProjects // *.aup3 , DynamicLibraries // depends on the operating system @@ -80,20 +80,21 @@ namespace FileNames // Convert fileTypes into a single string as expected by wxWidgets file // selection dialog - wxString FormatWildcard( const FileTypes &fileTypes ); + AUDACITY_DLL_API wxString FormatWildcard( const FileTypes &fileTypes ); // This exists to compensate for bugs in wxCopyFile: - bool DoCopyFile( + AUDACITY_DLL_API bool DoCopyFile( const FilePath& file1, const FilePath& file2, bool overwrite = true); // wxWidgets doesn't have a function to do this: make a hard file-system // link if possible. It might not be, as when the paths are on different // storage devices. + AUDACITY_DLL_API bool HardLinkFile( const FilePath& file1, const FilePath& file2); - wxString MkDir(const wxString &Str); + AUDACITY_DLL_API wxString MkDir(const wxString &Str); - bool IsMidi(const FilePath &fName); + AUDACITY_DLL_API bool IsMidi(const FilePath &fName); /** \brief A list of directories that should be searched for Audacity files * (plug-ins, help files, etc.). @@ -103,52 +104,52 @@ namespace FileNames * directories can be specified using the AUDACITY_PATH environment * variable. On Windows or Mac OS, this will include the directory * which contains the Audacity program. */ - const FilePaths &AudacityPathList(); - void SetAudacityPathList( FilePaths list ); + AUDACITY_DLL_API const FilePaths &AudacityPathList(); + AUDACITY_DLL_API void SetAudacityPathList( FilePaths list ); // originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames. - void MakeNameUnique( + AUDACITY_DLL_API void MakeNameUnique( FilePaths &otherNames, wxFileName &newName); - wxString LowerCaseAppNameInPath( const wxString & dirIn); + AUDACITY_DLL_API wxString LowerCaseAppNameInPath( const wxString & dirIn); /** \brief Audacity user data directory * * Where audacity keeps its settings and other user data squirreled away, * by default ~/.audacity-data/ on Unix, Application Data/Audacity on * windows system */ - FilePath DataDir(); - FilePath ResourcesDir(); - FilePath HtmlHelpDir(); - FilePath HtmlHelpIndexFile(bool quick); - FilePath LegacyChainDir(); - FilePath MacroDir(); - FilePath NRPDir(); - FilePath NRPFile(); - FilePath PluginRegistry(); - FilePath PluginSettings(); + AUDACITY_DLL_API FilePath DataDir(); + AUDACITY_DLL_API FilePath ResourcesDir(); + AUDACITY_DLL_API FilePath HtmlHelpDir(); + AUDACITY_DLL_API FilePath HtmlHelpIndexFile(bool quick); + AUDACITY_DLL_API FilePath LegacyChainDir(); + AUDACITY_DLL_API FilePath MacroDir(); + AUDACITY_DLL_API FilePath NRPDir(); + AUDACITY_DLL_API FilePath NRPFile(); + AUDACITY_DLL_API FilePath PluginRegistry(); + AUDACITY_DLL_API FilePath PluginSettings(); - FilePath BaseDir(); - FilePath ModulesDir(); + AUDACITY_DLL_API FilePath BaseDir(); + AUDACITY_DLL_API FilePath ModulesDir(); /** \brief The user plug-in directory (not a system one) * * This returns the string path to where the user may have put plug-ins * if they don't have system admin rights. Under default settings, it's * /Plug-Ins/ */ - FilePath PlugInDir(); - FilePath ThemeDir(); - FilePath ThemeComponentsDir(); - FilePath ThemeCachePng(); - FilePath ThemeCacheAsCee(); - FilePath ThemeComponent(const wxString &Str); - FilePath ThemeCacheHtm(); - FilePath ThemeImageDefsAsCee(); + AUDACITY_DLL_API FilePath PlugInDir(); + AUDACITY_DLL_API FilePath ThemeDir(); + AUDACITY_DLL_API FilePath ThemeComponentsDir(); + AUDACITY_DLL_API FilePath ThemeCachePng(); + AUDACITY_DLL_API FilePath ThemeCacheAsCee(); + AUDACITY_DLL_API FilePath ThemeComponent(const wxString &Str); + AUDACITY_DLL_API FilePath ThemeCacheHtm(); + AUDACITY_DLL_API FilePath ThemeImageDefsAsCee(); // Obtain name of loaded module that contains address - FilePath PathFromAddr(void *addr); + AUDACITY_DLL_API FilePath PathFromAddr(void *addr); - bool IsPathAvailable( const FilePath & Path); - wxFileNameWrapper DefaultToDocumentsFolder + AUDACITY_DLL_API bool IsPathAvailable( const FilePath & Path); + AUDACITY_DLL_API wxFileNameWrapper DefaultToDocumentsFolder (const wxString &preference); // If not None, determines a preference key (for the default path string) to @@ -176,10 +177,10 @@ namespace FileNames LastUsed }; - wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type); + AUDACITY_DLL_API wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type); - FilePath FindDefaultPath(Operation op); - void UpdateDefaultPath(Operation op, const FilePath &path); + AUDACITY_DLL_API FilePath FindDefaultPath(Operation op); + AUDACITY_DLL_API void UpdateDefaultPath(Operation op, const FilePath &path); // F is a function taking a wxString, returning wxString template @@ -194,7 +195,7 @@ namespace FileNames return result; } - FilePath + AUDACITY_DLL_API FilePath SelectFile(Operation op, // op matters only when default_path is empty const TranslatableString& message, const FilePath& default_path, @@ -205,11 +206,11 @@ namespace FileNames wxWindow *parent); // Useful functions for working with search paths - void AddUniquePathToPathList(const FilePath &path, + AUDACITY_DLL_API void AddUniquePathToPathList(const FilePath &path, FilePaths &pathList); - void AddMultiPathsToPathList(const wxString &multiPathString, + AUDACITY_DLL_API void AddMultiPathsToPathList(const wxString &multiPathString, FilePaths &pathList); - void FindFilesInPathList(const wxString & pattern, + AUDACITY_DLL_API void FindFilesInPathList(const wxString & pattern, const FilePaths & pathList, FilePaths &results, int flags = wxDIR_FILES); @@ -217,18 +218,18 @@ namespace FileNames /** \brief Protect against Unicode to multi-byte conversion failures * on Windows */ #if defined(__WXMSW__) - char *VerifyFilename(const wxString &s, bool input = true); + AUDACITY_DLL_API char *VerifyFilename(const wxString &s, bool input = true); #endif // wxString compare function for sorting case, which is needed to load correctly. - int CompareNoCase(const wxString& first, const wxString& second); + AUDACITY_DLL_API int CompareNoCase(const wxString& first, const wxString& second); // Create a unique filename using the passed prefix and suffix - wxString CreateUniqueName(const wxString &prefix, + AUDACITY_DLL_API wxString CreateUniqueName(const wxString &prefix, const wxString &suffix = wxEmptyString); // File extension used for unsaved/temporary project files - wxString UnsavedProjectExtension(); + AUDACITY_DLL_API wxString UnsavedProjectExtension(); AUDACITY_DLL_API bool IsOnFATFileSystem(const FilePath &path); diff --git a/src/HelpText.h b/src/HelpText.h index 8897e8441..ee2ea39e1 100644 --- a/src/HelpText.h +++ b/src/HelpText.h @@ -14,12 +14,12 @@ class TranslatableString; class wxString; -wxString HelpText( const wxString & Key ); -TranslatableString TitleText( const wxString & Key ); +AUDACITY_DLL_API wxString HelpText( const wxString & Key ); +AUDACITY_DLL_API TranslatableString TitleText( const wxString & Key ); -extern const wxString VerCheckArgs(); -extern const wxString VerCheckUrl(); -extern const wxString VerCheckHtml(); -extern wxString FormatHtmlText( const wxString & Text ); +extern AUDACITY_DLL_API const wxString VerCheckArgs(); +extern AUDACITY_DLL_API const wxString VerCheckUrl(); +extern AUDACITY_DLL_API const wxString VerCheckHtml(); +extern AUDACITY_DLL_API wxString FormatHtmlText( const wxString & Text ); #endif diff --git a/src/ImageManipulation.h b/src/ImageManipulation.h index 7262cbb30..164059a99 100644 --- a/src/ImageManipulation.h +++ b/src/ImageManipulation.h @@ -18,6 +18,7 @@ class wxImage; // the entire image by the vector difference between that // pixel and the dstColour. For better control, use // ChangeImageColour(wxImage, wxColour*, wxColour*) below +AUDACITY_DLL_API std::unique_ptr ChangeImageColour(wxImage * srcImage, wxColour & dstColour); // This function takes a source image, which it assumes to @@ -27,6 +28,7 @@ std::unique_ptr ChangeImageColour(wxImage * srcImage, wxColour & dstCol // Audacity uses this routines to make the buttons // (skip-start, play, stop, record, skip-end) adapt to // the color scheme of the user. +AUDACITY_DLL_API std::unique_ptr ChangeImageColour(wxImage * srcImage, wxColour & srcColour, wxColour & dstColour); @@ -36,6 +38,7 @@ std::unique_ptr ChangeImageColour(wxImage * srcImage, // returns a NEW image where the foreground has been // overlaid onto the background using alpha-blending, // at location (xoff, yoff). +AUDACITY_DLL_API std::unique_ptr OverlayImage(wxImage * background, wxImage * foreground, wxImage * mask, int xoff, int yoff); @@ -45,23 +48,29 @@ using teBmps = int; /// The index of a bitmap resource in Theme Resources. // Same idea, but this time the mask is an alpha channel in // the foreground bitmap, and it's all retrieved from Themes. +AUDACITY_DLL_API std::unique_ptr OverlayImage(teBmps eBack, teBmps eForeground, int xoff, int yoff); // Creates an image with a solid background color +AUDACITY_DLL_API std::unique_ptr CreateBackground(int width, int height, wxColour colour); // Creates an image with the Mac OS X Aqua stripes, to be used // as a background +AUDACITY_DLL_API std::unique_ptr CreateAquaBackground(int width, int height, int offset); // Uses color on all OS except Mac, uses Aqua +AUDACITY_DLL_API std::unique_ptr CreateSysBackground(int width, int height, int offset, wxColour colour); // Pastes one image into another at specified location. +AUDACITY_DLL_API void PasteSubImage( wxImage * pDest, wxImage * pSrc, int x, int y ); // Gets a rectangle from within another image, INCLUDING the alpha channel +AUDACITY_DLL_API wxImage GetSubImageWithAlpha( const wxImage & Src, const wxRect &rect ); diff --git a/src/InconsistencyException.h b/src/InconsistencyException.h index b87ba923f..25ff1edb4 100644 --- a/src/InconsistencyException.h +++ b/src/InconsistencyException.h @@ -20,7 +20,7 @@ The error message identifies source file and line number, possibly the function too (depending on the compiler), and suggests that the user inform the development team. */ -class InconsistencyException final : public MessageBoxException +class AUDACITY_DLL_API InconsistencyException final : public MessageBoxException { public: InconsistencyException() {} diff --git a/src/Internat.h b/src/Internat.h index c0b18dea7..9e5d86a2f 100644 --- a/src/Internat.h +++ b/src/Internat.h @@ -101,7 +101,7 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st #define XPC(sing, plur, n, c) \ TranslatableString{ wxT(sing), {} }.Context(c).Plural<(n)>( wxT(plur) ) -class Internat +class AUDACITY_DLL_API Internat { public: /** \brief Initialize internationalisation support. Call this once at @@ -161,9 +161,9 @@ private: #define LAT1CTOWX(X) wxString((X), wxConvISO8859_1) class ComponentInterfaceSymbol; -TranslatableStrings Msgids( +AUDACITY_DLL_API TranslatableStrings Msgids( const EnumValueSymbol strings[], size_t nStrings); -TranslatableStrings Msgids( const std::vector &strings ); +AUDACITY_DLL_API TranslatableStrings Msgids( const std::vector &strings ); // Whether disambiguationg contexts are supported // If not, then the program builds and runs, but strings in the catalog with diff --git a/src/KeyboardCapture.h b/src/KeyboardCapture.h index 463bae4c2..d2965e16b 100644 --- a/src/KeyboardCapture.h +++ b/src/KeyboardCapture.h @@ -31,16 +31,17 @@ DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_CAPTURE_KEY, -1); namespace KeyboardCapture { - bool IsHandler(const wxWindow *handler); - wxWindow *GetHandler(); - void Capture(wxWindow *handler); - void Release(wxWindow *handler); + AUDACITY_DLL_API bool IsHandler(const wxWindow *handler); + AUDACITY_DLL_API wxWindow *GetHandler(); + AUDACITY_DLL_API void Capture(wxWindow *handler); + AUDACITY_DLL_API void Release(wxWindow *handler); using FilterFunction = std::function< bool( wxKeyEvent& ) >; /// \brief Install a pre-filter, returning the previously installed one /// Pre-filter is called before passing the event to the captured window; if it /// returns false, then skip the event entirely + AUDACITY_DLL_API FilterFunction SetPreFilter( const FilterFunction &function ); /// \brief Install a post-filter, returning the previously installed one @@ -49,12 +50,14 @@ namespace KeyboardCapture /// it skips only the wxEVT_CHAR or wxEVT_KEY_UP event); it is passed a /// wxKEY_DOWN or a wxKEY_UP event; if it returns false, then the event is /// skipped + AUDACITY_DLL_API FilterFunction SetPostFilter( const FilterFunction &function ); /// \brief a function useful to implement a focus event handler /// The window releases the keyboard if the event is for killing focus, /// otherwise the window captures the keyboard; then refresh the window /// and skip the event + AUDACITY_DLL_API void OnFocus( wxWindow &window, wxFocusEvent &event ); } diff --git a/src/LabelTrack.h b/src/LabelTrack.h index 476db8861..d5ef89a58 100644 --- a/src/LabelTrack.h +++ b/src/LabelTrack.h @@ -26,7 +26,7 @@ class TimeWarper; struct LabelTrackHit; struct TrackPanelDrawingContext; -class LabelStruct +class AUDACITY_DLL_API LabelStruct { public: LabelStruct() = default; diff --git a/src/Languages.h b/src/Languages.h index 0e65c8044..702a7073f 100644 --- a/src/Languages.h +++ b/src/Languages.h @@ -16,6 +16,7 @@ class wxString; #include "audacity/Types.h" +AUDACITY_DLL_API void GetLanguages( wxArrayString &langCodes, TranslatableStrings &langNames); diff --git a/src/Menus.h b/src/Menus.h index e758b4618..62f6891ec 100644 --- a/src/Menus.h +++ b/src/Menus.h @@ -35,7 +35,7 @@ typedef wxArrayString PluginIDs; namespace Registry{ class Visitor; } -class MenuCreator +class AUDACITY_DLL_API MenuCreator { public: MenuCreator(); @@ -71,7 +71,7 @@ public: struct ToolbarMenuVisitor; -class MenuManager final +class AUDACITY_DLL_API MenuManager final : public MenuCreator , public ClientData::Base , private PrefsListener diff --git a/src/Mix.h b/src/Mix.h index e5cdffbca..2d678da8e 100644 --- a/src/Mix.h +++ b/src/Mix.h @@ -43,7 +43,7 @@ class WaveTrackCache; * no explicit time range to process, and the whole occupied length of the * input tracks is processed. */ -void MixAndRender(TrackList * tracks, WaveTrackFactory *factory, +void AUDACITY_DLL_API MixAndRender(TrackList * tracks, WaveTrackFactory *factory, double rate, sampleFormat format, double startTime, double endTime, std::shared_ptr &uLeft, @@ -79,7 +79,7 @@ class AUDACITY_DLL_API Mixer { public: // An argument to Mixer's constructor - class WarpOptions + class AUDACITY_DLL_API WarpOptions { public: //! Construct with warp from the TimeTrack if there is one diff --git a/src/ModuleManager.h b/src/ModuleManager.h index ff38f29e6..70646ca83 100644 --- a/src/ModuleManager.h +++ b/src/ModuleManager.h @@ -75,7 +75,7 @@ typedef std::map ModuleMap; typedef std::map> LibraryMap; using PluginIDs = wxArrayString; -class ModuleManager final +class AUDACITY_DLL_API ModuleManager final { public: diff --git a/src/PitchName.h b/src/PitchName.h index f9e08be01..7e6316547 100644 --- a/src/PitchName.h +++ b/src/PitchName.h @@ -26,37 +26,39 @@ class TranslatableString; // Each register starts with C (e.g., for middle C and A440, // it's register 4). // MIDI note number 0 is C-1 in Scientific pitch notation. -double FreqToMIDInote(const double freq); +AUDACITY_DLL_API double FreqToMIDInote(const double freq); -double MIDInoteToFreq(const double dMIDInote); +AUDACITY_DLL_API double MIDInoteToFreq(const double dMIDInote); // PitchIndex returns the [0,11] index for a double MIDI note number, // per result from FreqToMIDInote, corresponding to modulo 12 // of the integer part of (dMIDInote + 0.5), so 0=C, 1=C#, etc. -unsigned int PitchIndex(const double dMIDInote); +AUDACITY_DLL_API unsigned int PitchIndex(const double dMIDInote); // PitchOctave returns the octave index for a double dMIDInote note number, // per result from FreqToMIDInote. // MIDI note number 0 is C-1 in Scientific pitch notation. -int PitchOctave(const double dMIDInote); +AUDACITY_DLL_API int PitchOctave(const double dMIDInote); enum class PitchNameChoice { Sharps, Flats, Both }; // PitchName takes dMIDInote (per result from // FreqToMIDInote) and returns a standard pitch/note name [C, C#, etc.). -TranslatableString PitchName( +AUDACITY_DLL_API TranslatableString PitchName( const double dMIDInote, const PitchNameChoice choice = PitchNameChoice::Sharps ); // PitchName_Absolute does the same thing as PitchName, but appends // the octave number, e.g., instead of "C" it will return "C4" // if the dMIDInote corresponds to middle C, i.e., is 60. -TranslatableString PitchName_Absolute( +AUDACITY_DLL_API TranslatableString PitchName_Absolute( const double dMIDInote, const PitchNameChoice choice = PitchNameChoice::Sharps); +AUDACITY_DLL_API double PitchToMIDInote(const unsigned int nPitchIndex, const int nPitchOctave); +AUDACITY_DLL_API double PitchToFreq(const unsigned int nPitchIndex, const int nPitchOctave); #endif // __AUDACITY_PITCHNAME__ diff --git a/src/PlatformCompatibility.h b/src/PlatformCompatibility.h index 9b9b68331..0ba247312 100644 --- a/src/PlatformCompatibility.h +++ b/src/PlatformCompatibility.h @@ -22,7 +22,7 @@ #include "audacity/Types.h" -class PlatformCompatibility +class AUDACITY_DLL_API PlatformCompatibility { public: // diff --git a/src/PluginManager.h b/src/PluginManager.h index ab041b672..12a23d432 100644 --- a/src/PluginManager.h +++ b/src/PluginManager.h @@ -41,7 +41,7 @@ typedef enum } PluginType; // TODO: Convert this to multiple derived classes -class PluginDescriptor +class AUDACITY_DLL_API PluginDescriptor { public: PluginDescriptor(); @@ -168,7 +168,7 @@ typedef wxArrayString PluginIDs; class PluginRegistrationDialog; -class PluginManager final : public PluginManagerInterface +class AUDACITY_DLL_API PluginManager final : public PluginManagerInterface { public: diff --git a/src/Prefs.h b/src/Prefs.h index f712d7bf4..1ffdb6cb7 100644 --- a/src/Prefs.h +++ b/src/Prefs.h @@ -58,7 +58,7 @@ extern ByColumns_t ByColumns; /// A table of EnumValueSymbol that you can access by "row" with /// operator [] but also allowing access to the "columns" of internal or /// translated strings, and also allowing convenient column-wise construction -class EnumValueSymbols : public std::vector< EnumValueSymbol > +class AUDACITY_DLL_API EnumValueSymbols : public std::vector< EnumValueSymbol > { public: EnumValueSymbols() = default; @@ -86,7 +86,7 @@ private: /// Packages a table of user-visible choices each with an internal code string, /// a preference key path, and a default choice -class ChoiceSetting +class AUDACITY_DLL_API ChoiceSetting { public: ChoiceSetting( @@ -136,7 +136,7 @@ protected: /// (generally not equal to their table positions), /// and optionally an old preference key path that stored integer codes, to be /// migrated into one that stores internal string values instead -class EnumSettingBase : public ChoiceSetting +class AUDACITY_DLL_API EnumSettingBase : public ChoiceSetting { public: EnumSettingBase( @@ -209,7 +209,8 @@ public: // An event emitted by the application when the Preference dialog commits // changes -wxDECLARE_EVENT(EVT_PREFS_UPDATE, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, + EVT_PREFS_UPDATE, wxCommandEvent); // Invoke UpdatePrefs() when Preference dialog commits changes. class AUDACITY_DLL_API PrefsListener @@ -236,13 +237,14 @@ private: /// Return the config file key associated with a warning dialog identified /// by internalDialogName. When the box is checked, the value at the key /// becomes false. +AUDACITY_DLL_API wxString WarningDialogKey(const wxString &internalDialogName); /* Meant to be statically constructed. A callback to repopulate configuration files after a reset. */ -struct PreferenceInitializer { +struct AUDACITY_DLL_API PreferenceInitializer { PreferenceInitializer(); virtual ~PreferenceInitializer(); virtual void operator () () = 0; diff --git a/src/Project.h b/src/Project.h index a500daa8d..b7bc1866c 100644 --- a/src/Project.h +++ b/src/Project.h @@ -27,14 +27,14 @@ class AudacityProject; AUDACITY_DLL_API AudacityProject *GetActiveProject(); // For use by ProjectManager only: -extern void SetActiveProject(AudacityProject * project); +AUDACITY_DLL_API void SetActiveProject(AudacityProject * project); /// \brief an object of class AllProjects acts like a standard library /// container, but refers to a global array of open projects. So you can /// iterate easily over shared pointers to them with range-for : /// for (auto pProject : AllProjects{}) { ... } /// The pointers are never null. -class AllProjects +class AUDACITY_DLL_API AllProjects { // Use shared_ptr to projects, because elsewhere we need weak_ptr using AProjectHolder = std::shared_ptr< AudacityProject >; diff --git a/src/ProjectAudioIO.h b/src/ProjectAudioIO.h index bee522795..f125f71dd 100644 --- a/src/ProjectAudioIO.h +++ b/src/ProjectAudioIO.h @@ -19,7 +19,7 @@ class MeterPanelBase; ///\ brief Holds per-project state needed for interaction with AudioIO, /// including the audio stream token and pointers to meters -class ProjectAudioIO final +class AUDACITY_DLL_API ProjectAudioIO final : public ClientData::Base { public: diff --git a/src/ProjectAudioManager.h b/src/ProjectAudioManager.h index 2a76ef026..fac46f571 100644 --- a/src/ProjectAudioManager.h +++ b/src/ProjectAudioManager.h @@ -38,7 +38,7 @@ struct TransportTracks; enum StatusBarField : int; -class ProjectAudioManager final +class AUDACITY_DLL_API ProjectAudioManager final : public ClientData::Base , public AudioIOListener , public std::enable_shared_from_this< ProjectAudioManager > @@ -163,7 +163,9 @@ private: const AudacityProject &project, StatusBarField field); }; +AUDACITY_DLL_API AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project ); +AUDACITY_DLL_API AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project ); struct PropertiesOfSelected @@ -173,11 +175,12 @@ struct PropertiesOfSelected int numberOfSelected{ 0 }; }; +AUDACITY_DLL_API PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj); #include "commands/CommandFlag.h" -extern const ReservedCommandFlag +extern AUDACITY_DLL_API const ReservedCommandFlag &CanStopAudioStreamFlag(); #endif diff --git a/src/ProjectFileIO.h b/src/ProjectFileIO.h index 2917f3f66..774003779 100644 --- a/src/ProjectFileIO.h +++ b/src/ProjectFileIO.h @@ -52,7 +52,7 @@ wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API, ///\brief Object associated with a project that manages reading and writing /// of Audacity project file formats, and autosave -class ProjectFileIO final +class AUDACITY_DLL_API ProjectFileIO final : public ClientData::Base , public XMLTagHandler , private PrefsListener @@ -327,7 +327,7 @@ wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_PROJECT_TITLE_CHANGE, wxCommandEvent); //! Makes a temporary project that doesn't display on the screen -class InvisibleTemporaryProject +class AUDACITY_DLL_API InvisibleTemporaryProject { public: InvisibleTemporaryProject(); diff --git a/src/ProjectFileIORegistry.h b/src/ProjectFileIORegistry.h index 6dc440e33..01d941170 100644 --- a/src/ProjectFileIORegistry.h +++ b/src/ProjectFileIORegistry.h @@ -24,7 +24,7 @@ using TagHandlerFactory = std::function< XMLTagHandler *( AudacityProject & ) >; // Typically statically constructed -struct Entry{ +struct AUDACITY_DLL_API Entry{ Entry( const wxString &tag, const TagHandlerFactory &factory ); }; diff --git a/src/ProjectFileManager.h b/src/ProjectFileManager.h index 8522f461e..8f68c59e2 100644 --- a/src/ProjectFileManager.h +++ b/src/ProjectFileManager.h @@ -28,7 +28,7 @@ class XMLTagHandler; using WaveTrackArray = std::vector < std::shared_ptr < WaveTrack > >; using TrackHolders = std::vector< WaveTrackArray >; -class ProjectFileManager final +class AUDACITY_DLL_API ProjectFileManager final : public ClientData::Base { public: diff --git a/src/ProjectHistory.h b/src/ProjectHistory.h index b565ce658..ba67fcede 100644 --- a/src/ProjectHistory.h +++ b/src/ProjectHistory.h @@ -17,7 +17,7 @@ class AudacityProject; struct UndoState; enum class UndoPush : unsigned char; -class ProjectHistory final +class AUDACITY_DLL_API ProjectHistory final : public ClientData::Base { public: diff --git a/src/ProjectManager.h b/src/ProjectManager.h index cce7d4d5b..35d675773 100644 --- a/src/ProjectManager.h +++ b/src/ProjectManager.h @@ -25,7 +25,7 @@ struct AudioIOStartStreamOptions; ///\brief Object associated with a project for high-level management of the /// project's lifetime, including creation, destruction, opening from file, /// importing, pushing undo states, and reverting to saved states -class ProjectManager final +class AUDACITY_DLL_API ProjectManager final : public wxEvtHandler , public ClientData::Base { diff --git a/src/ProjectSelectionManager.h b/src/ProjectSelectionManager.h index 0aad35ac0..eb4072b06 100644 --- a/src/ProjectSelectionManager.h +++ b/src/ProjectSelectionManager.h @@ -17,7 +17,7 @@ Paul Licameli split from ProjectManager.cpp class AudacityProject; -class ProjectSelectionManager final +class AUDACITY_DLL_API ProjectSelectionManager final : public ClientData::Base , public SelectionBarListener , public SpectralSelectionBarListener diff --git a/src/ProjectSettings.h b/src/ProjectSettings.h index 0aa7928aa..b3ef3d71f 100644 --- a/src/ProjectSettings.h +++ b/src/ProjectSettings.h @@ -47,7 +47,7 @@ enum { ///\brief Holds various per-project settings values, including the sample rate, /// and sends events to the project when certain values change -class ProjectSettings final +class AUDACITY_DLL_API ProjectSettings final : public ClientData::Base , private PrefsListener { diff --git a/src/ProjectStatus.h b/src/ProjectStatus.h index 78d1c4a16..09495c8da 100644 --- a/src/ProjectStatus.h +++ b/src/ProjectStatus.h @@ -34,7 +34,7 @@ enum StatusBarField : int { wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_PROJECT_STATUS_UPDATE, wxCommandEvent); -class ProjectStatus final +class AUDACITY_DLL_API ProjectStatus final : public ClientData::Base , public PrefsListener { @@ -57,7 +57,7 @@ public: using StatusWidthFunctions = std::vector< StatusWidthFunction >; // Typically a static instance of this struct is used. - struct RegisteredStatusWidthFunction + struct AUDACITY_DLL_API RegisteredStatusWidthFunction { explicit RegisteredStatusWidthFunction( const StatusWidthFunction &function ); diff --git a/src/ProjectWindow.h b/src/ProjectWindow.h index dbfc59ce2..c124c06ff 100644 --- a/src/ProjectWindow.h +++ b/src/ProjectWindow.h @@ -26,7 +26,7 @@ void InitProjectWindow( ProjectWindow &window ); ///\brief A top-level window associated with a project, and handling scrollbars /// and zooming -class ProjectWindow final : public ProjectWindowBase +class AUDACITY_DLL_API ProjectWindow final : public ProjectWindowBase , public TrackPanelListener , public PrefsListener { diff --git a/src/ProjectWindowBase.h b/src/ProjectWindowBase.h index 19cbee43d..185fc1e7d 100644 --- a/src/ProjectWindowBase.h +++ b/src/ProjectWindowBase.h @@ -33,7 +33,7 @@ protected: AudacityProject &mProject; }; -AudacityProject *FindProjectFromWindow( wxWindow *pWindow ); +AUDACITY_DLL_API AudacityProject *FindProjectFromWindow( wxWindow *pWindow ); const AudacityProject *FindProjectFromWindow( const wxWindow *pWindow ); #endif diff --git a/src/RealFFTf.h b/src/RealFFTf.h index 20d44449f..02a221aab 100644 --- a/src/RealFFTf.h +++ b/src/RealFFTf.h @@ -17,7 +17,7 @@ struct FFTParam { #endif }; -struct FFTDeleter{ +struct AUDACITY_DLL_API FFTDeleter{ void operator () (FFTParam *p) const; }; @@ -25,11 +25,11 @@ using HFFT = std::unique_ptr< FFTParam, FFTDeleter >; -HFFT GetFFT(size_t); -void RealFFTf(fft_type *, const FFTParam *); -void InverseRealFFTf(fft_type *, const FFTParam *); -void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut); -void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer, +AUDACITY_DLL_API HFFT GetFFT(size_t); +AUDACITY_DLL_API void RealFFTf(fft_type *, const FFTParam *); +AUDACITY_DLL_API void InverseRealFFTf(fft_type *, const FFTParam *); +AUDACITY_DLL_API void ReorderToTime(const FFTParam *hFFT, const fft_type *buffer, fft_type *TimeOut); +AUDACITY_DLL_API void ReorderToFreq(const FFTParam *hFFT, const fft_type *buffer, fft_type *RealOut, fft_type *ImagOut); #endif diff --git a/src/Registry.h b/src/Registry.h index e529cf563..d585b8e9a 100644 --- a/src/Registry.h +++ b/src/Registry.h @@ -56,7 +56,7 @@ namespace Registry { // Most items in the table will be the large ones describing commands, so the // waste of space in unions for separators and sub-menus should not be // large. - struct BaseItem { + struct AUDACITY_DLL_API BaseItem { // declare at least one virtual function so dynamic_cast will work explicit BaseItem( const Identifier &internalName ) @@ -79,7 +79,7 @@ namespace Registry { // static tables of items to be computed once and reused // The name of the delegate is significant for path calculations, but the // SharedItem's ordering hint is used if the delegate has none - struct SharedItem final : BaseItem { + struct AUDACITY_DLL_API SharedItem final : BaseItem { explicit SharedItem( const BaseItemSharedPtr &ptr_ ) : BaseItem{ wxEmptyString } , ptr{ ptr_ } @@ -97,7 +97,7 @@ namespace Registry { // the ComputedItem is visited // The name of the substitute is significant for path calculations, but the // ComputedItem's ordering hint is used if the substitute has none - struct ComputedItem final : BaseItem { + struct AUDACITY_DLL_API ComputedItem final : BaseItem { // The type of functions that generate descriptions of items. // Return type is a shared_ptr to let the function decide whether to // recycle the object or rebuild it on demand each time. @@ -117,13 +117,13 @@ namespace Registry { }; // Common abstract base class for items that are not groups - struct SingleItem : BaseItem { + struct AUDACITY_DLL_API SingleItem : BaseItem { using BaseItem::BaseItem; ~SingleItem() override = 0; }; // Common abstract base class for items that group other items - struct GroupItem : BaseItem { + struct AUDACITY_DLL_API GroupItem : BaseItem { using BaseItem::BaseItem; // Construction from an internal name and a previously built-up @@ -231,13 +231,14 @@ namespace Registry { // The sequence of calls to RegisterItem has no significance for // determining the visitation ordering. When sequence is important, register // a GroupItem. + AUDACITY_DLL_API void RegisterItem( GroupItem ®istry, const Placement &placement, BaseItemPtr pItem ); // Define actions to be done in Visit. // Default implementations do nothing // The supplied path does not include the name of the item - class Visitor + class AUDACITY_DLL_API Visitor { public: virtual ~Visitor(); @@ -268,7 +269,8 @@ namespace Registry { // registry of plug-ins, and something must be done to preserve old // behavior. It can be done in the central place using string literal // identifiers only, not requiring static compilation or linkage dependency. - struct OrderingPreferenceInitializer : PreferenceInitializer { + struct AUDACITY_DLL_API + OrderingPreferenceInitializer : PreferenceInitializer { using Literal = const wxChar *; using Pair = std::pair< Literal, Literal >; using Pairs = std::vector< Pair >; diff --git a/src/Resample.h b/src/Resample.h index 109238bd5..dee207715 100644 --- a/src/Resample.h +++ b/src/Resample.h @@ -25,7 +25,7 @@ struct soxr_deleter { }; using soxrHandle = std::unique_ptr; -class Resample final +class AUDACITY_DLL_API Resample final { public: /// Resamplers may have more than one method, offering a diff --git a/src/SampleFormat.h b/src/SampleFormat.h index 8e5506380..eec4009dc 100644 --- a/src/SampleFormat.h +++ b/src/SampleFormat.h @@ -44,7 +44,7 @@ typedef enum { #define SAMPLE_SIZE_DISK(SampleFormat) (((SampleFormat) == int24Sample) ? \ size_t{ 3 } : SAMPLE_SIZE(SampleFormat) ) -TranslatableString GetSampleFormatStr(sampleFormat format); +AUDACITY_DLL_API TranslatableString GetSampleFormatStr(sampleFormat format); // // Allocating/Freeing Samples @@ -124,21 +124,25 @@ private: // Copying, Converting and Clearing Samples // +AUDACITY_DLL_API void CopySamples(constSamplePtr src, sampleFormat srcFormat, samplePtr dst, sampleFormat dstFormat, unsigned int len, bool highQuality=true, unsigned int srcStride=1, unsigned int dstStride=1); +AUDACITY_DLL_API void CopySamplesNoDither(samplePtr src, sampleFormat srcFormat, samplePtr dst, sampleFormat dstFormat, unsigned int len, unsigned int srcStride=1, unsigned int dstStride=1); +AUDACITY_DLL_API void ClearSamples(samplePtr buffer, sampleFormat format, size_t start, size_t len); +AUDACITY_DLL_API void ReverseSamples(samplePtr buffer, sampleFormat format, int start, int len); @@ -147,6 +151,7 @@ void ReverseSamples(samplePtr buffer, sampleFormat format, // are set in preferences. // +AUDACITY_DLL_API void InitDitherers(); // These are so commonly done for processing samples in floating point form in memory, diff --git a/src/Screenshot.h b/src/Screenshot.h index 0b6dba624..17a8f9dfa 100644 --- a/src/Screenshot.h +++ b/src/Screenshot.h @@ -25,7 +25,7 @@ class AudacityProject; -void OpenScreenshotTools( AudacityProject &project ); +AUDACITY_DLL_API void OpenScreenshotTools( AudacityProject &project ); void CloseScreenshotTools(); #endif // __AUDACITY_SCREENSHOT__ diff --git a/src/SelectUtilities.h b/src/SelectUtilities.h index 06ab7f56e..3521df868 100644 --- a/src/SelectUtilities.h +++ b/src/SelectUtilities.h @@ -17,17 +17,17 @@ class Track; /// Namespace for functions for Select menu namespace SelectUtilities { -void DoSelectTimeAndTracks( +AUDACITY_DLL_API void DoSelectTimeAndTracks( AudacityProject &project, bool bAllTime, bool bAllTracks); -void SelectAllIfNone( AudacityProject &project ); -bool SelectAllIfNoneAndAllowed( AudacityProject &project ); -void SelectNone( AudacityProject &project ); -void DoListSelection( +AUDACITY_DLL_API void SelectAllIfNone( AudacityProject &project ); +AUDACITY_DLL_API bool SelectAllIfNoneAndAllowed( AudacityProject &project ); +AUDACITY_DLL_API void SelectNone( AudacityProject &project ); +AUDACITY_DLL_API void DoListSelection( AudacityProject &project, Track *t, bool shift, bool ctrl, bool modifyState ); -void DoSelectAll( AudacityProject &project ); -void DoSelectAllAudio( AudacityProject &project ); -void DoSelectSomething( AudacityProject &project ); +AUDACITY_DLL_API void DoSelectAll( AudacityProject &project ); +AUDACITY_DLL_API void DoSelectAllAudio( AudacityProject &project ); +AUDACITY_DLL_API void DoSelectSomething( AudacityProject &project ); } diff --git a/src/SelectionState.h b/src/SelectionState.h index 6034b6d46..053d583e3 100644 --- a/src/SelectionState.h +++ b/src/SelectionState.h @@ -18,7 +18,7 @@ class ViewInfo; #include // State relating to the set of selected tracks -class SelectionState final +class AUDACITY_DLL_API SelectionState final : public ClientData::Base { public: @@ -52,7 +52,7 @@ private: // For committing or rolling-back of changes in selectedness of tracks. // When rolling back, it is assumed that no tracks have been added or removed. -class SelectionStateChanger +class AUDACITY_DLL_API SelectionStateChanger { public: SelectionStateChanger( SelectionState &state, TrackList &tracks ); diff --git a/src/Shuttle.h b/src/Shuttle.h index 1ed4175ed..1b22a8abf 100644 --- a/src/Shuttle.h +++ b/src/Shuttle.h @@ -57,7 +57,7 @@ class CommandParameters; virtual functions that do nothing by default. Unrelated to class Shuttle. ********************************************************************************/ -class ShuttleParams /* not final */ +class AUDACITY_DLL_API ShuttleParams /* not final */ { public: wxString mParams; @@ -83,7 +83,7 @@ public: /**************************************************************************//** \brief Shuttle that gets parameter values into a string. ********************************************************************************/ -class ShuttleGetAutomation final : public ShuttleParams +class AUDACITY_DLL_API ShuttleGetAutomation final : public ShuttleParams { public: ShuttleParams & Optional( bool & var ) override; @@ -101,7 +101,7 @@ public: /**************************************************************************//** \brief Shuttle that sets parameters to a value (from a string) ********************************************************************************/ -class ShuttleSetAutomation final : public ShuttleParams +class AUDACITY_DLL_API ShuttleSetAutomation final : public ShuttleParams { public: ShuttleSetAutomation(){ bWrite = false; bOK = false;}; diff --git a/src/ShuttleGetDefinition.h b/src/ShuttleGetDefinition.h index fa5596fe3..3131b7bc8 100644 --- a/src/ShuttleGetDefinition.h +++ b/src/ShuttleGetDefinition.h @@ -17,7 +17,7 @@ /**************************************************************************//** \brief Shuttle that retrieves a JSON format definition of a command's parameters. ********************************************************************************/ -class ShuttleGetDefinition final +class AUDACITY_DLL_API ShuttleGetDefinition final : public ShuttleParams, public CommandMessageTargetDecorator { public: diff --git a/src/Snap.h b/src/Snap.h index 5e0e45bc2..73aaf3263 100644 --- a/src/Snap.h +++ b/src/Snap.h @@ -52,7 +52,7 @@ struct SnapResults { bool Snapped() const { return snappedPoint || snappedTime; } }; -class SnapManager +class AUDACITY_DLL_API SnapManager { public: SnapManager(const AudacityProject &project, diff --git a/src/Spectrum.h b/src/Spectrum.h index 674b20230..aaaae6356 100644 --- a/src/Spectrum.h +++ b/src/Spectrum.h @@ -21,6 +21,7 @@ calculates windowSize/2 frequency samples */ +AUDACITY_DLL_API bool ComputeSpectrum(const float * data, size_t width, size_t windowSize, double rate, float *out, bool autocorrelation, int windowFunc = eWinFuncHann); diff --git a/src/TempDirectory.h b/src/TempDirectory.h index 7d583e20c..873a8c4fc 100644 --- a/src/TempDirectory.h +++ b/src/TempDirectory.h @@ -18,20 +18,19 @@ class wxWindow; namespace TempDirectory { - wxString TempDir(); - void ResetTempDir(); + AUDACITY_DLL_API wxString TempDir(); + AUDACITY_DLL_API void ResetTempDir(); - const FilePath &DefaultTempDir(); - void SetDefaultTempDir( const FilePath &tempDir ); - bool IsTempDirectoryNameOK( const FilePath & Name ); + AUDACITY_DLL_API const FilePath &DefaultTempDir(); + AUDACITY_DLL_API void SetDefaultTempDir( const FilePath &tempDir ); + AUDACITY_DLL_API bool IsTempDirectoryNameOK( const FilePath & Name ); // Create a filename for an unsaved/temporary project file - wxString UnsavedProjectFileName(); + AUDACITY_DLL_API wxString UnsavedProjectFileName(); - bool FATFilesystemDenied(const FilePath &path, + AUDACITY_DLL_API bool FATFilesystemDenied(const FilePath &path, const TranslatableString &msg, wxWindow *window = nullptr); - }; #endif diff --git a/src/Theme.h b/src/Theme.h index f863e9f95..6e0832f2e 100644 --- a/src/Theme.h +++ b/src/Theme.h @@ -179,7 +179,7 @@ class wxWindow; class wxString; class wxPaintEvent; -class auStaticText : public wxWindow +class AUDACITY_DLL_API auStaticText : public wxWindow { public: auStaticText(wxWindow* parent, wxString text); @@ -193,7 +193,7 @@ public: extern AUDACITY_DLL_API Theme theTheme; -extern ChoiceSetting +extern AUDACITY_DLL_API ChoiceSetting GUITheme ; diff --git a/src/TimeDialog.h b/src/TimeDialog.h index f95c66206..bb3cf25a2 100644 --- a/src/TimeDialog.h +++ b/src/TimeDialog.h @@ -20,7 +20,7 @@ class NumericTextCtrl; class ShuttleGui; -class TimeDialog final : public wxDialogWrapper +class AUDACITY_DLL_API TimeDialog final : public wxDialogWrapper { public: diff --git a/src/TimeTrack.h b/src/TimeTrack.h index c2c40c434..a841c3eb7 100644 --- a/src/TimeTrack.h +++ b/src/TimeTrack.h @@ -21,7 +21,7 @@ class Ruler; class ZoomInfo; struct TrackPanelDrawingContext; -class TimeTrack final : public Track { +class AUDACITY_DLL_API TimeTrack final : public Track { public: diff --git a/src/Track.h b/src/Track.h index 7c5a15754..a8d963044 100644 --- a/src/Track.h +++ b/src/Track.h @@ -182,7 +182,7 @@ private: }; //! Optional extra information about an interval, appropriate to a subtype of Track -struct TrackIntervalData { +struct AUDACITY_DLL_API TrackIntervalData { virtual ~TrackIntervalData(); }; @@ -1255,7 +1255,7 @@ wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, /*! @brief A flat linked list of tracks supporting Add, Remove, * Clear, and Contains, serialization of the list of tracks, event notifications */ -class TrackList final +class AUDACITY_DLL_API TrackList final : public wxEvtHandler , public ListOfTracks , public std::enable_shared_from_this diff --git a/src/TrackArtist.h b/src/TrackArtist.h index 8ecb7d809..99790c7a0 100644 --- a/src/TrackArtist.h +++ b/src/TrackArtist.h @@ -39,15 +39,18 @@ class ZoomInfo; namespace TrackArt { // Helper: draws the "sync-locked" watermark tiled to a rectangle + AUDACITY_DLL_API void DrawSyncLockTiles( TrackPanelDrawingContext &context, const wxRect &rect ); // Helper: draws background with selection rect + AUDACITY_DLL_API void DrawBackgroundWithSelection(TrackPanelDrawingContext &context, const wxRect &rect, const Track *track, const wxBrush &selBrush, const wxBrush &unselBrush, bool useSelection = true); + AUDACITY_DLL_API void DrawNegativeOffsetTrackArrows( TrackPanelDrawingContext &context, const wxRect & rect ); } @@ -137,11 +140,11 @@ public: bool hasSolo{ false }; }; -extern int GetWaveYPos(float value, float min, float max, +extern AUDACITY_DLL_API int GetWaveYPos(float value, float min, float max, int height, bool dB, bool outer, float dBr, bool clip); extern float FromDB(float value, double dBRange); -extern float ValueOfPixel(int yy, int height, bool offset, +extern AUDACITY_DLL_API float ValueOfPixel(int yy, int height, bool offset, bool dB, double dBRange, float zoomMin, float zoomMax); #endif // define __AUDACITY_TRACKARTIST__ diff --git a/src/TrackInfo.h b/src/TrackInfo.h index aca577e2b..0be816306 100644 --- a/src/TrackInfo.h +++ b/src/TrackInfo.h @@ -30,6 +30,7 @@ static const int TitleSoloBorderOverlap = 1; namespace TrackInfo { + AUDACITY_DLL_API unsigned MinimumTrackHeight(); struct TCPLine { @@ -65,59 +66,81 @@ namespace TrackInfo using TCPLines = std::vector< TCPLine >; // return y value and height + AUDACITY_DLL_API std::pair< int, int > CalcItemY( const TCPLines &lines, unsigned iItem ); + AUDACITY_DLL_API unsigned DefaultTrackHeight( const TCPLines &topLines ); + AUDACITY_DLL_API void DrawItems ( TrackPanelDrawingContext &context, const wxRect &rect, const Track &track ); + AUDACITY_DLL_API void DrawItems ( TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack, const std::vector &topLines, const std::vector &bottomLines ); + AUDACITY_DLL_API void DrawCloseButton( TrackPanelDrawingContext &context, const wxRect &bev, const Track *pTrack, ButtonHandle *target ); + AUDACITY_DLL_API void CloseTitleDrawFunction ( TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack ); + AUDACITY_DLL_API void MinimizeSyncLockDrawFunction ( TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack ); + AUDACITY_DLL_API void SetTrackInfoFont(wxDC *dc); + AUDACITY_DLL_API void GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest ); + AUDACITY_DLL_API void GetCloseBoxRect(const wxRect & rect, wxRect &dest); + AUDACITY_DLL_API void GetTitleBarHorizontalBounds( const wxRect & rect, wxRect &dest ); + AUDACITY_DLL_API void GetTitleBarRect(const wxRect & rect, wxRect &dest); + AUDACITY_DLL_API void GetSliderHorizontalBounds( const wxPoint &topleft, wxRect &dest ); + AUDACITY_DLL_API void GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest ); + AUDACITY_DLL_API void GetMinimizeRect(const wxRect & rect, wxRect &dest); + AUDACITY_DLL_API void GetSelectButtonHorizontalBounds( const wxRect &rect, wxRect &dest ); + AUDACITY_DLL_API void GetSelectButtonRect(const wxRect & rect, wxRect &dest); + AUDACITY_DLL_API void GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest ); + AUDACITY_DLL_API void GetSyncLockIconRect(const wxRect & rect, wxRect &dest); + AUDACITY_DLL_API bool HideTopItem( const wxRect &rect, const wxRect &subRect, int allowance = 0 ); // Non-member, namespace function relying on TrackPanel to invoke it // when it handles preference update events + AUDACITY_DLL_API void UpdatePrefs( wxWindow *pParent ); + AUDACITY_DLL_API bool HasSoloButton(); }; diff --git a/src/TrackPanel.h b/src/TrackPanel.h index db5e90611..e622bf7e3 100644 --- a/src/TrackPanel.h +++ b/src/TrackPanel.h @@ -213,7 +213,7 @@ protected: }; // A predicate class -struct IsVisibleTrack +struct AUDACITY_DLL_API IsVisibleTrack { IsVisibleTrack(AudacityProject *project); diff --git a/src/TrackPanelAx.h b/src/TrackPanelAx.h index 53824c120..dd2d1c925 100644 --- a/src/TrackPanelAx.h +++ b/src/TrackPanelAx.h @@ -156,7 +156,7 @@ private: int mMessageCount; }; -class TrackFocus final +class AUDACITY_DLL_API TrackFocus final : public ClientData::Base { public: diff --git a/src/TrackUtilities.h b/src/TrackUtilities.h index cd5a71616..c945b7403 100644 --- a/src/TrackUtilities.h +++ b/src/TrackUtilities.h @@ -20,13 +20,18 @@ namespace TrackUtilities { OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID }; /// Move a track up, down, to top or to bottom. - void DoMoveTrack( AudacityProject &project, Track* target, MoveChoice choice ); + AUDACITY_DLL_API void DoMoveTrack( + AudacityProject &project, Track* target, MoveChoice choice ); // "exclusive" mute means mute the chosen track and unmute all others. + AUDACITY_DLL_API void DoTrackMute( AudacityProject &project, Track *pTrack, bool exclusive ); // Type of solo (standard or simple) follows the set preference, unless // exclusive == true, which causes the opposite behavior. + AUDACITY_DLL_API void DoTrackSolo( AudacityProject &project, Track *pTrack, bool exclusive ); + AUDACITY_DLL_API void DoRemoveTrack( AudacityProject &project, Track * toRemove ); + AUDACITY_DLL_API void DoRemoveTracks( AudacityProject & ); } diff --git a/src/UIHandle.h b/src/UIHandle.h index f39006ed2..099aa0654 100644 --- a/src/UIHandle.h +++ b/src/UIHandle.h @@ -32,7 +32,7 @@ struct TrackPanelMouseState; // A TrackPanelCell reports a handle object of some subclass, in response to a // hit test at a mouse position; then this handle processes certain events, // and maintains necessary state through click-drag-release event sequences. -class UIHandle /* not final */ : public TrackPanelDrawable +class AUDACITY_DLL_API UIHandle /* not final */ : public TrackPanelDrawable { public: // See RefreshCode.h for bit flags: diff --git a/src/UserException.h b/src/UserException.h index d669a72a3..a63f458c5 100644 --- a/src/UserException.h +++ b/src/UserException.h @@ -13,7 +13,7 @@ //! Can be thrown when user cancels operations, as with a progress dialog. Delayed handler does nothing /*! This class does not inherit from MessageBoxException. */ -class UserException final : public AudacityException +class AUDACITY_DLL_API UserException final : public AudacityException { public: UserException() {} diff --git a/src/ViewInfo.h b/src/ViewInfo.h index eb3d143cc..4b4182c0b 100644 --- a/src/ViewInfo.h +++ b/src/ViewInfo.h @@ -38,7 +38,7 @@ wxDECLARE_EXPORTED_EVENT( AUDACITY_DLL_API, // This heavyweight wrapper of the SelectedRegion structure emits events // on mutating operations, that other classes can listen for. -class NotifyingSelectedRegion : public wxEvtHandler +class AUDACITY_DLL_API NotifyingSelectedRegion : public wxEvtHandler { public: // Expose SelectedRegion's const accessors diff --git a/src/WaveClip.h b/src/WaveClip.h index f99576105..ca109aa62 100644 --- a/src/WaveClip.h +++ b/src/WaveClip.h @@ -34,7 +34,7 @@ class WaveCache; class WaveTrackCache; class wxFileNameWrapper; -class SpecCache { +class AUDACITY_DLL_API SpecCache { public: // Make invalid cache diff --git a/src/WaveTrack.h b/src/WaveTrack.h index 97e8c2e53..33a2ccfe4 100644 --- a/src/WaveTrack.h +++ b/src/WaveTrack.h @@ -596,7 +596,7 @@ private: // the contents of the WaveTrack are known not to change. It can replace // repeated calls to WaveTrack::Get() (each of which opens and closes at least // one block file). -class WaveTrackCache { +class AUDACITY_DLL_API WaveTrackCache { public: WaveTrackCache() : mBufferSize(0) diff --git a/src/commands/Command.h b/src/commands/Command.h index 9bd64660c..2edfb3697 100644 --- a/src/commands/Command.h +++ b/src/commands/Command.h @@ -72,7 +72,8 @@ public: }; -class CommandImplementation /* not final */ : public OldStyleCommand +class AUDACITY_DLL_API CommandImplementation /* not final */ + : public OldStyleCommand { private: OldStyleCommandType &mType; diff --git a/src/commands/CommandDirectory.h b/src/commands/CommandDirectory.h index 3635871ee..6b3a9691c 100644 --- a/src/commands/CommandDirectory.h +++ b/src/commands/CommandDirectory.h @@ -27,7 +27,7 @@ they are kept separate to make things simpler. class CommandOutputTargets; -class CommandDirectory +class AUDACITY_DLL_API CommandDirectory { private: static std::unique_ptr mInstance; diff --git a/src/commands/CommandFlag.h b/src/commands/CommandFlag.h index d2fb2c5ec..218443e86 100644 --- a/src/commands/CommandFlag.h +++ b/src/commands/CommandFlag.h @@ -85,7 +85,7 @@ struct CommandFlagOptions{ // Construct one statically to register (and reserve) a bit position in the set // an associate it with a test function; those with quickTest = true are cheap // to compute and always checked -class ReservedCommandFlag : public CommandFlag +class AUDACITY_DLL_API ReservedCommandFlag : public CommandFlag { public: using Predicate = std::function< bool( const AudacityProject& ) >; @@ -116,7 +116,7 @@ struct MenuItemEnabler { }; // Typically this is statically constructed: -struct RegisteredMenuItemEnabler{ +struct AUDACITY_DLL_API RegisteredMenuItemEnabler{ RegisteredMenuItemEnabler( const MenuItemEnabler &enabler ); }; diff --git a/src/commands/CommandManager.h b/src/commands/CommandManager.h index fd73c6890..c844eb6b3 100644 --- a/src/commands/CommandManager.h +++ b/src/commands/CommandManager.h @@ -94,7 +94,7 @@ class AUDACITY_DLL_API CommandManager final using CheckFn = std::function< bool(AudacityProject&) >; // For specifying unusual arguments in AddItem - struct Options + struct AUDACITY_DLL_API Options { Options() {} // Allow implicit construction from an accelerator string, which is @@ -366,7 +366,7 @@ private: std::unique_ptr< wxMenuBar > mTempMenuBar; }; -struct MenuVisitor : Registry::Visitor +struct AUDACITY_DLL_API MenuVisitor : Registry::Visitor { // final overrides void BeginGroup( Registry::GroupItem &item, const Path &path ) final; @@ -397,17 +397,18 @@ namespace MenuTable { using namespace Registry; // These are found by dynamic_cast - struct MenuSection { + struct AUDACITY_DLL_API MenuSection { virtual ~MenuSection(); }; - struct WholeMenu { + struct AUDACITY_DLL_API WholeMenu { WholeMenu( bool extend = false ) : extension{ extend } {} virtual ~WholeMenu(); bool extension; }; // Describes a main menu in the toolbar, or a sub-menu - struct MenuItem final : ConcreteGroupItem< false, ToolbarMenuVisitor > + struct AUDACITY_DLL_API MenuItem final + : ConcreteGroupItem< false, ToolbarMenuVisitor > , WholeMenu { // Construction from an internal name and a previously built-up // vector of pointers @@ -460,7 +461,7 @@ namespace MenuTable { // This is used before a sequence of many calls to Command() and // CommandGroup(), so that the finder argument need not be specified // in each call. - class FinderScope : ValueRestorer< CommandHandlerFinder > + class AUDACITY_DLL_API FinderScope : ValueRestorer< CommandHandlerFinder > { static CommandHandlerFinder sFinder; @@ -474,7 +475,7 @@ namespace MenuTable { }; // Describes one command in a menu - struct CommandItem final : SingleItem { + struct AUDACITY_DLL_API CommandItem final : SingleItem { CommandItem(const CommandID &name_, const TranslatableString &label_in_, CommandFunctorPointer callback_, @@ -508,7 +509,7 @@ namespace MenuTable { // Describes several successive commands in a menu that are closely related // and dispatch to one common callback, which will be passed a number // in the CommandContext identifying the command - struct CommandGroupItem final : SingleItem { + struct AUDACITY_DLL_API CommandGroupItem final : SingleItem { CommandGroupItem(const Identifier &name_, std::vector< ComponentInterfaceSymbol > items_, CommandFunctorPointer callback_, @@ -683,7 +684,7 @@ namespace MenuTable { // Typically you make a static object of this type in the .cpp file that // also defines the added menu actions. // pItem can be specified by an expression using the inline functions above. - struct AttachedItem final + struct AUDACITY_DLL_API AttachedItem final { AttachedItem( const Placement &placement, BaseItemPtr pItem ); diff --git a/src/commands/CommandManagerWindowClasses.h b/src/commands/CommandManagerWindowClasses.h index 3e2135476..f8f19373c 100644 --- a/src/commands/CommandManagerWindowClasses.h +++ b/src/commands/CommandManagerWindowClasses.h @@ -25,7 +25,7 @@ struct AUDACITY_DLL_API NonKeystrokeInterceptingWindow \brief Top-level windows that do redirect keystrokes to the associated project's CommandManager inherit this class. */ -struct TopLevelKeystrokeHandlingWindow +struct AUDACITY_DLL_API TopLevelKeystrokeHandlingWindow { virtual ~TopLevelKeystrokeHandlingWindow(); }; diff --git a/src/commands/CommandSignature.h b/src/commands/CommandSignature.h index 623a73512..23e741bba 100644 --- a/src/commands/CommandSignature.h +++ b/src/commands/CommandSignature.h @@ -25,7 +25,7 @@ class wxString; class wxVariant; class Validator; -class CommandSignature +class AUDACITY_DLL_API CommandSignature { private: ParamValueMap mDefaults; diff --git a/src/commands/CommandTargets.h b/src/commands/CommandTargets.h index 7f38c1eaf..e9e021210 100644 --- a/src/commands/CommandTargets.h +++ b/src/commands/CommandTargets.h @@ -70,7 +70,7 @@ public: }; /// Interface for objects that can receive (string) messages from a command -class CommandMessageTarget /* not final */ +class AUDACITY_DLL_API CommandMessageTarget /* not final */ { public: CommandMessageTarget() {mCounts.push_back(0);} @@ -202,7 +202,7 @@ public: }; /// Displays messages from a command in an AudacityMessageBox -class MessageBoxTarget final : public CommandMessageTarget +class AUDACITY_DLL_API MessageBoxTarget final : public CommandMessageTarget { public: virtual ~MessageBoxTarget() {} @@ -210,7 +210,7 @@ public: }; /// Displays messages from a command in a wxStatusBar -class StatusBarTarget final : public CommandMessageTarget +class AUDACITY_DLL_API StatusBarTarget final : public CommandMessageTarget { private: wxStatusBar &mStatus; @@ -385,7 +385,8 @@ public: } }; -class LispifiedCommandOutputTargets : public CommandOutputTargets +class AUDACITY_DLL_API LispifiedCommandOutputTargets + : public CommandOutputTargets { public : LispifiedCommandOutputTargets( CommandOutputTargets & target ); @@ -394,7 +395,7 @@ private: CommandOutputTargets * pToRestore; }; -class BriefCommandOutputTargets : public CommandOutputTargets +class AUDACITY_DLL_API BriefCommandOutputTargets : public CommandOutputTargets { public : BriefCommandOutputTargets( CommandOutputTargets & target ); diff --git a/src/commands/CommandType.h b/src/commands/CommandType.h index 60781b9f6..e18e43678 100644 --- a/src/commands/CommandType.h +++ b/src/commands/CommandType.h @@ -39,7 +39,7 @@ class CommandOutputTargets; class CommandSignature; class wxString; -class OldStyleCommandType : public AudacityCommand +class AUDACITY_DLL_API OldStyleCommandType : public AudacityCommand { private: ComponentInterfaceSymbol mSymbol; diff --git a/src/commands/Keyboard.h b/src/commands/Keyboard.h index 291dc6be2..38c86b062 100644 --- a/src/commands/Keyboard.h +++ b/src/commands/Keyboard.h @@ -21,7 +21,7 @@ struct NormalizedKeyStringTag; // Case insensitive comparisons using NormalizedKeyStringBase = TaggedIdentifier; -struct NormalizedKeyString : NormalizedKeyStringBase +struct AUDACITY_DLL_API NormalizedKeyString : NormalizedKeyStringBase { NormalizedKeyString() = default; explicit NormalizedKeyString( const wxString &key ); @@ -35,6 +35,7 @@ namespace std : hash< NormalizedKeyStringBase > {}; } +AUDACITY_DLL_API NormalizedKeyString KeyEventToKeyString(const wxKeyEvent & keyEvent); #endif diff --git a/src/commands/LoadCommands.h b/src/commands/LoadCommands.h index 5b6a81993..6c7c99161 100644 --- a/src/commands/LoadCommands.h +++ b/src/commands/LoadCommands.h @@ -27,7 +27,7 @@ class AudacityCommand; // /////////////////////////////////////////////////////////////////////////////// -class BuiltinCommandsModule final : public ModuleInterface +class AUDACITY_DLL_API BuiltinCommandsModule final : public ModuleInterface { public: BuiltinCommandsModule(const wxString *path); diff --git a/src/commands/ScreenshotCommand.h b/src/commands/ScreenshotCommand.h index 091cb3244..6067873a3 100644 --- a/src/commands/ScreenshotCommand.h +++ b/src/commands/ScreenshotCommand.h @@ -28,7 +28,7 @@ class AdornedRulerPanel; class AudacityProject; class CommandContext; -class ScreenshotCommand : public AudacityCommand +class AUDACITY_DLL_API ScreenshotCommand : public AudacityCommand { public: enum kBackgrounds diff --git a/src/commands/ScriptCommandRelay.h b/src/commands/ScriptCommandRelay.h index eeb9de5e3..da8361a38 100644 --- a/src/commands/ScriptCommandRelay.h +++ b/src/commands/ScriptCommandRelay.h @@ -25,7 +25,7 @@ class wxString; typedef int(*tpExecScriptServerFunc)(wxString * pIn, wxString * pOut); typedef int(*tpRegScriptServerFunc)(tpExecScriptServerFunc pFn); -class ScriptCommandRelay +class AUDACITY_DLL_API ScriptCommandRelay { public: static void StartScriptServer(tpRegScriptServerFunc scriptFn); diff --git a/src/effects/Effect.h b/src/effects/Effect.h index ed73e5566..8eeb09a8d 100644 --- a/src/effects/Effect.h +++ b/src/effects/Effect.h @@ -376,7 +376,7 @@ protected: // For the use of analyzers, which don't need to make output wave tracks, // but may need to add label tracks. - class AddedAnalysisTrack { + class AUDACITY_DLL_API AddedAnalysisTrack { friend Effect; AddedAnalysisTrack(Effect *pEffect, const wxString &name); AddedAnalysisTrack(const AddedAnalysisTrack&) PROHIBITED; @@ -406,7 +406,7 @@ protected: // For the use of analyzers, which don't need to make output wave tracks, // but may need to modify label tracks. - class ModifiedAnalysisTrack { + class AUDACITY_DLL_API ModifiedAnalysisTrack { friend Effect; ModifiedAnalysisTrack (Effect *pEffect, const LabelTrack *pOrigTrack, const wxString &name); diff --git a/src/effects/EffectUI.h b/src/effects/EffectUI.h index 307a9fe70..7d7050e3b 100644 --- a/src/effects/EffectUI.h +++ b/src/effects/EffectUI.h @@ -220,6 +220,7 @@ class CommandContext; namespace EffectUI { + AUDACITY_DLL_API wxDialog *DialogFactory( wxWindow &parent, EffectHostInterface *pHost, EffectUIClientInterface *client); @@ -227,7 +228,7 @@ namespace EffectUI { // Returns true on success. Will only operate on tracks that // have the "selected" flag set to true, which is consistent with // Audacity's standard UI. - bool DoEffect( + AUDACITY_DLL_API bool DoEffect( const PluginID & ID, const CommandContext &context, unsigned flags ); } diff --git a/src/effects/Generator.h b/src/effects/Generator.h index f26034b18..e76cb38ae 100644 --- a/src/effects/Generator.h +++ b/src/effects/Generator.h @@ -51,7 +51,7 @@ protected: // Postcondition: // If mDuration was valid (>= 0), then the tracks are replaced by the // generated results and true is returned. Otherwise, return false. - bool Process() override; + AUDACITY_DLL_API bool Process() override; }; // Abstract generator which creates the sound in discrete blocks, whilst diff --git a/src/effects/LoadEffects.h b/src/effects/LoadEffects.h index 855d9b10b..58aff2e30 100644 --- a/src/effects/LoadEffects.h +++ b/src/effects/LoadEffects.h @@ -26,7 +26,7 @@ class Effect; // /////////////////////////////////////////////////////////////////////////////// -class BuiltinEffectsModule final : public ModuleInterface +class AUDACITY_DLL_API BuiltinEffectsModule final : public ModuleInterface { public: BuiltinEffectsModule(const wxString *path); diff --git a/src/effects/TimeWarper.h b/src/effects/TimeWarper.h index 4a79bcd1d..223e48d03 100644 --- a/src/effects/TimeWarper.h +++ b/src/effects/TimeWarper.h @@ -58,20 +58,20 @@ of the warped region. #include "../MemoryX.h" -class TimeWarper /* not final */ +class AUDACITY_DLL_API TimeWarper /* not final */ { public: virtual ~TimeWarper(); virtual double Warp(double originalTime) const = 0; }; -class IdentityTimeWarper final : public TimeWarper +class AUDACITY_DLL_API IdentityTimeWarper final : public TimeWarper { public: double Warp(double originalTime) const override; }; -class ShiftTimeWarper final : public TimeWarper +class AUDACITY_DLL_API ShiftTimeWarper final : public TimeWarper { private: std::unique_ptr mWarper; @@ -83,7 +83,7 @@ public: double Warp(double originalTime) const override; }; -class LinearTimeWarper final : public TimeWarper +class AUDACITY_DLL_API LinearTimeWarper final : public TimeWarper { private: double mScale; @@ -97,7 +97,7 @@ public: double Warp(double originalTime) const override; }; -class LinearInputRateTimeWarper final : public TimeWarper +class AUDACITY_DLL_API LinearInputRateTimeWarper final : public TimeWarper { private: LinearTimeWarper mRateWarper; @@ -110,7 +110,7 @@ public: double Warp(double originalTime) const override; }; -class LinearOutputRateTimeWarper final : public TimeWarper +class AUDACITY_DLL_API LinearOutputRateTimeWarper final : public TimeWarper { private: LinearTimeWarper mTimeWarper; @@ -125,7 +125,7 @@ public: double Warp(double originalTime) const override; }; -class LinearInputStretchTimeWarper final : public TimeWarper +class AUDACITY_DLL_API LinearInputStretchTimeWarper final : public TimeWarper { private: LinearTimeWarper mTimeWarper; @@ -138,7 +138,7 @@ public: double Warp(double originalTime) const override; }; -class LinearOutputStretchTimeWarper final : public TimeWarper +class AUDACITY_DLL_API LinearOutputStretchTimeWarper final : public TimeWarper { private: LinearTimeWarper mTimeWarper; @@ -151,7 +151,7 @@ public: double Warp(double originalTime) const override; }; -class GeometricInputTimeWarper final : public TimeWarper +class AUDACITY_DLL_API GeometricInputTimeWarper final : public TimeWarper { private: LinearTimeWarper mTimeWarper; @@ -164,7 +164,7 @@ public: double Warp(double originalTime) const override; }; -class GeometricOutputTimeWarper final : public TimeWarper +class AUDACITY_DLL_API GeometricOutputTimeWarper final : public TimeWarper { private: LinearTimeWarper mTimeWarper; @@ -177,7 +177,7 @@ public: double Warp(double originalTime) const override; }; -class PasteTimeWarper final : public TimeWarper +class AUDACITY_DLL_API PasteTimeWarper final : public TimeWarper { private: const double mOldT1, mNewT1; @@ -188,7 +188,7 @@ public: // Note: this assumes that tStart is a fixed point of warper->warp() -class RegionTimeWarper final : public TimeWarper +class AUDACITY_DLL_API RegionTimeWarper final : public TimeWarper { private: std::unique_ptr mWarper; diff --git a/src/effects/TwoPassSimpleMono.h b/src/effects/TwoPassSimpleMono.h index 425ce2484..696988391 100644 --- a/src/effects/TwoPassSimpleMono.h +++ b/src/effects/TwoPassSimpleMono.h @@ -17,7 +17,7 @@ class WaveTrack; -class EffectTwoPassSimpleMono /* not final */ : public Effect +class AUDACITY_DLL_API EffectTwoPassSimpleMono /* not final */ : public Effect { public: // Effect implementation diff --git a/src/export/Export.h b/src/export/Export.h index 7aa2acd9c..825a5a61b 100644 --- a/src/export/Export.h +++ b/src/export/Export.h @@ -158,7 +158,8 @@ using ExportPluginArray = std::vector < std::unique_ptr< ExportPlugin > > ; //---------------------------------------------------------------------------- // For a file suffix change from the options. -wxDECLARE_EVENT(AUDACITY_FILE_SUFFIX_EVENT, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, + AUDACITY_FILE_SUFFIX_EVENT, wxCommandEvent); class AUDACITY_DLL_API Exporter final : public wxEvtHandler { @@ -172,7 +173,7 @@ public: // Register factories, not plugin objects themselves, which allows them // to have some fresh state variables each time export begins again // and to compute translated strings for the current locale - struct RegisteredExportPlugin{ + struct AUDACITY_DLL_API RegisteredExportPlugin{ RegisteredExportPlugin( const Identifier &id, // an internal string naming the plug-in const ExportPluginFactory&, @@ -322,16 +323,17 @@ private: DECLARE_EVENT_TABLE() }; -TranslatableString AudacityExportCaptionStr(); -TranslatableString AudacityExportMessageStr(); +AUDACITY_DLL_API TranslatableString AudacityExportCaptionStr(); +AUDACITY_DLL_API TranslatableString AudacityExportMessageStr(); /// We have many Export errors that are essentially anonymous /// and are distinguished only by an error code number. /// Rather than repeat the code, we have it just once. -void ShowExportErrorDialog(wxString ErrorCode, +AUDACITY_DLL_API void ShowExportErrorDialog(wxString ErrorCode, TranslatableString message = AudacityExportMessageStr(), const TranslatableString& caption = AudacityExportCaptionStr()); +AUDACITY_DLL_API void ShowDiskFullExportErrorDialog(const wxFileNameWrapper &fileName); #endif diff --git a/src/export/ExportMultiple.h b/src/export/ExportMultiple.h index c2ee4d092..0f5bff6e6 100644 --- a/src/export/ExportMultiple.h +++ b/src/export/ExportMultiple.h @@ -29,7 +29,7 @@ class SelectionState; class ShuttleGui; class Track; -class ExportMultipleDialog final : public wxDialogWrapper +class AUDACITY_DLL_API ExportMultipleDialog final : public wxDialogWrapper { public: diff --git a/src/import/Import.h b/src/import/Import.h index 5272059f8..fe0f503cf 100644 --- a/src/import/Import.h +++ b/src/import/Import.h @@ -77,12 +77,12 @@ class ExtImportItem wxArrayString mime_types; }; -class Importer { +class AUDACITY_DLL_API Importer { public: // Objects of this type are statically constructed in files implementing // subclasses of ImportPlugin - struct RegisteredImportPlugin{ + struct AUDACITY_DLL_API RegisteredImportPlugin{ RegisteredImportPlugin( const Identifier &id, // an internal string naming the plug-in std::unique_ptr, diff --git a/src/import/ImportPlugin.h b/src/import/ImportPlugin.h index 71caab36b..0f282ba64 100644 --- a/src/import/ImportPlugin.h +++ b/src/import/ImportPlugin.h @@ -60,7 +60,7 @@ class Tags; class ImportFileHandle; -class ImportPlugin /* not final */ +class AUDACITY_DLL_API ImportPlugin /* not final */ { public: @@ -100,7 +100,7 @@ protected: class WaveTrack; using TrackHolders = std::vector< std::vector< std::shared_ptr > >; -class ImportFileHandle /* not final */ +class AUDACITY_DLL_API ImportFileHandle /* not final */ { public: ImportFileHandle(const FilePath & filename); diff --git a/src/prefs/EffectsPrefs.h b/src/prefs/EffectsPrefs.h index 30aa373ee..41f3acca0 100644 --- a/src/prefs/EffectsPrefs.h +++ b/src/prefs/EffectsPrefs.h @@ -38,5 +38,5 @@ class EffectsPrefs final : public PrefsPanel void Populate(); }; -extern ChoiceSetting EffectsGroupBy; +AUDACITY_DLL_API extern ChoiceSetting EffectsGroupBy; #endif diff --git a/src/prefs/GUIPrefs.h b/src/prefs/GUIPrefs.h index 79d0c5db9..926710064 100644 --- a/src/prefs/GUIPrefs.h +++ b/src/prefs/GUIPrefs.h @@ -22,7 +22,7 @@ class ShuttleGui; #define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") } -class GUIPrefs final : public PrefsPanel +class AUDACITY_DLL_API GUIPrefs final : public PrefsPanel { public: GUIPrefs(wxWindow * parent, wxWindowID winid); @@ -68,10 +68,11 @@ class GUIPrefs final : public PrefsPanel int mDefaultRangeIndex; }; +AUDACITY_DLL_API int ShowClippingPrefsID(); int ShowTrackNameInWaveformPrefsID(); -extern ChoiceSetting +extern AUDACITY_DLL_API ChoiceSetting GUIManualLocation ; diff --git a/src/prefs/ImportExportPrefs.h b/src/prefs/ImportExportPrefs.h index 5cdabba3b..b4d05d3f9 100644 --- a/src/prefs/ImportExportPrefs.h +++ b/src/prefs/ImportExportPrefs.h @@ -23,7 +23,7 @@ class ShuttleGui; template< typename Enum > class EnumSetting; -class ImportExportPrefs final : public PrefsPanel +class AUDACITY_DLL_API ImportExportPrefs final : public PrefsPanel { public: static EnumSetting< bool > ExportDownMixSetting; diff --git a/src/prefs/PrefsDialog.h b/src/prefs/PrefsDialog.h index b8f27e071..1c2cb7e10 100644 --- a/src/prefs/PrefsDialog.h +++ b/src/prefs/PrefsDialog.h @@ -30,7 +30,7 @@ class ShuttleGui; class AudacityProject; -class PrefsDialog /* not final */ : public wxDialogWrapper +class AUDACITY_DLL_API PrefsDialog /* not final */ : public wxDialogWrapper { public: PrefsDialog(wxWindow * parent, @@ -77,7 +77,7 @@ private: // This adds code appropriate only to the original use of PrefsDialog for // global settings -- not its reuses elsewhere as in View Settings -class GlobalPrefsDialog final : public PrefsDialog +class AUDACITY_DLL_API GlobalPrefsDialog final : public PrefsDialog { public: GlobalPrefsDialog( @@ -90,6 +90,6 @@ public: }; class AudacityProject; -void DoReloadPreferences( AudacityProject &project ); +void AUDACITY_DLL_API DoReloadPreferences( AudacityProject &project ); #endif diff --git a/src/prefs/PrefsPanel.h b/src/prefs/PrefsPanel.h index 69718ea54..bc8cbbd75 100644 --- a/src/prefs/PrefsPanel.h +++ b/src/prefs/PrefsPanel.h @@ -46,7 +46,8 @@ MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs. class AudacityProject; class ShuttleGui; -class PrefsPanel /* not final */ : public wxPanelWrapper, ComponentInterface +class AUDACITY_DLL_API PrefsPanel /* not final */ + : public wxPanelWrapper, ComponentInterface { public: // An array of PrefsNode specifies the tree of pages in pre-order traversal. @@ -79,7 +80,7 @@ class PrefsPanel /* not final */ : public wxPanelWrapper, ComponentInterface // Typically you make a static object of this type in the .cpp file that // also implements the PrefsPanel subclass. - struct Registration final + struct AUDACITY_DLL_API Registration final { Registration( const wxString &name, const Factory &factory, bool expanded = true, diff --git a/src/prefs/QualityPrefs.h b/src/prefs/QualityPrefs.h index 04476e89c..9074bdebc 100644 --- a/src/prefs/QualityPrefs.h +++ b/src/prefs/QualityPrefs.h @@ -25,7 +25,7 @@ enum DitherType : unsigned; #define QUALITY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Quality") } -class QualityPrefs final : public PrefsPanel +class AUDACITY_DLL_API QualityPrefs final : public PrefsPanel { public: QualityPrefs(wxWindow * parent, wxWindowID winid); diff --git a/src/prefs/SpectrogramSettings.h b/src/prefs/SpectrogramSettings.h index db8286c26..f608a5133 100644 --- a/src/prefs/SpectrogramSettings.h +++ b/src/prefs/SpectrogramSettings.h @@ -23,13 +23,13 @@ class NumberScale; class SpectrumPrefs; class wxArrayStringEx; -class SpectrogramSettings : public PrefsListener +class AUDACITY_DLL_API SpectrogramSettings : public PrefsListener { friend class SpectrumPrefs; public: // Singleton for settings that are not per-track - class Globals + class AUDACITY_DLL_API Globals { public: static Globals &Get(); diff --git a/src/prefs/TracksBehaviorsPrefs.h b/src/prefs/TracksBehaviorsPrefs.h index 44a48f933..06bf46b3b 100644 --- a/src/prefs/TracksBehaviorsPrefs.h +++ b/src/prefs/TracksBehaviorsPrefs.h @@ -21,7 +21,7 @@ class ShuttleGui; #define TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks Behaviors") } -class TracksBehaviorsPrefs final : public PrefsPanel +class AUDACITY_DLL_API TracksBehaviorsPrefs final : public PrefsPanel { public: TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid); @@ -40,8 +40,8 @@ class TracksBehaviorsPrefs final : public PrefsPanel void PopulateOrExchange(ShuttleGui & S) override; }; -extern ChoiceSetting TracksBehaviorsSolo; +extern AUDACITY_DLL_API ChoiceSetting TracksBehaviorsSolo; -bool GetEditClipsCanMove(); +AUDACITY_DLL_API bool GetEditClipsCanMove(); #endif diff --git a/src/prefs/TracksPrefs.h b/src/prefs/TracksPrefs.h index 6e751e95e..63c6ea25e 100644 --- a/src/prefs/TracksPrefs.h +++ b/src/prefs/TracksPrefs.h @@ -24,7 +24,7 @@ class ShuttleGui; #define TRACKS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks") } -class TracksPrefs final : public PrefsPanel +class AUDACITY_DLL_API TracksPrefs final : public PrefsPanel { public: TracksPrefs(wxWindow * parent, wxWindowID winid); diff --git a/src/prefs/WaveformSettings.h b/src/prefs/WaveformSettings.h index 68a9a0934..2a2551dbc 100644 --- a/src/prefs/WaveformSettings.h +++ b/src/prefs/WaveformSettings.h @@ -16,12 +16,12 @@ Paul Licameli class EnumValueSymbols; -class WaveformSettings : public PrefsListener +class AUDACITY_DLL_API WaveformSettings : public PrefsListener { public: // Singleton for settings that are not per-track - class Globals + class AUDACITY_DLL_API Globals { public: static Globals &Get(); diff --git a/src/toolbars/ControlToolBar.h b/src/toolbars/ControlToolBar.h index f5f51da8d..d6a8d1432 100644 --- a/src/toolbars/ControlToolBar.h +++ b/src/toolbars/ControlToolBar.h @@ -29,7 +29,7 @@ class AButton; class AudacityProject; // In the GUI, ControlToolBar appears as the "Transport Toolbar". "Control Toolbar" is historic. -class ControlToolBar final : public ToolBar { +class AUDACITY_DLL_API ControlToolBar final : public ToolBar { public: diff --git a/src/toolbars/SelectionBar.h b/src/toolbars/SelectionBar.h index ed03e3869..b1e85968a 100644 --- a/src/toolbars/SelectionBar.h +++ b/src/toolbars/SelectionBar.h @@ -42,7 +42,7 @@ class AudacityProject; class SelectionBarListener; class NumericTextCtrl; -class SelectionBar final : public ToolBar { +class AUDACITY_DLL_API SelectionBar final : public ToolBar { public: SelectionBar( AudacityProject &project ); diff --git a/src/toolbars/ToolBar.h b/src/toolbars/ToolBar.h index f6472a401..d04edd6d4 100644 --- a/src/toolbars/ToolBar.h +++ b/src/toolbars/ToolBar.h @@ -88,7 +88,7 @@ enum { ToolBarFloatMargin = 1 }; class AudacityProject; -class ToolBar /* not final */ +class AUDACITY_DLL_API ToolBar /* not final */ : public wxPanelWrapper , protected PrefsListener { @@ -254,7 +254,7 @@ public: friend class ToolBarResizer; }; -struct RegisteredToolbarFactory { +struct AUDACITY_DLL_API RegisteredToolbarFactory { using Function = std::function< ToolBar::Holder( AudacityProject & ) >; using Functions = std::vector< Function >; diff --git a/src/toolbars/ToolManager.h b/src/toolbars/ToolManager.h index a96a20751..188aaffa5 100644 --- a/src/toolbars/ToolManager.h +++ b/src/toolbars/ToolManager.h @@ -47,7 +47,7 @@ class ToolFrame; /// class ToolManager //////////////////////////////////////////////////////////// -class ToolManager final +class AUDACITY_DLL_API ToolManager final : public wxEvtHandler , public wxEventFilter , public ClientData::Base @@ -221,7 +221,7 @@ public: // Construct a static instance of this class to add a menu item that shows and // hides a toolbar -struct AttachedToolBarMenuItem : CommandHandlerObject { +struct AUDACITY_DLL_API AttachedToolBarMenuItem : CommandHandlerObject { AttachedToolBarMenuItem( ToolBarID id, const CommandID &name, const TranslatableString &label_in, const Registry::OrderingHint &hint = {}, diff --git a/src/tracks/labeltrack/ui/LabelTrackView.h b/src/tracks/labeltrack/ui/LabelTrackView.h index 848f67660..dbc160fd8 100644 --- a/src/tracks/labeltrack/ui/LabelTrackView.h +++ b/src/tracks/labeltrack/ui/LabelTrackView.h @@ -36,7 +36,7 @@ constexpr int MAX_NUM_ROWS =80; class wxKeyEvent; -class LabelTrackView final : public CommonTrackView +class AUDACITY_DLL_API LabelTrackView final : public CommonTrackView { LabelTrackView( const LabelTrackView& ) = delete; LabelTrackView &operator=( const LabelTrackView& ) = delete; diff --git a/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.h b/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.h index 3bd94588b..50b1a7f74 100644 --- a/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.h +++ b/src/tracks/playabletrack/ui/PlayableTrackButtonHandles.h @@ -14,7 +14,7 @@ Paul Licameli split from TrackPanel.cpp #include "../../ui/ButtonHandle.h" class wxMouseState; -class MuteButtonHandle final : public ButtonHandle +class AUDACITY_DLL_API MuteButtonHandle final : public ButtonHandle { MuteButtonHandle(const MuteButtonHandle&) = delete; @@ -45,7 +45,7 @@ public: //////////////////////////////////////////////////////////////////////////////// -class SoloButtonHandle final : public ButtonHandle +class AUDACITY_DLL_API SoloButtonHandle final : public ButtonHandle { SoloButtonHandle(const SoloButtonHandle&) = delete; diff --git a/src/tracks/playabletrack/ui/PlayableTrackControls.h b/src/tracks/playabletrack/ui/PlayableTrackControls.h index 437686d0f..f1273e0e6 100644 --- a/src/tracks/playabletrack/ui/PlayableTrackControls.h +++ b/src/tracks/playabletrack/ui/PlayableTrackControls.h @@ -16,7 +16,8 @@ class wxRect; class Track; -class PlayableTrackControls /* not final */ : public CommonTrackControls +class AUDACITY_DLL_API PlayableTrackControls /* not final */ + : public CommonTrackControls { public: // To help subclasses define GetTCPLines diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackControls.h b/src/tracks/playabletrack/wavetrack/ui/WaveTrackControls.h index bbe8fb558..62cd6f6a5 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackControls.h +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackControls.h @@ -23,7 +23,7 @@ class WaveTrack; class wxEvent; class wxWindow; -class WaveTrackControls final : public PlayableTrackControls +class AUDACITY_DLL_API WaveTrackControls final : public PlayableTrackControls { WaveTrackControls(const WaveTrackControls&) = delete; WaveTrackControls &operator=(const WaveTrackControls&) = delete; @@ -70,7 +70,7 @@ private: #include "../../../../widgets/PopupMenuTable.h" -struct WaveTrackPopupMenuTable : public PopupMenuTable +struct AUDACITY_DLL_API WaveTrackPopupMenuTable : public PopupMenuTable { using PopupMenuTable::PopupMenuTable; PlayableTrackControls::InitMenuData *mpData{}; @@ -81,6 +81,7 @@ protected: }; // Expose the wave track menu table to registration of menu items +AUDACITY_DLL_API WaveTrackPopupMenuTable &GetWaveTrackMenuTable(); #endif diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackVRulerControls.h b/src/tracks/playabletrack/wavetrack/ui/WaveTrackVRulerControls.h index cc6c5562f..39664c53a 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackVRulerControls.h +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackVRulerControls.h @@ -18,9 +18,9 @@ class WaveTrack; namespace WaveTrackVRulerControls { - Ruler &ScratchRuler(); + AUDACITY_DLL_API Ruler &ScratchRuler(); - void DoDraw( TrackVRulerControls &controls, + AUDACITY_DLL_API void DoDraw( TrackVRulerControls &controls, TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass ); }; diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackVZoomHandle.h b/src/tracks/playabletrack/wavetrack/ui/WaveTrackVZoomHandle.h index 35a991cca..5ac4b51d0 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackVZoomHandle.h +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackVZoomHandle.h @@ -23,8 +23,10 @@ namespace WaveTrackVZoomHandle // See RefreshCode.h for bit flags: using Result = unsigned; + AUDACITY_DLL_API HitTestPreview HitPreview(const wxMouseState &state); + AUDACITY_DLL_API bool IsDragZooming(int zoomStart, int zoomEnd); using DoZoomFunction = void (*)( AudacityProject *pProject, @@ -33,27 +35,31 @@ namespace WaveTrackVZoomHandle const wxRect &rect, int zoomStart, int zoomEnd, bool fixedMousePoint); + AUDACITY_DLL_API Result DoDrag( const TrackPanelMouseEvent &event, AudacityProject *pProject, int zoomStart, int &zoomEnd ); + AUDACITY_DLL_API Result DoRelease( const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent, WaveTrack *pTrack, const wxRect &mRect, DoZoomFunction doZoom, PopupMenuTable &table, int zoomStart, int zoomEnd ); + AUDACITY_DLL_API void DoDraw( TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass, int zoomStart, int zoomEnd ); + AUDACITY_DLL_API wxRect DoDrawingArea( const wxRect &rect, const wxRect &panelRect, unsigned iPass ); }; #include "../../../../widgets/PopupMenuTable.h" // to inherit -class WaveTrackVRulerMenuTable +class AUDACITY_DLL_API WaveTrackVRulerMenuTable : public PopupMenuTable , private PrefsListener { diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackView.h b/src/tracks/playabletrack/wavetrack/ui/WaveTrackView.h index 2ad239675..b7a60b484 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackView.h +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackView.h @@ -21,7 +21,7 @@ class TranslatableString; class WaveTrack; class WaveTrackView; -class WaveTrackSubView : public CommonTrackView +class AUDACITY_DLL_API WaveTrackSubView : public CommonTrackView { public: @@ -65,7 +65,7 @@ using WaveTrackSubViews = ClientData::Site< WaveTrackView, WaveTrackSubView, ClientData::SkipCopying, std::shared_ptr >; -class WaveTrackView final +class AUDACITY_DLL_API WaveTrackView final : public CommonTrackView , public WaveTrackSubViews { @@ -156,7 +156,7 @@ class SelectedRegion; class WaveClip; class ZoomInfo; -struct ClipParameters +struct AUDACITY_DLL_API ClipParameters { // Do a bunch of calculations common to waveform and spectrum drawing. ClipParameters diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h b/src/tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h index 194f4ade3..6735a9e4d 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h @@ -83,12 +83,12 @@ namespace WaveTrackViewConstants Display ConvertLegacyDisplayValue(int oldValue); //! String identifier for a preference for one of each type of view - extern const EnumValueSymbol MultiViewSymbol; + extern AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol; } #include -struct WaveTrackSubViewType { +struct AUDACITY_DLL_API WaveTrackSubViewType { using Display = WaveTrackViewConstants::Display; // Identifies the type session-wide, and determines relative position in @@ -105,7 +105,7 @@ struct WaveTrackSubViewType { { return id == other.id; } // Typically a file scope statically constructed object - struct RegisteredType { + struct AUDACITY_DLL_API RegisteredType { RegisteredType( WaveTrackSubViewType type ); }; diff --git a/src/tracks/ui/ButtonHandle.h b/src/tracks/ui/ButtonHandle.h index 99356f471..e3893acf9 100644 --- a/src/tracks/ui/ButtonHandle.h +++ b/src/tracks/ui/ButtonHandle.h @@ -22,7 +22,7 @@ class TranslatableString; /// \brief A UIHandle for a TrackPanel button, such as the Mute and Solo /// buttons. -class ButtonHandle /* not final */ : public UIHandle +class AUDACITY_DLL_API ButtonHandle /* not final */ : public UIHandle { ButtonHandle(const ButtonHandle&) = delete; diff --git a/src/tracks/ui/CommonTrackControls.h b/src/tracks/ui/CommonTrackControls.h index c441f8474..0ce8a5c76 100644 --- a/src/tracks/ui/CommonTrackControls.h +++ b/src/tracks/ui/CommonTrackControls.h @@ -23,7 +23,7 @@ class TrackSelectHandle; namespace TrackInfo{ struct TCPLine; } using TCPLines = std::vector< TrackInfo::TCPLine >; -class CommonTrackControls /* not final */ : public TrackControls +class AUDACITY_DLL_API CommonTrackControls /* not final */ : public TrackControls { public: using TrackControls::TrackControls; diff --git a/src/tracks/ui/CommonTrackView.h b/src/tracks/ui/CommonTrackView.h index f7c0e483a..a3d73ab35 100644 --- a/src/tracks/ui/CommonTrackView.h +++ b/src/tracks/ui/CommonTrackView.h @@ -16,7 +16,7 @@ Paul Licameli split from class TrackView class SelectHandle; class TimeShiftHandle; -class CommonTrackView /* not final */ : public TrackView +class AUDACITY_DLL_API CommonTrackView /* not final */ : public TrackView { public: using TrackView::TrackView; diff --git a/src/tracks/ui/EnvelopeHandle.h b/src/tracks/ui/EnvelopeHandle.h index b9436ada1..4c1341909 100644 --- a/src/tracks/ui/EnvelopeHandle.h +++ b/src/tracks/ui/EnvelopeHandle.h @@ -24,7 +24,7 @@ class ViewInfo; class TimeTrack; class WaveTrack; -class EnvelopeHandle final : public UIHandle +class AUDACITY_DLL_API EnvelopeHandle final : public UIHandle { EnvelopeHandle(const EnvelopeHandle&) = delete; EnvelopeHandle &operator=(const EnvelopeHandle&) = delete; diff --git a/src/tracks/ui/Scrubbing.h b/src/tracks/ui/Scrubbing.h index 7563ba834..f78b62a33 100644 --- a/src/tracks/ui/Scrubbing.h +++ b/src/tracks/ui/Scrubbing.h @@ -37,7 +37,7 @@ class TranslatableString; #endif // Scrub state object -class Scrubber final +class AUDACITY_DLL_API Scrubber final : public wxEvtHandler , public ClientData::Base , private PrefsListener diff --git a/src/tracks/ui/SelectHandle.h b/src/tracks/ui/SelectHandle.h index 84ff8a8dc..bcff8dccf 100644 --- a/src/tracks/ui/SelectHandle.h +++ b/src/tracks/ui/SelectHandle.h @@ -27,7 +27,7 @@ class ViewInfo; class WaveTrack; class wxMouseState; -class SelectHandle : public UIHandle +class AUDACITY_DLL_API SelectHandle : public UIHandle { SelectHandle(const SelectHandle&); diff --git a/src/tracks/ui/SliderHandle.h b/src/tracks/ui/SliderHandle.h index d707292ab..13bfb9943 100644 --- a/src/tracks/ui/SliderHandle.h +++ b/src/tracks/ui/SliderHandle.h @@ -18,7 +18,7 @@ class LWSlider; class Track; class TranslatableString; -class SliderHandle /* not final */ : public UIHandle +class AUDACITY_DLL_API SliderHandle /* not final */ : public UIHandle { SliderHandle(const SliderHandle&) = delete; diff --git a/src/tracks/ui/TimeShiftHandle.h b/src/tracks/ui/TimeShiftHandle.h index f095ecb3b..0b8ecfe6f 100644 --- a/src/tracks/ui/TimeShiftHandle.h +++ b/src/tracks/ui/TimeShiftHandle.h @@ -28,7 +28,7 @@ class TrackInterval; class ViewInfo; //! Abstract base class for policies to manipulate a track type with the Time Shift tool -class TrackShifter { +class AUDACITY_DLL_API TrackShifter { public: TrackShifter(); TrackShifter(const TrackShifter&) PROHIBITED; @@ -199,7 +199,7 @@ using MakeTrackShifter = AttachedVirtualFunction< class ViewInfo; -struct ClipMoveState { +struct AUDACITY_DLL_API ClipMoveState { ClipMoveState() = default; ClipMoveState(const ClipMoveState&) PROHIBITED; @@ -251,7 +251,7 @@ struct ClipMoveState { } }; -class TimeShiftHandle final : public UIHandle +class AUDACITY_DLL_API TimeShiftHandle final : public UIHandle { TimeShiftHandle(const TimeShiftHandle&) = delete; static HitTestPreview HitPreview diff --git a/src/tracks/ui/TrackControls.h b/src/tracks/ui/TrackControls.h index c0723a00c..2d05ac9f7 100644 --- a/src/tracks/ui/TrackControls.h +++ b/src/tracks/ui/TrackControls.h @@ -15,7 +15,7 @@ Paul Licameli split from TrackPanel.cpp class Track; -class TrackControls /* not final */ : public CommonTrackCell +class AUDACITY_DLL_API TrackControls /* not final */ : public CommonTrackCell , public std::enable_shared_from_this< TrackControls > { public: diff --git a/src/tracks/ui/TrackVRulerControls.h b/src/tracks/ui/TrackVRulerControls.h index 0c307fae2..a934927b8 100644 --- a/src/tracks/ui/TrackVRulerControls.h +++ b/src/tracks/ui/TrackVRulerControls.h @@ -19,7 +19,8 @@ class wxDC; const int kGuard = 5; // 5 pixels to reduce risk of VZooming accidentally -class TrackVRulerControls /* not final */ : public CommonTrackPanelCell +class AUDACITY_DLL_API TrackVRulerControls /* not final */ + : public CommonTrackPanelCell , public std::enable_shared_from_this< TrackVRulerControls > { public: diff --git a/src/tracks/ui/TrackView.h b/src/tracks/ui/TrackView.h index 4037b5705..d230b7b0c 100644 --- a/src/tracks/ui/TrackView.h +++ b/src/tracks/ui/TrackView.h @@ -19,7 +19,7 @@ class TrackList; class TrackVRulerControls; class TrackPanelResizerCell; -class TrackView /* not final */ : public CommonTrackCell +class AUDACITY_DLL_API TrackView /* not final */ : public CommonTrackCell , public std::enable_shared_from_this { TrackView( const TrackView& ) = delete; diff --git a/src/widgets/AButton.h b/src/widgets/AButton.h index f9ce3103d..d592af214 100644 --- a/src/widgets/AButton.h +++ b/src/widgets/AButton.h @@ -22,7 +22,7 @@ class wxImage; class TranslatableString; -class AButton final : public wxWindow { +class AUDACITY_DLL_API AButton final : public wxWindow { friend class AButtonAx; class Listener; diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index a00e95225..0153b96be 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -68,7 +68,7 @@ or ASlider. #if wxUSE_ACCESSIBILITY #include "WindowAccessible.h" -class ASliderAx final : public WindowAccessible +class AUDACITY_DLL_API ASliderAx final : public WindowAccessible { public: ASliderAx(wxWindow * window); diff --git a/src/widgets/ASlider.h b/src/widgets/ASlider.h index 8b8d3b116..5a2c60842 100644 --- a/src/widgets/ASlider.h +++ b/src/widgets/ASlider.h @@ -58,7 +58,7 @@ class TipWindow; // which uses this class, is below. // -class LWSlider +class AUDACITY_DLL_API LWSlider { friend class ASlider; friend class ASliderAx; @@ -230,7 +230,7 @@ class LWSlider bool mEnabled; }; -class ASlider /* not final */ : public wxPanel +class AUDACITY_DLL_API ASlider /* not final */ : public wxPanel { friend class ASliderAx; diff --git a/src/widgets/AudacityMessageBox.h b/src/widgets/AudacityMessageBox.h index 28633aad6..0397cf719 100644 --- a/src/widgets/AudacityMessageBox.h +++ b/src/widgets/AudacityMessageBox.h @@ -14,7 +14,7 @@ #include #include "../Internat.h" -extern TranslatableString AudacityMessageBoxCaptionStr(); +extern AUDACITY_DLL_API TranslatableString AudacityMessageBoxCaptionStr(); // Do not use wxMessageBox!! Its default window title does not translate! inline int AudacityMessageBox(const TranslatableString& message, diff --git a/src/widgets/ErrorDialog.h b/src/widgets/ErrorDialog.h index 7657adf13..d40f985d3 100644 --- a/src/widgets/ErrorDialog.h +++ b/src/widgets/ErrorDialog.h @@ -46,6 +46,7 @@ private: }; /// Displays an error dialog with a button that offers help +AUDACITY_DLL_API void ShowErrorDialog(wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, @@ -67,7 +68,8 @@ void ShowModelessErrorDialog(wxWindow *parent, \class AudacityTextEntryDialog \brief Wrap wxTextEntryDialog so that caption IS translatable. ********************************************************************************/ -class AudacityTextEntryDialog : public wxTabTraversalWrapper< wxTextEntryDialog > +class AUDACITY_DLL_API AudacityTextEntryDialog + : public wxTabTraversalWrapper< wxTextEntryDialog > { public: AudacityTextEntryDialog( diff --git a/src/widgets/FileDialog/mac/FileDialogPrivate.h b/src/widgets/FileDialog/mac/FileDialogPrivate.h index 7fe79111c..e4a7ee129 100644 --- a/src/widgets/FileDialog/mac/FileDialogPrivate.h +++ b/src/widgets/FileDialog/mac/FileDialogPrivate.h @@ -22,7 +22,7 @@ class wxChoice; // wxFileDialog //------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE FileDialog: public FileDialogBase +class AUDACITY_DLL_API FileDialog: public FileDialogBase { DECLARE_DYNAMIC_CLASS(FileDialog) protected: diff --git a/src/widgets/Grabber.h b/src/widgets/Grabber.h index af77b0551..34bd869cd 100644 --- a/src/widgets/Grabber.h +++ b/src/widgets/Grabber.h @@ -99,7 +99,7 @@ typedef void (wxEvtHandler::*GrabberEventFunction)(GrabberEvent &); #define grabberWidth 10 -class Grabber final : public wxWindow +class AUDACITY_DLL_API Grabber final : public wxWindow { public: @@ -147,7 +147,7 @@ class Grabber final : public wxWindow // Piggy back in same source file as Grabber. // Audacity Flicker-free StaticBitmap. -class AStaticBitmap : public wxStaticBitmap { +class AUDACITY_DLL_API AStaticBitmap : public wxStaticBitmap { public: AStaticBitmap(wxWindow *parent, wxWindowID id, diff --git a/src/widgets/Grid.h b/src/widgets/Grid.h index 7f19cee5f..a73dc9e96 100644 --- a/src/widgets/Grid.h +++ b/src/widgets/Grid.h @@ -34,7 +34,7 @@ class NumericTextCtrl; #define GRID_VALUE_TIME wxT("Time") #define GRID_VALUE_FREQUENCY wxT("Frequency") -class NumericEditor /* not final */ : public wxGridCellEditor +class AUDACITY_DLL_API NumericEditor /* not final */ : public wxGridCellEditor { public: @@ -116,7 +116,8 @@ wxComboBox. **************************************************************************/ #define GRID_VALUE_CHOICE wxT("Choice") -class ChoiceEditor final : public wxGridCellEditor, wxEvtHandler +class AUDACITY_DLL_API ChoiceEditor final + : public wxGridCellEditor, wxEvtHandler { public: @@ -180,7 +181,7 @@ public: \brief wxGrid with support for accessibility. **************************************************************************/ -class Grid final : public wxGrid +class AUDACITY_DLL_API Grid final : public wxGrid { public: diff --git a/src/widgets/HelpSystem.h b/src/widgets/HelpSystem.h index 8e33b35a7..195ce1546 100644 --- a/src/widgets/HelpSystem.h +++ b/src/widgets/HelpSystem.h @@ -35,7 +35,7 @@ class AudacityProject; * the online copy of the Audacity manual is stored, so that it can be * changed if required */ -class HelpSystem +class AUDACITY_DLL_API HelpSystem { public: /// Displays cuttable information in a text ctrl, with an OK button. @@ -115,7 +115,7 @@ class ShuttleGui; #include "HtmlWindow.h" // to inherit -void OpenInDefaultBrowser(const wxHtmlLinkInfo& link); +AUDACITY_DLL_API void OpenInDefaultBrowser(const wxHtmlLinkInfo& link); /// \brief An HtmlWindow that handles linked clicked - usually the diff --git a/src/widgets/ImageRoll.h b/src/widgets/ImageRoll.h index 0424e97b9..febcf573a 100644 --- a/src/widgets/ImageRoll.h +++ b/src/widgets/ImageRoll.h @@ -24,7 +24,7 @@ // wxImage copies cheaply with reference counting using ImageArray = std::vector; -class ImageRoll +class AUDACITY_DLL_API ImageRoll { public: enum RollType { diff --git a/src/widgets/Meter.h b/src/widgets/Meter.h index 4f55cd0b7..ddcbc51d3 100644 --- a/src/widgets/Meter.h +++ b/src/widgets/Meter.h @@ -92,7 +92,8 @@ class MeterAx; \brief MeterPanel is a panel that paints the meter used for monitoring or playback. ************************************************************************/ -class MeterPanel final : public MeterPanelBase, private PrefsListener +class AUDACITY_DLL_API MeterPanel final + : public MeterPanelBase, private PrefsListener { DECLARE_DYNAMIC_CLASS(MeterPanel) diff --git a/src/widgets/MeterPanelBase.h b/src/widgets/MeterPanelBase.h index fd555045e..c84fd8dbd 100644 --- a/src/widgets/MeterPanelBase.h +++ b/src/widgets/MeterPanelBase.h @@ -13,7 +13,7 @@ Paul Licameli split from Meter.h #include "wxPanelWrapper.h" -class MeterPanelBase /* not final */ +class AUDACITY_DLL_API MeterPanelBase /* not final */ : public wxPanelWrapper { public: diff --git a/src/widgets/NumericTextCtrl.h b/src/widgets/NumericTextCtrl.h index cb6e5452b..0b68b4f13 100644 --- a/src/widgets/NumericTextCtrl.h +++ b/src/widgets/NumericTextCtrl.h @@ -43,7 +43,7 @@ class NumericField; class DigitInfo; -class NumericConverter /* not final */ +class AUDACITY_DLL_API NumericConverter /* not final */ { public: @@ -166,7 +166,8 @@ protected: int mDefaultNdx; }; -class NumericTextCtrl final : public wxControl, public NumericConverter +class AUDACITY_DLL_API NumericTextCtrl final + : public wxControl, public NumericConverter { friend class NumericTextCtrlAx; diff --git a/src/widgets/Overlay.h b/src/widgets/Overlay.h index 000db0db0..e717d123a 100644 --- a/src/widgets/Overlay.h +++ b/src/widgets/Overlay.h @@ -90,7 +90,7 @@ AdornedRulerPanel. */ -class Overlay +class AUDACITY_DLL_API Overlay { public: Overlay() = default; diff --git a/src/widgets/OverlayPanel.h b/src/widgets/OverlayPanel.h index 8e37fc6d3..4a8a20004 100644 --- a/src/widgets/OverlayPanel.h +++ b/src/widgets/OverlayPanel.h @@ -51,7 +51,7 @@ private: }; /// Used to restore pen, brush and logical-op in a DC back to what they were. -struct DCUnchanger { +struct AUDACITY_DLL_API DCUnchanger { public: DCUnchanger() {} @@ -68,7 +68,7 @@ public: /// Makes temporary drawing context changes that you back out of, RAII style // It's like wxDCPenChanger, etc., but simple and general -class ADCChanger : public std::unique_ptr +class AUDACITY_DLL_API ADCChanger : public std::unique_ptr { using Base = std::unique_ptr; public: diff --git a/src/widgets/PopupMenuTable.h b/src/widgets/PopupMenuTable.h index 8251e723d..52df6dc43 100644 --- a/src/widgets/PopupMenuTable.h +++ b/src/widgets/PopupMenuTable.h @@ -31,7 +31,7 @@ class wxCommandEvent; class PopupMenuHandler; class PopupMenuTable; -struct PopupMenuTableEntry : Registry::SingleItem +struct AUDACITY_DLL_API PopupMenuTableEntry : Registry::SingleItem { enum Type { Item, RadioItem, CheckItem }; using InitFunction = @@ -60,7 +60,7 @@ struct PopupMenuTableEntry : Registry::SingleItem ~PopupMenuTableEntry() override; }; -struct PopupSubMenu : Registry::ConcreteGroupItem< false > +struct AUDACITY_DLL_API PopupSubMenu : Registry::ConcreteGroupItem< false > , MenuTable::WholeMenu { TranslatableString caption; @@ -100,7 +100,7 @@ struct PopupMenuVisitor : public MenuVisitor { PopupMenuTable &mTable; }; -class PopupMenuTable : public PopupMenuHandler +class AUDACITY_DLL_API PopupMenuTable : public PopupMenuHandler { public: using Entry = PopupMenuTableEntry; diff --git a/src/widgets/Warning.h b/src/widgets/Warning.h index b4ea50c2e..c0aa48296 100644 --- a/src/widgets/Warning.h +++ b/src/widgets/Warning.h @@ -19,12 +19,14 @@ class wxWindow; class TranslatableString; // "Don't show this warning again" - const TranslatableString &DefaultWarningFooter(); +AUDACITY_DLL_API +const TranslatableString &DefaultWarningFooter(); /// Displays a warning dialog with a check box. If the user checks /// the box, the internalDialogName is noted in the /// preferences. The internalDialogName is never seen by /// the user; it should be unique to each message. +AUDACITY_DLL_API int ShowWarningDialog(wxWindow *parent, const wxString &internalDialogName, const TranslatableString &message, diff --git a/src/widgets/WindowAccessible.h b/src/widgets/WindowAccessible.h index 35ce58eab..31a482abb 100644 --- a/src/widgets/WindowAccessible.h +++ b/src/widgets/WindowAccessible.h @@ -18,7 +18,7 @@ #include // to inherit #include // for TranslatableString -class WindowAccessible: public wxAccessible +class AUDACITY_DLL_API WindowAccessible: public wxAccessible { public: WindowAccessible(wxWindow* win); @@ -28,7 +28,7 @@ public: }; -class SliderAx final : public WindowAccessible +class AUDACITY_DLL_API SliderAx final : public WindowAccessible { public: SliderAx(wxWindow * window, const TranslatableString &fmt); diff --git a/src/widgets/valnum.h b/src/widgets/valnum.h index adadb4b41..792c5a0b5 100644 --- a/src/widgets/valnum.h +++ b/src/widgets/valnum.h @@ -46,7 +46,7 @@ inline int operator & (NumValidatorStyle x, NumValidatorStyle y) // Base class for all numeric validators. // ---------------------------------------------------------------------------- -class NumValidatorBase /* not final */ : public wxValidator +class AUDACITY_DLL_API NumValidatorBase /* not final */ : public wxValidator { public: // Change the validator style. Usually it's specified during construction. @@ -277,7 +277,8 @@ private: // type-dependent code of wxIntegerValidator<> and always works with values of // type LongestValueType. It is not meant to be used directly, please use // IntegerValidator<> only instead. -class IntegerValidatorBase /* not final */ : public NumValidatorBase +class AUDACITY_DLL_API IntegerValidatorBase /* not final */ + : public NumValidatorBase { protected: // Define the type we use here, it should be the maximal-sized integer type @@ -381,7 +382,8 @@ MakeIntegerValidator(T *value, NumValidatorStyle style = NumValidatorStyle::DEFA // Similar to IntegerValidatorBase, this class is not meant to be used // directly, only FloatingPointValidator<> should be used in the user code. -class FloatingPointValidatorBase /* not final */ : public NumValidatorBase +class AUDACITY_DLL_API FloatingPointValidatorBase /* not final */ + : public NumValidatorBase { public: // Set precision i.e. the number of digits shown (and accepted on input) @@ -509,7 +511,7 @@ MakeFloatingPointValidator(int precision, T *value, NumValidatorStyle style = Nu // Sometimes useful for specifying max and min values for validators, when they // must have the same precision as the validated value -double RoundValue(int precision, double value); +AUDACITY_DLL_API double RoundValue(int precision, double value); #endif // wxUSE_VALIDATORS diff --git a/src/widgets/wxPanelWrapper.h b/src/widgets/wxPanelWrapper.h index 8a2ffebcf..4df6fb04c 100644 --- a/src/widgets/wxPanelWrapper.h +++ b/src/widgets/wxPanelWrapper.h @@ -17,7 +17,7 @@ #include "audacity/Types.h" -void wxTabTraversalWrapperCharHook(wxKeyEvent &event); +AUDACITY_DLL_API void wxTabTraversalWrapperCharHook(wxKeyEvent &event); template class AUDACITY_DLL_API wxTabTraversalWrapper : public Base diff --git a/src/xml/XMLTagHandler.h b/src/xml/XMLTagHandler.h index c7a1246af..42b7efa7d 100644 --- a/src/xml/XMLTagHandler.h +++ b/src/xml/XMLTagHandler.h @@ -25,7 +25,7 @@ #include "audacity/Types.h" #include "XMLWriter.h" -class XMLValueChecker +class AUDACITY_DLL_API XMLValueChecker { public: // "Good" means well-formed and for the file-related functions, names an existing file or folder.