2 paper-system-scheme.cc -- implement Paper_system bindings
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "paper-system.hh"
11 LY_DEFINE (ly_paper_system_height, "ly:paper-system-extent",
12 2, 0, 0, (SCM system, SCM axis),
13 "Return the extent of @var{system}.")
15 Paper_system *ps = unsmob_paper_system (system);
16 SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
17 SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
18 Axis ax = (Axis)scm_to_int (axis);
19 return ly_interval2scm (ps->to_stencil ().extent (ax));
22 LY_DEFINE (ly_paper_system_stencil, "ly:paper-system-stencil",
23 1, 0, 0, (SCM system),
24 "Return the height of @var{system}.")
26 Paper_system *ps = unsmob_paper_system (system);
27 SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
28 return ps->to_stencil ().smobbed_copy ();
33 LY_DEFINE (ly_paper_system_property, "ly:paper-system-property",
34 2, 1, 0, (SCM system, SCM sym, SCM dfault),
35 "Return the value for @var{sym}. Properties may be set by "
36 "setting the @code{line-break-system-details} property of "
37 "NonMusicalPaperColumn. If the property is not found, "
38 "return @var{dfault}, "
39 "or @code{'()} if undefined.")
41 Paper_system *ps = unsmob_paper_system (system);
42 SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
43 if (dfault == SCM_UNDEFINED)
46 SCM retval = ps->internal_get_property (sym);
47 if (retval == SCM_EOL)