]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/direction.hh
release: 1.0.1
[lilypond.git] / lily / include / direction.hh
1 /*
2   direction.hh -- declare Direction
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef DIRECTION_HH
11 #define DIRECTION_HH
12
13 #include "axes.hh"
14
15 enum Direction 
16 {
17   UP=1,
18   DOWN=-1,
19   LEFT=-1,
20   RIGHT=1,
21   CENTER=0,
22   SMALLER=-1,
23   BIGGER=1,
24 };
25
26 inline Direction
27 flip (Direction *i) {
28   if (*i == (Direction)1)
29     *i = (Direction)-1;
30   else if (*i == (Direction)-1)
31     *i = (Direction)1;
32   return *i;
33 }
34
35 /**
36    if d > 0: the max operator
37    if d < 0: the min operator
38  */
39 template<class T> minmax (Direction d, T, T);
40
41 String direction_str (Direction, Axis);
42
43 #endif // DIRECTION_HH