]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/direction.hh
release: 1.1.15
[lilypond.git] / lily / include / direction.hh
index 032effc64f1da59ce37b1e4514dd7452efa61ec4..45f574b83a8bc83e8db9f7c3dc484971cc7cf460 100644 (file)
@@ -1,15 +1,17 @@
 /*
-  direction.hh -- declare 
+  direction.hh -- declare Direction
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef DIRECTION_HH
 #define DIRECTION_HH
 
+#include "axes.hh"
+
 enum Direction 
 {
   UP=1,
@@ -19,8 +21,25 @@ enum Direction
   CENTER=0,
   SMALLER=-1,
   BIGGER=1,
-
+  START = -1,
+  STOP = 1
 };
 
+inline Direction
+flip (Direction *i) {
+  if (*i == (Direction)1)
+    *i = (Direction)-1;
+  else if (*i == (Direction)-1)
+    *i = (Direction)1;
+  return *i;
+}
+
+/**
+   if d > 0: the max operator
+   if d < 0: the min operator
+ */
+template<class T> T minmax (Direction d, T, T);
+
+String direction_str (Direction, Axis);
 
 #endif // DIRECTION_HH