use new ControlList::add() argument
[ardour.git] / libs / pbd / pbd / controllable.h
index 7379f36027fdc2a4000142de0272652ac3940d30..eb4b7ff14291c00df03b9b1c7b42720d28371a55 100644 (file)
@@ -2,7 +2,7 @@
     Copyright (C) 2000-2007 Paul Davis 
 
     This program is free software; you can redistribute it and/or modify
-v    it under the terms of the GNU General Public License as published by
+    it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
@@ -24,8 +24,9 @@ v    it under the terms of the GNU General Public License as published by
 #include <set>
 #include <map>
 
+#include "pbd/libpbd_visibility.h"
 #include "pbd/signals.h"
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 
 #include "pbd/statefuldestructible.h"
 
@@ -33,7 +34,7 @@ class XMLNode;
 
 namespace PBD {
 
-class Controllable : public PBD::StatefulDestructible {
+class LIBPBD_API Controllable : public PBD::StatefulDestructible {
   public:
        enum Flag {
                Toggle = 0x1,
@@ -44,17 +45,24 @@ class Controllable : public PBD::StatefulDestructible {
        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
-        *    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.
+        * 1. `user' --- as presented to the user (e.g. dB, Hz, etc.)
+        * 2. `interface' --- as used in some cases for the UI representation
+        * (in order to make controls behave logarithmically).
+        * 3. `internal' --- as passed to a processor, track, plugin, or whatever.
+        *
+        * Note that in some cases user and processor may be the same
+        * (and interface different) e.g. frequency, which is presented
+        * to the user and passed to the processor in linear terms, but
+        * which needs log scaling in the interface.
+        *
+        * In other cases, user and interface may be the same (and processor different)
+        * e.g. gain, which is presented to the user in log terms (dB)
+        * but passed to the processor as a linear quantity.
         */
 
-       /** Set `user' value */
+       /** Set `internal' value */
        virtual void set_value (double) = 0;
-       /** @return `user' value */
+       /** @return `internal' value */
        virtual double get_value (void) const = 0;
 
        PBD::Signal0<void> LearningFinished;
@@ -98,7 +106,7 @@ class Controllable : public PBD::StatefulDestructible {
        static void remove (Controllable*);
 
        typedef std::set<PBD::Controllable*> Controllables;
-       static Glib::StaticRWLock registry_lock;
+        static Glib::Threads::RWLock registry_lock;
        static Controllables registry;
 };
 
@@ -106,7 +114,7 @@ class Controllable : public PBD::StatefulDestructible {
    a Controllable
 */
 
-class IgnorableControllable : public Controllable 
+class LIBPBD_API IgnorableControllable : public Controllable 
 {
   public: 
        IgnorableControllable () : PBD::Controllable ("ignoreMe") {}