Ardour  8.7-14-g57a6773833
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 #ifndef __ardour_readonly_control_h__
20 #define __ardour_readonly_control_h__
21 
22 #include <memory>
23 
24 #include "pbd/destructible.h"
25 
28 
29 namespace ARDOUR {
30 
31 class Plugin;
32 
34 {
35 public:
36  ReadOnlyControl (std::shared_ptr<Plugin>, const ParameterDescriptor&, uint32_t pnum);
37 
38  virtual double get_parameter () const;
39  std::string describe_parameter ();
40  const ParameterDescriptor& desc() const { return _desc; }
41 
42 protected:
43  std::weak_ptr<Plugin> _plugin;
45  uint32_t _parameter_num;
46 };
47 
48 } // namespace ARDOUR
49 
50 #endif /* __ardour_readonly_control_h__ */
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