Merged with trunk R1719.
[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
37 namespace Editing {
38
39 // SNAPTYPE
40 #undef SNAPTYPE
41 #define SNAPTYPE(a) a,
42 enum SnapType {
43         #include "editing_syms.h"
44 };
45
46 extern const char *snaptypestrs[];
47 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
48 SnapType str2snaptype(const std::string &);
49
50 #undef SNAPTYPE
51 #define SNAPTYPE(a) /*empty*/
52
53 // SNAPMODE
54 #undef SNAPMODE
55 #define SNAPMODE(a) a,
56 enum SnapMode {
57         #include "editing_syms.h"
58 };
59
60 extern const char *snapmodestrs[];
61 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
62 SnapMode str2snapmode(const std::string &);
63
64 #undef SNAPMODE
65 #define SNAPMODE(a) /*empty*/
66
67 // REGIONLISTSORTTYPE
68 #undef REGIONLISTSORTTYPE
69 #define REGIONLISTSORTTYPE(a) a,
70 enum RegionListSortType {
71         #include "editing_syms.h"
72 };
73
74 extern const char *regionlistsorttypestrs[];
75 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
76 RegionListSortType str2regionlistsorttype(const std::string &);
77
78 #undef REGIONLISTSORTTYPE
79 #define REGIONLISTSORTTYPE(a) /*empty*/
80
81 // MOUSEMODE
82 #undef MOUSEMODE
83 #define MOUSEMODE(a) a,
84 enum MouseMode {
85         #include "editing_syms.h"
86 };
87
88 extern const char *mousemodestrs[];
89 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
90 MouseMode str2mousemode(const std::string &);
91
92 #undef MOUSEMODE
93 #define MOUSEMODE(a) /*empty*/
94
95 // ZOOMFOCUS
96 #undef ZOOMFOCUS
97 #define ZOOMFOCUS(a) a,
98 enum ZoomFocus {
99         #include "editing_syms.h"
100 };
101
102 extern const char *zoomfocusstrs[];
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 extern const char *displaycontrolstrs[];
117 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
118 DisplayControl str2displaycontrol (const std::string &);
119
120 #undef DISPLAYCONTROL
121 #define DISPLAYCONTROL(a) /*empty*/
122
123 // IMPORTMODE
124 #undef IMPORTMODE
125 #define IMPORTMODE(a) a,
126 enum ImportMode {
127         #include "editing_syms.h"
128 };
129
130 extern const char *importmodestrs[];
131 inline const char* enum2str(ImportMode m) {return importmodestrs[m];}
132 ImportMode str2importmode (const std::string &);
133
134 #undef IMPORTMODE
135 #define IMPORTMODE(a) /*empty*/
136
137 /////////////////////
138 // These don't need their state saved. yet...
139 enum CutCopyOp {
140         Cut,
141         Copy,
142         Clear
143 };
144
145 enum XFadeType {
146         Pre,
147         Post,
148         At
149 };
150
151 } // namespace Editing
152
153 #endif // __gtk_ardour_editing_h__