reinstate functional clocks
[ardour.git] / gtk2_ardour / editing.h
1 /*
2     Copyright (C) 2000-2007 Paul Davis 
3
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.
8
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.
13
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.
17
18 */
19
20 #ifndef __gtk_ardour_editing_h__
21 #define __gtk_ardour_editing_h__
22
23 #include <string>
24 #include <map>
25 #include <ardour/types.h>
26
27 // This involves some cpp magic. --taybin
28
29 #define SNAPTYPE(a) /*empty*/
30 #define SNAPMODE(a) /*empty*/
31 #define REGIONLISTSORTTYPE(a) /*empty*/
32 #define MOUSEMODE(a) /*empty*/
33 #define ZOOMFOCUS(a) /*empty*/
34 #define DISPLAYCONTROL(a) /*empty*/
35 #define IMPORTMODE(a) /*empty*/
36 #define IMPORTPOSITION(a) /*empty*/
37 #define IMPORTDISPOSITION(a) /*empty*/
38 #define EDITPOINT(a) /*empty*/
39
40 namespace Editing {
41
42 // SNAPTYPE
43 #undef SNAPTYPE
44 #define SNAPTYPE(a) a,
45 enum SnapType {
46         #include "editing_syms.h"
47 };
48
49 extern const char *snaptypestrs[];
50 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
51 SnapType str2snaptype(const std::string &);
52
53 #undef SNAPTYPE
54 #define SNAPTYPE(a) /*empty*/
55
56 // SNAPMODE
57 #undef SNAPMODE
58 #define SNAPMODE(a) a,
59 enum SnapMode {
60         #include "editing_syms.h"
61 };
62
63 extern const char *snapmodestrs[];
64 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
65 SnapMode str2snapmode(const std::string &);
66
67 #undef SNAPMODE
68 #define SNAPMODE(a) /*empty*/
69
70 // REGIONLISTSORTTYPE
71 #undef REGIONLISTSORTTYPE
72 #define REGIONLISTSORTTYPE(a) a,
73 enum RegionListSortType {
74         #include "editing_syms.h"
75 };
76
77 extern const char *regionlistsorttypestrs[];
78 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
79 RegionListSortType str2regionlistsorttype(const std::string &);
80
81 #undef REGIONLISTSORTTYPE
82 #define REGIONLISTSORTTYPE(a) /*empty*/
83
84 // MOUSEMODE
85 #undef MOUSEMODE
86 #define MOUSEMODE(a) a,
87 enum MouseMode {
88         #include "editing_syms.h"
89 };
90
91 extern const char *mousemodestrs[];
92 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
93 MouseMode str2mousemode(const std::string &);
94
95 #undef MOUSEMODE
96 #define MOUSEMODE(a) /*empty*/
97
98 // ZOOMFOCUS
99 #undef ZOOMFOCUS
100 #define ZOOMFOCUS(a) a,
101 enum ZoomFocus {
102         #include "editing_syms.h"
103 };
104
105 extern const char *zoomfocusstrs[];
106 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
107 ZoomFocus str2zoomfocus(const std::string &);
108
109 #undef ZOOMFOCUS
110 #define ZOOMFOCUS(a) /*empty*/
111
112 // DISPLAYCONTROL
113 #undef DISPLAYCONTROL
114 #define DISPLAYCONTROL(a) a,
115 enum DisplayControl {
116         #include "editing_syms.h"
117 };
118
119 extern const char *displaycontrolstrs[];
120 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
121 DisplayControl str2displaycontrol (const std::string &);
122
123 #undef DISPLAYCONTROL
124 #define DISPLAYCONTROL(a) /*empty*/
125
126 // IMPORTMODE
127 #undef IMPORTMODE
128 #define IMPORTMODE(a) a,
129 enum ImportMode {
130         #include "editing_syms.h"
131 };
132
133 #undef IMPORTMODE
134 #define IMPORTMODE(a) /*empty*/
135
136 // IMPORTPOSITION
137 #undef IMPORTPOSITION
138 #define IMPORTPOSITION(a) a,
139 enum ImportPosition {
140         #include "editing_syms.h"
141 };
142
143 #undef IMPORTPOSITION
144 #define IMPORTPOSITION(a) /*empty*/
145
146 // IMPORTDISPOSITION
147 #undef IMPORTDISPOSITION
148 #define IMPORTDISPOSITION(a) a,
149 enum ImportDisposition {
150         #include "editing_syms.h"
151 };
152
153 #undef IMPORTDISPOSITION
154 #define IMPORTDISPOSITION(a) /*empty*/
155
156 // EDITPOINT
157 #undef EDITPOINT
158 #define EDITPOINT(a) a,
159 enum EditPoint {
160         #include "editing_syms.h"
161 };
162
163 #undef EDITPOINT
164 #define EDITPOINT(a) /*empty*/
165
166 /////////////////////
167 // These don't need their state saved. yet...
168 enum CutCopyOp {
169         Cut,
170         Copy,
171         Clear
172 };
173
174 enum XFadeType {
175         Pre,
176         Post,
177         At
178 };
179
180 } // namespace Editing
181
182 #endif // __gtk_ardour_editing_h__