1 #ifndef __gtk_ardour_editing_h__
2 #define __gtk_ardour_editing_h__
7 // This involves some cpp magic. --taybin
9 #define SNAPTYPE(a) /*empty*/
10 #define SNAPMODE(a) /*empty*/
11 #define REGIONLISTSORTTYPE(a) /*empty*/
12 #define MOUSEMODE(a) /*empty*/
13 #define ZOOMFOCUS(a) /*empty*/
14 #define DISPLAYCONTROL(a) /*empty*/
15 #define COLORID(a) /*empty*/
21 #define SNAPTYPE(a) a,
23 #include "editing_syms.h"
27 #define SNAPTYPE(s) #s,
28 static const char *snaptypestrs[] = {
29 #include "editing_syms.h"
31 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
32 SnapType str2snaptype(std::string);
35 #define SNAPTYPE(a) /*empty*/
39 #define SNAPMODE(a) a,
41 #include "editing_syms.h"
45 #define SNAPMODE(s) #s,
46 static const char *snapmodestrs[] = {
47 #include "editing_syms.h"
49 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
50 SnapMode str2snapmode(std::string);
53 #define SNAPMODE(a) /*empty*/
56 #undef REGIONLISTSORTTYPE
57 #define REGIONLISTSORTTYPE(a) a,
58 enum RegionListSortType {
59 #include "editing_syms.h"
62 #undef REGIONLISTSORTTYPE
63 #define REGIONLISTSORTTYPE(s) #s,
64 static const char *regionlistsorttypestrs[] = {
65 #include "editing_syms.h"
67 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
68 RegionListSortType str2regionlistsorttype(std::string);
70 #undef REGIONLISTSORTTYPE
71 #define REGIONLISTSORTTYPE(a) /*empty*/
75 #define MOUSEMODE(a) a,
77 #include "editing_syms.h"
81 #define MOUSEMODE(s) #s,
82 static const char *mousemodestrs[] = {
83 #include "editing_syms.h"
85 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
86 MouseMode str2mousemode(std::string);
89 #define MOUSEMODE(a) /*empty*/
93 #define ZOOMFOCUS(a) a,
95 #include "editing_syms.h"
99 #define ZOOMFOCUS(s) #s,
100 static const char *zoomfocusstrs[] = {
101 #include "editing_syms.h"
103 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
104 ZoomFocus str2zoomfocus(std::string);
107 #define ZOOMFOCUS(a) /*empty*/
110 #undef DISPLAYCONTROL
111 #define DISPLAYCONTROL(a) a,
112 enum DisplayControl {
113 #include "editing_syms.h"
116 #undef DISPLAYCONTROL
117 #define DISPLAYCONTROL(s) #s,
118 static const char *displaycontrolstrs[] = {
119 #include "editing_syms.h"
121 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
122 DisplayControl str2displaycontrol (std::string);
124 #undef DISPLAYCONTROL
125 #define DISPLAYCONTROL(a) /*empty*/
128 #define COLORID(a) a,
130 #include "editing_syms.h"
134 #define COLORID(s) #s,
135 static const char *color_id_strs[] = {
136 #include "editing_syms.h"
138 inline const char* enum2str(ColorID m) {return color_id_strs[m];}
139 ColorID str2color_id (std::string);
142 #define COLORID(a) /*empty*/
144 /////////////////////
145 // These don't need their state saved. yet...
165 typedef std::map<Editing::ColorID,int> ColorMap;
166 extern ColorMap color_map;
168 } // namespace Editing
170 #endif // __gtk_ardour_editing_h__