2 paper-def.hh -- declare Paper_def
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
12 #include "lily-proto.hh"
18 #include "interval.hh"
19 #include "music-output-def.hh"
23 Symbols, dimensions and constants pertaining to visual output.
25 This struct takes care of all kinds of symbols, dimensions and
26 constants. Most of them are related to the point-size of the fonts,
27 so therefore, the lookup table for symbols is also in here.
31 add support for multiple fontsizes
33 add support for other len->wid conversions.
35 Input_engraver should be in here.
37 class Paper_def : public Music_output_def {
39 Dictionary<Real> *real_vars_p_;
40 static int default_count_i_;
42 VIRTUAL_COPY_CONS(Paper_def,Music_output_def);
44 virtual ~Paper_def ();
45 DECLARE_MY_RUNTIME_TYPEINFO;
47 Array<Interval> shape_int_a_;
50 Set or overwrite a variable
52 void set_var (String, Real);
54 Read a variable. Crash if it doesn't exist.
56 Real get_var (String) const;
61 Paper_def (Paper_def const&);
62 /// The distance between beams of multiplicity_i
63 Real interbeam_f (int multiplicity_i) const;
65 /// The thickness of a beam
66 Real beam_thickness_f () const;
68 /// The distance between lines
69 Real interline_f () const;
70 /// half the distance between lines
71 Real internote_f () const;
73 /// thickness of the standard line
74 Real rule_thickness () const;
76 /// thickness of the staff line
77 Real staffline_f () const;
79 Interval line_dimensions_int (int) const;
80 Real linewidth_f () const;
82 /// height of the staff
83 Real staffheight_f () const;
85 /// width of a crotchet ball
86 Real note_width () const;
89 Lookup const * lookup_l (); // TODO naming
91 /** convert a duration to an idealspacing
92 influence using the geometric_ and parameters.
94 Real duration_to_dist (Moment, Real) const;
95 Real geometric_spacing (Moment) const;
96 Real arithmetic_constant (Moment minimal_mom) const;
97 Real arithmetic_spacing (Moment mom,Real constant) const;
98 virtual int get_next_default_count () const;
99 String TeX_output_settings_str () const;
102 #endif // Paper_def_HH