source file of the GNU LilyPond music typesetter
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <math.h> // ceil.
SCM
Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
{
- Grob *them = unsmob_element (element_smob);
+ Grob *them = unsmob_grob (element_smob);
Axis a = (Axis) gh_scm2int (axis);
assert (a == Y_AXIS);
- Grob * rc = unsmob_element (them->get_grob_property ("rest-collision"));
+ Grob * rc = unsmob_grob (them->get_grob_property ("rest-collision"));
if (rc)
{
(not?)
*/
- p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
- p->set_grob_property ("rest-collision", me->self_scm ());
+ p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
+ p->set_grob_property ("rest-collision", me->self_scm ());
}
static SCM
head_characteristic (Grob * col)
{
- Grob * s = unsmob_element (col->get_grob_property ("rest"));
+ Grob * s = unsmob_grob (col->get_grob_property ("rest"));
if (!s)
return SCM_BOOL_F;
for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
{
- Grob * e = unsmob_element (gh_car (s));
+ Grob * e = unsmob_grob (gh_car (s));
if (!e)
continue;
else
commony= commony->common_refpoint (e, Y_AXIS);
- if (unsmob_element (e->get_grob_property ("rest")))
+ if (unsmob_grob (e->get_grob_property ("rest")))
rests.push (e);
else
notes.push (e);
display_count = gh_scm2int (s);
for (; i > display_count; i--)
{
- Grob* r = unsmob_element (rests[i-1]->get_grob_property ("rest"));
+ Grob* r = unsmob_grob (rests[i-1]->get_grob_property ("rest"));
if (r)
r->suicide ();
rests[i-1]->suicide ();
// try to be opposite of noteheads.
Direction dir = - Note_column::dir (notes[0]);
- Grob * r = unsmob_element (rcol->get_grob_property ("rest"));
+ Grob * r = unsmob_grob (rcol->get_grob_property ("rest"));
Interval restdim = r->extent (r, Y_AXIS); // ??
if (restdim.empty_b ())