Ardour  8.12
editing.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
3  * Copyright (C) 2006-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2007-2009 David Robillard <d@drobilla.net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __gtk_ardour_editing_h__
22 #define __gtk_ardour_editing_h__
23 
24 #include <string>
25 #include <map>
26 #include "ardour/types.h"
27 
28 // This involves some cpp magic. --taybin
29 
30 #define GRIDTYPE(a) /*empty*/
31 #define SNAPMODE(a) /*empty*/
32 #define REGIONLISTSORTTYPE(a) /*empty*/
33 #define MOUSEMODE(a) /*empty*/
34 #define MIDIEDITMODE(a) /*empty*/
35 #define ZOOMFOCUS(a) /*empty*/
36 #define DISPLAYCONTROL(a) /*empty*/
37 #define IMPORTMODE(a) /*empty*/
38 #define IMPORTPOSITION(a)
39 #define IMPORTDISPOSITION(a)
40 #define EDITPOINT(a) /*empty*/
41 #define WAVEFORMSCALE(a) /*empty*/
42 #define WAVEFORMSHAPE(a) /*empty*/
43 #define INSERTTIMEOPT(a) /*empty*/
44 #define TEMPOEDITBEHAVIOR(a) /*empty*/
45 #define NOTENAMEDISPLAY(a) /*empty*/
46 #define MARKERCLICKBEHAVIOR(a) /*empty*/
47 
48 namespace Editing {
49 
50 // GRIDTYPE
51 #undef GRIDTYPE
52 #define GRIDTYPE(a) a,
53 enum GridType {
54  #include "editing_syms.h"
55 };
56 
57 static const int DRAW_VEL_AUTO = -1;
58 static const int DRAW_CHAN_AUTO = -1;
59 static const GridType DRAW_LEN_AUTO = GridTypeNone; //special case: use the Grid's value instead of the note-length selection
60 
61 extern const char *gridtypestrs[];
62 inline const char* enum2str(GridType m) {return gridtypestrs[m];}
63 GridType str2gridtype(const std::string &);
64 
65 #undef GRIDTYPE
66 #define GRIDTYPE(a) /*empty*/
67 
68 // SNAPMODE
69 #undef SNAPMODE
70 #define SNAPMODE(a) a,
71 enum SnapMode {
72  #include "editing_syms.h"
73 };
74 
75 extern const char *snapmodestrs[];
76 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
77 SnapMode str2snapmode(const std::string &);
78 
79 #undef SNAPMODE
80 #define SNAPMODE(a) /*empty*/
81 
82 // REGIONLISTSORTTYPE
83 #undef REGIONLISTSORTTYPE
84 #define REGIONLISTSORTTYPE(a) a,
86  #include "editing_syms.h"
87 };
88 
89 extern const char *regionlistsorttypestrs[];
90 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
92 
93 #undef REGIONLISTSORTTYPE
94 #define REGIONLISTSORTTYPE(a) /*empty*/
95 
96 // MOUSEMODE
97 #undef MOUSEMODE
98 #define MOUSEMODE(a) a,
99 enum MouseMode {
100  #include "editing_syms.h"
101 };
102 
103 extern const char *mousemodestrs[];
104 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
105 MouseMode str2mousemode(const std::string &);
106 
107 #undef MOUSEMODE
108 #define MOUSEMODE(a) /*empty*/
109 
110 // MIDIEDITMODE
111 #undef MIDIEDITMODE
112 #define MIDIEDITMODE(a) a,
114  #include "editing_syms.h"
115 };
116 
117 extern const char *midieditmodestrs[];
118 inline const char* enum2str(MidiEditMode m) {return midieditmodestrs[m];}
119 MidiEditMode str2midieditmode(const std::string &);
120 
121 #undef MIDIEDITMODE
122 #define MIDIEDITMODE(a) /*empty*/
123 
124 // ZOOMFOCUS
125 #undef ZOOMFOCUS
126 #define ZOOMFOCUS(a) a,
127 enum ZoomFocus {
128  #include "editing_syms.h"
129 };
130 
131 extern const char *zoomfocusstrs[];
132 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
133 ZoomFocus str2zoomfocus(const std::string &);
134 
135 #undef ZOOMFOCUS
136 #define ZOOMFOCUS(a) /*empty*/
137 
138 // DISPLAYCONTROL
139 #undef DISPLAYCONTROL
140 #define DISPLAYCONTROL(a) a,
142  #include "editing_syms.h"
143 };
144 
145 extern const char *displaycontrolstrs[];
146 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
147 DisplayControl str2displaycontrol (const std::string &);
148 
149 #undef DISPLAYCONTROL
150 #define DISPLAYCONTROL(a) /*empty*/
151 
152 
153 // IMPORTMODE
154 #undef IMPORTMODE
155 #define IMPORTMODE(a) a,
157  #include "editing_syms.h"
158 };
159 
160 #undef IMPORTMODE
161 #define IMPORTMODE(a) /*empty*/
162 
163 // IMPORTPOSITION
164 #undef IMPORTPOSITION
165 #define IMPORTPOSITION(a) a,
167  #include "editing_syms.h"
168 };
169 
170 #undef IMPORTPOSITION
171 #define IMPORTPOSITION(a) /*empty*/
172 
173 // IMPORTDISPOSITION
174 #undef IMPORTDISPOSITION
175 #define IMPORTDISPOSITION(a) a,
177  #include "editing_syms.h"
178 };
179 
180 #undef IMPORTDISPOSITION
181 #define IMPORTDISPOSITION(a) /*empty*/
182 
183 // EDITPOINT
184 #undef EDITPOINT
185 #define EDITPOINT(a) a,
186 enum EditPoint {
187  #include "editing_syms.h"
188 };
189 
190 #undef EDITPOINT
191 #define EDITPOINT(a) /*empty*/
192 
193 // INSERTTIMEOPT
194 #undef INSERTTIMEOPT
195 #define INSERTTIMEOPT(a) a,
197  #include "editing_syms.h"
198 };
199 
200 #undef INSERTTIMEOPT
201 #define INSERTTIMEOPT(a) /*empty*/
202 
203 #undef NOTENAMEDISPLAY
204 #define NOTENAMEDISPLAY(a) a,
206  #include "editing_syms.h"
207 };
208 
209 extern const char *notenamedisplaystrs[];
210 inline const char* enum2str(NoteNameDisplay m) {return notenamedisplaystrs[m];}
211 
212 #undef NOTENAMEDISPLAY
213 #define NOTENAMEDISPLAY(a) /*empty*/
214 
215 #undef MARKERCLICKBEHAVIOR
216 #define MARKERCLICKBEHAVIOR(a) a,
218  #include "editing_syms.h"
219 };
220 #undef MARKERCLICKBEHAVIOR
221 #define MARKERCLICKBEHAVIOR(a) /*empty*/
222 
223 extern const char *markerclickbehaviorstrs[];
224 inline const char* enum2str(MarkerClickBehavior m) {return markerclickbehaviorstrs[m];}
226 
228 // These don't need their state saved. yet...
229 enum CutCopyOp {
233  Clear
234 };
235 
236 enum XFadeType {
239  At
240 };
241 
247 };
248 
249 enum ZoomAxis {
252  Both
253 };
254 
259  ListSelection = 0x8
260 };
261 
262 } // namespace Editing
263 
264 #endif // __gtk_ardour_editing_h__
ZoomAxis
Definition: editing.h:249
@ Horizontal
Definition: editing.h:251
@ Vertical
Definition: editing.h:250
@ Both
Definition: editing.h:252
CutCopyOp
Definition: editing.h:229
@ Copy
Definition: editing.h:232
@ Clear
Definition: editing.h:233
@ Cut
Definition: editing.h:231
@ Delete
Definition: editing.h:230
ImportDisposition
Definition: editing.h:176
const char * displaycontrolstrs[]
EditPoint
Definition: editing.h:186
const char * notenamedisplaystrs[]
SnapMode
Definition: editing.h:71
const char * snapmodestrs[]
InsertTimeOption
Definition: editing.h:196
ImportMode
Definition: editing.h:156
const char * markerclickbehaviorstrs[]
DisplayControl str2displaycontrol(const std::string &)
ZoomFocus str2zoomfocus(const std::string &)
DisplayControl
Definition: editing.h:141
GridType
Definition: editing.h:53
SnapMode str2snapmode(const std::string &)
EditIgnoreOption
Definition: editing.h:242
@ EDIT_IGNORE_MARKER
Definition: editing.h:246
@ EDIT_IGNORE_MOUSE
Definition: editing.h:245
@ EDIT_IGNORE_PHEAD
Definition: editing.h:244
@ EDIT_IGNORE_NONE
Definition: editing.h:243
MidiEditMode
Definition: editing.h:113
const char * zoomfocusstrs[]
MidiEditMode str2midieditmode(const std::string &)
NoteNameDisplay
Definition: editing.h:205
XFadeType
Definition: editing.h:236
@ At
Definition: editing.h:239
@ Post
Definition: editing.h:238
@ Pre
Definition: editing.h:237
RegionListSortType str2regionlistsorttype(const std::string &)
GridType str2gridtype(const std::string &)
RegionListSortType
Definition: editing.h:85
const char * gridtypestrs[]
MarkerClickBehavior
Definition: editing.h:217
ZoomFocus
Definition: editing.h:127
MarkerClickBehavior str2markerclickbehavior(const std::string &)
const char * enum2str(GridType m)
Definition: editing.h:62
const char * regionlistsorttypestrs[]
const char * midieditmodestrs[]
static const int DRAW_VEL_AUTO
Definition: editing.h:57
const char * mousemodestrs[]
static const GridType DRAW_LEN_AUTO
Definition: editing.h:59
ImportPosition
Definition: editing.h:166
MouseMode str2mousemode(const std::string &)
static const int DRAW_CHAN_AUTO
Definition: editing.h:58
RegionActionTarget
Definition: editing.h:255
@ EnteredRegions
Definition: editing.h:257
@ SelectedRegions
Definition: editing.h:256
@ ListSelection
Definition: editing.h:259
@ EditPointRegions
Definition: editing.h:258
MouseMode
Definition: editing.h:99