First appearance of MIDI edit tool bar. Toggles when delete held, but otherwise...
[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 MIDIEDITMODE(a) /*empty*/
34 #define ZOOMFOCUS(a) /*empty*/
35 #define DISPLAYCONTROL(a) /*empty*/
36 #define IMPORTMODE(a) /*empty*/
37
38 namespace Editing {
39
40 // SNAPTYPE
41 #undef SNAPTYPE
42 #define SNAPTYPE(a) a,
43 enum SnapType {
44         #include "editing_syms.h"
45 };
46
47 extern const char *snaptypestrs[];
48 inline const char* enum2str(SnapType m) {return snaptypestrs[m];}
49 SnapType str2snaptype(const std::string &);
50
51 #undef SNAPTYPE
52 #define SNAPTYPE(a) /*empty*/
53
54 // SNAPMODE
55 #undef SNAPMODE
56 #define SNAPMODE(a) a,
57 enum SnapMode {
58         #include "editing_syms.h"
59 };
60
61 extern const char *snapmodestrs[];
62 inline const char* enum2str(SnapMode m) {return snapmodestrs[m];}
63 SnapMode str2snapmode(const std::string &);
64
65 #undef SNAPMODE
66 #define SNAPMODE(a) /*empty*/
67
68 // REGIONLISTSORTTYPE
69 #undef REGIONLISTSORTTYPE
70 #define REGIONLISTSORTTYPE(a) a,
71 enum RegionListSortType {
72         #include "editing_syms.h"
73 };
74
75 extern const char *regionlistsorttypestrs[];
76 inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];}
77 RegionListSortType str2regionlistsorttype(const std::string &);
78
79 #undef REGIONLISTSORTTYPE
80 #define REGIONLISTSORTTYPE(a) /*empty*/
81
82 // MOUSEMODE
83 #undef MOUSEMODE
84 #define MOUSEMODE(a) a,
85 enum MouseMode {
86         #include "editing_syms.h"
87 };
88
89 extern const char *mousemodestrs[];
90 inline const char* enum2str(MouseMode m) {return mousemodestrs[m];}
91 MouseMode str2mousemode(const std::string &);
92
93 #undef MOUSEMODE
94 #define MOUSEMODE(a) /*empty*/
95
96 // MIDIEDITMODE
97 #undef MIDIEDITMODE
98 #define MIDIEDITMODE(a) a,
99 enum MidiEditMode {
100         #include "editing_syms.h"
101 };
102
103 extern const char *midieditmodestrs[];
104 inline const char* enum2str(MidiEditMode m) {return midieditmodestrs[m];}
105 MidiEditMode str2midieditmode(const std::string &);
106
107 #undef MIDIEDITMODE
108 #define MIDIEDITMODE(a) /*empty*/
109
110 // ZOOMFOCUS
111 #undef ZOOMFOCUS
112 #define ZOOMFOCUS(a) a,
113 enum ZoomFocus {
114         #include "editing_syms.h"
115 };
116
117 extern const char *zoomfocusstrs[];
118 inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];}
119 ZoomFocus str2zoomfocus(const std::string &);
120
121 #undef ZOOMFOCUS
122 #define ZOOMFOCUS(a) /*empty*/
123
124 // DISPLAYCONTROL
125 #undef DISPLAYCONTROL
126 #define DISPLAYCONTROL(a) a,
127 enum DisplayControl {
128         #include "editing_syms.h"
129 };
130
131 extern const char *displaycontrolstrs[];
132 inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];}
133 DisplayControl str2displaycontrol (const std::string &);
134
135 #undef DISPLAYCONTROL
136 #define DISPLAYCONTROL(a) /*empty*/
137
138 // IMPORTMODE
139 #undef IMPORTMODE
140 #define IMPORTMODE(a) a,
141 enum ImportMode {
142         #include "editing_syms.h"
143 };
144
145 extern const char *importmodestrs[];
146 inline const char* enum2str(ImportMode m) {return importmodestrs[m];}
147 ImportMode str2importmode (const std::string &);
148
149 #undef IMPORTMODE
150 #define IMPORTMODE(a) /*empty*/
151
152 /////////////////////
153 // These don't need their state saved. yet...
154 enum CutCopyOp {
155         Cut,
156         Copy,
157         Clear
158 };
159
160 enum XFadeType {
161         Pre,
162         Post,
163         At
164 };
165
166 } // namespace Editing
167
168 #endif // __gtk_ardour_editing_h__