/*
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
SCM
Rest::y_offset_callback (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = Grob::unsmob (smob);
int duration_log = scm_to_int (me->get_property ("duration-log"));
Real ss = Staff_symbol_referencer::staff_space (me);
SCM
Rest::calc_cross_staff (SCM smob)
{
- Grob *me = unsmob_grob (smob);
- Grob *stem = unsmob_grob (me->get_object ("stem"));
+ Grob *me = Grob::unsmob (smob);
+ Grob *stem = Grob::unsmob (me->get_object ("stem"));
if (!stem)
return SCM_BOOL_F;
make this function easily usable in C++
*/
string
-Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers,
+Rest::glyph_name (Grob *me, int durlog, const string &style, bool try_ledgers,
Real offset)
{
bool is_ledgered = false;
actual_style = "";
}
- return ("rests." + to_string (durlog) + (is_ledgered ? "o" : "")
+ return ("rests." + ::to_string (durlog) + (is_ledgered ? "o" : "")
+ actual_style);
}
SCM
Rest::print (SCM smob)
{
- return brew_internal_stencil (unsmob_grob (smob), true);
+ return brew_internal_stencil (Grob::unsmob (smob), true);
}
MAKE_SCHEME_CALLBACK (Rest, width, 1);
SCM
Rest::width (SCM smob)
{
- return generic_extent_callback (unsmob_grob (smob), X_AXIS);
+ return generic_extent_callback (Grob::unsmob (smob), X_AXIS);
}
MAKE_SCHEME_CALLBACK (Rest, height, 1);
SCM
Rest::height (SCM smob)
{
- return generic_extent_callback (unsmob_grob (smob), Y_AXIS);
+ return generic_extent_callback (Grob::unsmob (smob), Y_AXIS);
}
/*
with ledgered rests.
*/
SCM m = brew_internal_stencil (me, a != X_AXIS);
- return ly_interval2scm (unsmob_stencil (m)->extent (a));
+ return ly_interval2scm (Stencil::unsmob (m)->extent (a));
}
MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
SCM /* start */,
SCM /* end */)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = Grob::unsmob (smob);
SCM m = brew_internal_stencil (me, false);
- return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
+ return ly_interval2scm (Stencil::unsmob (m)->extent (Y_AXIS));
}
ADD_INTERFACE (Rest,