]> git.donarmstrong.com Git - lilypond.git/blob - lily/rhythmic-head.cc
release: 1.1.32
[lilypond.git] / lily / rhythmic-head.cc
1 /*
2   rhythmic-head.cc -- implement 
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 #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"
18
19 void
20 Rhythmic_head::do_add_processing ()
21 {
22   if (dots_i_ && !dots_l_)
23     {
24       assert (false);
25       /*      Dots *d = new Dots;
26       add_dots (d);
27       pscore_l_->typeset_element (d);
28
29
30       
31       axis_group_l_a_[Y_AXIS]->add_element (d);
32       axis_group_l_a_[X_AXIS]->add_element (d);*/
33     }
34   if (dots_l_)
35     {
36       dots_l_->no_dots_i_ = dots_i_;
37     }
38 }
39
40 void
41 Rhythmic_head::add_dots (Dots *dot_l)
42 {
43   dots_l_ = dot_l;  
44   dot_l->add_dependency (this);  
45 }
46
47
48 Rhythmic_head::Rhythmic_head ()
49 {
50   dots_l_ =0;
51   balltype_i_ =0;
52   dots_i_ = 0;
53 }
54
55 void
56 Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n)
57 {
58   if (o == dots_l_)
59     dots_l_ = n ? dynamic_cast<Dots *> (n) :0;
60 }
61
62
63 void
64 Rhythmic_head::do_print () const
65 {
66 #ifndef NPRINT
67   DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i_;
68 #endif
69 }
70