summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/controllable.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-01-20 18:02:36 +0000
committerCarl Hetherington <carl@carlh.net>2012-01-20 18:02:36 +0000
commitd03d0363a469a98753a546570bda79f59cba405c (patch)
treea141e48e5e019b181f8c526fd02d95f0f10b88d0 /libs/pbd/pbd/controllable.h
parent24978033ef7b40ec5d408238421f42b3bc9821f3 (diff)
Remove unused concept of user' values. Make user_to_ui
and ui_to_user virtual members of PBD::Controllable. git-svn-id: svn://localhost/ardour2/branches/3.0@11286 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/controllable.h')
-rw-r--r--libs/pbd/pbd/controllable.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h
index 9c059e9401..f61a375ba7 100644
--- a/libs/pbd/pbd/controllable.h
+++ b/libs/pbd/pbd/controllable.h
@@ -43,13 +43,12 @@ class Controllable : public PBD::StatefulDestructible {
Controllable (const std::string& name, Flag f = Flag (0));
virtual ~Controllable() { Destroyed (this); }
- /* We express Controllable values in one of three ways:
- * 1. `user' --- as presented to the user (e.g. dB, Hz etc.)
- * 2. `UI' --- as used in some cases for the internal representation
+ /* We express Controllable values in one of two ways:
+ * 1. `UI' --- as used in some cases for the internal representation
* of the UI. This may be the same as `user', or may be something
* like the natural log of frequency in order that sliders operate
* in a logarithmic fashion.
- * 3. `plugin' --- as passed to a plugin.
+ * 2. `user' --- as passed to a plugin, and presented to the user.
*/
/** Set `user' value */
@@ -57,6 +56,14 @@ class Controllable : public PBD::StatefulDestructible {
/** @return `user' value */
virtual double get_value (void) const = 0;
+ virtual double user_to_ui (double v) const {
+ return v;
+ }
+
+ virtual double ui_to_user (double v) const {
+ return v;
+ }
+
PBD::Signal0<void> LearningFinished;
static PBD::Signal3<void,PBD::Controllable*,int,int> CreateBinding;
static PBD::Signal1<void,PBD::Controllable*> DeleteBinding;