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.
28 // This involves some cpp magic. --taybin
30 #define SNAPTYPE(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*/
42 #define SNAPTYPE(s) if (!strcmp(type, #s)) {return s;}
44 str2snaptype (const string & str) {
45 const char* type = str.c_str();
46 #include "editing_syms.h"
51 #define SNAPTYPE(s) N_(#s),
52 const char *snaptypestrs[] = {
53 #include "editing_syms.h"
57 #define SNAPTYPE(a) /*empty*/
61 #define SNAPMODE(s) if (!strcmp(type, #s)) {return s;}
63 str2snapmode (const string & str) {
64 const char* type = str.c_str();
65 #include "editing_syms.h"
70 #define SNAPMODE(s) N_(#s),
71 const char *snapmodestrs[] = {
72 #include "editing_syms.h"
76 #define SNAPMODE(a) /*empty*/
80 #undef REGIONLISTSORTTYPE
81 #define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
83 str2regionlistsorttype (const string & str) {
84 const char* type = str.c_str();
85 #include "editing_syms.h"
89 #undef REGIONLISTSORTTYPE
90 #define REGIONLISTSORTTYPE(s) N_(#s),
91 const char *regionlistsorttypestrs[] = {
92 #include "editing_syms.h"
95 #undef REGIONLISTSORTTYPE
96 #define REGIONLISTSORTTYPE(a) /*empty*/
100 #define MOUSEMODE(s) if (!strcmp(type, #s)) {return s;}
102 str2mousemode (const string & str) {
103 const char* type = str.c_str();
104 #include "editing_syms.h"
109 #define MOUSEMODE(s) N_(#s),
110 const char *mousemodestrs[] = {
111 #include "editing_syms.h"
115 #define MOUSEMODE(a) /*empty*/
119 #define MIDIEDITMODE(s) if (!strcmp(type, #s)) {return s;}
121 str2midieditmode (const string & str) {
122 const char* type = str.c_str();
123 #include "editing_syms.h"
124 return MidiEditSelect;
128 #define MIDIEDITMODE(s) N_(#s),
129 const char *midieditmodestrs[] = {
130 #include "editing_syms.h"
134 #define MIDIEDITMODE(a) /*empty*/
138 #define ZOOMFOCUS(s) if (!strcmp(type, #s)) {return s;}
140 str2zoomfocus (const string & str) {
141 const char* type = str.c_str();
142 #include "editing_syms.h"
143 return ZoomFocusPlayhead;
147 #define ZOOMFOCUS(s) N_(#s),
148 const char *zoomfocusstrs[] = {
149 #include "editing_syms.h"
153 #define ZOOMFOCUS(a) /*empty*/
156 #undef DISPLAYCONTROL
157 #define DISPLAYCONTROL(s) if (!strcmp(type, #s)) {return s;}
159 str2displaycontrol (const string & str) {
160 const char* type = str.c_str();
161 #include "editing_syms.h"
162 return FollowPlayhead;
165 #undef DISPLAYCONTROL
166 #define DISPLAYCONTROL(s) N_(#s),
167 const char *displaycontrolstrs[] = {
168 #include "editing_syms.h"
171 #undef DISPLAYCONTROL
172 #define DISPLAYCONTROL(a) /*empty*/
176 #define IMPORTMODE(s) N_(#s),
177 const char *importmodestrs[] = {
178 #include "editing_syms.h"
182 #define IMPORTMODE(a) /*empty*/
184 } // namespace Editing