File: ExportOptionsEditor.h

package info (click to toggle)
audacity 3.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 125,252 kB
  • sloc: cpp: 358,238; ansic: 75,458; lisp: 7,761; sh: 3,410; python: 1,503; xml: 1,385; perl: 854; makefile: 122
file content (58 lines) | stat: -rw-r--r-- 1,804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**********************************************************************

  Audacity: A Digital Audio Editor

  ExportOptionsEditor.h

  Vitaly Sverchinsky

**********************************************************************/

#pragma once

#include "ExportTypes.h"

namespace audacity
{
   class BasicSettings;
}

///\brief Editor objects are used to retrieve a set of export options,
///and configure exporting parameters according the plugin internal logic.
///Each option is assigned with internal index that should not change.
class IMPORT_EXPORT_API ExportOptionsEditor
{
public:
   using SampleRateList = std::vector<int>;
   
   ///\brief Listener object that is used to report on option changes.
   class IMPORT_EXPORT_API Listener
   {
   public:
      virtual ~Listener();

      ///\brief Called before `OnExportOptionChange`
      virtual void OnExportOptionChangeBegin() = 0;
      ///\brief Called after `OnExportOptionChange`
      virtual void OnExportOptionChangeEnd() = 0;
      ///\brief Called when option change
      virtual void OnExportOptionChange(const ExportOption& option) = 0;
      ///\brief Called when format extension change (usually in response parameter change)
      virtual void OnFormatInfoChange() = 0;

      virtual void OnSampleRateListChange() = 0;
   };

   virtual ~ExportOptionsEditor();

   virtual int GetOptionsCount() const = 0;
   virtual bool GetOption(int index, ExportOption& option) const = 0;
   
   virtual bool GetValue(ExportOptionID id, ExportValue& value) const = 0;
   virtual bool SetValue(ExportOptionID id, const ExportValue& value) = 0;

   virtual SampleRateList GetSampleRateList() const = 0;
   
   virtual void Store(audacity::BasicSettings& settings) const = 0;
   virtual void Load(const audacity::BasicSettings& config) = 0;
};