2 * Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
3 * Copyright (C) 2006-2016 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2007-2009 David Robillard <d@drobilla.net>
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.
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.
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.
29 // This involves some cpp magic. --taybin
31 #define GRIDTYPE(a) /*empty*/
32 #define SNAPMODE(a) /*empty*/
33 #define REGIONLISTSORTTYPE(a) /*empty*/
34 #define MOUSEMODE(a) /*empty*/
35 #define MIDIEDITMODE(a) /*empty*/
36 #define ZOOMFOCUS(a) /*empty*/
37 #define DISPLAYCONTROL(a) /*empty*/
43 #define GRIDTYPE(s) if (!strcmp(type, #s)) {return s;}
45 str2gridtype (const string & str) {
46 const char* type = str.c_str();
47 #include "editing_syms.h"
52 #define GRIDTYPE(s) N_(#s),
53 const char *gridtypestrs[] = {
54 #include "editing_syms.h"
58 #define GRIDTYPE(a) /*empty*/
62 #define SNAPMODE(s) if (!strcmp(type, #s)) {return s;}
64 str2snapmode (const string & str) {
65 const char* type = str.c_str();
66 #include "editing_syms.h"
71 #define SNAPMODE(s) N_(#s),
72 const char *snapmodestrs[] = {
73 #include "editing_syms.h"
77 #define SNAPMODE(a) /*empty*/
81 #undef REGIONLISTSORTTYPE
82 #define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
84 str2regionlistsorttype (const string & str) {
85 const char* type = str.c_str();
86 #include "editing_syms.h"
90 #undef REGIONLISTSORTTYPE
91 #define REGIONLISTSORTTYPE(s) N_(#s),
92 const char *regionlistsorttypestrs[] = {
93 #include "editing_syms.h"
96 #undef REGIONLISTSORTTYPE
97 #define REGIONLISTSORTTYPE(a) /*empty*/
101 #define MOUSEMODE(s) if (!strcmp(type, #s)) {return s;}
103 str2mousemode (const string & str) {
104 const char* type = str.c_str();
105 #include "editing_syms.h"
110 #define MOUSEMODE(s) N_(#s),
111 const char *mousemodestrs[] = {
112 #include "editing_syms.h"
116 #define MOUSEMODE(a) /*empty*/
120 #define ZOOMFOCUS(s) if (!strcmp(type, #s)) {return s;}
122 str2zoomfocus (const string & str) {
123 const char* type = str.c_str();
124 #include "editing_syms.h"
125 return ZoomFocusPlayhead;
129 #define ZOOMFOCUS(s) N_(#s),
130 const char *zoomfocusstrs[] = {
131 #include "editing_syms.h"
135 #define ZOOMFOCUS(a) /*empty*/
138 #undef DISPLAYCONTROL
139 #define DISPLAYCONTROL(s) if (!strcmp(type, #s)) {return s;}
141 str2displaycontrol (const string & str) {
142 const char* type = str.c_str();
143 #include "editing_syms.h"
144 return FollowPlayhead;
147 #undef DISPLAYCONTROL
148 #define DISPLAYCONTROL(s) N_(#s),
149 const char *displaycontrolstrs[] = {
150 #include "editing_syms.h"
153 #undef DISPLAYCONTROL
154 #define DISPLAYCONTROL(a) /*empty*/
158 #define IMPORTMODE(s) N_(#s),
159 const char *importmodestrs[] = {
160 #include "editing_syms.h"
164 #define IMPORTMODE(a) /*empty*/
166 } // namespace Editing