2 music-output-def.hh -- declare Output_def
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #ifndef MUSIC_OUTPUT_DEF_HH
10 #define MUSIC_OUTPUT_DEF_HH
13 #include "lily-proto.hh"
14 #include "virtual-methods.hh"
19 Output settings for a block of music.
21 This devolved into a rather empty class. The distinction between
22 various instances is made in the parser, which creates
23 midi/layout/paper blocks depending on the keyword read.
25 The data structure is set up as recursive: the definitions not
26 supplied in layout are looked up in paper. This is done through
27 the parent_ field of Output_def. However, such nesting is limited to
30 * first because the parser hard-codes the different types
33 * Second, because the prime benefit of multiple levels
34 (eg. paper containing layout for a score, containing layout of a
35 \score embedded in \markup) requires scaling the Stencils (eg. the
36 one coming from score at markup level)
42 VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
43 DECLARE_SMOBS (Output_def,);
50 Output_def (Output_def const&);
56 SCM c_variable (String id) const;
57 SCM lookup_variable (SCM sym) const;
58 void set_variable (SCM sym, SCM val);
59 Real get_dimension (SCM symbol) const;
61 SCM get_font_table (Output_def *def);
62 void assign_context_def (Output_def *m, SCM transdef);
63 SCM find_context_def (Output_def const *m, SCM name);
65 int get_tempo (Output_def*def, Moment moment);
66 void set_tempo (Output_def*def, Moment moment, int count_per_minute_i);
68 Interval line_dimensions_int (Output_def*def, int);
71 Font_metric *select_encoded_font (Output_def *layout, SCM chain);
72 Font_metric *select_font (Output_def *layout, SCM chain);
74 DECLARE_UNSMOB (Output_def, output_def);
77 Font_metric* find_pango_font (Output_def *layout, SCM descr, Real factor);
78 Font_metric *find_scaled_font (Output_def *od, Font_metric *f, Real magnification);
79 Output_def *scale_output_def (Output_def *def, Real scale);
81 Real output_scale (Output_def*);
83 #endif /* MUSIC_OUTPUT_DEF_HH */