9 // This involves some cpp magic. --taybin
11 #define SNAPTYPE(a) /*empty*/
12 #define SNAPMODE(a) /*empty*/
13 #define REGIONLISTSORTTYPE(a) /*empty*/
14 #define MOUSEMODE(a) /*empty*/
15 #define ZOOMFOCUS(a) /*empty*/
16 #define DISPLAYCONTROL(a) /*empty*/
22 #define SNAPTYPE(s) if (!strcmp(type, #s)) {return s;}
24 str2snaptype (const string & str) {
25 const char* type = str.c_str();
26 #include "editing_syms.h"
31 #define SNAPTYPE(s) N_(#s),
32 const char *snaptypestrs[] = {
33 #include "editing_syms.h"
37 #define SNAPTYPE(a) /*empty*/
41 #define SNAPMODE(s) if (!strcmp(type, #s)) {return s;}
43 str2snapmode (const string & str) {
44 const char* type = str.c_str();
45 #include "editing_syms.h"
50 #define SNAPMODE(s) N_(#s),
51 const char *snapmodestrs[] = {
52 #include "editing_syms.h"
56 #define SNAPMODE(a) /*empty*/
60 #undef REGIONLISTSORTTYPE
61 #define REGIONLISTSORTTYPE(s) if (!strcmp(type, #s)) {return s;}
63 str2regionlistsorttype (const string & str) {
64 const char* type = str.c_str();
65 #include "editing_syms.h"
69 #undef REGIONLISTSORTTYPE
70 #define REGIONLISTSORTTYPE(s) N_(#s),
71 const char *regionlistsorttypestrs[] = {
72 #include "editing_syms.h"
75 #undef REGIONLISTSORTTYPE
76 #define REGIONLISTSORTTYPE(a) /*empty*/
80 #define MOUSEMODE(s) if (!strcmp(type, #s)) {return s;}
82 str2mousemode (const string & str) {
83 const char* type = str.c_str();
84 #include "editing_syms.h"
89 #define MOUSEMODE(s) N_(#s),
90 const char *mousemodestrs[] = {
91 #include "editing_syms.h"
95 #define MOUSEMODE(a) /*empty*/
99 #define ZOOMFOCUS(s) if (!strcmp(type, #s)) {return s;}
101 str2zoomfocus (const string & str) {
102 const char* type = str.c_str();
103 #include "editing_syms.h"
104 return ZoomFocusPlayhead;
108 #define ZOOMFOCUS(s) N_(#s),
109 const char *zoomfocusstrs[] = {
110 #include "editing_syms.h"
114 #define ZOOMFOCUS(a) /*empty*/
117 #undef DISPLAYCONTROL
118 #define DISPLAYCONTROL(s) if (!strcmp(type, #s)) {return s;}
120 str2displaycontrol (const string & str) {
121 const char* type = str.c_str();
122 #include "editing_syms.h"
123 return FollowPlayhead;
126 #undef DISPLAYCONTROL
127 #define DISPLAYCONTROL(s) N_(#s),
128 const char *displaycontrolstrs[] = {
129 #include "editing_syms.h"
132 #undef DISPLAYCONTROL
133 #define DISPLAYCONTROL(a) /*empty*/
137 #define IMPORTMODE(s) N_(#s),
138 const char *importmodestrs[] = {
139 #include "editing_syms.h"
143 #define IMPORTMODE(a) /*empty*/
145 } // namespace Editing