]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/symbol.hh
release: 0.0.67
[lilypond.git] / lily / include / symbol.hh
1 /*
2   symbol.hh -- declare Symbol, Atom
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #ifndef SYMBOL_HH
10 #define SYMBOL_HH
11
12 #include "string.hh"
13 #include "boxes.hh"
14 #include "lily-proto.hh"
15
16 struct Symbol {
17     String tex;
18     Box dim;
19
20     Symbol (String, Box);
21     Symbol();
22     String str()const;          // for printing.
23 };
24
25
26 /// a symbol which can be translated, and freely copied
27 struct Atom {
28     Offset off;
29     Symbol sym;
30
31     /* *************** */
32     
33     void translate(Offset o) {
34         off += o;
35     }
36     
37     /// how big is #this#?
38     Box extent() const;
39     Atom(Symbol s);
40
41     void print() const;
42
43     String TeX_string() const;
44 };
45 #endif