]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/symbol.hh
release: 0.0.68pre
[lilypond.git] / lily / include / symbol.hh
index 6e04d049cff068a9ec34244e5ef4af096236494b..e1e24b25e068b45dfbe405471e0649be60187ef9 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  symbol.hh -- declare Symbol, Atom
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #ifndef SYMBOL_HH
 #define SYMBOL_HH
 
@@ -14,4 +22,30 @@ struct Symbol {
     String str()const;         // for printing.
 };
 
+
+/// a symbol which can be translated, and freely copied
+struct Atom {
+    Offset off_;
+    Symbol sym_;
+
+    /* *************** */
+    
+    void translate(Offset o) {
+       off_ += o;
+    }
+    void translate_x(Real r){ 
+       off_.x += r;
+    }
+    void translate_y(Real r) {
+       off_.y += r;
+    }
+    
+    /// how big is #this#?
+    Box extent() const;
+    Atom(Symbol s);
+
+    void print() const;
+
+    String TeX_string() const;
+};
 #endif