source file of the GNU LilyPond music typesetter
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "rhythmic-head.hh"
#include "lookup.hh"
#include "rest.hh"
#include "dots.hh"
-#include "axis-group-element.hh"
#include "paper-score.hh"
#include "stem.hh"
+#include "staff-symbol-referencer.hh"
Dots*
Rhythmic_head::dots_l () const
{
- SCM s = get_elt_property ("dot");
+ SCM s = get_elt_pointer ("dot");
return dynamic_cast<Dots*> (unsmob_element (s));
}
+int
+Rhythmic_head::balltype_i () const
+{
+ SCM s = get_elt_property ("duration-log");
+
+ return gh_number_p (s) ? gh_scm2int (s) : 0;
+}
+
Stem*
Rhythmic_head::stem_l () const
{
- SCM s = get_elt_property ("stem");
+ SCM s = get_elt_pointer ("stem");
return dynamic_cast<Stem*> (unsmob_element (s));
}
int
-Rhythmic_head::dots_i () const
+Rhythmic_head::dot_count () const
{
- return dots_l () ? dots_l ()->dots_i_ : 0;
+ return dots_l ()
+ ? gh_scm2int (dots_l ()->get_elt_property ("dot-count")) : 0;
}
-void
-Rhythmic_head::do_post_processing ()
+GLUE_SCORE_ELEMENT(Rhythmic_head,after_line_breaking);
+SCM
+Rhythmic_head::member_after_line_breaking ()
{
- if (dots_l ())
+ if (Dots *d = dots_l ())
{
- dots_l ()->set_position(int (position_f ()));
+ Staff_symbol_referencer_interface si (d);
+ Staff_symbol_referencer_interface me (d);
+ si.set_position(int (me.position_f ()));
}
+
+ return SCM_UNDEFINED;
}
void
Rhythmic_head::add_dots (Dots *dot_l)
{
- set_elt_property ("dot", dot_l->self_scm_);
+ set_elt_pointer ("dot", dot_l->self_scm_);
dot_l->add_dependency (this);
}
-Rhythmic_head::Rhythmic_head ()
-{
- balltype_i_ =0;
-}
-
-
-void
-Rhythmic_head::do_print () const
+Rhythmic_head::Rhythmic_head (SCM s)
+ : Item (s)
{
-#ifndef NPRINT
- DEBUG_OUT << "balltype = "<< balltype_i_ << "dots = " << dots_i ();
-#endif
}
-