add JAG to author list
[ardour.git] / gtk2_ardour / editing.h
1 /*
2     Copyright (C) 2000-2007 Paul Davis 
3
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.
8
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.
13
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.
17
18 */
19
20 #ifndef __gtk_ardour_editing_h__
21 #define __gtk_ardour_editing_h__
22
23 #include <string>
24 #include <map>
25 #include <ardour/types.h>
26
27 // This involves some cpp magic. --taybin
28
29 #define SNAPTYPE(a) /*empty*/
30 #define SNAPMODE(a) /*empty*/
31 #define REGIONLISTSORTTYPE(a) /*empty*/
32 #define MOUSEMODE(a) /*empty*/
33 #define ZOOMFOCUS(a) /*empty*/
34 #define DISPLAYCONTROL(a) /*empty*/
35 #define IMPORTMODE(a) /*empty*/
36 #define IMPORTPOSITION(a) /*empty*/
37 #define IMPORTDISPOSITION(a) /*empty*/
38 #define EDITPOINT(a) /*empty*/
39 #define WAVEFORMSCALE(a) /*empty*/
40 #define WAVEFORMSHAPE(a) /*empty*/
41 #define INSERTTIMEOPT(a) /*empty*/
42
43 namespace Editing {
44
45 // SNAPTYPE
46 #undef SNAPTYPE
47 #define SNAPTYPE(a) a,
48 enum SnapType {
49         #include "editing_syms.h"
50 };
51
52 extern const char *snaptypestrs[];
53 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
54 SnapType str2snaptype(const std::string &);
55
56 #undef SNAPTYPE
57 #define SNAPTYPE(a) /*empty*/
58
59 // SNAPMODE
60 #undef SNAPMODE
61 #define SNAPMODE(a) a,
62 enum SnapMode {
63         #include "editing_syms.h"
64 };
65
66 extern const char *snapmodestrs[];
67 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
68 SnapMode str2snapmode(const std::string &);
69
70 #undef SNAPMODE
71 #define SNAPMODE(a) /*empty*/
72
73 // REGIONLISTSORTTYPE
74 #undef REGIONLISTSORTTYPE
75 #define REGIONLISTSORTTYPE(a) a,
76 enum RegionListSortType {
77         #include "editing_syms.h"
78 };
79
80 extern const char *regionlistsorttypestrs[];
81 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
82 RegionListSortType str2regionlistsorttype(const std::string &);
83
84 #undef REGIONLISTSORTTYPE
85 #define REGIONLISTSORTTYPE(a) /*empty*/
86
87 // MOUSEMODE
88 #undef MOUSEMODE
89 #define MOUSEMODE(a) a,
90 enum MouseMode {
91         #include "editing_syms.h"
92 };
93
94 extern const char *mousemodestrs[];
95 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
96 MouseMode str2mousemode(const std::string &);
97
98 #undef MOUSEMODE
99 #define MOUSEMODE(a) /*empty*/
100
101 // ZOOMFOCUS
102 #undef ZOOMFOCUS
103 #define ZOOMFOCUS(a) a,
104 enum ZoomFocus {
105         #include "editing_syms.h"
106 };
107
108 extern const char *zoomfocusstrs[];
109 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
110 ZoomFocus str2zoomfocus(const std::string &);
111
112 #undef ZOOMFOCUS
113 #define ZOOMFOCUS(a) /*empty*/
114
115 // DISPLAYCONTROL
116 #undef DISPLAYCONTROL
117 #define DISPLAYCONTROL(a) a,
118 enum DisplayControl {
119         #include "editing_syms.h"
120 };
121
122 extern const char *displaycontrolstrs[];
123 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
124 DisplayControl str2displaycontrol (const std::string &);
125
126 #undef DISPLAYCONTROL
127 #define DISPLAYCONTROL(a) /*empty*/
128
129 // IMPORTMODE
130 #undef IMPORTMODE
131 #define IMPORTMODE(a) a,
132 enum ImportMode {
133         #include "editing_syms.h"
134 };
135
136 #undef IMPORTMODE
137 #define IMPORTMODE(a) /*empty*/
138
139 // IMPORTPOSITION
140 #undef IMPORTPOSITION
141 #define IMPORTPOSITION(a) a,
142 enum ImportPosition {
143         #include "editing_syms.h"
144 };
145
146 #undef IMPORTPOSITION
147 #define IMPORTPOSITION(a) /*empty*/
148
149 // IMPORTDISPOSITION
150 #undef IMPORTDISPOSITION
151 #define IMPORTDISPOSITION(a) a,
152 enum ImportDisposition {
153         #include "editing_syms.h"
154 };
155
156 #undef IMPORTDISPOSITION
157 #define IMPORTDISPOSITION(a) /*empty*/
158
159 // EDITPOINT
160 #undef EDITPOINT
161 #define EDITPOINT(a) a,
162 enum EditPoint {
163         #include "editing_syms.h"
164 };
165
166 #undef EDITPOINT
167 #define EDITPOINT(a) /*empty*/
168
169 // WAVEFORMSCALE
170 #undef WAVEFORMSCALE
171 #define WAVEFORMSCALE(a) a,
172 enum WaveformScale {
173         #include "editing_syms.h"
174 };
175
176 #undef WAVEFORMSCALE
177 #define WAVEFORMSCALE(a) /*empty*/
178
179
180 // WAVEFORMSHAPE
181 #undef WAVEFORMSHAPE
182 #define WAVEFORMSHAPE(a) a,
183 enum WaveformShape {
184         #include "editing_syms.h"
185 };
186
187 #undef WAVEFORMSHAPE
188 #define WAVEFORMSHAPE(a) /*empty*/
189
190
191 // INSERTTIMEOPT
192 #undef INSERTTIMEOPT
193 #define INSERTTIMEOPT(a) a,
194 enum InsertTimeOption {
195         #include "editing_syms.h"
196 };
197
198 #undef INSERTTIMEOPT
199 #define INSERTTIMEOPT(a) /*empty*/
200
201
202 /////////////////////
203 // These don't need their state saved. yet...
204 enum CutCopyOp {
205         Cut,
206         Copy,
207         Clear
208 };
209
210 enum XFadeType {
211         Pre,
212         Post,
213         At
214 };
215
216 } // namespace Editing
217
218 #endif // __gtk_ardour_editing_h__