Ardour  9.0-pre0-582-g084a23a80d
readonly_control.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #pragma once
20 
21 #include <memory>
22 
23 #include "pbd/destructible.h"
24 
27 
28 namespace ARDOUR {
29 
30 class Plugin;
31 
33 {
34 public:
35  ReadOnlyControl (std::shared_ptr<Plugin>, const ParameterDescriptor&, uint32_t pnum);
36 
37  virtual double get_parameter () const;
38  std::string describe_parameter ();
39  const ParameterDescriptor& desc() const { return _desc; }
40 
41 protected:
42  std::weak_ptr<Plugin> _plugin;
44  uint32_t _parameter_num;
45 };
46 
47 } // namespace ARDOUR
48 
std::string describe_parameter()
const ParameterDescriptor _desc
virtual double get_parameter() const
std::weak_ptr< Plugin > _plugin
const ParameterDescriptor & desc() const
ReadOnlyControl(std::shared_ptr< Plugin >, const ParameterDescriptor &, uint32_t pnum)
#define LIBARDOUR_API