2 atom.cc -- implement Atom
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "ly-smobs.icc"
13 #include "interval.hh"
17 #include "dimensions.hh"
20 #include "global-ctor.hh"
21 #include "font-metric.hh"
25 SCM onstack = s; // protection. just to be sure.
32 Atom::mark_smob (SCM s)
34 Atom* a = SMOB_TO_TYPE(Atom, s);
35 assert (s == a->self_scm_);
40 Atom::fontify (Font_metric * met)
42 SCM desc = ly_quote_scm (met->description ());
43 SCM font_switch = gh_list (ly_symbol2scm ("select-font"),
48 func_ = gh_list (ly_symbol2scm ("string-append"),
54 Atom::do_smobify_self ()
58 Atom::Atom (Atom const &s)
66 Atom::print_smob (SCM s, SCM p, scm_print_state*)
68 Atom * a = unsmob_atom (s);
70 scm_puts ("#<Atom off ",p);
71 String str(a->off_.str ());
72 scm_puts ((char *)str.ch_C(), p);
73 scm_display (a->func_, p);
78 IMPLEMENT_UNSMOB(Atom, atom)