*/
#include "span-bar.hh"
+
#include "font-interface.hh"
#include "dimensions.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
#include "stencil.hh"
#include "warn.hh"
#include "axis-group-interface.hh"
-#include "group-interface.hh"
-#include "grob.hh"
#include "bar-line.hh"
void
/* compute common refpoint of elements */
Grob *refp = me;
- for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts))
+ for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts))
{
- SCM smobbed_staff_bar = ly_car (elts);
+ SCM smobbed_staff_bar = scm_car (elts);
Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
refp = staff_bar->common_refpoint (refp, Y_AXIS);
}
/* glyph may not be a string, when ME is killed by Hara Kiri in
between. */
- if (!ly_c_string_p (glyph))
+ if (!scm_is_string (glyph))
return SCM_EOL;
String glyph_string = ly_scm2string (glyph);
Stencil span_bar_mol;
Interval prev_extent;
- for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts))
+ for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts))
{
- SCM smobbed_staff_bar = ly_car (elts);
+ SCM smobbed_staff_bar = scm_car (elts);
Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
Interval ext = staff_bar->extent (refp, Y_AXIS);
if (ext.is_empty ())
Span_bar::width_callback (SCM element_smob, SCM scm_axis)
{
Grob *se = unsmob_grob (element_smob);
- Axis a = (Axis) ly_scm2int (scm_axis);
+ Axis a = (Axis) scm_to_int (scm_axis);
assert (a == X_AXIS);
String gl = ly_scm2string (se->get_property ("glyph"));
SCM
Span_bar::before_line_breaking (SCM smob)
{
- evaluate_empty (unsmob_grob (smob));
- evaluate_glyph (unsmob_grob (smob));
+ Grob * g = unsmob_grob (smob);
+ evaluate_empty (g);
+ evaluate_glyph (g);
/* No need to call Bar_line::before_line_breaking (), because the info
in ELEMENTS already has been procced by
Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
- Axis a = (Axis) ly_scm2int (axis);
+ Axis a = (Axis) scm_to_int (axis);
assert (a == Y_AXIS);
Interval i (get_spanned_interval (me));
/* TODO: filter all hara-kiried out of ELEMENS list, and then
optionally do suicide. Call this cleanage function from
center_on_spanned_callback () as well. */
- if (!ly_c_pair_p (me->get_property ("elements")))
+ if (!scm_is_pair (me->get_property ("elements")))
{
me->suicide ();
}
{
SCM gl = me->get_property ("glyph");
- if (ly_c_string_p (gl))
+ if (scm_is_string (gl))
return ;
for (SCM s = me->get_property ("elements");
- !ly_c_string_p (gl) && ly_c_pair_p (s); s = ly_cdr (s))
+ !scm_is_string (gl) && scm_is_pair (s); s = scm_cdr (s))
{
- gl = unsmob_grob (ly_car (s))
+ gl = unsmob_grob (scm_car (s))
->get_property ("glyph");
}
- if (!ly_c_string_p (gl))
+ if (!scm_is_string (gl))
{
me->suicide ();
return;
{
type = ".|";
}
- else if (type== ":|")
+ else if (type == ":|")
{
type = "|.";
}
- else if (type== ":|:")
+ else if (type == ":|:")
{
type = ".|.";
}