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