2 Copyright (C) 2000-2007 Paul Davis
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.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "pbd/enumwriter.h"
22 #include "audio_clock.h"
28 using namespace ARDOUR;
29 using namespace Editing;
32 setup_gtk_ardour_enums ()
34 EnumWriter& enum_writer (EnumWriter::instance());
38 AudioClock::Mode clock_mode;
40 ImportMode import_mode;
42 LayerDisplay layer_display;
43 RegionListSortType region_list_sort_type;
48 #define REGISTER(e) enum_writer.register_distinct (typeid(e).name(), i, s); i.clear(); s.clear()
49 #define REGISTER_BITS(e) enum_writer.register_bits (typeid(e).name(), i, s); i.clear(); s.clear()
50 #define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e)
51 #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e)
53 REGISTER_CLASS_ENUM (AudioClock, Timecode);
54 REGISTER_CLASS_ENUM (AudioClock, BBT);
55 REGISTER_CLASS_ENUM (AudioClock, MinSec);
56 REGISTER_CLASS_ENUM (AudioClock, Frames);
57 REGISTER (clock_mode);
60 REGISTER_ENUM (Narrow);
63 REGISTER_ENUM (ImportAsTrack);
64 REGISTER_ENUM (ImportToTrack);
65 REGISTER_ENUM (ImportAsRegion);
66 REGISTER_ENUM (ImportAsTapeTrack);
67 REGISTER (import_mode);
69 REGISTER_ENUM (EditAtPlayhead);
70 REGISTER_ENUM (EditAtMouse);
71 REGISTER_ENUM (EditAtSelectedMarker);
72 REGISTER (edit_point);
74 REGISTER_ENUM (Overlaid);
75 REGISTER_ENUM (Stacked);
76 REGISTER (layer_display);
78 REGISTER_ENUM (ByEndInFile);
79 REGISTER_ENUM (ByLength);
80 REGISTER_ENUM (ByName);
81 REGISTER_ENUM (ByPosition);
82 REGISTER_ENUM (BySourceFileCreationDate);
83 REGISTER_ENUM (BySourceFileFS);
84 REGISTER_ENUM (BySourceFileLength);
85 REGISTER_ENUM (BySourceFileName);
86 REGISTER_ENUM (ByStartInFile);
87 REGISTER_ENUM (ByTimestamp);
88 REGISTER (region_list_sort_type);
90 REGISTER_ENUM (SnapToCDFrame);
91 REGISTER_ENUM (SnapToTimecodeFrame);
92 REGISTER_ENUM (SnapToTimecodeSeconds);
93 REGISTER_ENUM (SnapToTimecodeMinutes);
94 REGISTER_ENUM (SnapToSeconds);
95 REGISTER_ENUM (SnapToMinutes);
96 REGISTER_ENUM (SnapToBeatDiv128);
97 REGISTER_ENUM (SnapToBeatDiv64);
98 REGISTER_ENUM (SnapToBeatDiv32);
99 REGISTER_ENUM (SnapToBeatDiv28);
100 REGISTER_ENUM (SnapToBeatDiv24);
101 REGISTER_ENUM (SnapToBeatDiv20);
102 REGISTER_ENUM (SnapToBeatDiv16);
103 REGISTER_ENUM (SnapToBeatDiv14);
104 REGISTER_ENUM (SnapToBeatDiv12);
105 REGISTER_ENUM (SnapToBeatDiv10);
106 REGISTER_ENUM (SnapToBeatDiv8);
107 REGISTER_ENUM (SnapToBeatDiv7);
108 REGISTER_ENUM (SnapToBeatDiv6);
109 REGISTER_ENUM (SnapToBeatDiv5);
110 REGISTER_ENUM (SnapToBeatDiv4);
111 REGISTER_ENUM (SnapToBeatDiv3);
112 REGISTER_ENUM (SnapToBeatDiv2);
113 REGISTER_ENUM (SnapToBeat);
114 REGISTER_ENUM (SnapToBar);
115 REGISTER_ENUM (SnapToMark);
116 REGISTER_ENUM (SnapToRegionStart);
117 REGISTER_ENUM (SnapToRegionEnd);
118 REGISTER_ENUM (SnapToRegionSync);
119 REGISTER_ENUM (SnapToRegionBoundary);
120 REGISTER (snap_type);
122 REGISTER_ENUM (SnapOff);
123 REGISTER_ENUM (SnapNormal);
124 REGISTER_ENUM (SnapMagnetic);
125 REGISTER (snap_mode);
127 REGISTER_ENUM (ZoomFocusLeft);
128 REGISTER_ENUM (ZoomFocusRight);
129 REGISTER_ENUM (ZoomFocusCenter);
130 REGISTER_ENUM (ZoomFocusPlayhead);
131 REGISTER_ENUM (ZoomFocusMouse);
132 REGISTER_ENUM (ZoomFocusEdit);
133 REGISTER (zoom_focus);