lilypond-0.1.56
[lilypond.git] / lily / rhythmic-head.cc
blob616b8bf8cd27dafb0040a908020b3c3ff93c26a4
1 /*
2 rhythmic-head.cc -- implement
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "rhythmic-head.hh"
10 #include "debug.hh"
11 #include "molecule.hh"
12 #include "paper-def.hh"
13 #include "lookup.hh"
14 #include "rest.hh"
15 #include "dots.hh"
16 #include "axis-group-element.hh"
17 #include "p-score.hh"
19 void
20 Rhythmic_head::do_add_processing ()
22 if (dots_i_ && !dots_l_)
24 Dots *d = new Dots;
25 add (d);
26 pscore_l_->typeset_element (d);
27 axis_group_l_a_[Y_AXIS]->add_element (d);
28 axis_group_l_a_[X_AXIS]->add_element (d);
30 if (dots_l_)
32 dots_l_->no_dots_i_ = dots_i_;
36 void
37 Rhythmic_head::add (Dots *dot_l)
39 dots_l_ = dot_l;
40 dot_l->add_dependency (this);
44 Rhythmic_head::Rhythmic_head ()
46 dots_l_ =0;
47 balltype_i_ =0;
48 dots_i_ = 0;
51 void
52 Rhythmic_head::do_substitute_dependent (Score_elem*o,Score_elem*n)
54 if (o == dots_l_)
55 dots_l_ = n ? (Dots*)n->item () :0;
58 IMPLEMENT_IS_TYPE_B1(Rhythmic_head, Item);
59 void
60 Rhythmic_head::do_print () const
62 #ifndef NPRINT
63 DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i_;
64 #endif