X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frest-collision.cc;h=536ced40e5b7fb75b88b34893da3064ff3faa8bd;hb=a6a51abfd0195a3cf7d6ea095cf69808852f21ce;hp=d82358661fef39edc409175a9adb176312ae6209;hpb=0fe24db3936774a8fb913cb14c997036db7aeb1c;p=lilypond.git diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index d82358661f..536ced40e5 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2014 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,12 +36,13 @@ using namespace std; #include "grob.hh" #include "unpure-pure-container.hh" #include "warn.hh" +#include "lily-imports.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 = Grob::unsmob (rest); + Grob *rest_grob = unsmob (rest); Grob *parent = rest_grob->get_parent (X_AXIS); /* @@ -51,9 +52,9 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM offset) if (scm_is_number (offset)) rest_grob->translate_axis (scm_to_double (offset), Y_AXIS); - if (Note_column::has_interface (parent) && Note_column::has_rests (parent)) + if (has_interface (parent) && Note_column::has_rests (parent)) { - Grob *collision = Grob::unsmob (parent->get_object ("rest-collision")); + Grob *collision = unsmob (parent->get_object ("rest-collision")); if (collision) (void) collision->get_property ("positioning-done"); @@ -69,13 +70,13 @@ Rest_collision::add_column (Grob *me, Grob *p) p->set_object ("rest-collision", me->self_scm ()); - Grob *rest = Grob::unsmob (p->get_object ("rest")); + Grob *rest = unsmob (p->get_object ("rest")); if (rest) { chain_offset_callback (rest, Unpure_pure_container::make_smob (Rest_collision::force_shift_callback_rest_proc, - ly_lily_module_constant ("pure-chain-offset-callback")), + Lily::pure_chain_offset_callback), Y_AXIS); } } @@ -96,7 +97,7 @@ MAKE_SCHEME_CALLBACK (Rest_collision, calc_positioning_done, 1); SCM Rest_collision::calc_positioning_done (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); me->set_property ("positioning-done", SCM_BOOL_T); @@ -108,9 +109,9 @@ Rest_collision::calc_positioning_done (SCM smob) for (vsize i = 0; i < elts.size (); i++) { Grob *e = elts[i]; - if (Note_column::has_interface (e)) + if (has_interface (e)) { - if (Grob::unsmob (e->get_object ("rest"))) + if (unsmob (e->get_object ("rest"))) rests.push_back (e); else notes.push_back (e);