2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--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 #ifndef MUSIC_OUTPUT_DEF_HH
21 #define MUSIC_OUTPUT_DEF_HH
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
);
63 Output_def (Output_def
const&);
69 SCM
c_variable (string id
) const;
70 SCM
lookup_variable (SCM sym
) const;
71 void set_variable (SCM sym
, SCM val
);
73 Real
get_dimension (SCM symbol
) const;
75 SCM
get_font_table (Output_def
*def
);
76 void assign_context_def (Output_def
*m
, SCM transdef
);
77 SCM
find_context_def (Output_def
const *m
, SCM name
);
79 Interval
line_dimensions_int (Output_def
*def
, int);
82 Font_metric
*select_encoded_font (Output_def
*layout
, SCM chain
);
83 Font_metric
*select_font (Output_def
*layout
, SCM chain
);
85 DECLARE_UNSMOB (Output_def
, output_def
);
88 Font_metric
* find_pango_font (Output_def
*layout
, SCM descr
, Real factor
);
89 Font_metric
*find_scaled_font (Output_def
*od
, Font_metric
*f
, Real magnification
);
90 Output_def
*scale_output_def (Output_def
*def
, Real scale
);
92 Real
output_scale (Output_def
*);
94 #endif /* MUSIC_OUTPUT_DEF_HH */