universal change in the design of the way Route/Track controls are designed and used...
[ardour.git] / libs / ardour / enums.cc
index 84755cb913b34931dc04ff8a56e418c0bb3ef4a9..85634640b95ddb7a0311557a021747dd35638328 100644 (file)
@@ -34,6 +34,7 @@
 #include "ardour/mute_master.h"
 #include "ardour/session.h"
 #include "ardour/source.h"
+#include "ardour/tempo.h"
 #include "ardour/track.h"
 #include "ardour/types.h"
 
@@ -74,6 +75,7 @@ setup_enum_writer ()
        AFLPosition _AFLPosition;
        RemoteModel _RemoteModel;
        DenormalModel _DenormalModel;
+       LayerModel _LayerModel;
        InsertMergePolicy _InsertMergePolicy;
        ListenPosition _ListenPosition;
        SampleFormat _SampleFormat;
@@ -85,20 +87,24 @@ setup_enum_writer ()
        ShuttleUnits _ShuttleUnits;
        Session::RecordState _Session_RecordState;
        SessionEvent::Type _SessionEvent_Type;
+       SessionEvent::Action _SessionEvent_Action;
        TimecodeFormat _Session_TimecodeFormat;
        Session::PullupFormat _Session_PullupFormat;
        FadeShape _FadeShape;
+       RegionSelectionAfterSplit _RegionSelectionAfterSplit;
        IOChange _IOChange;
        AutomationType _AutomationType;
        AutoState _AutoState;
        AutoStyle _AutoStyle;
        AutoConnectOption _AutoConnectOption;
+       TracksAutoNamingRule _TracksAutoNamingRule;
        Session::StateOfTheState _Session_StateOfTheState;
        Route::Flag _Route_Flag;
        Source::Flag _Source_Flag;
        Diskstream::Flag _Diskstream_Flag;
        Location::Flags _Location_Flags;
        PositionLockStyle _PositionLockStyle;
+       TempoSection::Type _TempoSection_Type;
        Track::FreezeState _Track_FreezeState;
        AutomationList::InterpolationStyle _AutomationList_InterpolationStyle;
        AnyTime::Type _AnyTime_Type;
@@ -126,24 +132,55 @@ setup_enum_writer ()
        Session::SlaveState _Session_SlaveState;
        MTC_Status _MIDI_MTC_Status;
        Evoral::OverlapType _OverlapType;
+        BufferingPreset _BufferingPreset;
+       AutoReturnTarget _AutoReturnTarget;
 
 #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_ENUM (NullAutomation);
        REGISTER_ENUM (GainAutomation);
        REGISTER_ENUM (PanAzimuthAutomation);
        REGISTER_ENUM (PanElevationAutomation);
        REGISTER_ENUM (PanWidthAutomation);
+       REGISTER_ENUM (PanFrontBackAutomation);
+       REGISTER_ENUM (PanLFEAutomation);
        REGISTER_ENUM (PluginAutomation);
+       REGISTER_ENUM (PluginPropertyAutomation);
        REGISTER_ENUM (SoloAutomation);
+       REGISTER_ENUM (SoloIsolateAutomation);
+       REGISTER_ENUM (SoloSafeAutomation);
        REGISTER_ENUM (MuteAutomation);
        REGISTER_ENUM (MidiCCAutomation);
+       REGISTER_ENUM (MidiPgmChangeAutomation);
+       REGISTER_ENUM (MidiPitchBenderAutomation);
+       REGISTER_ENUM (MidiChannelPressureAutomation);
+       REGISTER_ENUM (MidiSystemExclusiveAutomation);
        REGISTER_ENUM (FadeInAutomation);
        REGISTER_ENUM (FadeOutAutomation);
        REGISTER_ENUM (EnvelopeAutomation);
-       REGISTER_BITS (_AutomationType);
+       REGISTER_ENUM (RecEnableAutomation);
+       REGISTER_ENUM (RecSafeAutomation);
+       REGISTER_ENUM (TrimAutomation);
+       REGISTER_ENUM (PhaseAutomation);
+       REGISTER_ENUM (MonitoringAutomation);
+       REGISTER_ENUM (EQGain);
+       REGISTER_ENUM (EQFrequency);
+       REGISTER_ENUM (EQQ);
+       REGISTER_ENUM (EQShape);
+       REGISTER_ENUM (EQHPF);
+       REGISTER_ENUM (EQEnable);
+       REGISTER_ENUM (CompThreshold);
+       REGISTER_ENUM (CompSpeed);
+       REGISTER_ENUM (CompMode);
+       REGISTER_ENUM (CompMakeup);
+       REGISTER_ENUM (CompRedux);
+       REGISTER_ENUM (CompEnable);
+       REGISTER_ENUM (BusSendLevel);
+       REGISTER_ENUM (BusSendEnable);
+       REGISTER (_AutomationType);
 
        REGISTER_ENUM (Off);
        REGISTER_ENUM (Write);
@@ -183,6 +220,8 @@ setup_enum_writer ()
        REGISTER_ENUM (MeterIEC2BBC);
        REGISTER_ENUM (MeterIEC2EBU);
        REGISTER_ENUM (MeterVU);
+       REGISTER_ENUM (MeterPeak0dB);
+       REGISTER_ENUM (MeterMCP);
        REGISTER (_MeterType);
 
        REGISTER_ENUM (Normal);
@@ -288,18 +327,22 @@ setup_enum_writer ()
        REGISTER (_RemoteModel);
        /*
         * EditorOrdered has been deprecated
-        * since the removal of independent 
+        * since the removal of independent
         * editor / mixer ordering.
        */
        enum_writer.add_to_hack_table ("EditorOrdered", "MixerOrdered");
 
-        REGISTER_ENUM (InsertMergeReject);
-        REGISTER_ENUM (InsertMergeRelax);
-        REGISTER_ENUM (InsertMergeReplace);
-        REGISTER_ENUM (InsertMergeTruncateExisting);
-        REGISTER_ENUM (InsertMergeTruncateAddition);
-        REGISTER_ENUM (InsertMergeExtend);
-        REGISTER (_InsertMergePolicy);
+       REGISTER_ENUM (LaterHigher);
+       REGISTER_ENUM (Manual);
+       REGISTER (_LayerModel);
+
+       REGISTER_ENUM (InsertMergeReject);
+       REGISTER_ENUM (InsertMergeRelax);
+       REGISTER_ENUM (InsertMergeReplace);
+       REGISTER_ENUM (InsertMergeTruncateExisting);
+       REGISTER_ENUM (InsertMergeTruncateAddition);
+       REGISTER_ENUM (InsertMergeExtend);
+       REGISTER (_InsertMergePolicy);
 
        REGISTER_ENUM (AfterFaderListen);
        REGISTER_ENUM (PreFaderListen);
@@ -309,6 +352,10 @@ setup_enum_writer ()
        REGISTER_ENUM (AutoConnectMaster);
        REGISTER_BITS (_AutoConnectOption);
 
+       REGISTER_ENUM (UseDefaultNames);
+       REGISTER_ENUM (NameAfterDriver);
+       REGISTER_BITS (_TracksAutoNamingRule);
+
        REGISTER_ENUM (FormatFloat);
        REGISTER_ENUM (FormatInt24);
        REGISTER_ENUM (FormatInt16);
@@ -326,6 +373,8 @@ setup_enum_writer ()
        REGISTER_ENUM (AIFF);
        REGISTER_ENUM (iXML);
        REGISTER_ENUM (RF64);
+       REGISTER_ENUM (RF64_WAV);
+       REGISTER_ENUM (MBWF);
        REGISTER (_HeaderFormat);
 
        REGISTER_ENUM (AudioUnit);
@@ -370,11 +419,22 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (SessionEvent, InputConfigurationChange);
        REGISTER_CLASS_ENUM (SessionEvent, SetPlayAudioRange);
        REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange);
+       REGISTER_CLASS_ENUM (SessionEvent, RealTimeOperation);
+       REGISTER_CLASS_ENUM (SessionEvent, AdjustPlaybackBuffering);
+       REGISTER_CLASS_ENUM (SessionEvent, AdjustCaptureBuffering);
+       REGISTER_CLASS_ENUM (SessionEvent, SetTimecodeTransmission);
+       REGISTER_CLASS_ENUM (SessionEvent, Skip);
        REGISTER_CLASS_ENUM (SessionEvent, StopOnce);
        REGISTER_CLASS_ENUM (SessionEvent, AutoLoop);
-       REGISTER_CLASS_ENUM (SessionEvent, Skip);
+       REGISTER_CLASS_ENUM (SessionEvent, AutoLoopDeclick);
        REGISTER (_SessionEvent_Type);
 
+       REGISTER_CLASS_ENUM (SessionEvent, Add);
+       REGISTER_CLASS_ENUM (SessionEvent, Remove);
+       REGISTER_CLASS_ENUM (SessionEvent, Replace);
+       REGISTER_CLASS_ENUM (SessionEvent, Clear);
+       REGISTER (_SessionEvent_Action);
+
        REGISTER_CLASS_ENUM (Session, Stopped);
        REGISTER_CLASS_ENUM (Session, Waiting);
        REGISTER_CLASS_ENUM (Session, Running);
@@ -454,6 +514,16 @@ setup_enum_writer ()
        REGISTER_ENUM (FadeSymmetric);
        REGISTER (_FadeShape);
 
+       REGISTER_ENUM(None);
+       REGISTER_ENUM(NewlyCreatedLeft);
+       REGISTER_ENUM(NewlyCreatedRight);
+       REGISTER_ENUM(NewlyCreatedBoth);
+       REGISTER_ENUM(Existing);
+       REGISTER_ENUM(ExistingNewlyCreatedLeft);
+       REGISTER_ENUM(ExistingNewlyCreatedRight);
+       REGISTER_ENUM(ExistingNewlyCreatedBoth);
+       REGISTER (_RegionSelectionAfterSplit);
+
        REGISTER_CLASS_ENUM (Diskstream, Recordable);
        REGISTER_CLASS_ENUM (Diskstream, Hidden);
        REGISTER_CLASS_ENUM (Diskstream, Destructive);
@@ -469,6 +539,10 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Location, IsSkip);
        REGISTER_BITS (_Location_Flags);
 
+       REGISTER_CLASS_ENUM (TempoSection, Ramp);
+       REGISTER_CLASS_ENUM (TempoSection, Constant);
+       REGISTER (_TempoSection_Type);
+
        REGISTER_CLASS_ENUM (Track, NoFreeze);
        REGISTER_CLASS_ENUM (Track, Frozen);
        REGISTER_CLASS_ENUM (Track, UnFrozen);
@@ -623,6 +697,18 @@ setup_enum_writer ()
        REGISTER_ENUM (Evoral::OverlapEnd);
        REGISTER_ENUM (Evoral::OverlapExternal);
        REGISTER(_OverlapType);
+
+       REGISTER_ENUM (Small);
+       REGISTER_ENUM (Medium);
+       REGISTER_ENUM (Large);
+       REGISTER_ENUM (Custom);
+       REGISTER(_BufferingPreset);
+
+       REGISTER_ENUM (LastLocate);
+       REGISTER_ENUM (RangeSelectionStart);
+       REGISTER_ENUM (Loop);
+       REGISTER_ENUM (RegionSelectionStart);
+       REGISTER_BITS (_AutoReturnTarget);
 }
 
 } /* namespace ARDOUR */
@@ -656,6 +742,7 @@ std::ostream& operator<<(std::ostream& o, const SampleFormat& var)
        std::string s = enum_2_string (var);
        return o << s;
 }
+
 std::istream& operator>>(std::istream& o, AutoConnectOption& var)
 {
        std::string s;
@@ -670,6 +757,20 @@ std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var)
        return o << s;
 }
 
+std::istream& operator>>(std::istream& o, TracksAutoNamingRule& var)
+{
+       std::string s;
+       o >> s;
+       var = (TracksAutoNamingRule) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const TracksAutoNamingRule& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
 std::istream& operator>>(std::istream& o, MonitorModel& var)
 {
        std::string s;
@@ -779,6 +880,19 @@ std::ostream& operator<<(std::ostream& o, const ListenPosition& var)
        std::string s = enum_2_string (var);
        return o << s;
 }
+std::istream& operator>>(std::istream& o, LayerModel& var)
+{
+       std::string s;
+       o >> s;
+       var = (LayerModel) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const LayerModel& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
 
 std::istream& operator>>(std::istream& o, InsertMergePolicy& var)
 {
@@ -912,6 +1026,7 @@ std::ostream& operator<<(std::ostream& o, const Evoral::OverlapType& var)
        std::string s = enum_2_string (var);
        return o << s;
 }
+
 std::istream& operator>>(std::istream& o, FadeShape& var)
 {
        std::string s;
@@ -925,3 +1040,59 @@ std::ostream& operator<<(std::ostream& o, const FadeShape& var)
        std::string s = enum_2_string (var);
        return o << s;
 }
+
+std::istream& operator>>(std::istream& o, RegionSelectionAfterSplit& var)
+{
+       std::string s;
+       o >> s;
+       var = (RegionSelectionAfterSplit) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const RegionSelectionAfterSplit& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, ARDOUR::BufferingPreset& var)
+{
+       std::string s;
+       o >> s;
+       var = (ARDOUR::BufferingPreset) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const ARDOUR::BufferingPreset& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, AutoReturnTarget& var)
+{
+       std::string s;
+       o >> s;
+       var = (AutoReturnTarget) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const AutoReturnTarget& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, MeterType& var)
+{
+       std::string s;
+       o >> s;
+       var = (MeterType) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const MeterType& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}