]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-book.hh
a0ccbe82cc44b13bafef4d3273f52972b51a07b8
[lilypond.git] / lily / include / paper-book.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2004--2014  Jan Nieuwenhuizen <janneke@gnu.org>
5
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.
10
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.
15
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/>.
18 */
19 #ifndef PAPER_BOOK_HH
20 #define PAPER_BOOK_HH
21
22 #include "std-vector.hh"
23 #include "smobs.hh"
24 #include "lily-proto.hh"
25
26 /** Paper_book collects headers, systems (Paper_system) and texts, and
27     exports them to the output backend, either as systems or as
28     completely formatted pages.  */
29
30 class Paper_book
31 {
32   DECLARE_SMOBS (Paper_book);
33
34   SCM systems_;
35   SCM pages_;
36   SCM performances_;
37
38   void add_score_title (SCM);
39   SCM get_score_title (SCM);
40
41 public:
42   SCM header_;
43   SCM header_0_;
44   SCM scores_;
45   SCM bookparts_;
46   Paper_book *parent_;
47   Output_def *paper_;
48
49   Paper_book ();
50
51   Output_def *top_paper ();
52
53   void add_score (SCM);
54   void add_bookpart (SCM);
55   void add_performance (SCM);
56
57   SCM performances () const;
58   SCM systems ();
59   SCM pages ();
60   SCM get_system_specs ();
61
62   Stencil book_title ();
63   Stencil score_title (SCM);
64
65   void classic_output (SCM output_channel);
66   void output (SCM output_channel);
67
68 protected:
69   void classic_output_aux (SCM output,
70                            long *first_performance_number);
71   long output_aux (SCM output_channel,
72                    bool is_last,
73                    long *first_page_number,
74                    long *first_performance_number);
75 };
76
77 DECLARE_UNSMOB (Paper_book, paper_book)
78
79 #endif /* PAPER_BOOK_HH */