]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-book.hh
716ddd5b3da974c5659f8ed0a988acfe90f83f2b
[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 : public Smob<Paper_book>
31 {
32 public:
33   SCM mark_smob ();
34   static const char type_p_name_[];
35   virtual ~Paper_book ();
36 private:
37   SCM systems_;
38   SCM pages_;
39   SCM performances_;
40
41   void add_score_title (SCM);
42   SCM get_score_title (SCM);
43
44 public:
45   SCM header_;
46   SCM header_0_;
47   SCM scores_;
48   SCM bookparts_;
49   Paper_book *parent_;
50   Output_def *paper_;
51
52   Paper_book ();
53
54   Output_def *top_paper ();
55
56   void add_score (SCM);
57   void add_bookpart (SCM);
58   void add_performance (SCM);
59
60   SCM performances () const;
61   SCM systems ();
62   SCM pages ();
63   SCM get_system_specs ();
64
65   Stencil book_title ();
66   Stencil score_title (SCM);
67
68   void classic_output (SCM output_channel);
69   void output (SCM output_channel);
70
71 protected:
72   void classic_output_aux (SCM output,
73                            long *first_performance_number);
74   long output_aux (SCM output_channel,
75                    bool is_last,
76                    long *first_page_number,
77                    long *first_performance_number);
78 };
79
80
81 #endif /* PAPER_BOOK_HH */