/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2012 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 "staff-symbol-referencer.hh"
#include "stem.hh"
#include "grob.hh"
+#include "unpure-pure-container.hh"
#include "warn.hh"
MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2, 1, "");
SCM
Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
{
- Grob *rest_grob = unsmob_grob (rest);
+ Grob *rest_grob = Grob::unsmob (rest);
Grob *parent = rest_grob->get_parent (X_AXIS);
/*
if (Note_column::has_interface (parent) && Note_column::has_rests (parent))
{
- Grob *collision = unsmob_grob (parent->get_object ("rest-collision"));
+ Grob *collision = Grob::unsmob (parent->get_object ("rest-collision"));
if (collision)
(void) collision->get_property ("positioning-done");
p->set_object ("rest-collision", me->self_scm ());
- Grob *rest = unsmob_grob (p->get_object ("rest"));
+ Grob *rest = Grob::unsmob (p->get_object ("rest"));
if (rest)
{
chain_offset_callback (rest,
- Rest_collision::force_shift_callback_rest_proc, Y_AXIS);
+ ly_make_unpure_pure_container
+ (Rest_collision::force_shift_callback_rest_proc,
+ ly_lily_module_constant ("pure-chain-offset-callback")),
+ Y_AXIS);
}
}
SCM
Rest_collision::calc_positioning_done (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = Grob::unsmob (smob);
me->set_property ("positioning-done", SCM_BOOL_T);
for (vsize i = 0; i < elts.size (); i++)
{
Grob *e = elts[i];
- if (unsmob_grob (e->get_object ("rest")))
+ if (Grob::unsmob (e->get_object ("rest")))
rests.push_back (e);
else
notes.push_back (e);
for (LEFT_and_RIGHT (d))
vector_sort (ordered_rests[d], rest_shift_less);
-
for (LEFT_and_RIGHT (d))
{
if (ordered_rests[d].size () < 1)