/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "note-column.hh"
-#include <cmath> // ceil
+#include <cmath> // ceil
using namespace std;
#include "accidental-placement.hh"
return unsmob_item (s);
}
+Item *
+Note_column::get_flag (Grob *me)
+{
+ Item *stem = get_stem (me);
+ if (stem)
+ {
+ SCM s = stem->get_object ("flag");
+ return unsmob_item (s);
+ }
+ return 0;
+}
+
Slice
Note_column::head_positions_interval (Grob *me)
{
{
extract_grob_set (me, "note-heads", heads);
if (heads.size ())
- return (Direction)sign (head_positions_interval (me).center ());
+ return (Direction)sign (head_positions_interval (me).center ());
}
programming_error ("note column without heads and stem");
{
extract_grob_set (me, "note-heads", heads);
if (heads.size ())
- both = true;
+ both = true;
else
- me->set_object ("rest", h->self_scm ());
+ me->set_object ("rest", h->self_scm ());
}
else if (Note_head::has_interface (h))
{
if (unsmob_grob (me->get_object ("rest")))
- both = true;
+ both = true;
Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), h);
}
Grob *h = heads[i];
acc = h ? unsmob_grob (h->get_object ("accidental-grob")) : 0;
if (acc)
- break;
+ break;
}
if (!acc)
{
Grob *dots = unsmob_grob (heads[i]->get_object ("dot"));
if (dots)
- return dots->get_parent (X_AXIS);
+ return dots->get_parent (X_AXIS);
}
return 0;
}
-Grob *
-Note_column::arpeggio (Grob *me)
-{
- return unsmob_grob (me->get_object ("arpeggio"));
-}
-
/* If a note-column contains a cross-staff stem then
nc->extent (Y_AXIS, refp) will not consider the extent of the stem.
If you want the extent of the stem to be included (and you are safe
}
ADD_INTERFACE (Note_column,
- "Stem and noteheads combined.",
-
- /* properties */
- "arpeggio "
- "force-hshift "
- "horizontal-shift "
- "ignore-collision "
- "note-heads "
- "rest "
- "rest-collision "
- "stem "
- );
+ "Stem and noteheads combined.",
+
+ /* properties */
+ "force-hshift "
+ "horizontal-shift "
+ "ignore-collision "
+ "note-heads "
+ "rest "
+ "rest-collision "
+ "stem "
+ );