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 ZOOMFOCUS(a) /*empty*/
35 #define DISPLAYCONTROL(a) /*empty*/
41 #define SNAPTYPE(s) if (!strcmp(type, #s)) {return s;}
43 str2snaptype (const string & str) {
44 const char* type = str.c_str();
45 #include "editing_syms.h"
50 #define SNAPTYPE(s) N_(#s),
51 const char *snaptypestrs[] = {
52 #include "editing_syms.h"
56 #define SNAPTYPE(a) /*empty*/
60 #define SNAPMODE(s) if (!strcmp(type, #s)) {return s;}
62 str2snapmode (const string & str) {
63 const char* type = str.c_str();
64 #include "editing_syms.h"
69 #define SNAPMODE(s) N_(#s),
70 const char *snapmodestrs[] = {
71 #include "editing_syms.h"
75 #define SNAPMODE(a) /*empty*/
79 #undef REGIONLISTSORTTYPE
80 #define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
82 str2regionlistsorttype (const string & str) {
83 const char* type = str.c_str();
84 #include "editing_syms.h"
88 #undef REGIONLISTSORTTYPE
89 #define REGIONLISTSORTTYPE(s) N_(#s),
90 const char *regionlistsorttypestrs[] = {
91 #include "editing_syms.h"
94 #undef REGIONLISTSORTTYPE
95 #define REGIONLISTSORTTYPE(a) /*empty*/
99 #define MOUSEMODE(s) if (!strcmp(type, #s)) {return s;}
101 str2mousemode (const string & str) {
102 const char* type = str.c_str();
103 #include "editing_syms.h"
108 #define MOUSEMODE(s) N_(#s),
109 const char *mousemodestrs[] = {
110 #include "editing_syms.h"
114 #define MOUSEMODE(a) /*empty*/
118 #define ZOOMFOCUS(s) if (!strcmp(type, #s)) {return s;}
120 str2zoomfocus (const string & str) {
121 const char* type = str.c_str();
122 #include "editing_syms.h"
123 return ZoomFocusPlayhead;
127 #define ZOOMFOCUS(s) N_(#s),
128 const char *zoomfocusstrs[] = {
129 #include "editing_syms.h"
133 #define ZOOMFOCUS(a) /*empty*/
136 #undef DISPLAYCONTROL
137 #define DISPLAYCONTROL(s) if (!strcmp(type, #s)) {return s;}
139 str2displaycontrol (const string & str) {
140 const char* type = str.c_str();
141 #include "editing_syms.h"
142 return FollowPlayhead;
145 #undef DISPLAYCONTROL
146 #define DISPLAYCONTROL(s) N_(#s),
147 const char *displaycontrolstrs[] = {
148 #include "editing_syms.h"
151 #undef DISPLAYCONTROL
152 #define DISPLAYCONTROL(a) /*empty*/
156 #define IMPORTMODE(s) N_(#s),
157 const char *importmodestrs[] = {
158 #include "editing_syms.h"
162 #define IMPORTMODE(a) /*empty*/
164 } // namespace Editing