source file of the GNU LilyPond music typesetter
- (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "spanner.hh"
#include "tie-column.hh"
+
+#include "spanner.hh"
#include "group-interface.hh"
#include "tie.hh"
#include "directional-element-interface.hh"
#include "rhythmic-head.hh"
-
-
-
-
-
/*
tie dir depends on what Tie_column does.
*/
-
+/*
+ TODO: this doesn't follow standard pattern. Regularize.
+ */
void
Tie_column::add_tie (Grob*me,Grob *s)
{
&& Tie_column::has_interface (s->get_parent (Y_AXIS)))
return ;
- if (! Pointer_group_interface::count (me, "ties"))
+ if (!Pointer_group_interface::count (me, ly_symbol2scm ("ties")))
{
dynamic_cast<Spanner*> (me)->set_bound (LEFT, Tie::head (s,LEFT));
dynamic_cast<Spanner*> (me)->set_bound (RIGHT, Tie::head (s,RIGHT));
{
werner_directions (me);
}
-
-
int
tie_compare (Grob* const & s1,
for (int i = ties.size (); i--;)
if (get_grob_direction (ties[i]))
ties.del (i);
-
if (!ties.size ())
return ;
-
Direction d = get_grob_direction (me);
if (d)
ties.del (0);
set_grob_direction (ties.pop (), UP);
- for (int i=ties.size (); i--;)
+ for (int i = ties.size (); i--;)
{
Grob * t = ties[i];
Real p = Tie::get_position (t);
if (ties.size () == 1)
{
- Grob * t = ties[0];
- set_grob_direction (t,Tie::get_default_dir (t));
+ Grob * t = ties[0];
+ if (t->is_live ()
+ && !get_grob_direction (t))
+ set_grob_direction (t,Tie::get_default_dir (t));
return ;
}
ADD_INTERFACE (Tie_column,"tie-column-interface",
- "that sets tie directions in a tied chord",
+ "Object that sets directions of multiple ties in a tied chord",
"direction");