diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-30 16:48:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-30 16:48:58 +0000 |
commit | 74933f58659051f6d4ef52d1103b2b7ba4643883 (patch) | |
tree | 93069fda3163dce2e97b61a845863b68b300200d /libs/pbd/enums.cc | |
parent | 8a17b0fb9073bb21ef2c718113f9e41359faf4fe (diff) |
restore excess calls to sync-order stuff (for now); allow MIDI controllers to use the same non-linear fader response as the gui; add various flags to PBD::Controllable and remove URI from that class
git-svn-id: svn://localhost/ardour2/branches/3.0@6414 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/enums.cc')
-rw-r--r-- | libs/pbd/enums.cc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libs/pbd/enums.cc b/libs/pbd/enums.cc new file mode 100644 index 0000000000..559af3a307 --- /dev/null +++ b/libs/pbd/enums.cc @@ -0,0 +1,47 @@ +/* + Copyright (C) 2009 Paul Davis + + This program is free software; you can redistribute it and/or modify + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include "pbd/controllable.h" +#include "pbd/enumwriter.h" + +void setup_libpbd_enums () __attribute__ ((constructor)); + +using namespace PBD; +using namespace std; + +void +setup_libpbd_enums () +{ + EnumWriter& enum_writer (EnumWriter::instance()); + vector<int> i; + vector<string> s; + + Controllable::Flag controllable_flags; + +#define REGISTER(e) enum_writer.register_distinct (typeid(e).name(), i, s); i.clear(); s.clear() +#define REGISTER_BITS(e) enum_writer.register_bits (typeid(e).name(), i, s); i.clear(); s.clear() +#define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e) +#define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e) + + REGISTER_CLASS_ENUM (Controllable, Toggle); + REGISTER_CLASS_ENUM (Controllable, Discrete); + REGISTER_CLASS_ENUM (Controllable, GainLike); + REGISTER_CLASS_ENUM (Controllable, IntegerOnly); + REGISTER (controllable_flags); +} |