]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/atom.hh
b2e94f13599abc9d7eaad6d4e2572cdfce4978b9
[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--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef ATOM_HH
10 #define ATOM_HH
11
12 #include "protected-scm.hh"
13 #include "string.hh"
14 #include "box.hh"
15 #include "lily-proto.hh"
16 #include "lily-guile.hh"
17
18 #if 0
19 /// a symbol which can be translated, and freely copied
20 class Atom {
21   static long smob_tag_;
22
23   static SCM smob_mark (SCM);
24   static scm_sizet smob_free (SCM);
25   static int smob_display (SCM, SCM, scm_print_state*);
26   Atom (SCM s);
27   SCM make_smob () const;
28 public:
29   Offset off_;
30
31   static SCM make_atom (SCM outputfunc);
32   SCM copy_self () const;
33   static Atom *atom_l (SCM);
34
35   /// Is #obj# a Foo?
36   static bool Atom_b(SCM obj);
37   static void init_smob ();
38   
39   SCM func_;
40   SCM font_;
41 };
42
43 #else
44
45 class Atom {
46 public:
47   Atom (SCM s);
48   Offset off_;
49   /*
50     SCM expression that (when evaluated) gives a TeX string
51 representing a musical notation symbol.  */
52   Protected_scm func_;
53   Protected_scm font_;
54 };
55
56 #endif
57
58 #endif