]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/atom.hh
release: 0.1.15
[lilypond.git] / lily / include / atom.hh
1 /*
2   atom.hh -- declare 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 ATOM_HH
10 #define ATOM_HH
11
12 #include "string.hh"
13 #include "boxes.hh"
14 #include "lily-proto.hh"
15
16
17 /// a symbol which can be translated, and freely copied
18 struct Atom {
19   String tex_;
20   Box dim_;
21   Offset off_;
22
23   String str() const;           // for printing.
24   Atom (String, Box);
25     Atom ();
26   void translate (Offset o) {
27     off_ += o;
28   }
29   void translate (Real r,Axis a){
30     off_[a] += r;
31   }
32   /// how big is #this#?
33   Box extent() const;
34   void print() const;
35   String TeX_string() const;
36 };
37 #endif