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@cs.uu.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 Assoc<int, Lookup *> *lookup_p_assoc_p_;
41 static int default_count_i_;
44 VIRTUAL_COPY_CONS(Paper_def,Music_output_def);
47 virtual ~Paper_def ();
48 DECLARE_MY_RUNTIME_TYPEINFO;
50 Array<Interval> shape_int_a_;
52 Real get_var (String) const;
55 void set_lookup (int, Lookup*);
57 Paper_def (Paper_def const&);
58 /// The distance between beams of multiplicity_i
59 Real interbeam_f (int multiplicity_i) const;
61 /// The thickness of a beam
62 Real beam_thickness_f () const;
64 /// The distance between lines
65 Real interline_f () const;
66 /// half the distance between lines
67 Real internote_f () const;
69 /// thickness of the standard line
70 Real rule_thickness () const;
72 /// thickness of the staff line
73 Real staffline_f () const;
75 Interval line_dimensions_int (int) const;
76 Real linewidth_f () const;
78 /// height of the staff
79 Real staffheight_f () const;
81 /// width of a crotchet ball
82 Real note_width () const;
85 Lookup const * lookup_l (int sz) const; // TODO naming
87 /** convert a duration to an idealspacing
88 influence using the geometric_ and paratime_signatures.
90 Real duration_to_dist (Moment, Real) const;
91 Real geometric_spacing (Moment) const;
92 Real arithmetic_constant (Moment minimal_mom) const;
93 Real arithmetic_spacing (Moment mom,Real constant) const;
94 virtual int get_next_default_count () const;
95 String TeX_output_settings_str () const;
97 friend int yyparse (void*);
100 #endif // Paper_def_HH