2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2012 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/>.
23 #include "lily-proto.hh"
24 #include "virtual-methods.hh"
29 Output settings for a block of music.
31 This devolved into a rather empty class. The distinction between
32 various instances is made in the parser, which creates
33 midi/layout/paper blocks depending on the keyword read.
35 The data structure is set up as recursive: the definitions not
36 supplied in layout are looked up in paper. This is done through
37 the parent_ field of Output_def. However, such nesting is limited to
40 * first because the parser hard-codes the different types
43 * Second, because the prime benefit of multiple levels
44 (eg. paper containing layout for a score, containing layout of a
45 \score embedded in \markup) requires scaling the Stencils (eg. the
46 one coming from score at markup level)
53 VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
54 DECLARE_SMOBS (Output_def);
62 Output_def (Output_def const&);
68 SCM c_variable (string id) const;
69 SCM lookup_variable (SCM sym) const;
70 void set_variable (SCM sym, SCM val);
72 Real get_dimension (SCM symbol) const;
74 SCM get_font_table (Output_def *def);
75 void assign_context_def (Output_def *m, SCM transdef);
76 SCM find_context_def (Output_def const *m, SCM name);
78 Interval line_dimensions_int (Output_def *def, int);
81 Font_metric *select_encoded_font (Output_def *layout, SCM chain);
82 Font_metric *select_font (Output_def *layout, SCM chain);
84 DECLARE_UNSMOB (Output_def, output_def);
87 Font_metric* find_pango_font (Output_def *layout, SCM descr, Real factor);
88 Font_metric *find_scaled_font (Output_def *od, Font_metric *f,
90 Output_def *scale_output_def (Output_def *def, Real scale);
92 Real output_scale (Output_def*);
94 #endif /* OUTPUT_DEF_HH */