Make whole notes in solfa style the same width as half notes
[lilypond/mpolesky.git] / lily / paper-book-scheme.cc
blob6f86da8eb4e93e22f2c014ba8694dde1e9601a3d
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "paper-book.hh"
21 #include "ly-module.hh"
22 #include "output-def.hh"
24 LY_DEFINE (ly_paper_book_pages, "ly:paper-book-pages",
25 1, 0, 0, (SCM pb),
26 "Return pages in @code{Paper_book} object @var{pb}.")
28 LY_ASSERT_SMOB (Paper_book, pb, 1);
29 return unsmob_paper_book (pb)->pages ();
32 LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
33 1, 0, 0, (SCM pb),
34 "Return scopes in @code{Paper_book} object @var{pb}.")
36 LY_ASSERT_SMOB (Paper_book, pb, 1);
37 Paper_book *book = unsmob_paper_book (pb);
39 SCM scopes = SCM_EOL;
40 if (book->parent_)
42 scopes = ly_paper_book_scopes (book->parent_->self_scm ());
44 if (ly_is_module (book->header_))
45 scopes = scm_cons (book->header_, scopes);
47 return scopes;
50 LY_DEFINE (ly_paper_book_performances, "ly:paper-book-performances",
51 1, 0, 0, (SCM pb),
52 "Return performances in @code{Paper_book} object @var{pb}.")
54 LY_ASSERT_SMOB (Paper_book, pb, 1);
55 return unsmob_paper_book (pb)->performances ();
58 LY_DEFINE (ly_paper_book_systems, "ly:paper-book-systems",
59 1, 0, 0, (SCM pb),
60 "Return systems in @code{Paper_book} object @var{pb}.")
62 LY_ASSERT_SMOB (Paper_book, pb, 1);
63 return unsmob_paper_book (pb)->systems ();
66 LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
67 1, 0, 0, (SCM pb),
68 "Return the paper output definition (@code{\\paper})"
69 " in @code{Paper_book} object @var{pb}.")
71 LY_ASSERT_SMOB (Paper_book, pb, 1);
72 Paper_book *pbook = unsmob_paper_book (pb);
73 return pbook->paper_->self_scm ();