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.
29 // This involves some cpp magic. --taybin
31 #define SNAPTYPE(a) /*empty*/
32 #define SNAPDELTA(a) /*empty*/
33 #define SNAPMODE(a) /*empty*/
34 #define REGIONLISTSORTTYPE(a) /*empty*/
35 #define MOUSEMODE(a) /*empty*/
36 #define MIDIEDITMODE(a) /*empty*/
37 #define ZOOMFOCUS(a) /*empty*/
38 #define DISPLAYCONTROL(a) /*empty*/
44 #define SNAPTYPE(s) if (!strcmp(type, #s)) {return s;}
46 str2snaptype (const string & str) {
47 const char* type = str.c_str();
48 #include "editing_syms.h"
53 #define SNAPTYPE(s) N_(#s),
54 const char *snaptypestrs[] = {
55 #include "editing_syms.h"
59 #define SNAPTYPE(a) /*empty*/
64 #define SNAPDELTA(s) if (!strcmp(type, #s)) {return s;}
66 str2snapdelta (const string & str) {
67 const char* type = str.c_str();
68 #include "editing_syms.h"
73 #define SNAPDELTA(s) N_(#s),
74 const char *snapdeltastrs[] = {
75 #include "editing_syms.h"
79 #define SNAPDELTA(a) /*empty*/
84 #define SNAPMODE(s) if (!strcmp(type, #s)) {return s;}
86 str2snapmode (const string & str) {
87 const char* type = str.c_str();
88 #include "editing_syms.h"
93 #define SNAPMODE(s) N_(#s),
94 const char *snapmodestrs[] = {
95 #include "editing_syms.h"
99 #define SNAPMODE(a) /*empty*/
102 // REGIONLISTSORTTYPE
103 #undef REGIONLISTSORTTYPE
104 #define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
106 str2regionlistsorttype (const string & str) {
107 const char* type = str.c_str();
108 #include "editing_syms.h"
112 #undef REGIONLISTSORTTYPE
113 #define REGIONLISTSORTTYPE(s) N_(#s),
114 const char *regionlistsorttypestrs[] = {
115 #include "editing_syms.h"
118 #undef REGIONLISTSORTTYPE
119 #define REGIONLISTSORTTYPE(a) /*empty*/
123 #define MOUSEMODE(s) if (!strcmp(type, #s)) {return s;}
125 str2mousemode (const string & str) {
126 const char* type = str.c_str();
127 #include "editing_syms.h"
132 #define MOUSEMODE(s) N_(#s),
133 const char *mousemodestrs[] = {
134 #include "editing_syms.h"
138 #define MOUSEMODE(a) /*empty*/
142 #define ZOOMFOCUS(s) if (!strcmp(type, #s)) {return s;}
144 str2zoomfocus (const string & str) {
145 const char* type = str.c_str();
146 #include "editing_syms.h"
147 return ZoomFocusPlayhead;
151 #define ZOOMFOCUS(s) N_(#s),
152 const char *zoomfocusstrs[] = {
153 #include "editing_syms.h"
157 #define ZOOMFOCUS(a) /*empty*/
160 #undef DISPLAYCONTROL
161 #define DISPLAYCONTROL(s) if (!strcmp(type, #s)) {return s;}
163 str2displaycontrol (const string & str) {
164 const char* type = str.c_str();
165 #include "editing_syms.h"
166 return FollowPlayhead;
169 #undef DISPLAYCONTROL
170 #define DISPLAYCONTROL(s) N_(#s),
171 const char *displaycontrolstrs[] = {
172 #include "editing_syms.h"
175 #undef DISPLAYCONTROL
176 #define DISPLAYCONTROL(a) /*empty*/
180 #define IMPORTMODE(s) N_(#s),
181 const char *importmodestrs[] = {
182 #include "editing_syms.h"
186 #define IMPORTMODE(a) /*empty*/
188 } // namespace Editing