ardour
editing.h
Go to the documentation of this file.
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 MIDIEDITMODE(a) /*empty*/
34 #define ZOOMFOCUS(a) /*empty*/
35 #define DISPLAYCONTROL(a) /*empty*/
36 #define IMPORTMODE(a) /*empty*/
37 #define IMPORTPOSITION(a)
38 #define IMPORTDISPOSITION(a)
39 #define EDITPOINT(a) /*empty*/
40 #define WAVEFORMSCALE(a) /*empty*/
41 #define WAVEFORMSHAPE(a) /*empty*/
42 #define INSERTTIMEOPT(a) /*empty*/
43 
44 namespace Editing {
45 
46 // SNAPTYPE
47 #undef SNAPTYPE
48 #define SNAPTYPE(a) a,
49 enum SnapType {
50  #include "editing_syms.h"
51 };
52 
53 extern const char *snaptypestrs[];
54 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
55 SnapType str2snaptype(const std::string &);
56 
57 #undef SNAPTYPE
58 #define SNAPTYPE(a) /*empty*/
59 
60 // SNAPMODE
61 #undef SNAPMODE
62 #define SNAPMODE(a) a,
63 enum SnapMode {
64  #include "editing_syms.h"
65 };
66 
67 extern const char *snapmodestrs[];
68 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
69 SnapMode str2snapmode(const std::string &);
70 
71 #undef SNAPMODE
72 #define SNAPMODE(a) /*empty*/
73 
74 // REGIONLISTSORTTYPE
75 #undef REGIONLISTSORTTYPE
76 #define REGIONLISTSORTTYPE(a) a,
78  #include "editing_syms.h"
79 };
80 
81 extern const char *regionlistsorttypestrs[];
82 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
83 RegionListSortType str2regionlistsorttype(const std::string &);
84 
85 #undef REGIONLISTSORTTYPE
86 #define REGIONLISTSORTTYPE(a) /*empty*/
87 
88 // MOUSEMODE
89 #undef MOUSEMODE
90 #define MOUSEMODE(a) a,
91 enum MouseMode {
92  #include "editing_syms.h"
93 };
94 
95 extern const char *mousemodestrs[];
96 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
97 MouseMode str2mousemode(const std::string &);
98 
99 #undef MOUSEMODE
100 #define MOUSEMODE(a) /*empty*/
101 
102 // MIDIEDITMODE
103 #undef MIDIEDITMODE
104 #define MIDIEDITMODE(a) a,
106  #include "editing_syms.h"
107 };
108 
109 extern const char *midieditmodestrs[];
110 inline const char* enum2str(MidiEditMode m) {return midieditmodestrs[m];}
111 MidiEditMode str2midieditmode(const std::string &);
112 
113 #undef MIDIEDITMODE
114 #define MIDIEDITMODE(a) /*empty*/
115 
116 // ZOOMFOCUS
117 #undef ZOOMFOCUS
118 #define ZOOMFOCUS(a) a,
119 enum ZoomFocus {
120  #include "editing_syms.h"
121 };
122 
123 extern const char *zoomfocusstrs[];
124 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
125 ZoomFocus str2zoomfocus(const std::string &);
126 
127 #undef ZOOMFOCUS
128 #define ZOOMFOCUS(a) /*empty*/
129 
130 // DISPLAYCONTROL
131 #undef DISPLAYCONTROL
132 #define DISPLAYCONTROL(a) a,
134  #include "editing_syms.h"
135 };
136 
137 extern const char *displaycontrolstrs[];
138 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
139 DisplayControl str2displaycontrol (const std::string &);
140 
141 #undef DISPLAYCONTROL
142 #define DISPLAYCONTROL(a) /*empty*/
143 
144 
145 // IMPORTMODE
146 #undef IMPORTMODE
147 #define IMPORTMODE(a) a,
149  #include "editing_syms.h"
150 };
151 
152 #undef IMPORTMODE
153 #define IMPORTMODE(a) /*empty*/
154 
155 // IMPORTPOSITION
156 #undef IMPORTPOSITION
157 #define IMPORTPOSITION(a) a,
159  #include "editing_syms.h"
160 };
161 
162 #undef IMPORTPOSITION
163 #define IMPORTPOSITION(a) /*empty*/
164 
165 // IMPORTDISPOSITION
166 #undef IMPORTDISPOSITION
167 #define IMPORTDISPOSITION(a) a,
169  #include "editing_syms.h"
170 };
171 
172 #undef IMPORTDISPOSITION
173 #define IMPORTDISPOSITION(a) /*empty*/
174 
175 // EDITPOINT
176 #undef EDITPOINT
177 #define EDITPOINT(a) a,
178 enum EditPoint {
179  #include "editing_syms.h"
180 };
181 
182 #undef EDITPOINT
183 #define EDITPOINT(a) /*empty*/
184 
185 // INSERTTIMEOPT
186 #undef INSERTTIMEOPT
187 #define INSERTTIMEOPT(a) a,
189  #include "editing_syms.h"
190 };
191 
192 #undef INSERTTIMEOPT
193 #define INSERTTIMEOPT(a) /*empty*/
194 
195 
197 // These don't need their state saved. yet...
198 enum CutCopyOp {
203 };
204 
205 enum XFadeType {
209 };
210 
216 };
217 
218 } // namespace Editing
219 
220 #endif // __gtk_ardour_editing_h__
const char * midieditmodestrs[]
InsertTimeOption
Definition: editing.h:188
MouseMode
Definition: editing.h:91
MidiEditMode
Definition: editing.h:105
const char * regionlistsorttypestrs[]
Definition: editing.cc:92
ImportPosition
Definition: editing.h:158
const char * mousemodestrs[]
Definition: editing.cc:111
MidiEditMode str2midieditmode(const std::string &)
ZoomFocus
Definition: editing.h:119
SnapType
Definition: editing.h:49
EditIgnoreOption
Definition: editing.h:211
const char * snapmodestrs[]
Definition: editing.cc:72
const char * zoomfocusstrs[]
Definition: editing.cc:130
DisplayControl
Definition: editing.h:133
const char * displaycontrolstrs[]
Definition: editing.cc:149
DisplayControl str2displaycontrol(const string &str)
Definition: editing.cc:141
XFadeType
Definition: editing.h:205
const char * enum2str(SnapType m)
Definition: editing.h:54
SnapType str2snaptype(const string &str)
Definition: editing.cc:45
ImportMode
Definition: editing.h:148
SnapMode
Definition: editing.h:63
EditPoint
Definition: editing.h:178
RegionListSortType str2regionlistsorttype(const string &str)
Definition: editing.cc:84
CutCopyOp
Definition: editing.h:198
ZoomFocus str2zoomfocus(const string &str)
Definition: editing.cc:122
MouseMode str2mousemode(const string &str)
Definition: editing.cc:103
ImportDisposition
Definition: editing.h:168
SnapMode str2snapmode(const string &str)
Definition: editing.cc:64
const char * snaptypestrs[]
Definition: editing.cc:53
RegionListSortType
Definition: editing.h:77