new color management design starts to take shape (canvas color only for now)
[ardour.git] / gtk2_ardour / editing.h
1 #ifndef __gtk_ardour_editing_h__
2 #define __gtk_ardour_editing_h__
3
4 #include <string>
5 #include <map>
6 #include <ardour/types.h>
7
8 // This involves some cpp magic. --taybin
9
10 #define SNAPTYPE(a) /*empty*/
11 #define SNAPMODE(a) /*empty*/
12 #define REGIONLISTSORTTYPE(a) /*empty*/
13 #define MOUSEMODE(a) /*empty*/
14 #define ZOOMFOCUS(a) /*empty*/
15 #define DISPLAYCONTROL(a) /*empty*/
16
17 namespace Editing {
18
19 // SNAPTYPE
20 #undef SNAPTYPE
21 #define SNAPTYPE(a) a,
22 enum SnapType {
23         #include "editing_syms.h"
24 };
25
26 #undef SNAPTYPE
27 #define SNAPTYPE(s) #s,
28 static const char *snaptypestrs[] = {
29         #include "editing_syms.h"
30 };
31 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
32 SnapType str2snaptype(const std::string &);
33
34 #undef SNAPTYPE
35 #define SNAPTYPE(a) /*empty*/
36
37 // SNAPMODE
38 #undef SNAPMODE
39 #define SNAPMODE(a) a,
40 enum SnapMode {
41         #include "editing_syms.h"
42 };
43
44 #undef SNAPMODE
45 #define SNAPMODE(s) #s,
46 static const char *snapmodestrs[] = {
47         #include "editing_syms.h"
48 };
49 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
50 SnapMode str2snapmode(const std::string &);
51
52 #undef SNAPMODE
53 #define SNAPMODE(a) /*empty*/
54
55 // REGIONLISTSORTTYPE
56 #undef REGIONLISTSORTTYPE
57 #define REGIONLISTSORTTYPE(a) a,
58 enum RegionListSortType {
59         #include "editing_syms.h"
60 };
61
62 #undef REGIONLISTSORTTYPE
63 #define REGIONLISTSORTTYPE(s) #s,
64 static const char *regionlistsorttypestrs[] = {
65         #include "editing_syms.h"
66 };
67 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
68 RegionListSortType str2regionlistsorttype(const std::string &);
69
70 #undef REGIONLISTSORTTYPE
71 #define REGIONLISTSORTTYPE(a) /*empty*/
72
73 // MOUSEMODE
74 #undef MOUSEMODE
75 #define MOUSEMODE(a) a,
76 enum MouseMode {
77         #include "editing_syms.h"
78 };
79
80 #undef MOUSEMODE
81 #define MOUSEMODE(s) #s,
82 static const char *mousemodestrs[] = {
83         #include "editing_syms.h"
84 };
85 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
86 MouseMode str2mousemode(const std::string &);
87
88 #undef MOUSEMODE
89 #define MOUSEMODE(a) /*empty*/
90
91 // ZOOMFOCUS
92 #undef ZOOMFOCUS
93 #define ZOOMFOCUS(a) a,
94 enum ZoomFocus {
95         #include "editing_syms.h"
96 };
97
98 #undef ZOOMFOCUS
99 #define ZOOMFOCUS(s) #s,
100 static const char *zoomfocusstrs[] = {
101         #include "editing_syms.h"
102 };
103 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
104 ZoomFocus str2zoomfocus(const std::string &);
105
106 #undef ZOOMFOCUS
107 #define ZOOMFOCUS(a) /*empty*/
108
109 // DISPLAYCONTROL
110 #undef DISPLAYCONTROL
111 #define DISPLAYCONTROL(a) a,
112 enum DisplayControl {
113         #include "editing_syms.h"
114 };
115
116 #undef DISPLAYCONTROL
117 #define DISPLAYCONTROL(s) #s,
118 static const char *displaycontrolstrs[] = {
119         #include "editing_syms.h"
120 };
121 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
122 DisplayControl str2displaycontrol (const std::string &);
123
124 #undef DISPLAYCONTROL
125 #define DISPLAYCONTROL(a) /*empty*/
126
127 /////////////////////
128 // These don't need their state saved. yet...
129 enum CutCopyOp {
130         Cut,
131         Copy,
132         Clear
133 };
134
135 enum XFadeType {
136         Pre,
137         Post,
138         At
139 };
140
141 } // namespace Editing
142
143 #endif // __gtk_ardour_editing_h__